forked from pnpm/meta-updater
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add optional
clone
method to FormatPlugin
interface
This method is used to clone the object returned by `read` before passing it to `update`. This is useful when the object returned by `read` is not trivially cloneable. One use case is when trying to preserve comments in a JSONC file using the `comment-json` package, which uses symbol properties on the object to store comments. The default `clone` method would not preserve these symbol properties, so a custom `clone` method is needed. Fixes pnpm#10
- Loading branch information
Showing
3 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters