Skip to content

Commit

Permalink
esm: mark importAssertions as required
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
aduh95 authored and juanarbol committed Jan 26, 2023
1 parent f670a54 commit c14f068
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/internal/modules/esm/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -782,15 +782,11 @@ class ESMLoader {
* @param {string} originalSpecifier The specified URL path of the module to
* be resolved.
* @param {string} [parentURL] The URL path of the module's parent.
* @param {ImportAssertions} [importAssertions] Assertions from the import
* @param {ImportAssertions} importAssertions Assertions from the import
* statement or expression.
* @returns {{ format: string, url: URL['href'] }}
*/
async resolve(
originalSpecifier,
parentURL,
importAssertions = ObjectCreate(null),
) {
async resolve(originalSpecifier, parentURL, importAssertions) {
const isMain = parentURL === undefined;

if (
Expand Down

0 comments on commit c14f068

Please sign in to comment.