diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js index 8fad2fe617e4f8..59308ab817fb86 100644 --- a/lib/internal/process/pre_execution.js +++ b/lib/internal/process/pre_execution.js @@ -33,6 +33,7 @@ const { exposeLazyInterfaces, defineReplaceableLazyAttribute, setupCoverageHooks, + emitExperimentalWarning, } = require('internal/util'); const { @@ -569,8 +570,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', @@ -709,8 +709,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')(); } }