@@ -30,7 +30,7 @@ const resolvedPromise = PromiseResolve();
30
30
let debug = require ( 'internal/util/debuglog' ) . debuglog ( 'esm' , ( fn ) => {
31
31
debug = fn ;
32
32
} ) ;
33
- const { writeFileSync } = require ( 'fs' ) ;
33
+ // const { writeFileSync } = require('fs');
34
34
35
35
const noop = FunctionPrototype ;
36
36
@@ -114,21 +114,21 @@ class ModuleJob {
114
114
}
115
115
116
116
async _instantiate ( ) {
117
- writeFileSync ( 1 , 'ModuleJob::instantiate()\n' ) ;
117
+ // writeFileSync(1, 'ModuleJob::instantiate()\n');
118
118
const jobsInGraph = new SafeSet ( ) ;
119
119
const addJobsToDependencyGraph = async ( moduleJob ) => {
120
120
if ( jobsInGraph . has ( moduleJob ) ) {
121
121
return ;
122
122
}
123
123
jobsInGraph . add ( moduleJob ) ;
124
- writeFileSync ( 1 , 'ModuleJob::instantiate() getting linked jobs\n' ) ;
124
+ // writeFileSync(1, 'ModuleJob::instantiate() getting linked jobs\n');
125
125
const dependencyJobs = await moduleJob . linked ;
126
- writeFileSync ( 1 , 'ModuleJob::instantiate() got linked jobs\n' ) ;
126
+ // writeFileSync(1, 'ModuleJob::instantiate() got linked jobs\n');
127
127
return SafePromiseAllReturnVoid ( dependencyJobs , addJobsToDependencyGraph ) ;
128
128
} ;
129
129
await addJobsToDependencyGraph ( this ) ;
130
130
131
- writeFileSync ( 1 , 'ModuleJob::instantiate() job added to dep graph\n' ) ;
131
+ // writeFileSync(1, 'ModuleJob::instantiate() job added to dep graph\n');
132
132
try {
133
133
if ( ! hasPausedEntry && this . inspectBrk ) {
134
134
hasPausedEntry = true ;
@@ -138,7 +138,7 @@ class ModuleJob {
138
138
this . module . instantiate ( ) ;
139
139
}
140
140
} catch ( e ) {
141
- writeFileSync ( 1 , `ModuleJob::instantiate() error: ${ e . stack } \n` ) ;
141
+ // writeFileSync(1, `ModuleJob::instantiate() error: ${e.stack}\n`);
142
142
decorateErrorStack ( e ) ;
143
143
// TODO(@bcoe): Add source map support to exception that occurs as result
144
144
// of missing named export. This is currently not possible because
@@ -218,16 +218,16 @@ class ModuleJob {
218
218
}
219
219
220
220
async run ( ) {
221
- writeFileSync ( 1 , `ModuleJob::run() instantiating: ${ this . url } \n` ) ;
221
+ // writeFileSync(1, `ModuleJob::run() instantiating: ${this.url}\n`);
222
222
await this . instantiate ( ) ;
223
- writeFileSync ( 1 , `ModuleJob::run() instantiated: ${ this . url } \n` ) ;
223
+ // writeFileSync(1, `ModuleJob::run() instantiated: ${this.url}\n`);
224
224
const timeout = - 1 ;
225
225
const breakOnSigint = false ;
226
226
try {
227
227
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`);
229
229
} catch ( e ) {
230
- writeFileSync ( 1 , `ModuleJob::run() error: ${ e . stack } \n` ) ;
230
+ // writeFileSync(1, `ModuleJob::run() error: ${e.stack}\n`);
231
231
if ( e ?. name === 'ReferenceError' &&
232
232
isCommonJSGlobalLikeNotDefinedError ( e . message ) ) {
233
233
e . message += ' in ES module scope' ;
@@ -249,7 +249,7 @@ class ModuleJob {
249
249
'to use the \'.cjs\' file extension.' ;
250
250
}
251
251
}
252
- writeFileSync ( 1 , `ModuleJob::run() throwing error: ${ e . stack } \n` ) ;
252
+ // writeFileSync(1, `ModuleJob::run() throwing error: ${e.stack}\n`);
253
253
throw e ;
254
254
}
255
255
return { __proto__ : null , module : this . module } ;
0 commit comments