Compile Commentscript Commentscript is a variant on Javascript that I made up for the purpose of this question. Only commented-out code is evaluated.
Javascript has two types of comments:
// this is a single line comment, which starts with `//` and ends on a newline.

/*
This is a multiline comment.
It starts with /* and ends with */

Example:
//console.log('goodbye world')
console.log('hello world')

will output goodbye world to the console.
Your challenge is to compile Commentscript code into regular Javascript.
Scoring
This is code-golf, so shortest bytes wins!
Clarifications
Nested comments like // comment // nested comment should just have the top-level comment removed, for example comment // nested comment.
To avoid complications, comments in strings should be read as comments, e.g. 'abc //' def //ghi =&gt; ' def //ghi
Newlines from single line comments should be kept, but ones by multiline comments shouldn't.
Ignore shebangs, e.g. #! /usr/bin/env node
//a
//b
=&gt;
a
b


/*a*/


/*b*/
=&gt;
ab

Test cases
//console.log('hello world') =&gt; console.log('hello world')

//console.log('hello world')//do stuff =&gt; console.log('hello world')//do stuff

/*var a = 5;*/function f(){}/*console.log(a)*/ =&gt; var a = 5; console.log(a)

/////////// =&gt; /////////

//console.log('hello world')/*More nested comments*/ =&gt; console.log('hello world')/*More nested comments*/

&quot;abc //&quot; def //ghi =&gt; &quot; def //ghi

//a
//b
=&gt;
a
b

/*a*//*b*/ =&gt; ab

//a



//b

//c
=&gt;
a
b
c

/*
for(var x of array){
    console.log(x)
}
*/
=&gt; 
for(var x of array){
    console.log(x)
}


/*
//this is a comment
*/

=&gt;

//this is a comment


#!/usr/bin/env node =&gt;  [NOTHING]
Retina 0.8.2, 63 bytes
(//.*|/\*(.|¶)*?\*/|¶)|.
$1
//(.*)|/\*((.|¶)*?)\*/|(¶)¶*
$1$2$4

Try it online! Link includes test cases, but the newline-collapsing rule means that they're not double-separated on output. Explanation:
(//.*|/\*(.|¶)*?\*/|¶)|.
$1

Delete anything not a newline or comment.
//(.*)|/\*((.|¶)*?)\*/|(¶)¶*
$1$2$4

Keep the content of comments and one newline of consecutive newlines.