Skip to content

process.config is not cloneable anymore in v16.x #43581

Description

@bnoordhuis

v16.0.0 / process

#36902 made process.config immutable. That's fine in principle but the use of a Proxy breaks the following code:

v8.serialize(process.config) // Uncaught Error: #<Object> could not be cloned.

The properties themselves are proxies too so Object.fromEntries(Object.entries(process.config)) is not an easy workaround.

I suggest using Object.freeze() or Object.seal() instead.

cc @jasnell

Activity

  1. added
    processIssues and PRs related to the process subsystem.
    on Jun 26, 2022
  2. legendecas commented on Jun 27, 2022

    @legendecas
    Member

    We cannot intercept modifications on frozen or sealed objects and print warnings about that. That seems to be the key point of runtime deprecation.

  3. targos commented on Jun 27, 2022

    @targos
    Member

    The deprecation is here since v16.0.0. I think it should be fine to make it eol and lock the object in v19.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    processIssues and PRs related to the process subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions