Skip to content

Make sure drivers don't modify input options object #566

@pi0

Description

@pi0

Describe the feature

Found from nitrojs/nitro#2174

Drivers such as fs/fsLite currently modify options objects. this might have unwanted side-effects especially if input options are used in different places.

We should:

  • Make defineDriver types to make sure options object is (deep) ReadOnly
  • Possibly update tests to make sure there is no runtime update
  • Fix drivers that currently modify input to instead, make a copy of object

Additional information

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtest

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions