Skip to content

Nub 0.11.3

Latest

Choose a tag to compare

@github-actions github-actions released this 27 Nov 19:33
5ac70b9

Nub v0.11.3 resolves dependency ranges the way npm does, and runs the pnpm version that pnpm-lock.yaml records under a devEngines range.

A pnpm 11 pin that v0.11.2 wrote in a project with no lockfile needs one command, listed in Upgrading from v0.11.2.

Dependency ranges

A range with <= over a partial version now resolves to the version npm and pnpm install (#1144). Nub read <=6 as <=6.0.0-0, so it installed the newest 5.x:

Range npm and pnpm v0.11.2 v0.11.3
semver@<=6 6.3.2 5.7.3 6.3.2
semver@<=6.2 6.2.0 6.1.3 6.2.0
typescript@<=4.9 4.9.5 4.8.4 4.9.5
react@<=17 17.0.2 16.14.0 17.0.2

What it covers:

  • Every range Nub reads. Dependencies, nub add, overrides and npm: aliases all resolve the same way.
  • Unsatisfiable sets. In >=17 <=16 || 15.7.0, the first set matches nothing, so the range installs react 15.7.0. It installed 19.3.1.

pnpm version ranges

A devEngines.packageManager range now runs the pnpm version that pnpm-lock.yaml records, while the range allows it (#1143). It re-resolved the newest pnpm in range on every run.

The nub pm which command names that source:

» resolved from pnpm-lock.yaml within devEngines.packageManager (pnpm@11.20.0)

What changed, for pnpm 11.1.3 and later:

  • Downloads. A cold download is checked against the integrity the lockfile records, and a warm cache needs no network.
  • Updates. Under a range you wrote, nub pm update records the new version in pnpm-lock.yaml and removes packageManager. It wrote packageManager beside the range, and pnpm 11 warned on every command.
  • Range syntax. Package-manager ranges are read as npm reads them, so 11.20.0 - 11.29.0 and ^11.20.0 || ^12.0.0 resolve.

Upgrading from v0.11.2

  • A v0.11.2 pin with no lockfile warns on pnpm 11.8 and later. After nub pm use pnpm@11.x in a project with no pnpm-lock.yaml, v0.11.2 put the hash on packageManager alone, and pnpm 11.8+ prints Cannot use both "packageManager" and "devEngines.packageManager" on every command. Run the same nub pm use command again with v0.11.3 to rewrite the pin (#1141).

What's Changed

  • pm: keep the pnpm 11 pin digest without a pnpm warning by @colinhacks in #1141
  • pm: run a pnpm 11.1.3+ devEngines range at the version pnpm-lock.yaml records by @colinhacks in #1143
  • pm: read dependency ranges as npm does by @colinhacks in #1144

Full Changelog: v0.11.2...v0.11.3