Skip to content

Commit

Permalink
process: unify experimental warning messages
Browse files Browse the repository at this point in the history
PR-URL: #53704
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
RedYetiDev authored and RafaelGSS committed Aug 5, 2024
1 parent 64812d5 commit 2c44706
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/internal/process/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const {
exposeLazyInterfaces,
defineReplaceableLazyAttribute,
setupCoverageHooks,
emitExperimentalWarning,
} = require('internal/util');

const {
Expand Down Expand Up @@ -624,8 +625,7 @@ function initializePermission() {
};
// Guarantee path module isn't monkey-patched to bypass permission model
ObjectFreeze(require('path'));
process.emitWarning('Permission is an experimental feature',
'ExperimentalWarning');
emitExperimentalWarning('Permission');
const { has } = require('internal/process/permission');
const warnFlags = [
'--allow-addons',
Expand Down Expand Up @@ -714,8 +714,7 @@ function initializeSourceMapsHandlers() {

function initializeFrozenIntrinsics() {
if (getOptionValue('--frozen-intrinsics')) {
process.emitWarning('The --frozen-intrinsics flag is experimental',
'ExperimentalWarning');
emitExperimentalWarning('Frozen intristics');
require('internal/freeze_intrinsics')();
}
}
Expand Down

0 comments on commit 2c44706

Please sign in to comment.