Skip to content

External objects should not be modified #7655

Closed
@micnic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussIssues opened for discussions and feedbacks.fsIssues and PRs related to the fs subsystem / file system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions