Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process: unify experimental warning messages #53704

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/internal/process/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const {
exposeLazyInterfaces,
defineReplaceableLazyAttribute,
setupCoverageHooks,
emitExperimentalWarning,
} = require('internal/util');

const {
Expand Down Expand Up @@ -538,8 +539,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 @@ -628,8 +628,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
Loading