Skip to content

Commit 42428d9

Browse files
committed
loader: revert changes
1 parent f8de5d5 commit 42428d9

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/internal/modules/esm/get_format.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ function isExperimentalTextImport(importAttributes) {
243243

244244
/**
245245
* @param {URL} url
246-
* @param {{parentURL: string, importAttributes?: string}} context
246+
* @param {{parentURL: string, importAttributes?: Record<string, string>}} context
247247
* @returns {Promise<string> | string | undefined} only works when enabled
248248
*/
249249
function defaultGetFormatWithoutErrors(url, context) {
@@ -260,8 +260,8 @@ function defaultGetFormatWithoutErrors(url, context) {
260260

261261
/**
262262
* @param {URL} url
263-
* @param {{parentURL: string}} context
264-
* @returns {Promise<string> | string | undefined} only works when enabled
263+
* @param {{parentURL: string, importAttributes?: Record<string, string>}} context
264+
* * @returns {Promise<string> | string | undefined} only works when enabled
265265
*/
266266
function defaultGetFormat(url, context) {
267267
if (isExperimentalTextImport(context?.importAttributes)) {

lib/internal/modules/esm/load.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ function getSourceSync(url, context) {
4848
return { __proto__: null, responseURL, source };
4949
}
5050

51+
5152
/**
5253
* Node.js default load hook.
5354
* @param {string} url

lib/internal/modules/esm/resolve.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,6 @@ function throwIfInvalidParentURL(parentURL) {
937937
* @param {string} specifier - The specifier to resolve.
938938
* @param {object} [context] - The context object containing the parent URL and conditions.
939939
* @param {string} [context.parentURL] - The URL of the parent module.
940-
* @param {object} [context.importAttributes] - The import attributes for resolving the specifier.
941940
* @param {string[]} [context.conditions] - The conditions for resolving the specifier.
942941
* @returns {{url: string, format?: string}}
943942
*/

0 commit comments

Comments
 (0)