Files
pack/core/providers/node
2543f736d6 feat: use mise node version when installing node alongside bun (#341)
* Use mise to install Node.js instead of apt packages

When Bun is installed but Node.js is not required in the final image,
the provider now uses mise to install Node.js instead of installing
it via apt packages. This provides better version management and
consistency with the rest of the mise-based tooling.

Key changes:
- Install Node.js via mise with default version "latest"
- Check for version specifications in NODE_VERSION env var, .nvmrc,
  and .node-version files
- Support mise.toml and .tool-versions configuration files
- Remove apt package installation of nodejs in this scenario

This ensures Node.js is available for build steps (e.g., node-gyp for
native modules) while respecting user-specified versions and providing
consistent version management across all tools.

* Simplify Node.js version detection for Bun projects

When Node.js needs to be installed for Bun projects (for build tools
like node-gyp), keep the version detection simple:

- Default to "latest"
- Let UseMiseVersions handle mise.toml and .tool-versions

Added a TODO to implement full version detection logic in the future
(NODE_VERSION env var, package.json engines, .nvmrc, .node-version).

* Only check mise versions for packages that are installed

Instead of unconditionally checking mise versions for both node and bun,
only add packages to the UseMiseVersions check if they were actually
added to the mise step. This is more efficient and makes the intent
clearer.

* Track mise packages as they're added instead of re-checking conditions

Build a list of mise packages as they're added to miseStep, then use
that list for UseMiseVersions. This avoids duplicating the conditional
logic and makes it clear which packages we're checking versions for.

* test: snapshot update

---------

Co-authored-by: Hanzo Dev <[email protected]>
2025-11-12 16:46:34 -07:00
..
2025-08-18 14:11:42 -04:00
2025-08-18 14:11:42 -04:00