Skip to content

docsy.dev: run link-check bins directly, not via npx - #2686

Merged
chalin merged 1 commit into
docsy:mainfrom
chalin:chalin-drop-npx-from-link-scripts-2026-0722
Jul 22, 2026
Merged

chalin merged 1 commit into
docsy:mainfrom
chalin:chalin-drop-npx-from-link-scripts-2026-0722

Conversation

@chalin

@chalin chalin commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator
  • Drops npx from docsy.dev's link-check script lines (_check:links, refcache): npm run already puts node_modules/.bin on the PATH, so the bins provided by the link-cache devDependency resolve directly.
  • Rationale: npx BIN silently falls back to the public npm registry when node_modules is stale or missing, executing whatever package claims that name there — for refcache, the registry name is an unrelated package, so the fallback runs the wrong tool entirely. A bare bin name instead fails loudly (exit 127) with zero registry traffic.
  • Verified: the scripts resolve the local bins; with the devDependency removed from node_modules, they exit 127 with no network access.

- Drops `npx` from the `_check:links` and `refcache` scripts: the bins come from the git-only `link-cache` devDependency, so they are never fetchable from the npm registry by those names.
- With `npx`, a stale or missing `node_modules` silently falls back to the public registry, executing whatever package holds the name there. Bare bin names resolve via `node_modules/.bin` (on the PATH under `npm run`) and fail loudly (exit 127, no network) when the install is missing.
@chalin chalin added this to the 0.16.0 milestone Jul 22, 2026
@chalin
chalin merged commit 848374e into docsy:main Jul 22, 2026
16 checks passed
@chalin
chalin deleted the chalin-drop-npx-from-link-scripts-2026-0722 branch July 22, 2026 12:28
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