process: make process.config read-only
Checklist
-
tests and code linting passes -
a test and/or benchmark is included -
documentation is changed or added -
the commit message follows commit guidelines
Affected core subsystem(s)
process
Description of change
Makes process.config
read-only using a getter/setter and freezing the objects on JSON.parse. Does result in a perf hit but process.config
is not used in any critical paths (or any path in core) for that matter. There are apparently some places in user land where this is being extended and it causes problems when we want to add new configuration options (see #6115 for an example).
Refs: https://github.com/nodejs/node/pull/6115
/cc @Fishrock123