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: isPackageExists support version check #12

Closed
wants to merge 2 commits into from

Conversation

chizukicn
Copy link
Contributor

@chizukicn chizukicn commented Oct 1, 2023

Description

This PR will add version checking support for semver rules to isPackageExists.
So that we can use it to achieve something like

const isVue2 = isPackageExists("vue", {
  version: ">2 || <3"
});

export default {
  extends: [
    isVue2
      ? "plugin:vue/recommended"
      : "plugin:vue/vue3-recommended",
  ]
}

Linked Issues

Additional context

@antfu
Copy link
Member

antfu commented Oct 1, 2023

Thanks, but no, it's beyond the scope of this package, and I don't want to introduce semver as a dep when it's not a core feature.

@antfu antfu closed this Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants