MCPcopy Index your code
hub / github.com/nodejs/node / executeModuleJob

Method executeModuleJob

lib/internal/modules/esm/loader.js:223–240  ·  view source on GitHub ↗

* * @param {string} url URL of the module. * @param {object} wrap Module wrap object. * @param {boolean} isEntryPoint Whether the module is the entry point. * @returns {Promise } The module object.

(url, wrap, isEntryPoint = false)

Source from the content-addressed store, hash-verified

221 * @returns {Promise<object>} The module object.
222 */
223 async executeModuleJob(url, wrap, isEntryPoint = false) {
224 const module = await onImport.tracePromise(async () => {
225 const job = new ModuleJob(this, url, undefined, wrap, kEvaluationPhase, false, false, kImportInImportedESM);
226 this.loadCache.set(url, undefined, job);
227 const { module } = await job.run(isEntryPoint);
228 return module;
229 }, {
230 __proto__: null,
231 parentURL: '<eval>',
232 url,
233 });
234
235 return {
236 __proto__: null,
237 namespace: module.getNamespace(),
238 module,
239 };
240 }
241
242 /**
243 *

Callers 2

evalMethod · 0.95

Calls 3

runMethod · 0.95
tracePromiseMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected