mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
esm: fix import assertion warning
Refs: https://github.com/nodejs/node/pull/46901#discussion_r1122242913 PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
@@ -61,8 +61,8 @@ function validateAssertions(url, format,
|
||||
if (!alreadyWarned && ObjectKeys(importAssertions).length !== 0) {
|
||||
alreadyWarned = true;
|
||||
process.emitWarning(
|
||||
'Import assertions are not a stable feature of the JavaScript language, ' +
|
||||
'avoid relying on their current behavior and syntax as those might change ' +
|
||||
'Import assertions are not a stable feature of the JavaScript language. ' +
|
||||
'Avoid relying on their current behavior and syntax as those might change ' +
|
||||
'in a future version of Node.js.',
|
||||
'ExperimentalWarning',
|
||||
);
|
||||
|
||||
@@ -7,8 +7,8 @@ const jsonModuleDataUrl = 'data:application/json,""';
|
||||
|
||||
common.expectWarning(
|
||||
'ExperimentalWarning',
|
||||
'Import assertions are not a stable feature of the JavaScript language, ' +
|
||||
'avoid relying on their current behavior and syntax as those might change ' +
|
||||
'Import assertions are not a stable feature of the JavaScript language. ' +
|
||||
'Avoid relying on their current behavior and syntax as those might change ' +
|
||||
'in a future version of Node.js.'
|
||||
);
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ const jsonModuleDataUrl = 'data:application/json,""';
|
||||
|
||||
expectWarning(
|
||||
'ExperimentalWarning',
|
||||
'Import assertions are not a stable feature of the JavaScript language, ' +
|
||||
'avoid relying on their current behavior and syntax as those might change ' +
|
||||
'Import assertions are not a stable feature of the JavaScript language. ' +
|
||||
'Avoid relying on their current behavior and syntax as those might change ' +
|
||||
'in a future version of Node.js.'
|
||||
);
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ const { validateAssertions } = require('internal/modules/esm/assert');
|
||||
|
||||
common.expectWarning(
|
||||
'ExperimentalWarning',
|
||||
'Import assertions are not a stable feature of the JavaScript language, ' +
|
||||
'avoid relying on their current behavior and syntax as those might change ' +
|
||||
'Import assertions are not a stable feature of the JavaScript language. ' +
|
||||
'Avoid relying on their current behavior and syntax as those might change ' +
|
||||
'in a future version of Node.js.'
|
||||
);
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import { expectWarning } from '../common/index.mjs';
|
||||
|
||||
expectWarning(
|
||||
'ExperimentalWarning',
|
||||
'Import assertions are not a stable feature of the JavaScript language, ' +
|
||||
'avoid relying on their current behavior and syntax as those might change ' +
|
||||
'Import assertions are not a stable feature of the JavaScript language. ' +
|
||||
'Avoid relying on their current behavior and syntax as those might change ' +
|
||||
'in a future version of Node.js.'
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user