From fa3e0c86c72fae645ea1612947bc1169e6b50f13 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Thu, 12 Jan 2023 22:11:11 +0100 Subject: [PATCH] esm: mark `importAssertions` as required MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We already always specify a value, and failing to do so would likely be a bug. PR-URL: https://github.com/nodejs/node/pull/46164 Reviewed-By: Geoffrey Booth Reviewed-By: Michaƫl Zasso --- lib/internal/modules/esm/loader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/modules/esm/loader.js b/lib/internal/modules/esm/loader.js index 6cccecdf57e381..38cd2777dab9c5 100644 --- a/lib/internal/modules/esm/loader.js +++ b/lib/internal/modules/esm/loader.js @@ -777,14 +777,14 @@ 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 = { __proto__: null }, + importAssertions, ) { const isMain = parentURL === undefined;