Skip to content

chore(deps): replace nypm with package-manager-detector - #572

Merged
antfu merged 3 commits into
mainfrom
deps/replace-nypm-with-pm-detector
Sep 15, 2026
Merged

antfu merged 3 commits into
mainfrom
deps/replace-nypm-with-pm-detector

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

Description

Replaces the unified nypm package-manager API with antfu-collective's package-manager-detector across the packages that install optional integrations on demand.

  • Detection now goes through detect({ cwd }) (agent + version) instead of detectPackageManager.
  • Install / dlx command lines are resolved with resolveCommand(agent, 'add' | 'execute', args):
    • packages/kit createInstallLauncher resolves the add -D <specs> command and runs it as a tracked terminal session.
    • packages/oxc oxlint/oxfmt setup build their add/execute (dlx) command strings via a small shared utils/package-manager helper.
    • packages/vitest runs the resolved add -D @vitest/ui install through tinyexec (since package-manager-detector resolves commands rather than executing them), surfacing failures via VTDT0001.
  • Catalog swaps nypm for package-manager-detector; tinyexec added to @vitejs/devtools-vitest. Remaining nypm entries in the lockfile are transitive (nuxt/devtools et al.).
  • Docs (AGENTS.md, DTK0050, VTDT0001) updated to reference the new dependency.

Verified with pnpm lint, pnpm test, pnpm typecheck, and pnpm build.

Linked Issues

Additional context

This PR was created with the help of an agent.

@pkg-pr-new

pkg-pr-new Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/@vitejs/devtools@572

@vitejs/devtools-kit

npm i https://pkg.pr.new/@vitejs/devtools-kit@572

@vitejs/devtools-oxc

npm i https://pkg.pr.new/@vitejs/devtools-oxc@572

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/@vitejs/devtools-rolldown@572

@vitejs/devtools-vite

npm i https://pkg.pr.new/@vitejs/devtools-vite@572

@vitejs/devtools-vitest

npm i https://pkg.pr.new/@vitejs/devtools-vitest@572

commit: 247ba52

Swap the unified nypm package-manager API for antfu-collective's
package-manager-detector across kit, vitest, and oxc. Detection now goes
through `detect`, and install/dlx command lines are resolved via
`resolveCommand`, with the vitest launcher running its `@vitest/ui`
install through tinyexec.
Run the on-demand `@vitest/ui` install through
`ctx.terminals.startChildProcess` instead of tinyexec, so the install
streams into DevTools as a tracked terminal session (matching the oxc
setup and the kit install launcher). Drops the now-unused tinyexec dep.
`@clack/prompts` 1.8.1 types the prompt cancel value as a `unique
symbol`, which stopped narrowing out of `promptValue`'s return, breaking
the release-script typecheck. Return `Exclude<T, symbol>` so callers see
the prompt value without the cancel symbol.
@antfubot
antfubot force-pushed the deps/replace-nypm-with-pm-detector branch from f50c605 to 247ba52 Compare September 15, 2026 01:57
@antfu
antfu merged commit 07cdd9e into main Sep 15, 2026
10 checks passed
@antfu
antfu deleted the deps/replace-nypm-with-pm-detector branch September 15, 2026 02:01
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