| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,16 +5,16 @@ const experimentalImportMetaResolve = getOptionValue('--experimental-import-meta | |||
| 5 | 5 | ||
| 6 | 6 | /** | |
| 7 | 7 | * Generate a function to be used as import.meta.resolve for a particular module. | |
| 8 | - * @param {string} defaultParentUrl The default base to use for resolution | ||
| 8 | + * @param {string} defaultParentURL The default base to use for resolution | ||
| 9 | 9 | * @param {typeof import('./loader.js').ModuleLoader} loader Reference to the current module loader | |
| 10 | - * @returns {(specifier: string, parentUrl?: string) => string} Function to assign to import.meta.resolve | ||
| 10 | + * @returns {(specifier: string, parentURL?: string) => string} Function to assign to import.meta.resolve | ||
| 11 | 11 | */ | |
| 12 | - function createImportMetaResolve(defaultParentUrl, loader) { | ||
| 13 | - return function resolve(specifier, parentUrl = defaultParentUrl) { | ||
| 12 | + function createImportMetaResolve(defaultParentURL, loader) { | ||
| 13 | + return function resolve(specifier, parentURL = defaultParentURL) { | ||
| 14 | 14 | let url; | |
| 15 | 15 | ||
| 16 | 16 | try { | |
| 17 | - ({ url } = loader.resolveSync(specifier, parentUrl)); | ||
| 17 | + ({ url } = loader.resolveSync(specifier, parentURL)); | ||
| 18 | 18 | } catch (error) { | |
| 19 | 19 | if (error?.code === 'ERR_UNSUPPORTED_DIR_IMPORT') { | |
| 20 | 20 | ({ url } = error); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -152,7 +152,7 @@ class ModuleLoader { | |||
| 152 | 152 | * string, parentURL: string, | |
| 153 | 153 | * importAssertions: Record<string, string> | |
| 154 | 154 | * ) ResolveResult; | |
| 155 | - * register(specifier: string, parentUrl: string): any; | ||
| 155 | + * register(specifier: string, parentURL: string): any; | ||
| 156 | 156 | * forceLoadHooks(): void; | |
| 157 | 157 | * } | |
| 158 | 158 | * ``` | |
@@ -307,15 +307,15 @@ class ModuleLoader { | |||
| 307 | 307 | return module.getNamespace(); | |
| 308 | 308 | } | |
| 309 | 309 | ||
| 310 | - register(specifier, parentUrl) { | ||
| 310 | + register(specifier, parentURL) { | ||
| 311 | 311 | if (!this.#customizations) { | |
| 312 | 312 | // `CustomizedModuleLoader` is defined at the bottom of this file and | |
| 313 | 313 | // available well before this line is ever invoked. This is here in | |
| 314 | 314 | // order to preserve the git diff instead of moving the class. | |
| 315 | 315 | // eslint-disable-next-line no-use-before-define | |
| 316 | 316 | this.setCustomizations(new CustomizedModuleLoader()); | |
| 317 | 317 | } | |
| 318 | - return this.#customizations.register(specifier, parentUrl); | ||
| 318 | + return this.#customizations.register(specifier, parentURL); | ||
| 319 | 319 | } | |
| 320 | 320 | ||
| 321 | 321 | /** | |
| Back | FazBrowse Home | New Git URL |
0 commit comments