Shims and Package Managers
Nodeup preserves rustup-like shim behavior: one binary can be invoked through managed executable names and dispatch based on argv[0].
Managed Aliases
Nodeup recognizes these executable names:
nodenpmnpxyarnpnpm
If the binary is linked or copied as one of those names, Nodeup:
- Resolves the active runtime by directory override or global default.
- Installs a missing version runtime selected by that active selector.
- Plans the delegated command.
- Runs the resolved executable with inherited stdio.
Normal management commands still use the nodeup executable name.
Direct Dispatch
For node, npm, npx, and non-package-manager commands, Nodeup resolves the command under the selected runtime's bin/ directory.
On Windows, primary executable names are normalized:
node->node.exenpm,npx,yarn,pnpm,corepack-><command>.cmd- other commands ->
<command>.exe
packageManager Discovery
For yarn and pnpm, Nodeup searches for the nearest package.json from the current working directory upward.
If package.json contains packageManager, it must be a string in this format:
Strict rules:
- Supported managers are
yarnandpnpm. - Versions must be exact semantic versions.
- The requested command must match the configured manager.
- Unsupported managers and malformed values fail with
invalid-input. - Manager-command mismatches fail with
conflict.
Corepack is out of scope. Nodeup uses the selected runtime's npm exec.
yarn Mapping
yarn@1.x.y maps to the classic Yarn package:
yarn@2+ maps to Yarn's CLI distribution package:
When packageManager is absent and the runtime has bin/yarn, Nodeup runs it directly. Otherwise it falls back to:
pnpm Mapping
Pinned pnpm maps to:
When packageManager is absent and the runtime has bin/pnpm, Nodeup runs it directly. Otherwise it falls back to:
which Behavior
nodeup which yarn and nodeup which pnpm use the same planning rules as execution.
- Direct mode prints the runtime's
yarnorpnpmexecutable. - npm-exec mode prints the runtime's
npmexecutable becausenpm execwill run the package-manager CLI.
Failure Examples
This fails with conflict:
This fails with invalid-input: