From e0ab8dd63731d8eb92053776c5160fb190d5aea5 Mon Sep 17 00:00:00 2001 From: Sergey Petushkov Date: Sun, 11 Sep 2022 00:00:23 +0200 Subject: [PATCH] process: make process.config read only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/nodejs/node/issues/43581 PR-URL: https://github.com/nodejs/node/pull/43627 Reviewed-By: Anna Henningsen Reviewed-By: Antoine du Hamel Reviewed-By: Colin Ihrig Reviewed-By: Chengzhong Wu Reviewed-By: Ben Noordhuis Reviewed-By: Tobias Nießen --- doc/api/deprecations.md | 5 +- doc/api/process.md | 19 ++--- lib/internal/bootstrap/node.js | 75 ++----------------- test/abort/test-abort-fatal-error.js | 2 +- .../overwrite-config-preload-module.js | 1 + test/parallel/test-process-config.js | 3 + 6 files changed, 24 insertions(+), 81 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index d3f3eac9cef122..45b8e24f0d8161 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2889,12 +2889,15 @@ Prefer [`message.socket`][] over [`message.connection`][]. -Type: Runtime +Type: End-of-Life The `process.config` property provides access to Node.js compile-time settings. However, the property is mutable and therefore subject to tampering. The ability diff --git a/doc/api/process.md b/doc/api/process.md index 730f3f6ac9359e..73f79beb20c46e 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1041,6 +1041,9 @@ This feature is not available in [`Worker`][] threads.