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(versions): support optional v prefix in git semver tags #213

Open
b0o opened this issue May 7, 2024 · 1 comment
Open

feat(versions): support optional v prefix in git semver tags #213

b0o opened this issue May 7, 2024 · 1 comment

Comments

@b0o
Copy link

b0o commented May 7, 2024

Description

I have the following syncpack configuration:

{
  "versionGroups": [
    {
      "label": "Use workspace protocol for local packages",
      "dependencies": ["$LOCAL"],
      "dependencyTypes": ["dev", "prod", "peer"],
      "pinVersion": "workspace:*"
    }
  ],
  "semverGroups": [
    {
      "label": "use exact version numbers in production",
      "packages": ["**"],
      "dependencyTypes": ["prod"],
      "dependencies": ["**"],
      "range": ""
    }
  ]
}

I'm having an issue with my dependency https://github.com/uNetworking/uWebSockets.js. The developers do not publish their package on NPM, and only support installing from GitHub releases. Their releases are semver-versioned, but their git tags are prefixed with a v:

  "dependencies": {
    "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.43.0"
  }

The v prefix seems to trip up syncpack:

✘ name uWebSockets.js or version github:uNetworking/uWebSockets.js#v20.43.0 are not supported packages/a/package.json > dependencies [UnsupportedMismatch]
✘ name uWebSockets.js or version github:uNetworking/uWebSockets.js#v20.43.0 are not supported packages/b/package.json > dependencies [UnsupportedMismatch]

I tested removing the v prefix; syncpack correctly handles the dependency:

  "dependencies": {
    "uWebSockets.js": "github:uNetworking/uWebSockets.js#20.43.0"
  }

Suggested Solution

Support an optional v prefix for git semver tags. Also, might want to consider supporting other common prefixes?

@JamieMason
Copy link
Owner

Sounds good @b0o, thanks for raising 👍

@JamieMason JamieMason changed the title Support optional v prefix in git semver tags feat(versions): support optional v prefix in git semver tags May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants