Skip to content

Commit fa0fde7

Browse files
authored
process: unify experimental warning messages
PR-URL: #53704 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 2db4d94 commit fa0fde7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/internal/process/pre_execution.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const {
3434
exposeLazyInterfaces,
3535
defineReplaceableLazyAttribute,
3636
setupCoverageHooks,
37+
emitExperimentalWarning,
3738
} = require('internal/util');
3839

3940
const {
@@ -564,8 +565,7 @@ function initializePermission() {
564565
};
565566
// Guarantee path module isn't monkey-patched to bypass permission model
566567
ObjectFreeze(require('path'));
567-
process.emitWarning('Permission is an experimental feature',
568-
'ExperimentalWarning');
568+
emitExperimentalWarning('Permission');
569569
const { has } = require('internal/process/permission');
570570
const warnFlags = [
571571
'--allow-addons',
@@ -654,8 +654,7 @@ function initializeSourceMapsHandlers() {
654654

655655
function initializeFrozenIntrinsics() {
656656
if (getOptionValue('--frozen-intrinsics')) {
657-
process.emitWarning('The --frozen-intrinsics flag is experimental',
658-
'ExperimentalWarning');
657+
emitExperimentalWarning('Frozen intristics');
659658
require('internal/freeze_intrinsics')();
660659
}
661660
}

0 commit comments

Comments
 (0)