← Blog
The Nub Team

Nub 0.11.1

Nub provisions Yarn 2 and later pins without a committed release, refreshes its packageExtensions database, and starts on Node builds without module.register().

Nub 0.11.1 provisions Yarn 2+ (Berry) pins without a committed release, refreshes the bundled packageExtensions database, and starts on Node builds that have removed module.register().

Nub is an all-in-one toolkit for Node.js written in Rust. The nub command is flag-for-flag compatible with node, while adding full support for TypeScript, JSX, tsconfig.json, .env loading, and modern Web and ECMAScript APIs. It also includes a fast script runner (nub run), package runner (nubx), Node version manager (nub node), and pnpm-compatible package manager.

Yarn Berry pins

A packageManager or devEngines.packageManager pin to Yarn 2 or later now downloads and runs like a pnpm, npm or Yarn 1 pin (#1124, fixes #1029). It failed with "yarn 2+ (Berry) requires a committed release" unless the project committed one and set yarnPath.

nub pm use yarn@4
AreaWhat changed
DownloadBerry comes from @yarnpkg/cli-dist on the configured registry, from 2.4.1 on. A committed yarnPath release still takes precedence.
Pin hashesA +sha512 hash is checked against yarn.js, the file Corepack hashes, so a pin either tool wrote verifies in both.
Writing pinsnub pm use yarn@4 and nub pm update write Berry pins. Converting another manager's lockfile to Berry's format is refused.
Unpinned projectsWith no pin and no yarn on PATH, a Berry yarn.lock selects only Yarn releases that write that lockfile format.

Breaking changes

  • An exact package-manager pin to a version that was never published now errors. A pin such as pnpm@9.1.0 resolved the newest release in that major (#1124)

Bug fixes

PRWhat changed
#1125packageExtensions database. Refreshed to @nubjs/extensions 1.0.54. nitro no longer gains croner, scule, ufo and unctx, which it now declares, and the object.hasown and string.prototype.codepointat rules are gone. Existing lockfiles do not change.
#1127Node without module.register(). With --no-experimental-require-module on a Node 28 nightly, which removes module.register(), every process crashed at startup with TypeError: module_.register is not a function. Nub now prints one line saying its hooks are off and runs the program on plain Node.

The full release notes list every change in this release.

Get started

View repo