Skip to content

refactor: share encodePackageName utility function#1066

Merged
43081j merged 1 commit intonpmx-dev:mainfrom
bluwy:share-encodePackageName
Feb 6, 2026
Merged

refactor: share encodePackageName utility function#1066
43081j merged 1 commit intonpmx-dev:mainfrom
bluwy:share-encodePackageName

Conversation

@bluwy
Copy link
Copy Markdown
Contributor

@bluwy bluwy commented Feb 6, 2026

Use the encodePackageName utility in #shared/utils/npm everywhere 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.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 6, 2026 3:03am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 6, 2026 3:03am
npmx-lunaria Ignored Ignored Feb 6, 2026 3:03am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

The 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)
Check name Status Explanation
Description check ✅ Passed The pull request description accurately describes the changeset: consolidating duplicated encodePackageName implementations into a shared utility across multiple files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@43081j 43081j added this pull request to the merge queue Feb 6, 2026
Merged via the queue into npmx-dev:main with commit e74a201 Feb 6, 2026
16 checks passed
@bluwy bluwy deleted the share-encodePackageName branch February 6, 2026 16:13
@coderabbitai coderabbitai Bot mentioned this pull request Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants