@rushstack/rush-resolver-cache-plugin 5.172.1 → 5.174.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-commonjs/afterInstallAsync.js +19 -6
- package/lib-commonjs/afterInstallAsync.js.map +1 -1
- package/lib-commonjs/computeResolverCacheFromLockfileAsync.js +17 -11
- package/lib-commonjs/computeResolverCacheFromLockfileAsync.js.map +1 -1
- package/lib-commonjs/helpers.js +36 -75
- package/lib-commonjs/helpers.js.map +1 -1
- package/lib-commonjs/pnpm/depPath/common.js +38 -0
- package/lib-commonjs/pnpm/depPath/common.js.map +1 -0
- package/lib-commonjs/pnpm/depPath/hash.js +43 -0
- package/lib-commonjs/pnpm/depPath/hash.js.map +1 -0
- package/lib-commonjs/pnpm/depPath/v10.js +15 -0
- package/lib-commonjs/pnpm/depPath/v10.js.map +1 -0
- package/lib-commonjs/pnpm/depPath/v8.js +26 -0
- package/lib-commonjs/pnpm/depPath/v8.js.map +1 -0
- package/lib-commonjs/pnpm/depPath/v9.js +15 -0
- package/lib-commonjs/pnpm/depPath/v9.js.map +1 -0
- package/lib-commonjs/pnpm/keys/v6.js +10 -0
- package/lib-commonjs/pnpm/keys/v6.js.map +1 -0
- package/lib-commonjs/pnpm/keys/v9.js +10 -0
- package/lib-commonjs/pnpm/keys/v9.js.map +1 -0
- package/lib-commonjs/pnpm/pnpmVersionHelpers.js +55 -0
- package/lib-commonjs/pnpm/pnpmVersionHelpers.js.map +1 -0
- package/lib-commonjs/pnpm/store/v10.js +38 -0
- package/lib-commonjs/pnpm/store/v10.js.map +1 -0
- package/lib-commonjs/pnpm/store/v3.js +10 -0
- package/lib-commonjs/pnpm/store/v3.js.map +1 -0
- package/lib-commonjs/pnpm/v10.js +14 -0
- package/lib-commonjs/pnpm/v10.js.map +1 -0
- package/lib-commonjs/pnpm/v8.js +14 -0
- package/lib-commonjs/pnpm/v8.js.map +1 -0
- package/lib-commonjs/pnpm/v9.js +16 -0
- package/lib-commonjs/pnpm/v9.js.map +1 -0
- package/lib-commonjs/types.js.map +1 -1
- package/lib-dts/afterInstallAsync.d.ts.map +1 -1
- package/lib-dts/computeResolverCacheFromLockfileAsync.d.ts +7 -0
- package/lib-dts/computeResolverCacheFromLockfileAsync.d.ts.map +1 -1
- package/lib-dts/helpers.d.ts +17 -9
- package/lib-dts/helpers.d.ts.map +1 -1
- package/lib-dts/pnpm/depPath/common.d.ts +8 -0
- package/lib-dts/pnpm/depPath/common.d.ts.map +1 -0
- package/lib-dts/pnpm/depPath/hash.d.ts +3 -0
- package/lib-dts/pnpm/depPath/hash.d.ts.map +1 -0
- package/lib-dts/pnpm/depPath/v10.d.ts +2 -0
- package/lib-dts/pnpm/depPath/v10.d.ts.map +1 -0
- package/lib-dts/pnpm/depPath/v8.d.ts +2 -0
- package/lib-dts/pnpm/depPath/v8.d.ts.map +1 -0
- package/lib-dts/pnpm/depPath/v9.d.ts +2 -0
- package/lib-dts/pnpm/depPath/v9.d.ts.map +1 -0
- package/lib-dts/pnpm/keys/v6.d.ts +2 -0
- package/lib-dts/pnpm/keys/v6.d.ts.map +1 -0
- package/lib-dts/pnpm/keys/v9.d.ts +2 -0
- package/lib-dts/pnpm/keys/v9.d.ts.map +1 -0
- package/lib-dts/pnpm/pnpmVersionHelpers.d.ts +38 -0
- package/lib-dts/pnpm/pnpmVersionHelpers.d.ts.map +1 -0
- package/lib-dts/pnpm/store/v10.d.ts +3 -0
- package/lib-dts/pnpm/store/v10.d.ts.map +1 -0
- package/lib-dts/pnpm/store/v3.d.ts +3 -0
- package/lib-dts/pnpm/store/v3.d.ts.map +1 -0
- package/lib-dts/pnpm/v10.d.ts +3 -0
- package/lib-dts/pnpm/v10.d.ts.map +1 -0
- package/lib-dts/pnpm/v8.d.ts +3 -0
- package/lib-dts/pnpm/v8.d.ts.map +1 -0
- package/lib-dts/pnpm/v9.d.ts +3 -0
- package/lib-dts/pnpm/v9.d.ts.map +1 -0
- package/lib-dts/types.d.ts +1 -0
- package/lib-dts/types.d.ts.map +1 -1
- package/lib-esm/afterInstallAsync.js +19 -6
- package/lib-esm/afterInstallAsync.js.map +1 -1
- package/lib-esm/computeResolverCacheFromLockfileAsync.js +18 -12
- package/lib-esm/computeResolverCacheFromLockfileAsync.js.map +1 -1
- package/lib-esm/helpers.js +35 -72
- package/lib-esm/helpers.js.map +1 -1
- package/lib-esm/pnpm/depPath/common.js +34 -0
- package/lib-esm/pnpm/depPath/common.js.map +1 -0
- package/lib-esm/pnpm/depPath/hash.js +39 -0
- package/lib-esm/pnpm/depPath/hash.js.map +1 -0
- package/lib-esm/pnpm/depPath/v10.js +12 -0
- package/lib-esm/pnpm/depPath/v10.js.map +1 -0
- package/lib-esm/pnpm/depPath/v8.js +23 -0
- package/lib-esm/pnpm/depPath/v8.js.map +1 -0
- package/lib-esm/pnpm/depPath/v9.js +12 -0
- package/lib-esm/pnpm/depPath/v9.js.map +1 -0
- package/lib-esm/pnpm/keys/v6.js +7 -0
- package/lib-esm/pnpm/keys/v6.js.map +1 -0
- package/lib-esm/pnpm/keys/v9.js +7 -0
- package/lib-esm/pnpm/keys/v9.js.map +1 -0
- package/lib-esm/pnpm/pnpmVersionHelpers.js +19 -0
- package/lib-esm/pnpm/pnpmVersionHelpers.js.map +1 -0
- package/lib-esm/pnpm/store/v10.js +35 -0
- package/lib-esm/pnpm/store/v10.js.map +1 -0
- package/lib-esm/pnpm/store/v3.js +7 -0
- package/lib-esm/pnpm/store/v3.js.map +1 -0
- package/lib-esm/pnpm/v10.js +11 -0
- package/lib-esm/pnpm/v10.js.map +1 -0
- package/lib-esm/pnpm/v8.js +11 -0
- package/lib-esm/pnpm/v8.js.map +1 -0
- package/lib-esm/pnpm/v9.js +13 -0
- package/lib-esm/pnpm/v9.js.map +1 -0
- package/lib-esm/types.js.map +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.createBase32Hash = createBase32Hash;
|
|
6
|
+
exports.createShortSha256Hash = createShortSha256Hash;
|
|
7
|
+
// Hash functions vendored from pnpm to avoid transitive dependencies.
|
|
8
|
+
//
|
|
9
|
+
// createBase32Hash (MD5 base32, used by pnpm 8 and 9):
|
|
10
|
+
// https://github.com/pnpm/pnpm/blob/afe8ecef1f24812845b699c141d52643d1524079/packages/crypto.base32-hash/src/index.ts
|
|
11
|
+
// base32 encoding (from rfc4648):
|
|
12
|
+
// https://github.com/swansontec/rfc4648.js/blob/ead9c9b4b68e5d4a529f32925da02c02984e772c/src/codec.ts#L82-L118
|
|
13
|
+
//
|
|
14
|
+
// createShortSha256Hash (SHA-256 hex truncated to 32 chars, used by pnpm 10):
|
|
15
|
+
// https://github.com/pnpm/pnpm/blob/42ecf04fd0e442af8610ae4231855e004732dbf7/crypto/hash/src/index.ts
|
|
16
|
+
const node_crypto_1 = require("node:crypto");
|
|
17
|
+
const BASE32 = 'abcdefghijklmnopqrstuvwxyz234567'.split('');
|
|
18
|
+
function createBase32Hash(input) {
|
|
19
|
+
const data = (0, node_crypto_1.createHash)('md5').update(input).digest();
|
|
20
|
+
const mask = 0x1f;
|
|
21
|
+
let out = '';
|
|
22
|
+
let bits = 0;
|
|
23
|
+
let buffer = 0;
|
|
24
|
+
for (let i = 0; i < data.length; ++i) {
|
|
25
|
+
// eslint-disable-next-line no-bitwise
|
|
26
|
+
buffer = (buffer << 8) | (0xff & data[i]);
|
|
27
|
+
bits += 8;
|
|
28
|
+
while (bits > 5) {
|
|
29
|
+
bits -= 5;
|
|
30
|
+
// eslint-disable-next-line no-bitwise
|
|
31
|
+
out += BASE32[mask & (buffer >> bits)];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (bits) {
|
|
35
|
+
// eslint-disable-next-line no-bitwise
|
|
36
|
+
out += BASE32[mask & (buffer << (5 - bits))];
|
|
37
|
+
}
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
function createShortSha256Hash(input) {
|
|
41
|
+
return (0, node_crypto_1.createHash)('sha256').update(input).digest('hex').substring(0, 32);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=hash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../../../src/pnpm/depPath/hash.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAgB3D,4CA0BC;AAED,sDAEC;AA5CD,sEAAsE;AACtE,EAAE;AACF,uDAAuD;AACvD,wHAAwH;AACxH,kCAAkC;AAClC,iHAAiH;AACjH,EAAE;AACF,8EAA8E;AAC9E,wGAAwG;AAExG,6CAAyC;AAEzC,MAAM,MAAM,GAAa,kCAAkC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAEtE,SAAgB,gBAAgB,CAAC,KAAa;IAC5C,MAAM,IAAI,GAAW,IAAA,wBAAU,EAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;IAE9D,MAAM,IAAI,GAAS,IAAI,CAAC;IACxB,IAAI,GAAG,GAAW,EAAE,CAAC;IAErB,IAAI,IAAI,GAAW,CAAC,CAAC;IACrB,IAAI,MAAM,GAAW,CAAC,CAAC;IACvB,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QAC7C,sCAAsC;QACtC,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,IAAI,IAAI,CAAC,CAAC;QAEV,OAAO,IAAI,GAAG,CAAC,EAAE,CAAC;YAChB,IAAI,IAAI,CAAC,CAAC;YACV,sCAAsC;YACtC,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;IAED,IAAI,IAAI,EAAE,CAAC;QACT,sCAAsC;QACtC,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAgB,qBAAqB,CAAC,KAAa;IACjD,OAAO,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC3E,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// Hash functions vendored from pnpm to avoid transitive dependencies.\n//\n// createBase32Hash (MD5 base32, used by pnpm 8 and 9):\n// https://github.com/pnpm/pnpm/blob/afe8ecef1f24812845b699c141d52643d1524079/packages/crypto.base32-hash/src/index.ts\n// base32 encoding (from rfc4648):\n// https://github.com/swansontec/rfc4648.js/blob/ead9c9b4b68e5d4a529f32925da02c02984e772c/src/codec.ts#L82-L118\n//\n// createShortSha256Hash (SHA-256 hex truncated to 32 chars, used by pnpm 10):\n// https://github.com/pnpm/pnpm/blob/42ecf04fd0e442af8610ae4231855e004732dbf7/crypto/hash/src/index.ts\n\nimport { createHash } from 'node:crypto';\n\nconst BASE32: string[] = 'abcdefghijklmnopqrstuvwxyz234567'.split('');\n\nexport function createBase32Hash(input: string): string {\n const data: Buffer = createHash('md5').update(input).digest();\n\n const mask: 0x1f = 0x1f;\n let out: string = '';\n\n let bits: number = 0;\n let buffer: number = 0;\n for (let i: number = 0; i < data.length; ++i) {\n // eslint-disable-next-line no-bitwise\n buffer = (buffer << 8) | (0xff & data[i]);\n bits += 8;\n\n while (bits > 5) {\n bits -= 5;\n // eslint-disable-next-line no-bitwise\n out += BASE32[mask & (buffer >> bits)];\n }\n }\n\n if (bits) {\n // eslint-disable-next-line no-bitwise\n out += BASE32[mask & (buffer << (5 - bits))];\n }\n\n return out;\n}\n\nexport function createShortSha256Hash(input: string): string {\n return createHash('sha256').update(input).digest('hex').substring(0, 32);\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.depPathToFilename = void 0;
|
|
6
|
+
// Vendored from \@pnpm/dependency-path\@1000.0.1 (pnpm v10.0.0).
|
|
7
|
+
// https://github.com/pnpm/pnpm/blob/42ecf04fd0e442af8610ae4231855e004732dbf7/packages/dependency-path/src/index.ts
|
|
8
|
+
const common_1 = require("./common");
|
|
9
|
+
const hash_1 = require("./hash");
|
|
10
|
+
exports.depPathToFilename = (0, common_1.createDepPathToFilename)({
|
|
11
|
+
specialCharsRegex: /[\\/:*?"<>|#]/g,
|
|
12
|
+
maxLengthWithoutHash: 120 - 32 - 1,
|
|
13
|
+
hashFn: hash_1.createShortSha256Hash
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=v10.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v10.js","sourceRoot":"","sources":["../../../src/pnpm/depPath/v10.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,iEAAiE;AACjE,mHAAmH;AAEnH,qCAAmD;AACnD,iCAA+C;AAElC,QAAA,iBAAiB,GAAgC,IAAA,gCAAuB,EAAC;IACpF,iBAAiB,EAAE,gBAAgB;IACnC,oBAAoB,EAAE,GAAG,GAAG,EAAE,GAAG,CAAC;IAClC,MAAM,EAAE,4BAAqB;CAC9B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// Vendored from \\@pnpm/dependency-path\\@1000.0.1 (pnpm v10.0.0).\n// https://github.com/pnpm/pnpm/blob/42ecf04fd0e442af8610ae4231855e004732dbf7/packages/dependency-path/src/index.ts\n\nimport { createDepPathToFilename } from './common';\nimport { createShortSha256Hash } from './hash';\n\nexport const depPathToFilename: (depPath: string) => string = createDepPathToFilename({\n specialCharsRegex: /[\\\\/:*?\"<>|#]/g,\n maxLengthWithoutHash: 120 - 32 - 1,\n hashFn: createShortSha256Hash\n});\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.depPathToFilename = void 0;
|
|
6
|
+
// Based on \@pnpm/dependency-path\@2.1.8 (pnpm v8.15.9).
|
|
7
|
+
// https://github.com/pnpm/pnpm/blob/afe8ecef1f24812845b699c141d52643d1524079/packages/dependency-path/src/index.ts
|
|
8
|
+
//
|
|
9
|
+
// NOTE: The original pnpm source's depPathToFilenameUnescaped uses lastIndexOf('/')
|
|
10
|
+
// to find the version separator. This works for pnpm's internal dep paths which use '/'
|
|
11
|
+
// before the version (e.g. /@babel/code-frame/7.24.2), but NOT for lockfile v6 keys
|
|
12
|
+
// which use '@' (e.g. /@babel/code-frame@7.24.2). For scoped packages, lastIndexOf('/')
|
|
13
|
+
// would find the scope separator and produce @babel@code-frame@7.24.2 instead of the
|
|
14
|
+
// correct @babel+code-frame@7.24.2 (where the scope '/' is replaced by '+' via regex).
|
|
15
|
+
//
|
|
16
|
+
// We use the shared depPathToFilenameUnescaped (indexOf('@', 1)) from common.ts which
|
|
17
|
+
// correctly handles lockfile key format. The hash algorithm and special-char regex are
|
|
18
|
+
// identical to pnpm 9.
|
|
19
|
+
const common_1 = require("./common");
|
|
20
|
+
const hash_1 = require("./hash");
|
|
21
|
+
exports.depPathToFilename = (0, common_1.createDepPathToFilename)({
|
|
22
|
+
specialCharsRegex: /[\\/:*?"<>|]/g,
|
|
23
|
+
maxLengthWithoutHash: 120 - 26 - 1,
|
|
24
|
+
hashFn: hash_1.createBase32Hash
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=v8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v8.js","sourceRoot":"","sources":["../../../src/pnpm/depPath/v8.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,yDAAyD;AACzD,mHAAmH;AACnH,EAAE;AACF,oFAAoF;AACpF,wFAAwF;AACxF,oFAAoF;AACpF,wFAAwF;AACxF,qFAAqF;AACrF,uFAAuF;AACvF,EAAE;AACF,sFAAsF;AACtF,uFAAuF;AACvF,uBAAuB;AAEvB,qCAAmD;AACnD,iCAA0C;AAE7B,QAAA,iBAAiB,GAAgC,IAAA,gCAAuB,EAAC;IACpF,iBAAiB,EAAE,eAAe;IAClC,oBAAoB,EAAE,GAAG,GAAG,EAAE,GAAG,CAAC;IAClC,MAAM,EAAE,uBAAgB;CACzB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// Based on \\@pnpm/dependency-path\\@2.1.8 (pnpm v8.15.9).\n// https://github.com/pnpm/pnpm/blob/afe8ecef1f24812845b699c141d52643d1524079/packages/dependency-path/src/index.ts\n//\n// NOTE: The original pnpm source's depPathToFilenameUnescaped uses lastIndexOf('/')\n// to find the version separator. This works for pnpm's internal dep paths which use '/'\n// before the version (e.g. /@babel/code-frame/7.24.2), but NOT for lockfile v6 keys\n// which use '@' (e.g. /@babel/code-frame@7.24.2). For scoped packages, lastIndexOf('/')\n// would find the scope separator and produce @babel@code-frame@7.24.2 instead of the\n// correct @babel+code-frame@7.24.2 (where the scope '/' is replaced by '+' via regex).\n//\n// We use the shared depPathToFilenameUnescaped (indexOf('@', 1)) from common.ts which\n// correctly handles lockfile key format. The hash algorithm and special-char regex are\n// identical to pnpm 9.\n\nimport { createDepPathToFilename } from './common';\nimport { createBase32Hash } from './hash';\n\nexport const depPathToFilename: (depPath: string) => string = createDepPathToFilename({\n specialCharsRegex: /[\\\\/:*?\"<>|]/g,\n maxLengthWithoutHash: 120 - 26 - 1,\n hashFn: createBase32Hash\n});\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.depPathToFilename = void 0;
|
|
6
|
+
// Vendored from \@pnpm/dependency-path\@900.0.0 (pnpm v9.15.9).
|
|
7
|
+
// https://github.com/pnpm/pnpm/blob/d22a3f65ee047ecee7c89dd6f1971ecea4ecd4d4/packages/dependency-path/src/index.ts
|
|
8
|
+
const common_1 = require("./common");
|
|
9
|
+
const hash_1 = require("./hash");
|
|
10
|
+
exports.depPathToFilename = (0, common_1.createDepPathToFilename)({
|
|
11
|
+
specialCharsRegex: /[\\/:*?"<>|]/g,
|
|
12
|
+
maxLengthWithoutHash: 120 - 26 - 1,
|
|
13
|
+
hashFn: hash_1.createBase32Hash
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=v9.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v9.js","sourceRoot":"","sources":["../../../src/pnpm/depPath/v9.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,gEAAgE;AAChE,mHAAmH;AAEnH,qCAAmD;AACnD,iCAA0C;AAE7B,QAAA,iBAAiB,GAAgC,IAAA,gCAAuB,EAAC;IACpF,iBAAiB,EAAE,eAAe;IAClC,oBAAoB,EAAE,GAAG,GAAG,EAAE,GAAG,CAAC;IAClC,MAAM,EAAE,uBAAgB;CACzB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// Vendored from \\@pnpm/dependency-path\\@900.0.0 (pnpm v9.15.9).\n// https://github.com/pnpm/pnpm/blob/d22a3f65ee047ecee7c89dd6f1971ecea4ecd4d4/packages/dependency-path/src/index.ts\n\nimport { createDepPathToFilename } from './common';\nimport { createBase32Hash } from './hash';\n\nexport const depPathToFilename: (depPath: string) => string = createDepPathToFilename({\n specialCharsRegex: /[\\\\/:*?\"<>|]/g,\n maxLengthWithoutHash: 120 - 26 - 1,\n hashFn: createBase32Hash\n});\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.buildDependencyKey = buildDependencyKey;
|
|
6
|
+
// Lockfile v6 key format (used by pnpm 8): keys are prefixed with '/'.
|
|
7
|
+
function buildDependencyKey(name, specifier) {
|
|
8
|
+
return `/${name}@${specifier}`;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=v6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v6.js","sourceRoot":"","sources":["../../../src/pnpm/keys/v6.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAI3D,gDAEC;AAJD,uEAAuE;AAEvE,SAAgB,kBAAkB,CAAC,IAAY,EAAE,SAAiB;IAChE,OAAO,IAAI,IAAI,IAAI,SAAS,EAAE,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// Lockfile v6 key format (used by pnpm 8): keys are prefixed with '/'.\n\nexport function buildDependencyKey(name: string, specifier: string): string {\n return `/${name}@${specifier}`;\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.buildDependencyKey = buildDependencyKey;
|
|
6
|
+
// Lockfile v9 key format (used by pnpm 9 and 10): keys have no leading '/'.
|
|
7
|
+
function buildDependencyKey(name, specifier) {
|
|
8
|
+
return `${name}@${specifier}`;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=v9.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v9.js","sourceRoot":"","sources":["../../../src/pnpm/keys/v9.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAI3D,gDAEC;AAJD,4EAA4E;AAE5E,SAAgB,kBAAkB,CAAC,IAAY,EAAE,SAAiB;IAChE,OAAO,GAAG,IAAI,IAAI,SAAS,EAAE,CAAC;AAChC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// Lockfile v9 key format (used by pnpm 9 and 10): keys have no leading '/'.\n\nexport function buildDependencyKey(name: string, specifier: string): string {\n return `${name}@${specifier}`;\n}\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
21
|
+
var ownKeys = function(o) {
|
|
22
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
23
|
+
var ar = [];
|
|
24
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
25
|
+
return ar;
|
|
26
|
+
};
|
|
27
|
+
return ownKeys(o);
|
|
28
|
+
};
|
|
29
|
+
return function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.getPnpmVersionHelpersAsync = getPnpmVersionHelpersAsync;
|
|
39
|
+
/**
|
|
40
|
+
* Loads the version-specific pnpm helpers for the given major version.
|
|
41
|
+
* Uses async imports so that only the needed version's code is loaded.
|
|
42
|
+
*/
|
|
43
|
+
async function getPnpmVersionHelpersAsync(version) {
|
|
44
|
+
switch (version) {
|
|
45
|
+
case 8:
|
|
46
|
+
return (await Promise.resolve().then(() => __importStar(require('./v8')))).helpers;
|
|
47
|
+
case 9:
|
|
48
|
+
return (await Promise.resolve().then(() => __importStar(require('./v9')))).helpers;
|
|
49
|
+
case 10:
|
|
50
|
+
return (await Promise.resolve().then(() => __importStar(require('./v10')))).helpers;
|
|
51
|
+
default:
|
|
52
|
+
throw new Error(`Unsupported pnpm major version: ${version}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=pnpmVersionHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpmVersionHelpers.js","sourceRoot":"","sources":["../../src/pnpm/pnpmVersionHelpers.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2C3D,gEAWC;AAfD;;;GAGG;AACI,KAAK,UAAU,0BAA0B,CAAC,OAAyB;IACxE,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,CAAC;YACJ,OAAO,CAAC,wDAAa,MAAM,GAAC,CAAC,CAAC,OAAO,CAAC;QACxC,KAAK,CAAC;YACJ,OAAO,CAAC,wDAAa,MAAM,GAAC,CAAC,CAAC,OAAO,CAAC;QACxC,KAAK,EAAE;YACL,OAAO,CAAC,wDAAa,OAAO,GAAC,CAAC,CAAC,OAAO,CAAC;QACzC;YACE,MAAM,IAAI,KAAK,CAAC,mCAAmC,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type { IResolverContext } from '../types';\n\n/**\n * The major version of pnpm being used. Each version uses a different lockfile format\n * and store layout:\n * - pnpm 8: lockfile v6, store v3, MD5 base32 hash for dep paths\n * - pnpm 9: lockfile v9, store v3, MD5 base32 hash for dep paths\n * - pnpm 10: lockfile v9, store v10, SHA-256 hex hash for dep paths\n */\nexport type PnpmMajorVersion = 8 | 9 | 10;\n\n/**\n * Version-specific helpers for resolving pnpm dependency paths, lockfile keys,\n * and store index paths. Each pnpm major version has its own implementation.\n */\nexport interface IPnpmVersionHelpers {\n /**\n * Converts a pnpm dependency path to its on-disk folder name.\n * Uses MD5 base32 hashing for pnpm 8/9 and SHA-256 hex hashing for pnpm 10.\n */\n depPathToFilename(depPath: string): string;\n\n /**\n * Constructs the full lockfile package key from a package name and version specifier.\n * pnpm 8 uses `/{name}\\@{specifier}` (v6 key format); pnpm 9/10 use `{name}\\@{specifier}` (v9 key format).\n */\n buildDependencyKey(name: string, specifier: string): string;\n\n /**\n * Computes the pnpm store index file path for a given package integrity hash.\n * @param pnpmStorePath - The root pnpm store path (e.g. `~/.local/share/pnpm/store`)\n * @param context - The resolver context for the package (provides name/version for v10 paths)\n * @param hash - The hex-encoded integrity hash\n */\n getStoreIndexPath(pnpmStorePath: string, context: IResolverContext, hash: string): string;\n}\n\n/**\n * Loads the version-specific pnpm helpers for the given major version.\n * Uses async imports so that only the needed version's code is loaded.\n */\nexport async function getPnpmVersionHelpersAsync(version: PnpmMajorVersion): Promise<IPnpmVersionHelpers> {\n switch (version) {\n case 8:\n return (await import('./v8')).helpers;\n case 9:\n return (await import('./v9')).helpers;\n case 10:\n return (await import('./v10')).helpers;\n default:\n throw new Error(`Unsupported pnpm major version: ${version}`);\n }\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getStoreIndexPath = getStoreIndexPath;
|
|
6
|
+
// Store v10 index path format (used by pnpm 10):
|
|
7
|
+
// {storeDir}/v10/index/{hash[0:2]}/{hash[2:64]}-{name}@{version}.json
|
|
8
|
+
// Falls back to directory scan when the primary path doesn't exist.
|
|
9
|
+
const node_fs_1 = require("node:fs");
|
|
10
|
+
const SCOPE_SEPARATOR_REGEX = /\//g;
|
|
11
|
+
function getStoreIndexPath(pnpmStorePath, context, hash) {
|
|
12
|
+
// pnpm 10 truncates integrity hashes to 32 bytes (64 hex chars) for index paths.
|
|
13
|
+
const truncHash = hash.length > 64 ? hash.slice(0, 64) : hash;
|
|
14
|
+
const hashDir = truncHash.slice(0, 2);
|
|
15
|
+
const hashRest = truncHash.slice(2);
|
|
16
|
+
// pnpm 10 index path format: <hash (0-2)>/<hash (2-64)>-<name>@<version>.json
|
|
17
|
+
const pkgName = (context.name || '').replace(SCOPE_SEPARATOR_REGEX, '+');
|
|
18
|
+
const nameVer = context.version ? `${pkgName}@${context.version}` : pkgName;
|
|
19
|
+
let indexPath = `${pnpmStorePath}/v10/index/${hashDir}/${hashRest}-${nameVer}.json`;
|
|
20
|
+
// For truncated/hashed folder names, nameVer from the key may be wrong.
|
|
21
|
+
// Fallback: scan the directory for a file matching the hash prefix.
|
|
22
|
+
if (!(0, node_fs_1.existsSync)(indexPath)) {
|
|
23
|
+
const dir = `${pnpmStorePath}/v10/index/${hashDir}/`;
|
|
24
|
+
const filePrefix = `${hashRest}-`;
|
|
25
|
+
try {
|
|
26
|
+
const entries = (0, node_fs_1.readdirSync)(dir, { withFileTypes: true });
|
|
27
|
+
const match = entries.find((e) => e.isFile() && e.name.startsWith(filePrefix));
|
|
28
|
+
if (match) {
|
|
29
|
+
indexPath = dir + match.name;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch (_a) {
|
|
33
|
+
// ignore
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return indexPath;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=v10.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v10.js","sourceRoot":"","sources":["../../../src/pnpm/store/v10.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAY3D,8CAyBC;AAnCD,iDAAiD;AACjD,sEAAsE;AACtE,oEAAoE;AAEpE,qCAA+D;AAI/D,MAAM,qBAAqB,GAAW,KAAK,CAAC;AAE5C,SAAgB,iBAAiB,CAAC,aAAqB,EAAE,OAAyB,EAAE,IAAY;IAC9F,iFAAiF;IACjF,MAAM,SAAS,GAAW,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACtE,MAAM,OAAO,GAAW,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAW,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5C,8EAA8E;IAC9E,MAAM,OAAO,GAAW,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC;IACjF,MAAM,OAAO,GAAW,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IACpF,IAAI,SAAS,GAAW,GAAG,aAAa,cAAc,OAAO,IAAI,QAAQ,IAAI,OAAO,OAAO,CAAC;IAC5F,wEAAwE;IACxE,oEAAoE;IACpE,IAAI,CAAC,IAAA,oBAAU,EAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,MAAM,GAAG,GAAW,GAAG,aAAa,cAAc,OAAO,GAAG,CAAC;QAC7D,MAAM,UAAU,GAAW,GAAG,QAAQ,GAAG,CAAC;QAC1C,IAAI,CAAC;YACH,MAAM,OAAO,GAAa,IAAA,qBAAW,EAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;YACpE,MAAM,KAAK,GAAuB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;YACnG,IAAI,KAAK,EAAE,CAAC;gBACV,SAAS,GAAG,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC;YAC/B,CAAC;QACH,CAAC;QAAC,WAAM,CAAC;YACP,SAAS;QACX,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// Store v10 index path format (used by pnpm 10):\n// {storeDir}/v10/index/{hash[0:2]}/{hash[2:64]}-{name}@{version}.json\n// Falls back to directory scan when the primary path doesn't exist.\n\nimport { type Dirent, existsSync, readdirSync } from 'node:fs';\n\nimport type { IResolverContext } from '../../types';\n\nconst SCOPE_SEPARATOR_REGEX: RegExp = /\\//g;\n\nexport function getStoreIndexPath(pnpmStorePath: string, context: IResolverContext, hash: string): string {\n // pnpm 10 truncates integrity hashes to 32 bytes (64 hex chars) for index paths.\n const truncHash: string = hash.length > 64 ? hash.slice(0, 64) : hash;\n const hashDir: string = truncHash.slice(0, 2);\n const hashRest: string = truncHash.slice(2);\n // pnpm 10 index path format: <hash (0-2)>/<hash (2-64)>-<name>@<version>.json\n const pkgName: string = (context.name || '').replace(SCOPE_SEPARATOR_REGEX, '+');\n const nameVer: string = context.version ? `${pkgName}@${context.version}` : pkgName;\n let indexPath: string = `${pnpmStorePath}/v10/index/${hashDir}/${hashRest}-${nameVer}.json`;\n // For truncated/hashed folder names, nameVer from the key may be wrong.\n // Fallback: scan the directory for a file matching the hash prefix.\n if (!existsSync(indexPath)) {\n const dir: string = `${pnpmStorePath}/v10/index/${hashDir}/`;\n const filePrefix: string = `${hashRest}-`;\n try {\n const entries: Dirent[] = readdirSync(dir, { withFileTypes: true });\n const match: Dirent | undefined = entries.find((e) => e.isFile() && e.name.startsWith(filePrefix));\n if (match) {\n indexPath = dir + match.name;\n }\n } catch {\n // ignore\n }\n }\n return indexPath;\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getStoreIndexPath = getStoreIndexPath;
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
function getStoreIndexPath(pnpmStorePath, _context, hash) {
|
|
8
|
+
return `${pnpmStorePath}/v3/files/${hash.slice(0, 2)}/${hash.slice(2)}-index.json`;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=v3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v3.js","sourceRoot":"","sources":["../../../src/pnpm/store/v3.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;AAQ3D,8CAEC;AAHD,gEAAgE;AAChE,SAAgB,iBAAiB,CAAC,aAAqB,EAAE,QAA0B,EAAE,IAAY;IAC/F,OAAO,GAAG,aAAa,aAAa,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC;AACrF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// Store v3 index path format (used by pnpm 8 and 9):\n// {storeDir}/v3/files/{hash[0:2]}/{hash[2:]}-index.json\n\nimport type { IResolverContext } from '../../types';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function getStoreIndexPath(pnpmStorePath: string, _context: IResolverContext, hash: string): string {\n return `${pnpmStorePath}/v3/files/${hash.slice(0, 2)}/${hash.slice(2)}-index.json`;\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.helpers = void 0;
|
|
6
|
+
const v10_1 = require("./depPath/v10");
|
|
7
|
+
const v9_1 = require("./keys/v9");
|
|
8
|
+
const v10_2 = require("./store/v10");
|
|
9
|
+
exports.helpers = {
|
|
10
|
+
depPathToFilename: v10_1.depPathToFilename,
|
|
11
|
+
buildDependencyKey: v9_1.buildDependencyKey,
|
|
12
|
+
getStoreIndexPath: v10_2.getStoreIndexPath
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=v10.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v10.js","sourceRoot":"","sources":["../../src/pnpm/v10.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAK3D,uCAAkD;AAClD,kCAA+C;AAC/C,qCAAgD;AAEnC,QAAA,OAAO,GAAwB;IAC1C,iBAAiB,EAAjB,uBAAiB;IACjB,kBAAkB,EAAlB,uBAAkB;IAClB,iBAAiB,EAAjB,uBAAiB;CAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// pnpm 10: lockfile v9 (keys have no leading '/'), store v10, SHA-256 hex hash\n\nimport type { IPnpmVersionHelpers } from './pnpmVersionHelpers';\nimport { depPathToFilename } from './depPath/v10';\nimport { buildDependencyKey } from './keys/v9';\nimport { getStoreIndexPath } from './store/v10';\n\nexport const helpers: IPnpmVersionHelpers = {\n depPathToFilename,\n buildDependencyKey,\n getStoreIndexPath\n};\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.helpers = void 0;
|
|
6
|
+
const v8_1 = require("./depPath/v8");
|
|
7
|
+
const v6_1 = require("./keys/v6");
|
|
8
|
+
const v3_1 = require("./store/v3");
|
|
9
|
+
exports.helpers = {
|
|
10
|
+
depPathToFilename: v8_1.depPathToFilename,
|
|
11
|
+
buildDependencyKey: v6_1.buildDependencyKey,
|
|
12
|
+
getStoreIndexPath: v3_1.getStoreIndexPath
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=v8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v8.js","sourceRoot":"","sources":["../../src/pnpm/v8.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAK3D,qCAAiD;AACjD,kCAA+C;AAC/C,mCAA+C;AAElC,QAAA,OAAO,GAAwB;IAC1C,iBAAiB,EAAjB,sBAAiB;IACjB,kBAAkB,EAAlB,uBAAkB;IAClB,iBAAiB,EAAjB,sBAAiB;CAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// pnpm 8: lockfile v6 (keys start with '/'), store v3, MD5 base32 hash\n\nimport type { IPnpmVersionHelpers } from './pnpmVersionHelpers';\nimport { depPathToFilename } from './depPath/v8';\nimport { buildDependencyKey } from './keys/v6';\nimport { getStoreIndexPath } from './store/v3';\n\nexport const helpers: IPnpmVersionHelpers = {\n depPathToFilename,\n buildDependencyKey,\n getStoreIndexPath\n};\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.helpers = void 0;
|
|
6
|
+
// pnpm 9 uses the same dep-path hashing algorithm as pnpm 8 (MD5 base32)
|
|
7
|
+
// but a different depPathToFilenameUnescaped (indexOf('@') vs lastIndexOf('/'))
|
|
8
|
+
const v9_1 = require("./depPath/v9");
|
|
9
|
+
const v9_2 = require("./keys/v9");
|
|
10
|
+
const v3_1 = require("./store/v3");
|
|
11
|
+
exports.helpers = {
|
|
12
|
+
depPathToFilename: v9_1.depPathToFilename,
|
|
13
|
+
buildDependencyKey: v9_2.buildDependencyKey,
|
|
14
|
+
getStoreIndexPath: v3_1.getStoreIndexPath
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=v9.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v9.js","sourceRoot":"","sources":["../../src/pnpm/v9.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAK3D,yEAAyE;AACzE,gFAAgF;AAChF,qCAAiD;AACjD,kCAA+C;AAC/C,mCAA+C;AAElC,QAAA,OAAO,GAAwB;IAC1C,iBAAiB,EAAjB,sBAAiB;IACjB,kBAAkB,EAAlB,uBAAkB;IAClB,iBAAiB,EAAjB,sBAAiB;CAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// pnpm 9: lockfile v9 (keys have no leading '/'), store v3, MD5 base32 hash\n\nimport type { IPnpmVersionHelpers } from './pnpmVersionHelpers';\n// pnpm 9 uses the same dep-path hashing algorithm as pnpm 8 (MD5 base32)\n// but a different depPathToFilenameUnescaped (indexOf('@') vs lastIndexOf('/'))\nimport { depPathToFilename } from './depPath/v9';\nimport { buildDependencyKey } from './keys/v9';\nimport { getStoreIndexPath } from './store/v3';\n\nexport const helpers: IPnpmVersionHelpers = {\n depPathToFilename,\n buildDependencyKey,\n getStoreIndexPath\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nexport interface IResolverContext {\n descriptionFileRoot: string;\n descriptionFileHash: string | undefined;\n name: string;\n deps: Map<string, string>;\n isProject: boolean;\n ordinal: number;\n parent?: IResolverContext | undefined;\n optional?: boolean;\n nestedPackageDirs?: string[];\n}\n\nexport type IDependencyEntry =\n | string\n | {\n version: string;\n specifier: string;\n };\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nexport interface IResolverContext {\n descriptionFileRoot: string;\n descriptionFileHash: string | undefined;\n name: string;\n version?: string;\n deps: Map<string, string>;\n isProject: boolean;\n ordinal: number;\n parent?: IResolverContext | undefined;\n optional?: boolean;\n nestedPackageDirs?: string[];\n}\n\nexport type IDependencyEntry =\n | string\n | {\n version: string;\n specifier: string;\n };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"afterInstallAsync.d.ts","sourceRoot":"","sources":["../src/afterInstallAsync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EAEjB,OAAO,EAEP,QAAQ,EACT,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"afterInstallAsync.d.ts","sourceRoot":"","sources":["../src/afterInstallAsync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EAEjB,OAAO,EAEP,QAAQ,EACT,MAAM,qBAAqB,CAAC;AAwD7B;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,IAAI,CAAC,CAiOf"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { LookupByPath } from '@rushstack/rush-sdk';
|
|
2
2
|
import type { IResolverCacheFile } from '@rushstack/webpack-workspace-resolve-plugin';
|
|
3
3
|
import type { PnpmShrinkwrapFile } from './externals';
|
|
4
|
+
import { type PnpmMajorVersion } from './pnpm/pnpmVersionHelpers';
|
|
4
5
|
import type { IResolverContext } from './types';
|
|
5
6
|
/**
|
|
6
7
|
* The only parts of a RushConfigurationProject needed by this tool.
|
|
@@ -17,6 +18,7 @@ export interface IPlatformInfo {
|
|
|
17
18
|
cpu: typeof process.arch;
|
|
18
19
|
libc: 'glibc' | 'musl';
|
|
19
20
|
}
|
|
21
|
+
export type { PnpmMajorVersion, IPnpmVersionHelpers } from './pnpm/pnpmVersionHelpers';
|
|
20
22
|
/**
|
|
21
23
|
* Options for computing the resolver cache from a lockfile.
|
|
22
24
|
*/
|
|
@@ -41,6 +43,11 @@ export interface IComputeResolverCacheFromLockfileOptions {
|
|
|
41
43
|
* The lockfile to compute the cache from
|
|
42
44
|
*/
|
|
43
45
|
lockfile: PnpmShrinkwrapFile;
|
|
46
|
+
/**
|
|
47
|
+
* The major version of pnpm configured in rush.json (e.g. `"10.27.0"` → 10).
|
|
48
|
+
* Used to select the correct dep-path hashing algorithm and store layout.
|
|
49
|
+
*/
|
|
50
|
+
pnpmVersion: PnpmMajorVersion;
|
|
44
51
|
/**
|
|
45
52
|
* A callback to process external packages after they have been enumerated.
|
|
46
53
|
* Broken out as a separate function to facilitate testing without hitting the disk.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeResolverCacheFromLockfileAsync.d.ts","sourceRoot":"","sources":["../src/computeResolverCacheFromLockfileAsync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAEV,kBAAkB,EACnB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"computeResolverCacheFromLockfileAsync.d.ts","sourceRoot":"","sources":["../src/computeResolverCacheFromLockfileAsync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAEV,kBAAkB,EACnB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAOtD,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,OAAO,OAAO,CAAC,QAAQ,CAAC;IAC5B,GAAG,EAAE,OAAO,OAAO,CAAC,IAAI,CAAC;IACzB,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;CACxB;AA+ED,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,wCAAwC;IACvD;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,YAAY,EAAE,aAAa,CAAC;IAC5B;;OAEG;IACH,qBAAqB,EAAE,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,EAAE,eAAe,CAAC,CAAC;IAChF;;OAEG;IACH,QAAQ,EAAE,kBAAkB,CAAC;IAC7B;;;OAGG;IACH,WAAW,EAAE,gBAAgB,CAAC;IAC9B;;;;;;;OAOG;IACH,0BAA0B,CAAC,EAAE,CAC3B,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACvC,2BAA2B,EAAE,GAAG,CAAC,MAAM,CAAC,KACrC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAaD;;;;GAIG;AACH,wBAAsB,qCAAqC,CACzD,MAAM,EAAE,wCAAwC,GAC/C,OAAO,CAAC,kBAAkB,CAAC,CA+H7B"}
|
package/lib-dts/helpers.d.ts
CHANGED
|
@@ -1,31 +1,39 @@
|
|
|
1
1
|
import type { ISerializedResolveContext } from '@rushstack/webpack-workspace-resolve-plugin';
|
|
2
2
|
import type { IDependencyEntry, IResolverContext } from './types';
|
|
3
|
-
|
|
4
|
-
export declare function depPathToFilename(depPath: string): string;
|
|
3
|
+
import type { IPnpmVersionHelpers } from './pnpm/pnpmVersionHelpers';
|
|
5
4
|
/**
|
|
6
5
|
* Computes the root folder for a dependency from a reference to it in another package
|
|
7
6
|
* @param lockfileFolder - The folder that contains the lockfile
|
|
8
7
|
* @param key - The key of the dependency
|
|
9
8
|
* @param specifier - The specifier in the lockfile for the dependency
|
|
10
9
|
* @param context - The owning package
|
|
10
|
+
* @param helpers - Version-specific pnpm helpers
|
|
11
11
|
* @returns The identifier for the dependency
|
|
12
12
|
*/
|
|
13
|
-
export declare function resolveDependencyKey(lockfileFolder: string, key: string, specifier: string, context: IResolverContext
|
|
13
|
+
export declare function resolveDependencyKey(lockfileFolder: string, key: string, specifier: string, context: IResolverContext, helpers: IPnpmVersionHelpers, packageKeys?: {
|
|
14
|
+
has(key: string): boolean;
|
|
15
|
+
}): string;
|
|
14
16
|
/**
|
|
15
17
|
* Computes the physical path to a dependency based on its entry
|
|
16
18
|
* @param lockfileFolder - The folder that contains the lockfile during installation
|
|
17
19
|
* @param key - The key of the dependency
|
|
20
|
+
* @param depPathToFilename - Version-specific function to convert dep paths to filenames
|
|
18
21
|
* @param name - The name of the dependency, if provided
|
|
19
22
|
* @returns The physical path to the dependency
|
|
20
23
|
*/
|
|
21
|
-
export declare function getDescriptionFileRootFromKey(lockfileFolder: string, key: string, name?: string): string;
|
|
22
|
-
export declare function resolveDependencies(lockfileFolder: string, collection: Record<string, IDependencyEntry>, context: IResolverContext
|
|
24
|
+
export declare function getDescriptionFileRootFromKey(lockfileFolder: string, key: string, depPathToFilename: (depPath: string) => string, name?: string): string;
|
|
25
|
+
export declare function resolveDependencies(lockfileFolder: string, collection: Record<string, IDependencyEntry>, context: IResolverContext, helpers: IPnpmVersionHelpers, packageKeys?: {
|
|
26
|
+
has(key: string): boolean;
|
|
27
|
+
}): void;
|
|
23
28
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @param
|
|
26
|
-
* @returns The
|
|
29
|
+
* Extracts the package name and version from a lockfile package key.
|
|
30
|
+
* @param key - The lockfile package key (e.g. '/autoprefixer\@9.8.8', '\@scope/name\@1.0.0(peer\@2.0.0)')
|
|
31
|
+
* @returns The extracted name and version, or undefined for file: keys
|
|
27
32
|
*/
|
|
28
|
-
export declare function
|
|
33
|
+
export declare function extractNameAndVersionFromKey(key: string): {
|
|
34
|
+
name: string;
|
|
35
|
+
version: string;
|
|
36
|
+
} | undefined;
|
|
29
37
|
/**
|
|
30
38
|
*
|
|
31
39
|
* @param missingOptionalDependencies - The set of optional dependencies that were not installed
|
package/lib-dts/helpers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAE7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,mBAAmB,EAC5B,WAAW,CAAC,EAAE;IAAE,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAC1C,MAAM,CAcR;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,MAAM,EACX,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,EAC9C,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,CAYR;AAED,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC5C,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,mBAAmB,EAC5B,WAAW,CAAC,EAAE;IAAE,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAC1C,IAAI,CAcN;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAcvG;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,2BAA2B,EAAE,GAAG,CAAC,MAAM,CAAC,EACxC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACvC,gBAAgB,EAAE,MAAM,GACvB,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,gBAAgB,CAAC,KAAK,yBAAyB,CAgClE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function depPathToFilenameUnescaped(depPath: string): string;
|
|
2
|
+
export interface IDepPathToFilenameOptions {
|
|
3
|
+
specialCharsRegex: RegExp;
|
|
4
|
+
maxLengthWithoutHash: number;
|
|
5
|
+
hashFn: (input: string) => string;
|
|
6
|
+
}
|
|
7
|
+
export declare function createDepPathToFilename(options: IDepPathToFilenameOptions): (depPath: string) => string;
|
|
8
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/pnpm/depPath/common.ts"],"names":[],"mappings":"AAWA,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAUlE;AAED,MAAM,WAAW,yBAAyB;IACxC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACnC;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,yBAAyB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAYvG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../../src/pnpm/depPath/hash.ts"],"names":[],"mappings":"AAiBA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA0BtD;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v10.d.ts","sourceRoot":"","sources":["../../../src/pnpm/depPath/v10.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAInD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["../../../src/pnpm/depPath/v8.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAInD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v9.d.ts","sourceRoot":"","sources":["../../../src/pnpm/depPath/v9.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAInD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v6.d.ts","sourceRoot":"","sources":["../../../src/pnpm/keys/v6.ts"],"names":[],"mappings":"AAKA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v9.d.ts","sourceRoot":"","sources":["../../../src/pnpm/keys/v9.ts"],"names":[],"mappings":"AAKA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE1E"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { IResolverContext } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* The major version of pnpm being used. Each version uses a different lockfile format
|
|
4
|
+
* and store layout:
|
|
5
|
+
* - pnpm 8: lockfile v6, store v3, MD5 base32 hash for dep paths
|
|
6
|
+
* - pnpm 9: lockfile v9, store v3, MD5 base32 hash for dep paths
|
|
7
|
+
* - pnpm 10: lockfile v9, store v10, SHA-256 hex hash for dep paths
|
|
8
|
+
*/
|
|
9
|
+
export type PnpmMajorVersion = 8 | 9 | 10;
|
|
10
|
+
/**
|
|
11
|
+
* Version-specific helpers for resolving pnpm dependency paths, lockfile keys,
|
|
12
|
+
* and store index paths. Each pnpm major version has its own implementation.
|
|
13
|
+
*/
|
|
14
|
+
export interface IPnpmVersionHelpers {
|
|
15
|
+
/**
|
|
16
|
+
* Converts a pnpm dependency path to its on-disk folder name.
|
|
17
|
+
* Uses MD5 base32 hashing for pnpm 8/9 and SHA-256 hex hashing for pnpm 10.
|
|
18
|
+
*/
|
|
19
|
+
depPathToFilename(depPath: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Constructs the full lockfile package key from a package name and version specifier.
|
|
22
|
+
* pnpm 8 uses `/{name}\@{specifier}` (v6 key format); pnpm 9/10 use `{name}\@{specifier}` (v9 key format).
|
|
23
|
+
*/
|
|
24
|
+
buildDependencyKey(name: string, specifier: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Computes the pnpm store index file path for a given package integrity hash.
|
|
27
|
+
* @param pnpmStorePath - The root pnpm store path (e.g. `~/.local/share/pnpm/store`)
|
|
28
|
+
* @param context - The resolver context for the package (provides name/version for v10 paths)
|
|
29
|
+
* @param hash - The hex-encoded integrity hash
|
|
30
|
+
*/
|
|
31
|
+
getStoreIndexPath(pnpmStorePath: string, context: IResolverContext, hash: string): string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Loads the version-specific pnpm helpers for the given major version.
|
|
35
|
+
* Uses async imports so that only the needed version's code is loaded.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getPnpmVersionHelpersAsync(version: PnpmMajorVersion): Promise<IPnpmVersionHelpers>;
|
|
38
|
+
//# sourceMappingURL=pnpmVersionHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpmVersionHelpers.d.ts","sourceRoot":"","sources":["../../src/pnpm/pnpmVersionHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AAE1C;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAE3C;;;OAGG;IACH,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5D;;;;;OAKG;IACH,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3F;AAED;;;GAGG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAWxG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v10.d.ts","sourceRoot":"","sources":["../../../src/pnpm/store/v10.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpD,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAyBxG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v3.d.ts","sourceRoot":"","sources":["../../../src/pnpm/store/v3.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v10.d.ts","sourceRoot":"","sources":["../../src/pnpm/v10.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAKhE,eAAO,MAAM,OAAO,EAAE,mBAIrB,CAAC"}
|