Skip to content

Commit 27c59a3

Browse files
fix: renamed to attributes
1 parent d471633 commit 27c59a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/internal/modules/esm/fetch_module.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function fetchWithRedirects(parsed, context) {
145145
}
146146
const handler = parsed.protocol === 'http:' ? HTTPGet : HTTPSGet;
147147
const result = (async () => {
148-
const type = context.importAssertions?.type;
148+
const type = context.importAttributes?.type;
149149
const req = handler(parsed, {
150150
headers: { Accept: type === 'json' ? 'application/json,*/*;q=0.5' : '*/*;' },
151151
});

test/es-module/test-http-imports.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ for (const { protocol, createServer } of [
212212
const jsonUrl = new URL(url.href + 'json');
213213
jsonUrl.searchParams.set('mime', 'application/json');
214214
jsonUrl.searchParams.set('body', '{"x": 1}');
215-
const json = await import(jsonUrl.href, { assert: { type: 'json' } });
215+
const json = await import(jsonUrl.href, { with: { type: 'json' } });
216216
assert.deepStrictEqual(Object.keys(json), ['default']);
217217
assert.strictEqual(json.default.x, 1);
218218

0 commit comments

Comments
 (0)