Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Support custom clone operation #12

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Commits on Feb 1, 2024

  1. chore: run prettier

    b0o committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    152beda View commit details
    Browse the repository at this point in the history
  2. 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
    b0o committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    5b50c13 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2024

  1. chore: run prettier

    b0o committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    6c22fd2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a21ed3b View commit details
    Browse the repository at this point in the history
  3. chore: adjust order of methods in FormatPlugin interface

    They're now in the order they are called.
    b0o committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    a2dcdf8 View commit details
    Browse the repository at this point in the history
  4. style: update test name

    b0o committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    65633d3 View commit details
    Browse the repository at this point in the history
  5. style: import order

    b0o committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    71ac648 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2024

  1. fix: only call clone function when actual is not null

    also remove the options parameter from the clone function
    b0o committed Feb 4, 2024
    Configuration menu
    Copy the full SHA
    8c694d5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    12118f1 View commit details
    Browse the repository at this point in the history