Skip to content

Commit 568080e

Browse files
avivkellertargos
authored andcommitted
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 3472e1a commit 568080e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/internal/process/pre_execution.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const {
3636
exposeLazyInterfaces,
3737
defineReplaceableLazyAttribute,
3838
setupCoverageHooks,
39+
emitExperimentalWarning,
3940
} = require('internal/util');
4041

4142
const {
@@ -624,8 +625,7 @@ function initializePermission() {
624625
};
625626
// Guarantee path module isn't monkey-patched to bypass permission model
626627
ObjectFreeze(require('path'));
627-
process.emitWarning('Permission is an experimental feature',
628-
'ExperimentalWarning');
628+
emitExperimentalWarning('Permission');
629629
const { has } = require('internal/process/permission');
630630
const warnFlags = [
631631
'--allow-addons',
@@ -714,8 +714,7 @@ function initializeSourceMapsHandlers() {
714714

715715
function initializeFrozenIntrinsics() {
716716
if (getOptionValue('--frozen-intrinsics')) {
717-
process.emitWarning('The --frozen-intrinsics flag is experimental',
718-
'ExperimentalWarning');
717+
emitExperimentalWarning('Frozen intristics');
719718
require('internal/freeze_intrinsics')();
720719
}
721720
}

0 commit comments

Comments
 (0)