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

🐛 Bug: Support version protocols: npm:, workspace:, etc. #71

Open
ericcornelissen opened this issue Feb 20, 2021 · 1 comment
Open
Labels
status: accepting prs Please, send a pull request to resolve this! 🙏 type: bug Something isn't working :( 🐛

Comments

@ericcornelissen
Copy link

I use the syntax of the title so that I can have two different major version of one project as a dependency (one @1.x.x and one 2.x.x), but this validator doesn't recognize this syntax and outputs an error instead. It would be cool if this syntax was supported, but given that it is quite uncommon (to the best of my knowledge) I don't think this should be a priority.

The following package.json content can be used to reproduce this error.

{
  "name": "project",
  "version": "1.0.0",
  "private": true,
  "description": "...",
  "homepage": "https://github.com/ericcornelissen/project",
  "license": "MIT",
  "main": "lib/index.js",
  "repository": {
    "type": "git",
    "url": "https://github.com/ericcornelissen/project"
  },
  "dependencies": {
    "svgo-v1": "npm:[email protected]",
    "svgo-v2": "npm:[email protected]"
  }
}
ericcornelissen added a commit to ericcornelissen/svgo-action that referenced this issue Feb 20, 2021
As per the build failure at [1] PJV is no longer sufficient for
verifying the validity of package.json for this project. I opened [2] to
report this issue upstream.

--
1. https://github.com/ericcornelissen/svgo-action/pull/330/checks?check_run_id=1943467171#step:5:13
2. JoshuaKGoldberg/package.json-validator#71
@JoshuaKGoldberg JoshuaKGoldberg changed the title Invalid version range for dependency xxx: npm:[email protected] 🚀 Feature: Support version protocols: npm:, workspace:, etc. Mar 28, 2024
@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Mar 28, 2024

This would be great. We have to work around it in https://github.com/JoshuaKGoldberg/eslint-plugin-package-json right now, such as in JoshuaKGoldberg/eslint-plugin-package-json#258. Accepting PRs!

Related: #38, for file:.

@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Please, send a pull request to resolve this! 🙏 type: bug Something isn't working :( 🐛 labels Mar 28, 2024
@JoshuaKGoldberg JoshuaKGoldberg changed the title 🚀 Feature: Support version protocols: npm:, workspace:, etc. 🐛 Bug: Support version protocols: npm:, workspace:, etc. Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! 🙏 type: bug Something isn't working :( 🐛
Projects
None yet
Development

No branches or pull requests

2 participants