Skip to content

Commit 5b94e2b

Browse files
aduh95danielleadams
authored andcommitted
esm: fix import assertion warning
Refs: #46901 (comment) PR-URL: #46971 Reviewed-By: Debadree Chatterjee <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent f8d4bf8 commit 5b94e2b

5 files changed

+10
-10
lines changed

lib/internal/modules/esm/assert.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ function validateAssertions(url, format,
6262
if (!alreadyWarned && ObjectKeys(importAssertions).length !== 0) {
6363
alreadyWarned = true;
6464
process.emitWarning(
65-
'Import assertions are not a stable feature of the JavaScript language, ' +
66-
'avoid relying on their current behavior and syntax as those might change ' +
65+
'Import assertions are not a stable feature of the JavaScript language. ' +
66+
'Avoid relying on their current behavior and syntax as those might change ' +
6767
'in a future version of Node.js.',
6868
'ExperimentalWarning',
6969
);

test/es-module/test-esm-import-assertion-errors.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const jsonModuleDataUrl = 'data:application/json,""';
77

88
common.expectWarning(
99
'ExperimentalWarning',
10-
'Import assertions are not a stable feature of the JavaScript language, ' +
11-
'avoid relying on their current behavior and syntax as those might change ' +
10+
'Import assertions are not a stable feature of the JavaScript language. ' +
11+
'Avoid relying on their current behavior and syntax as those might change ' +
1212
'in a future version of Node.js.'
1313
);
1414

test/es-module/test-esm-import-assertion-errors.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const jsonModuleDataUrl = 'data:application/json,""';
66

77
expectWarning(
88
'ExperimentalWarning',
9-
'Import assertions are not a stable feature of the JavaScript language, ' +
10-
'avoid relying on their current behavior and syntax as those might change ' +
9+
'Import assertions are not a stable feature of the JavaScript language. ' +
10+
'Avoid relying on their current behavior and syntax as those might change ' +
1111
'in a future version of Node.js.'
1212
);
1313

test/es-module/test-esm-import-assertion-validation.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const { validateAssertions } = require('internal/modules/esm/assert');
88

99
common.expectWarning(
1010
'ExperimentalWarning',
11-
'Import assertions are not a stable feature of the JavaScript language, ' +
12-
'avoid relying on their current behavior and syntax as those might change ' +
11+
'Import assertions are not a stable feature of the JavaScript language. ' +
12+
'Avoid relying on their current behavior and syntax as those might change ' +
1313
'in a future version of Node.js.'
1414
);
1515

test/es-module/test-esm-import-assertion-warning.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { expectWarning } from '../common/index.mjs';
22

33
expectWarning(
44
'ExperimentalWarning',
5-
'Import assertions are not a stable feature of the JavaScript language, ' +
6-
'avoid relying on their current behavior and syntax as those might change ' +
5+
'Import assertions are not a stable feature of the JavaScript language. ' +
6+
'Avoid relying on their current behavior and syntax as those might change ' +
77
'in a future version of Node.js.'
88
);
99

0 commit comments

Comments
 (0)