@@ -321,14 +321,14 @@ class ESMLoader {
321321 * @param {string } specifier The string after `from` in an `import` statement,
322322 * or the first parameter of an `import()`
323323 * expression
324- * @param {string | undefined } parentURL The URL of the module importing this
324+ * @param {string | undefined } parentUrl The URL of the module importing this
325325 * one, unless this is the Node.js entry
326326 * point.
327327 * @param {Record<string, string> } importAssertions Validations for the
328328 * module import.
329329 * @returns {Promise<ModuleJob> } The (possibly pending) module job
330330 */
331- async getModuleJob ( specifier , parentURL , importAssertions ) {
331+ async getModuleJob ( specifier , parentUrl , importAssertions ) {
332332 let importAssertionsForResolve ;
333333
334334 // By default, `this.#loaders` contains just the Node default load hook
@@ -342,7 +342,7 @@ class ESMLoader {
342342 }
343343
344344 const { format, url } =
345- await this . resolve ( specifier , parentURL , importAssertionsForResolve ) ;
345+ await this . resolve ( specifier , parentUrl , importAssertionsForResolve ) ;
346346
347347 let job = this . moduleMap . get ( url , importAssertions . type ) ;
348348
@@ -352,7 +352,7 @@ class ESMLoader {
352352 }
353353
354354 if ( job === undefined ) {
355- job = this . #createModuleJob( url , importAssertions , parentURL , format ) ;
355+ job = this . #createModuleJob( url , importAssertions , parentUrl , format ) ;
356356 }
357357
358358 return job ;
@@ -363,17 +363,17 @@ class ESMLoader {
363363 * @param {string } url The absolute URL that was resolved for this module
364364 * @param {Record<string, string> } importAssertions Validations for the
365365 * module import.
366- * @param {string } [parentURL ] The absolute URL of the module importing this
366+ * @param {string } [parentUrl ] The absolute URL of the module importing this
367367 * one, unless this is the Node.js entry point
368368 * @param {string } [format] The format hint possibly returned by the
369369 * `resolve` hook
370370 * @returns {Promise<ModuleJob> } The (possibly pending) module job
371371 */
372- #createModuleJob( url , importAssertions , parentURL , format ) {
372+ #createModuleJob( url , importAssertions , parentUrl , format ) {
373373 const moduleProvider = async ( url , isMain ) => {
374374 const {
375375 format : finalFormat ,
376- responseURL ,
376+ responseUrl ,
377377 source,
378378 } = await this . load ( url , {
379379 format,
@@ -383,14 +383,14 @@ class ESMLoader {
383383 const translator = translators . get ( finalFormat ) ;
384384
385385 if ( ! translator ) {
386- throw new ERR_UNKNOWN_MODULE_FORMAT ( finalFormat , responseURL ) ;
386+ throw new ERR_UNKNOWN_MODULE_FORMAT ( finalFormat , responseUrl ) ;
387387 }
388388
389- return FunctionPrototypeCall ( translator , this , responseURL , source , isMain ) ;
389+ return FunctionPrototypeCall ( translator , this , responseUrl , source , isMain ) ;
390390 } ;
391391
392392 const inspectBrk = (
393- parentURL === undefined &&
393+ parentUrl === undefined &&
394394 getOptionValue ( '--inspect-brk' )
395395 ) ;
396396
@@ -399,7 +399,7 @@ class ESMLoader {
399399 url ,
400400 importAssertions ,
401401 moduleProvider ,
402- parentURL === undefined ,
402+ parentUrl === undefined ,
403403 inspectBrk
404404 ) ;
405405
@@ -416,14 +416,14 @@ class ESMLoader {
416416 * loader module.
417417 *
418418 * @param {string | string[] } specifiers Path(s) to the module.
419- * @param {string } parentURL Path of the parent importing the module.
419+ * @param {string } parentUrl Path of the parent importing the module.
420420 * @param {Record<string, string> } importAssertions Validations for the
421421 * module import.
422422 * @returns {Promise<ExportedHooks | KeyedExports[]> }
423423 * A collection of module export(s) or a list of collections of module
424424 * export(s).
425425 */
426- async import ( specifiers , parentURL , importAssertions ) {
426+ async import ( specifiers , parentUrl , importAssertions ) {
427427 // For loaders, `import` is passed multiple things to process, it returns a
428428 // list pairing the url and exports collected. This is especially useful for
429429 // error messaging, to identity from where an export came. But, in most
@@ -439,7 +439,7 @@ class ESMLoader {
439439 const jobs = new Array ( count ) ;
440440
441441 for ( let i = 0 ; i < count ; i ++ ) {
442- jobs [ i ] = this . getModuleJob ( specifiers [ i ] , parentURL , importAssertions )
442+ jobs [ i ] = this . getModuleJob ( specifiers [ i ] , parentUrl , importAssertions )
443443 . then ( ( job ) => job . run ( ) )
444444 . then ( ( { module } ) => module . getNamespace ( ) ) ;
445445 }
@@ -550,27 +550,27 @@ class ESMLoader {
550550 format,
551551 source,
552552 } = loaded ;
553- let responseURL = loaded . responseURL ;
553+ let responseUrl = loaded . responseUrl ;
554554
555- if ( responseURL === undefined ) {
556- responseURL = url ;
555+ if ( responseUrl === undefined ) {
556+ responseUrl = url ;
557557 }
558558
559- let responseURLObj ;
560- if ( typeof responseURL === 'string' ) {
559+ let responseURL ;
560+ if ( typeof responseUrl === 'string' ) {
561561 try {
562- responseURLObj = new URL ( responseURL ) ;
562+ responseURL = new URL ( responseUrl ) ;
563563 } catch {
564- // responseURLObj not defined will throw in next branch.
564+ // responseURL not defined will throw in next branch.
565565 }
566566 }
567567
568- if ( responseURLObj ?. href !== responseURL ) {
568+ if ( responseURL ?. href !== responseUrl ) {
569569 throw new ERR_INVALID_RETURN_PROPERTY_VALUE (
570570 'undefined or a fully resolved URL string' ,
571571 hookErrIdentifier ,
572- 'responseURL ' ,
573- responseURL ,
572+ 'responseUrl ' ,
573+ responseUrl ,
574574 ) ;
575575 }
576576
@@ -610,7 +610,7 @@ class ESMLoader {
610610
611611 return {
612612 format,
613- responseURL ,
613+ responseUrl ,
614614 source,
615615 } ;
616616 }
@@ -713,27 +713,27 @@ class ESMLoader {
713713 *
714714 * @param {string } originalSpecifier The specified URL path of the module to
715715 * be resolved.
716- * @param {string } [parentURL ] The URL path of the module's parent.
716+ * @param {string } [parentUrl ] The URL path of the module's parent.
717717 * @param {ImportAssertions } [importAssertions] Assertions from the import
718718 * statement or expression.
719719 * @returns {{ format: string, url: URL['href'] } }
720720 */
721721 async resolve (
722722 originalSpecifier ,
723- parentURL ,
723+ parentUrl ,
724724 importAssertions = ObjectCreate ( null )
725725 ) {
726- const isMain = parentURL === undefined ;
726+ const isMain = parentUrl === undefined ;
727727
728728 if (
729729 ! isMain &&
730- typeof parentURL !== 'string' &&
731- ! isURLInstance ( parentURL )
730+ typeof parentUrl !== 'string' &&
731+ ! isURLInstance ( parentUrl )
732732 ) {
733733 throw new ERR_INVALID_ARG_TYPE (
734- 'parentURL ' ,
734+ 'parentUrl ' ,
735735 [ 'string' , 'URL' ] ,
736- parentURL ,
736+ parentUrl ,
737737 ) ;
738738 }
739739 const resolvers = this . #resolvers;
@@ -749,7 +749,7 @@ class ESMLoader {
749749 const context = {
750750 conditions : DEFAULT_CONDITIONS ,
751751 importAssertions,
752- parentURL ,
752+ parentUrl ,
753753 } ;
754754
755755 const nextResolve = async ( suppliedSpecifier , ctx = context ) => {
0 commit comments