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 <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 f8d4bf8 commit 5b94e2b

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

lib/internal/modules/esm/assert.js

Lines changed: 2 additions & 2 deletions
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

Lines 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

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

Lines 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

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

Lines 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

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

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy