From f32c9d25e79aaa21e90bd4a06a6a2c51fa00370f Mon Sep 17 00:00:00 2001 From: Sergey Petushkov Date: Thu, 30 Jun 2022 12:18:02 +0200 Subject: [PATCH] process: make process.config read only Fixes: https://github.com/nodejs/node/issues/43581 --- doc/api/deprecations.md | 5 +- doc/api/process.md | 19 ++--- lib/internal/bootstrap/node.js | 75 ++----------------- .../overwrite-config-preload-module.js | 1 + test/parallel/test-process-config.js | 3 + 5 files changed, 23 insertions(+), 80 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 9dd2f7628d84b0..8faee2fde691f2 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 ecd53469ca4221..dff97fcfdced22 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1041,6 +1041,9 @@ This feature is not available in [`Worker`][] threads.