fetchPnpmDeps: drop fetcherVersion = 3 for pnpm_11 and the related test

This commit is contained in:
Gutyina Gergő
2026-07-07 13:34:28 +02:00
parent 936870572e
commit de25c842e5
8 changed files with 4 additions and 136 deletions
@@ -65,6 +65,10 @@ in
builtins.elem fetcherVersion supportedFetcherVersions
|| throw "fetchPnpmDeps `fetcherVersion` is not set to a supported value (${lib.concatStringsSep ", " (map toString supportedFetcherVersions)}), see https://nixos.org/manual/nixpkgs/stable/#javascript-pnpm-fetcherVersion.";
assert
!(fetcherVersion == 3 && lib.versionAtLeast pnpm.version "11.0.0")
|| throw "fetchPnpmDeps `fetcherVersion = 3` is no longer supported for `pnpm_11`. Please upgrade to the latest, see https://nixos.org/manual/nixpkgs/stable/#javascript-pnpm-fetcherVersion.";
stdenvNoCC.mkDerivation (
finalAttrs:
(
-1
View File
@@ -8,7 +8,6 @@
pnpm-empty-lockfile = callPackage ./pnpm-empty-lockfile { };
pnpm-fixup-state-db = callPackage ./pnpm-fixup-state-db { };
pnpm-workspaces = lib.recurseIntoAttrs (callPackage ./pnpm-workspaces { });
pnpm_11_v3 = callPackage ./pnpm_11_v3 { };
pnpm_11_v4 = callPackage ./pnpm_11_v4 { };
# pnpm reverse dependencies that don't have a top-level package
-60
View File
@@ -1,60 +0,0 @@
{
fetchPnpmDeps,
lib,
makeShellWrapper,
nodejs-slim,
pnpmConfigHook,
pnpm_11,
stdenv,
testers,
}:
let
pnpm = pnpm_11;
in
stdenv.mkDerivation (finalAttrs: {
pname = "pnpm-test";
inherit (pnpm) version;
src = ./src;
pnpmDeps = testers.invalidateFetcherByDrvHash fetchPnpmDeps {
inherit (finalAttrs) pname version src;
inherit pnpm;
fetcherVersion = 3;
hash = "sha256-+Vrv5ZiVIARDZrR5/4OYRmaecQQZmcZFtMjK4qhXKb8=";
};
nativeBuildInputs = [
makeShellWrapper
nodejs-slim
pnpm
pnpmConfigHook
];
buildPhase = ''
runHook preBuild
pnpm build
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm644 -t $out/lib/pnpm-11-test dist/index.js
makeWrapper ${lib.getExe nodejs-slim} $out/bin/pnpm-11-test \
--add-flags "$out/lib/pnpm-11-test"
runHook postInstall
'';
__structuredAttrs = true;
meta = {
license = lib.licenses.mit;
mainProgram = "pnpm-11-test";
inherit (pnpm.meta) maintainers;
};
})
-2
View File
@@ -1,2 +0,0 @@
dist/
node_modules/
-1
View File
@@ -1 +0,0 @@
console.log("Hello World");
@@ -1,20 +0,0 @@
{
"name": "pnpm11test",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"start": "node dist/index.js"
},
"license": "MIT",
"packageManager": "pnpm",
"type": "module",
"files": [
"dist/"
],
"devDependencies": {
"@types/node": "^25.5.0",
"typescript": "^6.0.2"
}
}
-39
View File
@@ -1,39 +0,0 @@
lockfileVersion: '9.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
importers:
.:
devDependencies:
'@types/node':
specifier: ^25.5.0
version: 25.5.0
typescript:
specifier: ^6.0.2
version: 6.0.2
packages:
'@types/node@25.5.0':
resolution: {integrity: sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==}
typescript@6.0.2:
resolution: {integrity: sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==}
engines: {node: '>=14.17'}
hasBin: true
undici-types@7.18.2:
resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==}
snapshots:
'@types/node@25.5.0':
dependencies:
undici-types: 7.18.2
typescript@6.0.2: {}
undici-types@7.18.2: {}
@@ -1,13 +0,0 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "dist",
"rootDir": ".",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}