Skip to content

Commit 463bb96

Browse files
aduh95juanarbol
authored andcommitted
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 <webadmin@geoffreybooth.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent e620de6 commit 463bb96

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
@@ -782,15 +782,11 @@ class ESMLoader {
782782
* @param {string} originalSpecifier The specified URL path of the module to
783783
* be resolved.
784784
* @param {string} [parentURL] The URL path of the module's parent.
785-
* @param {ImportAssertions} [importAssertions] Assertions from the import
785+
* @param {ImportAssertions} importAssertions Assertions from the import
786786
* statement or expression.
787787
* @returns {{ format: string, url: URL['href'] }}
788788
*/
789-
async resolve(
790-
originalSpecifier,
791-
parentURL,
792-
importAssertions = ObjectCreate(null),
793-
) {
789+
async resolve(originalSpecifier, parentURL, importAssertions) {
794790
const isMain = parentURL === undefined;
795791

796792
if (

0 commit comments

Comments
 (0)