Skip to content

External objects should not be modified #7655

Description

@micnic

Hey, I was playing around with Object.seal() and Object.freeze() and discovered that internally Node is trying to modify my objects and I got the following in fs.watch:

TypeError: Can't add property recursive, object is not extensible

In my opinion external objects should not be modified by Node, as I observed sometimes this rule is respected, sometimes - only partially (in case of fs.appendFile).

Do we have anywhere this rule specified?

cc @nodejs/collaborators

Activity

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

    discussIssues opened for discussion and feedback.fsIssues and PRs related to file-system APIs and the fs module.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions