Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: IanVS/prettier-plugin-sort-imports
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.2.0
Choose a base ref
...
head repository: IanVS/prettier-plugin-sort-imports
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.2.1
Choose a head ref
  • 3 commits
  • 17 files changed
  • 1 contributor

Commits on Mar 17, 2024

  1. Allow disabling plugin by setting importOrder to [] (#161)

    Closes #159
    
    This changes up how we handle `importOrder: []` in the prettier config.
    Previously, we would have applied our default config, such that
    builtins, node modules, and relative imports would be sorted. Now, it
    effectively disables the plugin so that no sorting takes place.
    
    This could be seen as a breaking change, but instead I see it as a bug
    fix. It doesn't make sense that using an explicit empty array for the
    setting causes a fallback to be used.
    
    Additionally, this gives users more control over disabling the plugin
    and turning it on only for certain subfolders or types of files, as
    shown in the referenced issue and documented in the readme in this PR.
    IanVS authored Mar 17, 2024
    Configuration menu
    Copy the full SHA
    0ffe11e View commit details
    Browse the repository at this point in the history
  2. Detect vue 2.7 / 3 more reliably (#160)

    Fixes #158
    
    The `transformRef` method is not found on the most recent versions of
    @vue/compiler-sfc (3.4.x), because it seems to have only existed for
    some versions of 3.x (including the version we use in devDependencies,
    which is why our tests passed). I couldn't find any mention of it in the
    Vue changelog, though it seems like it should have been a breaking
    change to remove the method.
    
    So, now instead of relying on the presence of a method, we'll import the
    package.json directly, look at the version field, and make our decision
    based on that, which should be much safer.
    IanVS authored Mar 17, 2024
    Configuration menu
    Copy the full SHA
    d97c9e4 View commit details
    Browse the repository at this point in the history
  3. 4.2.1

    IanVS committed Mar 17, 2024
    Configuration menu
    Copy the full SHA
    41ae68b View commit details
    Browse the repository at this point in the history
Loading