Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 463bb96

Browse filesBrowse 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
Copy full SHA for 463bb96

File tree

Expand file treeCollapse file tree

1 file changed

+2
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-6
lines changed
Open diff view settings
Collapse file

‎lib/internal/modules/esm/loader.js‎

Copy file name to clipboardExpand all lines: lib/internal/modules/esm/loader.js
+2-6Lines changed: 2 additions & 6 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.