Skip to content

feat: link install scripts to relevant file in code tab#975

Open
bcye wants to merge 2 commits intonpmx-dev:mainfrom
bcye:patch-2
Open

feat: link install scripts to relevant file in code tab#975
bcye wants to merge 2 commits intonpmx-dev:mainfrom
bcye:patch-2

Conversation

@bcye
Copy link
Contributor

@bcye bcye commented Feb 5, 2026

if install script command is of the form ^node some-script-path$ it links to that script in the codetab, in all other cases it links to package.json

@vercel
Copy link

vercel bot commented Feb 5, 2026

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

Project Deployment Actions Updated (UTC)
docs.npmx.dev Error Error Feb 5, 2026 0:31am
npmx.dev Ready Ready Preview, Comment Feb 5, 2026 0:31am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Feb 5, 2026 0:31am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

A new utility function getInstallScriptFilePath is added to parse install script commands and extract the target file path. The function recognises "node " patterns, normalises paths by removing leading "./", and defaults to "package.json" for paths with navigational segments or non-matching content. The InstallScripts component is updated to accept a version prop and compute code links using this function. Install script entries now render as clickable links to the corresponding files instead of plain text. The parent component passes the package version to enable this linking functionality.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description accurately describes the changeset, specifying the linking behaviour for install script commands.

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

✨ Finishing touches
🧪 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

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/components/Package/InstallScripts.vue 83.33% 1 Missing ⚠️
app/utils/install-scripts.ts 88.88% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant