src: condense experimental warning message

PR-URL: https://github.com/nodejs/node/pull/45424
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
This commit is contained in:
Rich Trott authored and Danielle Adams committed 2023-01-03 08:38:46 -05:00
1 parent 4283af48b0
commit 5544ce4bdf
6 files changed
+10 -12

No files matched your search

+1 -2
View File
@@ -221,8 +221,7 @@ function slowCases(enc) {
function emitExperimentalWarning(feature) {
if (experimentalWarnings.has(feature)) return;
const msg = `${feature} is an experimental feature. This feature could ` +
'change at any time';
const msg = `${feature} is an experimental feature and might change at any time`;
experimentalWarnings.add(feature);
process.emitWarning(msg, 'ExperimentalWarning');
}
+1 -2
View File
@@ -92,8 +92,7 @@ Maybe<bool> ProcessEmitExperimentalWarning(Environment* env,
experimental_warnings.insert(warning);
std::string message(warning);
message.append(
" is an experimental feature. This feature could change at any time");
message.append(" is an experimental feature and might change at any time");
return ProcessEmitWarningGeneric(env, message.c_str(), "ExperimentalWarning");
}
+4 -3
View File
@@ -43,9 +43,10 @@ function assertSingleDetailedShape(result) {
}
function expectExperimentalWarning() {
common.expectWarning('ExperimentalWarning',
'vm.measureMemory is an experimental feature. ' +
'This feature could change at any time');
common.expectWarning(
'ExperimentalWarning',
'vm.measureMemory is an experimental feature and might change at any time'
);
}
module.exports = {
+2 -1
View File
@@ -34,7 +34,8 @@ throws(() => require(vfsFile), { code: 'MODULE_NOT_FOUND' });
common.expectWarning(
'ExperimentalWarning',
'Module._stat is an experimental feature. This feature could change at any time');
'Module._stat is an experimental feature and might change at any time'
);
process.on('warning', common.mustCall());
+1 -2
View File
@@ -5,8 +5,7 @@ const path = require('path');
if (process.argv[2] === 'wasi-child') {
common.expectWarning('ExperimentalWarning',
'WASI is an experimental feature. This feature could ' +
'change at any time');
'WASI is an experimental feature and might change at any time');
const { WASI } = require('wasi');
const wasmDir = path.join(__dirname, 'wasm');
+1 -2
View File
@@ -8,8 +8,7 @@ if (process.argv[2] === 'wasi-child') {
const path = require('path');
common.expectWarning('ExperimentalWarning',
'WASI is an experimental feature. This feature could ' +
'change at any time');
'WASI is an experimental feature and might change at any time');
const { WASI } = require('wasi');
tmpdir.refresh();