fix: dependencies complex version link#1524
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThis pull request adds a VersionLink interface and a LAST_VERSION_IN_RANGE_REGEXP constant, and implements buildVersionLink in app/utils/versions.ts to convert complex semver strings (including unions and ranges) into objects with 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Resolves #1120
^1.0.0->^1.0.0Simple1.0.0 || 2.0.0->2.0.0Union>1.0.0 <=2.0.0-><=2.0.0Comparator Set1.0.0 - 2.0.0->2.0.0Range1.0.0 - 2.0.0 || 3.0.0 - 4.0.0->4.0.0Union of Rangesdependencies,peerDependenciesandoptionalDependenciescould have complex version (while 99% cases it'speer), so all of them are handled"||"(1.0.0 || 2.0.0), but I think people rarely need to click on a specific version for union, also it would add some incosistency, so I keep it as a one link, which points to the latest version from UnionExamples for reference:
Comparator Set (dependencies): https://npmx.dev/package/sass
Comparator Set (peer): https://npmx.dev/package/styled-components/v/3.5.0-0
Union (dependencies): https://npmx.dev/package/normalize-package-data/v/2.5.0, https://npmx.dev/package/loose-envify/v/1.4.0
Union (peer): https://npmx.dev/package/eslint-plugin-react