refactor: share encodePackageName utility function#1066
refactor: share encodePackageName utility function#1066bluwy wants to merge 1 commit intonpmx-dev:mainfrom
encodePackageName utility function#1066Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughWalkthroughThe pull request consolidates package name encoding logic across multiple files by introducing and using a centralised encodePackageName utility function. Previously, package name encoding was performed manually or defined locally in multiple locations. This change imports the shared utility and replaces all local encoding implementations with calls to encodePackageName when constructing NPM registry URLs. No public API signatures are modified; only internal encoding usage is refactored. 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Use the
encodePackageNameutility in#shared/utils/npmeverywhere instead of duplicating them. I think it's safe (?) since#shared/utils/*can work anywhere.PS I used explicit imports as I prefer them 😄 The codebase currently has a mix of explicit and auto/hidden imports and I'm not sure which is preferred.