n8n: 2.36.8 -> 2.37.9, migrate to pnpm 11, harden update.sh

n8n >= 2.37.0 demands pnpm >= 11.22.0 via engines.pnpm and serialises
patchedDependencies as plain scalars in pnpm-lock.yaml (same
lockfileVersion '9.0'), which pnpm 10 cannot install. The pinned nixpkgs
only ships pnpm_11 11.17.0, so:

- build with pnpm_11 + fetcherVersion 4 and relax the engines.pnpm gate
  in package.json (relaxPnpmEngine) for both fetchPnpmDeps and the main
  build; swap pnpm_10 -> pnpm_11 in nativeBuildInputs
- drop the workaround once nixpkgs ships pnpm >= 11.22

update.sh: detect ERR_PNPM_UNSUPPORTED_ENGINE /
ERR_PNPM_LOCKFILE_CONFIG_MISMATCH with actionable hints, sync
tests/n8n-overlay-test.nix expectations (checks were stale at 2.32.6),
guard against leftover fake-hash sentinels, and run from the repo root
so the relative nix --expr paths resolve.

Verified: n8n-overlay check green, full n8n 2.37.9 build green.
This commit is contained in:
2026-09-04 08:04:34 +02:00
parent 8f2d1beba3
commit c22cb5f3a7
3 changed files with 117 additions and 26 deletions
+3 -3
View File
@@ -15,9 +15,9 @@
modifiedPkgs = mkPkgs [self.overlays.modifications];
defaultPkgs = mkPkgs [self.overlays.default];
expectedVersion = "2.32.6";
expectedSrcHash = "sha256-wWm6vGyJ2I2SBU38gRGaZG2FR5FBxH6V/sWQwn5B4Ac=";
expectedPnpmHash = "sha256-QzUJCF+VIku9/HrmiUR9FNCU3MlYtyKOILZjFNXvN8U=";
expectedVersion = "2.37.9";
expectedSrcHash = "sha256-DFoXCtn+rM69ISKVV2aet8LfGCOsN29yuyYOpz0f71U=";
expectedPnpmHash = "sha256-4SFl0JD4iQc4tQFtJvNWkYCVyT6sj7+id/BrJEaTl8E=";
expectedChangelog = "https://github.com/n8n-io/n8n/releases/tag/n8n@${expectedVersion}";
expectedRootNodeModuleSymlinks = [
"ln -s .pnpm/node_modules/sass-embedded node_modules/sass-embedded"