Switch "查看源站" link from npmjs.com to npmx.dev#125
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
Deploying cnpmweb with
|
| Latest commit: |
75de086
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c1cb39e9.cnpmweb.pages.dev |
| Branch Preview URL: | https://copilot-update-source-link-n.cnpmweb.pages.dev |
|
@copilot 需要带上 #versions 锚点 https://npmx.dev/package/egg#versions |
Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the “查看源站” (View Source) link in the version sync alert to point to npmx.dev instead of npmjs.com, aligning the UI with the new upstream site.
Changes:
- Switch
NPM_REGISTRYinSyncAlert.tsxfromhttps://npmjs.comtohttps://npmx.dev - Remove the
?activeTab=versionsquery param from the generated package URL
Comments suppressed due to low confidence (1)
src/components/SyncAlert.tsx:14
NPM_REGISTRYnow points athttps://npmx.dev(package website), but elsewhere in the codebaseNPM_REGISTRYrefers to the actual registry origin (https://registry.npmjs.orginsrc/hooks/useNpmVersionCompare.ts). Consider renaming this constant to something likeNPMX_SITE_ORIGIN/NPM_PACKAGE_SITE_ORIGINto avoid confusion.
Also, REGISTRY_MAP is exported here but doesn’t appear to be imported anywhere else in the repo (search only finds this declaration). If it’s unused, removing it would reduce dead API surface.
const NPM_REGISTRY = 'https://npmx.dev';
export const REGISTRY_MAP = {
self: REGISTRY,
default: 'https://registry.npmjs.org',
};
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Added the |
The "查看源站" (View Source) link on the version sync alert currently points to
npmjs.com. Switch it tonpmx.dev.NPM_REGISTRYconstant inSyncAlert.tsxfromhttps://npmjs.comtohttps://npmx.dev?activeTab=versionsquery param (npmjs.com-specific) with#versionsanchor for npmx.dev (e.g.https://npmx.dev/package/egg#versions)Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.