Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! module: fix conditions override in synchronous resolve hooks
  • Loading branch information
joyeecheung committed Jul 22, 2025
commit 99865a7e271958fc519c49db5d0c850fbdddeb33
2 changes: 1 addition & 1 deletion lib/internal/modules/cjs/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ Module._load = function(request, parent, isMain) {
* @param {ResolveFilenameOptions} options Options object
* @typedef {object} ResolveFilenameOptions
* @property {string[]} paths Paths to search for modules in
* @param {Set<string>} conditions The conditions to use for resolution.
* @property {Set<string>?} conditions The conditions to use for resolution.
* @returns {void|string}
*/
Module._resolveFilename = function(request, parent, isMain, options) {
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ class ModuleLoader {
* from module.register() which are run in a blocking fashion for it to be synchronous.
* @param {string|URL} specifier See {@link resolveSync}.
* @param {{ parentURL?: string, importAttributes: ImportAttributes, conditions?: string[]}} context
* See {@link resolveSync}.
* See {@link resolveSync}.
* @returns {{ format: string, url: string }}
*/
#resolveAndMaybeBlockOnLoaderThread(specifier, context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ const { cjs, esm } = require('../fixtures/es-modules/custom-condition/load.cjs')
assert.strictEqual((await esm('foo/fourth')).result, 'foo');
hooks.deregister();
}
})().catch(common.mustNotCall());
})().then(common.mustCall());
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ const { cjs, esm } = require('../fixtures/es-modules/custom-condition/load.cjs')
});
hooks.deregister();
}
})().catch(common.mustNotCall());
})().then(common.mustCall());
Loading