@@ -30,7 +30,7 @@ const resolvedPromise = PromiseResolve();
3030let debug = require ( 'internal/util/debuglog' ) . debuglog ( 'esm' , ( fn ) => {
3131 debug = fn ;
3232} ) ;
33- const { writeFileSync } = require ( 'fs' ) ;
33+ // const { writeFileSync } = require('fs');
3434
3535const noop = FunctionPrototype ;
3636
@@ -114,21 +114,21 @@ class ModuleJob {
114114 }
115115
116116 async _instantiate ( ) {
117- writeFileSync ( 1 , 'ModuleJob::instantiate()\n' ) ;
117+ // writeFileSync(1, 'ModuleJob::instantiate()\n');
118118 const jobsInGraph = new SafeSet ( ) ;
119119 const addJobsToDependencyGraph = async ( moduleJob ) => {
120120 if ( jobsInGraph . has ( moduleJob ) ) {
121121 return ;
122122 }
123123 jobsInGraph . add ( moduleJob ) ;
124- writeFileSync ( 1 , 'ModuleJob::instantiate() getting linked jobs\n' ) ;
124+ // writeFileSync(1, 'ModuleJob::instantiate() getting linked jobs\n');
125125 const dependencyJobs = await moduleJob . linked ;
126- writeFileSync ( 1 , 'ModuleJob::instantiate() got linked jobs\n' ) ;
126+ // writeFileSync(1, 'ModuleJob::instantiate() got linked jobs\n');
127127 return SafePromiseAllReturnVoid ( dependencyJobs , addJobsToDependencyGraph ) ;
128128 } ;
129129 await addJobsToDependencyGraph ( this ) ;
130130
131- writeFileSync ( 1 , 'ModuleJob::instantiate() job added to dep graph\n' ) ;
131+ // writeFileSync(1, 'ModuleJob::instantiate() job added to dep graph\n');
132132 try {
133133 if ( ! hasPausedEntry && this . inspectBrk ) {
134134 hasPausedEntry = true ;
@@ -138,7 +138,7 @@ class ModuleJob {
138138 this . module . instantiate ( ) ;
139139 }
140140 } catch ( e ) {
141- writeFileSync ( 1 , `ModuleJob::instantiate() error: ${ e . stack } \n` ) ;
141+ // writeFileSync(1, `ModuleJob::instantiate() error: ${e.stack}\n`);
142142 decorateErrorStack ( e ) ;
143143 // TODO(@bcoe): Add source map support to exception that occurs as result
144144 // of missing named export. This is currently not possible because
@@ -218,16 +218,16 @@ class ModuleJob {
218218 }
219219
220220 async run ( ) {
221- writeFileSync ( 1 , `ModuleJob::run() instantiating: ${ this . url } \n` ) ;
221+ // writeFileSync(1, `ModuleJob::run() instantiating: ${this.url}\n`);
222222 await this . instantiate ( ) ;
223- writeFileSync ( 1 , `ModuleJob::run() instantiated: ${ this . url } \n` ) ;
223+ // writeFileSync(1, `ModuleJob::run() instantiated: ${this.url}\n`);
224224 const timeout = - 1 ;
225225 const breakOnSigint = false ;
226226 try {
227227 await this . module . evaluate ( timeout , breakOnSigint ) ;
228- writeFileSync ( 1 , `ModuleJob::run() evaluation complete: ${ this . module } \n` ) ;
228+ // writeFileSync(1, `ModuleJob::run() evaluation complete: ${this.module}\n`);
229229 } catch ( e ) {
230- writeFileSync ( 1 , `ModuleJob::run() error: ${ e . stack } \n` ) ;
230+ // writeFileSync(1, `ModuleJob::run() error: ${e.stack}\n`);
231231 if ( e ?. name === 'ReferenceError' &&
232232 isCommonJSGlobalLikeNotDefinedError ( e . message ) ) {
233233 e . message += ' in ES module scope' ;
@@ -249,7 +249,7 @@ class ModuleJob {
249249 'to use the \'.cjs\' file extension.' ;
250250 }
251251 }
252- writeFileSync ( 1 , `ModuleJob::run() throwing error: ${ e . stack } \n` ) ;
252+ // writeFileSync(1, `ModuleJob::run() throwing error: ${e.stack}\n`);
253253 throw e ;
254254 }
255255 return { __proto__ : null , module : this . module } ;
0 commit comments