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! |
📝 WalkthroughWalkthroughThis pull request refactors how dependency version strings are displayed and linked. A new 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/utils/versions.ts (1)
238-238: Consider removing&&from the regex pattern.The
&&operator is not part of the standard npm semver specification. Intersection (AND) in semver ranges is expressed using spaces, not&&. This condition would never match real npm version strings.Suggested change
- } else if (/>=|<=|[<>]|\s-\s|&&/.test(version)) { + } else if (/>=|<=|[<>]|\s-\s/.test(version)) {
🔗 Linked issue
Resolves #1120
🧭 Context
On Package page for complex dependencies versions we need to resolve combination of multiple versions into a url containing a single version.
📚 Description
^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