Skip to content

Commit 31ea7be

Browse files
authored
esm: mark importAssertions as required
We already always specify a value, and failing to do so would likely be a bug. PR-URL: #46164 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 91ca2d4 commit 31ea7be

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/internal/modules/esm/loader.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,11 @@ class ESMLoader {
299299
* @param {string} originalSpecifier The specified URL path of the module to
300300
* be resolved.
301301
* @param {string} [parentURL] The URL path of the module's parent.
302-
* @param {ImportAssertions} [importAssertions] Assertions from the import
302+
* @param {ImportAssertions} importAssertions Assertions from the import
303303
* statement or expression.
304304
* @returns {Promise<{ format: string, url: URL['href'] }>}
305305
*/
306-
async resolve(
307-
originalSpecifier,
308-
parentURL,
309-
importAssertions = { __proto__: null },
310-
) {
306+
async resolve(originalSpecifier, parentURL, importAssertions) {
311307
if (this.#hooks) {
312308
return this.#hooks.resolve(originalSpecifier, parentURL, importAssertions);
313309
}

0 commit comments

Comments
 (0)