← Blog
The Nub Team

Nub 0.2.9: isolated node_modules by default

The default node_modules layout is now isolated for npm, Yarn, and Bun projects, backed by a global virtual store, alongside install-performance and diagnostics work.

This release changes the default node_modules layout to isolated for npm, Yarn, and Bun projects, alongside install-performance and diagnostics work.

[!IMPORTANT] The default node_modules layout is now isolated. npm, Yarn, Bun, and pnpm incumbents — and fresh projects — now install with the isolated linker backed by a global virtual store, instead of the flat hoisted tree. The first nub install after upgrading does a one-time clean reinstall of node_modules. To keep the flat npm-style layout, add node-linker=hoisted to .npmrc, or pass --node-linker hoisted for a single command.

The default layout

Every incumbent now defaults to isolated — npm, Yarn, and Bun join pnpm and Nub-identity projects. Isolated links each package into a global virtual store and symlinks the declared dependency graph into node_modules, so only declared dependencies are reachable. (#238)

next, nuxt, and parcel default to strict isolated with the global virtual store auto-disabled, matching how those toolchains expect node_modules to be laid out.

Install performance

AreaWhat changed
Warm installsA fully-satisfied, unchanged tree exits "Already up to date" without re-running resolve, fetch, or link, even under the default no-downgrade trust policy (#234)
Isolated installsThe isolated materialize step overlaps with package fetch instead of running after it (#235)

Diagnostics

The engine's diagnostics layer is reachable under Nub via NUB_DIAG_* environment variables, and install phase debug lines are annotated with work counts and a no-work marker, so a warm no-op install is legible in the phase output. (#233, #236)

The full release notes list every change in this release.