Skip to content

Switch "查看源站" link from npmjs.com to npmx.dev#125

Merged
fengmk2 merged 4 commits intomasterfrom
copilot/update-source-link-npmx
Feb 26, 2026
Merged

Switch "查看源站" link from npmjs.com to npmx.dev#125
fengmk2 merged 4 commits intomasterfrom
copilot/update-source-link-npmx

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 26, 2026

The "查看源站" (View Source) link on the version sync alert currently points to npmjs.com. Switch it to npmx.dev.

  • Update NPM_REGISTRY constant in SyncAlert.tsx from https://npmjs.com to https://npmx.dev
  • Replace the ?activeTab=versions query param (npmjs.com-specific) with #versions anchor for npmx.dev (e.g. https://npmx.dev/package/egg#versions)
Original prompt

This section details on the original issue you should resolve

<issue_title>将「查看源站」的链接从 npmjs.com 切换到 npmx.dev</issue_title>
<issue_description>Image
https://npmmirror.com/package/vibe-kanban/versions?version=0.0.134</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 26, 2026

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

Project Deployment Actions Updated (UTC)
cnpmweb Ready Ready Preview, Comment Feb 26, 2026 2:38pm

Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Feb 26, 2026

Deploying cnpmweb with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copilot AI changed the title [WIP] Update source link from npmjs.com to npmx.dev Switch "查看源站" link from npmjs.com to npmx.dev Feb 26, 2026
@fengmk2 fengmk2 marked this pull request as ready for review February 26, 2026 14:25
Copilot AI review requested due to automatic review settings February 26, 2026 14:25
Comment thread src/components/SyncAlert.tsx Outdated
@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Feb 26, 2026

@copilot 需要带上 #versions 锚点 https://npmx.dev/package/egg#versions

Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_REGISTRY in SyncAlert.tsx from https://npmjs.com to https://npmx.dev
  • Remove the ?activeTab=versions query param from the generated package URL
Comments suppressed due to low confidence (1)

src/components/SyncAlert.tsx:14

  • NPM_REGISTRY now points at https://npmx.dev (package website), but elsewhere in the codebase NPM_REGISTRY refers to the actual registry origin (https://registry.npmjs.org in src/hooks/useNpmVersionCompare.ts). Consider renaming this constant to something like NPMX_SITE_ORIGIN/NPM_PACKAGE_SITE_ORIGIN to 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.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 26, 2026

@copilot 需要带上 #versions 锚点 https://npmx.dev/package/egg#versions

Added the #versions anchor in 593eb39. The link now generates https://npmx.dev/package/{name}#versions.

@fengmk2 fengmk2 merged commit 91201f4 into master Feb 26, 2026
11 checks passed
@fengmk2 fengmk2 deleted the copilot/update-source-link-npmx branch February 26, 2026 14:41
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.

将「查看源站」的链接从 npmjs.com 切换到 npmx.dev

3 participants