GeezerVison is showing github.com — process: unify experimental warning messages · nodejs/node@2c44706
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: lib/internal/process/pre_execution.js +3-4Lines changed: 3 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -36,6 +36,7 @@ const { |
36 | 36 | exposeLazyInterfaces, |
37 | 37 | defineReplaceableLazyAttribute, |
38 | 38 | setupCoverageHooks, |
| 39 | + emitExperimentalWarning, |
39 | 40 | } = require('internal/util'); |
40 | 41 |
|
41 | 42 | const { |
@@ -624,8 +625,7 @@ function initializePermission() { |
624 | 625 | }; |
625 | 626 | // Guarantee path module isn't monkey-patched to bypass permission model |
626 | 627 | ObjectFreeze(require('path')); |
627 | | - process.emitWarning('Permission is an experimental feature', |
628 | | - 'ExperimentalWarning'); |
| 628 | + emitExperimentalWarning('Permission'); |
629 | 629 | const { has } = require('internal/process/permission'); |
630 | 630 | const warnFlags = [ |
631 | 631 | '--allow-addons', |
@@ -714,8 +714,7 @@ function initializeSourceMapsHandlers() { |
714 | 714 |
|
715 | 715 | function initializeFrozenIntrinsics() { |
716 | 716 | if (getOptionValue('--frozen-intrinsics')) { |
717 | | - process.emitWarning('The --frozen-intrinsics flag is experimental', |
718 | | - 'ExperimentalWarning'); |
| 717 | + emitExperimentalWarning('Frozen intristics'); |
719 | 718 | require('internal/freeze_intrinsics')(); |
720 | 719 | } |
721 | 720 | } |
|