Skip to content

Commit a483d12

Browse files
Trottruyadorno
authored andcommitted
src: condense experimental warning message
PR-URL: #45424 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent 4fe5c4e commit a483d12

File tree

6 files changed

+10
-12
lines changed

6 files changed

+10
-12
lines changed

lib/internal/util.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,7 @@ function slowCases(enc) {
224224

225225
function emitExperimentalWarning(feature) {
226226
if (experimentalWarnings.has(feature)) return;
227-
const msg = `${feature} is an experimental feature. This feature could ` +
228-
'change at any time';
227+
const msg = `${feature} is an experimental feature and might change at any time`;
229228
experimentalWarnings.add(feature);
230229
process.emitWarning(msg, 'ExperimentalWarning');
231230
}

src/node_process_events.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ Maybe<bool> ProcessEmitExperimentalWarning(Environment* env,
9292

9393
experimental_warnings.insert(warning);
9494
std::string message(warning);
95-
message.append(
96-
" is an experimental feature. This feature could change at any time");
95+
message.append(" is an experimental feature and might change at any time");
9796
return ProcessEmitWarningGeneric(env, message.c_str(), "ExperimentalWarning");
9897
}
9998

test/common/measure-memory.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ function assertSingleDetailedShape(result) {
4343
}
4444

4545
function expectExperimentalWarning() {
46-
common.expectWarning('ExperimentalWarning',
47-
'vm.measureMemory is an experimental feature. ' +
48-
'This feature could change at any time');
46+
common.expectWarning(
47+
'ExperimentalWarning',
48+
'vm.measureMemory is an experimental feature and might change at any time'
49+
);
4950
}
5051

5152
module.exports = {

test/parallel/test-vfs.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ throws(() => require(vfsFile), { code: 'MODULE_NOT_FOUND' });
3434

3535
common.expectWarning(
3636
'ExperimentalWarning',
37-
'Module._stat is an experimental feature. This feature could change at any time');
37+
'Module._stat is an experimental feature and might change at any time'
38+
);
3839

3940
process.on('warning', common.mustCall());
4041

test/wasi/test-wasi-symlinks.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ const path = require('path');
55

66
if (process.argv[2] === 'wasi-child') {
77
common.expectWarning('ExperimentalWarning',
8-
'WASI is an experimental feature. This feature could ' +
9-
'change at any time');
8+
'WASI is an experimental feature and might change at any time');
109

1110
const { WASI } = require('wasi');
1211
const wasmDir = path.join(__dirname, 'wasm');

test/wasi/test-wasi.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ if (process.argv[2] === 'wasi-child') {
88
const path = require('path');
99

1010
common.expectWarning('ExperimentalWarning',
11-
'WASI is an experimental feature. This feature could ' +
12-
'change at any time');
11+
'WASI is an experimental feature and might change at any time');
1312

1413
const { WASI } = require('wasi');
1514
tmpdir.refresh();

0 commit comments

Comments
 (0)