mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
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:
1 parent
4283af48b0
commit
5544ce4bdf
6 files changed
+10
-12
No files matched your search
@@ -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');
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user