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 9d4d916

Browse filesBrowse files
aduh95targos
authored andcommitted
esm: fix import assertion warning
Refs: #46901 (comment) PR-URL: #46971 Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent c8d528e commit 9d4d916
Copy full SHA for 9d4d916

File tree

Expand file treeCollapse file tree

5 files changed

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

5 files changed

+10
-10
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: lib/internal/modules/esm/assert.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ function validateAssertions(url, format,
6161
if (!alreadyWarned && ObjectKeys(importAssertions).length !== 0) {
6262
alreadyWarned = true;
6363
process.emitWarning(
64-
'Import assertions are not a stable feature of the JavaScript language, ' +
65-
'avoid relying on their current behavior and syntax as those might change ' +
64+
'Import assertions are not a stable feature of the JavaScript language. ' +
65+
'Avoid relying on their current behavior and syntax as those might change ' +
6666
'in a future version of Node.js.',
6767
'ExperimentalWarning',
6868
);
Collapse file

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

Copy file name to clipboardExpand all lines: test/es-module/test-esm-import-assertion-errors.js
+2-2Lines changed: 2 additions & 2 deletions
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

Collapse file

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

Copy file name to clipboardExpand all lines: test/es-module/test-esm-import-assertion-errors.mjs
+2-2Lines changed: 2 additions & 2 deletions
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

Collapse file

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

Copy file name to clipboardExpand all lines: test/es-module/test-esm-import-assertion-validation.js
+2-2Lines changed: 2 additions & 2 deletions
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

Collapse file

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

Copy file name to clipboardExpand all lines: test/es-module/test-esm-import-assertion-warning.mjs
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.