@rushstack/rush-resolver-cache-plugin 5.173.0 → 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.
Files changed (100) hide show
  1. package/lib-commonjs/afterInstallAsync.js +19 -6
  2. package/lib-commonjs/afterInstallAsync.js.map +1 -1
  3. package/lib-commonjs/computeResolverCacheFromLockfileAsync.js +17 -11
  4. package/lib-commonjs/computeResolverCacheFromLockfileAsync.js.map +1 -1
  5. package/lib-commonjs/helpers.js +32 -70
  6. package/lib-commonjs/helpers.js.map +1 -1
  7. package/lib-commonjs/pnpm/depPath/common.js +38 -0
  8. package/lib-commonjs/pnpm/depPath/common.js.map +1 -0
  9. package/lib-commonjs/pnpm/depPath/hash.js +43 -0
  10. package/lib-commonjs/pnpm/depPath/hash.js.map +1 -0
  11. package/lib-commonjs/pnpm/depPath/v10.js +15 -0
  12. package/lib-commonjs/pnpm/depPath/v10.js.map +1 -0
  13. package/lib-commonjs/pnpm/depPath/v8.js +26 -0
  14. package/lib-commonjs/pnpm/depPath/v8.js.map +1 -0
  15. package/lib-commonjs/pnpm/depPath/v9.js +15 -0
  16. package/lib-commonjs/pnpm/depPath/v9.js.map +1 -0
  17. package/lib-commonjs/pnpm/keys/v6.js +10 -0
  18. package/lib-commonjs/pnpm/keys/v6.js.map +1 -0
  19. package/lib-commonjs/pnpm/keys/v9.js +10 -0
  20. package/lib-commonjs/pnpm/keys/v9.js.map +1 -0
  21. package/lib-commonjs/pnpm/pnpmVersionHelpers.js +55 -0
  22. package/lib-commonjs/pnpm/pnpmVersionHelpers.js.map +1 -0
  23. package/lib-commonjs/pnpm/store/v10.js +38 -0
  24. package/lib-commonjs/pnpm/store/v10.js.map +1 -0
  25. package/lib-commonjs/pnpm/store/v3.js +10 -0
  26. package/lib-commonjs/pnpm/store/v3.js.map +1 -0
  27. package/lib-commonjs/pnpm/v10.js +14 -0
  28. package/lib-commonjs/pnpm/v10.js.map +1 -0
  29. package/lib-commonjs/pnpm/v8.js +14 -0
  30. package/lib-commonjs/pnpm/v8.js.map +1 -0
  31. package/lib-commonjs/pnpm/v9.js +16 -0
  32. package/lib-commonjs/pnpm/v9.js.map +1 -0
  33. package/lib-commonjs/types.js.map +1 -1
  34. package/lib-dts/afterInstallAsync.d.ts.map +1 -1
  35. package/lib-dts/computeResolverCacheFromLockfileAsync.d.ts +7 -0
  36. package/lib-dts/computeResolverCacheFromLockfileAsync.d.ts.map +1 -1
  37. package/lib-dts/helpers.d.ts +17 -9
  38. package/lib-dts/helpers.d.ts.map +1 -1
  39. package/lib-dts/pnpm/depPath/common.d.ts +8 -0
  40. package/lib-dts/pnpm/depPath/common.d.ts.map +1 -0
  41. package/lib-dts/pnpm/depPath/hash.d.ts +3 -0
  42. package/lib-dts/pnpm/depPath/hash.d.ts.map +1 -0
  43. package/lib-dts/pnpm/depPath/v10.d.ts +2 -0
  44. package/lib-dts/pnpm/depPath/v10.d.ts.map +1 -0
  45. package/lib-dts/pnpm/depPath/v8.d.ts +2 -0
  46. package/lib-dts/pnpm/depPath/v8.d.ts.map +1 -0
  47. package/lib-dts/pnpm/depPath/v9.d.ts +2 -0
  48. package/lib-dts/pnpm/depPath/v9.d.ts.map +1 -0
  49. package/lib-dts/pnpm/keys/v6.d.ts +2 -0
  50. package/lib-dts/pnpm/keys/v6.d.ts.map +1 -0
  51. package/lib-dts/pnpm/keys/v9.d.ts +2 -0
  52. package/lib-dts/pnpm/keys/v9.d.ts.map +1 -0
  53. package/lib-dts/pnpm/pnpmVersionHelpers.d.ts +38 -0
  54. package/lib-dts/pnpm/pnpmVersionHelpers.d.ts.map +1 -0
  55. package/lib-dts/pnpm/store/v10.d.ts +3 -0
  56. package/lib-dts/pnpm/store/v10.d.ts.map +1 -0
  57. package/lib-dts/pnpm/store/v3.d.ts +3 -0
  58. package/lib-dts/pnpm/store/v3.d.ts.map +1 -0
  59. package/lib-dts/pnpm/v10.d.ts +3 -0
  60. package/lib-dts/pnpm/v10.d.ts.map +1 -0
  61. package/lib-dts/pnpm/v8.d.ts +3 -0
  62. package/lib-dts/pnpm/v8.d.ts.map +1 -0
  63. package/lib-dts/pnpm/v9.d.ts +3 -0
  64. package/lib-dts/pnpm/v9.d.ts.map +1 -0
  65. package/lib-dts/types.d.ts +1 -0
  66. package/lib-dts/types.d.ts.map +1 -1
  67. package/lib-esm/afterInstallAsync.js +19 -6
  68. package/lib-esm/afterInstallAsync.js.map +1 -1
  69. package/lib-esm/computeResolverCacheFromLockfileAsync.js +18 -12
  70. package/lib-esm/computeResolverCacheFromLockfileAsync.js.map +1 -1
  71. package/lib-esm/helpers.js +31 -67
  72. package/lib-esm/helpers.js.map +1 -1
  73. package/lib-esm/pnpm/depPath/common.js +34 -0
  74. package/lib-esm/pnpm/depPath/common.js.map +1 -0
  75. package/lib-esm/pnpm/depPath/hash.js +39 -0
  76. package/lib-esm/pnpm/depPath/hash.js.map +1 -0
  77. package/lib-esm/pnpm/depPath/v10.js +12 -0
  78. package/lib-esm/pnpm/depPath/v10.js.map +1 -0
  79. package/lib-esm/pnpm/depPath/v8.js +23 -0
  80. package/lib-esm/pnpm/depPath/v8.js.map +1 -0
  81. package/lib-esm/pnpm/depPath/v9.js +12 -0
  82. package/lib-esm/pnpm/depPath/v9.js.map +1 -0
  83. package/lib-esm/pnpm/keys/v6.js +7 -0
  84. package/lib-esm/pnpm/keys/v6.js.map +1 -0
  85. package/lib-esm/pnpm/keys/v9.js +7 -0
  86. package/lib-esm/pnpm/keys/v9.js.map +1 -0
  87. package/lib-esm/pnpm/pnpmVersionHelpers.js +19 -0
  88. package/lib-esm/pnpm/pnpmVersionHelpers.js.map +1 -0
  89. package/lib-esm/pnpm/store/v10.js +35 -0
  90. package/lib-esm/pnpm/store/v10.js.map +1 -0
  91. package/lib-esm/pnpm/store/v3.js +7 -0
  92. package/lib-esm/pnpm/store/v3.js.map +1 -0
  93. package/lib-esm/pnpm/v10.js +11 -0
  94. package/lib-esm/pnpm/v10.js.map +1 -0
  95. package/lib-esm/pnpm/v8.js +11 -0
  96. package/lib-esm/pnpm/v8.js.map +1 -0
  97. package/lib-esm/pnpm/v9.js +13 -0
  98. package/lib-esm/pnpm/v9.js.map +1 -0
  99. package/lib-esm/types.js.map +1 -1
  100. package/package.json +5 -5
@@ -0,0 +1,23 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ // Based on \@pnpm/dependency-path\@2.1.8 (pnpm v8.15.9).
4
+ // https://github.com/pnpm/pnpm/blob/afe8ecef1f24812845b699c141d52643d1524079/packages/dependency-path/src/index.ts
5
+ //
6
+ // NOTE: The original pnpm source's depPathToFilenameUnescaped uses lastIndexOf('/')
7
+ // to find the version separator. This works for pnpm's internal dep paths which use '/'
8
+ // before the version (e.g. /@babel/code-frame/7.24.2), but NOT for lockfile v6 keys
9
+ // which use '@' (e.g. /@babel/code-frame@7.24.2). For scoped packages, lastIndexOf('/')
10
+ // would find the scope separator and produce @babel@code-frame@7.24.2 instead of the
11
+ // correct @babel+code-frame@7.24.2 (where the scope '/' is replaced by '+' via regex).
12
+ //
13
+ // We use the shared depPathToFilenameUnescaped (indexOf('@', 1)) from common.ts which
14
+ // correctly handles lockfile key format. The hash algorithm and special-char regex are
15
+ // identical to pnpm 9.
16
+ import { createDepPathToFilename } from './common';
17
+ import { createBase32Hash } from './hash';
18
+ export const depPathToFilename = createDepPathToFilename({
19
+ specialCharsRegex: /[\\/:*?"<>|]/g,
20
+ maxLengthWithoutHash: 120 - 26 - 1,
21
+ hashFn: createBase32Hash
22
+ });
23
+ //# 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,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,MAAM,CAAC,MAAM,iBAAiB,GAAgC,uBAAuB,CAAC;IACpF,iBAAiB,EAAE,eAAe;IAClC,oBAAoB,EAAE,GAAG,GAAG,EAAE,GAAG,CAAC;IAClC,MAAM,EAAE,gBAAgB;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,12 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ // Vendored from \@pnpm/dependency-path\@900.0.0 (pnpm v9.15.9).
4
+ // https://github.com/pnpm/pnpm/blob/d22a3f65ee047ecee7c89dd6f1971ecea4ecd4d4/packages/dependency-path/src/index.ts
5
+ import { createDepPathToFilename } from './common';
6
+ import { createBase32Hash } from './hash';
7
+ export const depPathToFilename = createDepPathToFilename({
8
+ specialCharsRegex: /[\\/:*?"<>|]/g,
9
+ maxLengthWithoutHash: 120 - 26 - 1,
10
+ hashFn: createBase32Hash
11
+ });
12
+ //# 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,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,MAAM,CAAC,MAAM,iBAAiB,GAAgC,uBAAuB,CAAC;IACpF,iBAAiB,EAAE,eAAe;IAClC,oBAAoB,EAAE,GAAG,GAAG,EAAE,GAAG,CAAC;IAClC,MAAM,EAAE,gBAAgB;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,7 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ // Lockfile v6 key format (used by pnpm 8): keys are prefixed with '/'.
4
+ export function buildDependencyKey(name, specifier) {
5
+ return `/${name}@${specifier}`;
6
+ }
7
+ //# 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;AAE3D,uEAAuE;AAEvE,MAAM,UAAU,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,7 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ // Lockfile v9 key format (used by pnpm 9 and 10): keys have no leading '/'.
4
+ export function buildDependencyKey(name, specifier) {
5
+ return `${name}@${specifier}`;
6
+ }
7
+ //# 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;AAE3D,4EAA4E;AAE5E,MAAM,UAAU,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,19 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ /**
4
+ * Loads the version-specific pnpm helpers for the given major version.
5
+ * Uses async imports so that only the needed version's code is loaded.
6
+ */
7
+ export async function getPnpmVersionHelpersAsync(version) {
8
+ switch (version) {
9
+ case 8:
10
+ return (await import('./v8')).helpers;
11
+ case 9:
12
+ return (await import('./v9')).helpers;
13
+ case 10:
14
+ return (await import('./v10')).helpers;
15
+ default:
16
+ throw new Error(`Unsupported pnpm major version: ${version}`);
17
+ }
18
+ }
19
+ //# 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;AAuC3D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,OAAyB;IACxE,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,CAAC;YACJ,OAAO,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;QACxC,KAAK,CAAC;YACJ,OAAO,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;QACxC,KAAK,EAAE;YACL,OAAO,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,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,35 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ // Store v10 index path format (used by pnpm 10):
4
+ // {storeDir}/v10/index/{hash[0:2]}/{hash[2:64]}-{name}@{version}.json
5
+ // Falls back to directory scan when the primary path doesn't exist.
6
+ import { existsSync, readdirSync } from 'node:fs';
7
+ const SCOPE_SEPARATOR_REGEX = /\//g;
8
+ export function getStoreIndexPath(pnpmStorePath, context, hash) {
9
+ // pnpm 10 truncates integrity hashes to 32 bytes (64 hex chars) for index paths.
10
+ const truncHash = hash.length > 64 ? hash.slice(0, 64) : hash;
11
+ const hashDir = truncHash.slice(0, 2);
12
+ const hashRest = truncHash.slice(2);
13
+ // pnpm 10 index path format: <hash (0-2)>/<hash (2-64)>-<name>@<version>.json
14
+ const pkgName = (context.name || '').replace(SCOPE_SEPARATOR_REGEX, '+');
15
+ const nameVer = context.version ? `${pkgName}@${context.version}` : pkgName;
16
+ let indexPath = `${pnpmStorePath}/v10/index/${hashDir}/${hashRest}-${nameVer}.json`;
17
+ // For truncated/hashed folder names, nameVer from the key may be wrong.
18
+ // Fallback: scan the directory for a file matching the hash prefix.
19
+ if (!existsSync(indexPath)) {
20
+ const dir = `${pnpmStorePath}/v10/index/${hashDir}/`;
21
+ const filePrefix = `${hashRest}-`;
22
+ try {
23
+ const entries = readdirSync(dir, { withFileTypes: true });
24
+ const match = entries.find((e) => e.isFile() && e.name.startsWith(filePrefix));
25
+ if (match) {
26
+ indexPath = dir + match.name;
27
+ }
28
+ }
29
+ catch (_a) {
30
+ // ignore
31
+ }
32
+ }
33
+ return indexPath;
34
+ }
35
+ //# 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;AAE3D,iDAAiD;AACjD,sEAAsE;AACtE,oEAAoE;AAEpE,OAAO,EAAe,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI/D,MAAM,qBAAqB,GAAW,KAAK,CAAC;AAE5C,MAAM,UAAU,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,UAAU,CAAC,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,WAAW,CAAC,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,7 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ // eslint-disable-next-line @typescript-eslint/naming-convention
4
+ export function getStoreIndexPath(pnpmStorePath, _context, hash) {
5
+ return `${pnpmStorePath}/v3/files/${hash.slice(0, 2)}/${hash.slice(2)}-index.json`;
6
+ }
7
+ //# 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;AAO3D,gEAAgE;AAChE,MAAM,UAAU,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,11 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ import { depPathToFilename } from './depPath/v10';
4
+ import { buildDependencyKey } from './keys/v9';
5
+ import { getStoreIndexPath } from './store/v10';
6
+ export const helpers = {
7
+ depPathToFilename,
8
+ buildDependencyKey,
9
+ getStoreIndexPath
10
+ };
11
+ //# 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,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,CAAC,MAAM,OAAO,GAAwB;IAC1C,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;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,11 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ import { depPathToFilename } from './depPath/v8';
4
+ import { buildDependencyKey } from './keys/v6';
5
+ import { getStoreIndexPath } from './store/v3';
6
+ export const helpers = {
7
+ depPathToFilename,
8
+ buildDependencyKey,
9
+ getStoreIndexPath
10
+ };
11
+ //# 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,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,CAAC,MAAM,OAAO,GAAwB;IAC1C,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;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,13 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ // pnpm 9 uses the same dep-path hashing algorithm as pnpm 8 (MD5 base32)
4
+ // but a different depPathToFilenameUnescaped (indexOf('@') vs lastIndexOf('/'))
5
+ import { depPathToFilename } from './depPath/v9';
6
+ import { buildDependencyKey } from './keys/v9';
7
+ import { getStoreIndexPath } from './store/v3';
8
+ export const helpers = {
9
+ depPathToFilename,
10
+ buildDependencyKey,
11
+ getStoreIndexPath
12
+ };
13
+ //# 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,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,CAAC,MAAM,OAAO,GAAwB;IAC1C,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/rush-resolver-cache-plugin",
3
- "version": "5.173.0",
3
+ "version": "5.174.0",
4
4
  "description": "A Rush plugin that generates a resolver cache file after successful install.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -12,17 +12,17 @@
12
12
  "module": "./lib-esm/index.js",
13
13
  "types": "./dist/rush-resolver-cache-plugin.d.ts",
14
14
  "dependencies": {
15
- "@rushstack/rush-sdk": "5.173.0"
15
+ "@rushstack/rush-sdk": "5.174.0"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/webpack-env": "1.18.8",
19
19
  "eslint": "~9.37.0",
20
+ "@rushstack/heft": "1.2.12",
20
21
  "@rushstack/lookup-by-path": "0.10.1",
21
- "@rushstack/terminal": "0.22.5",
22
22
  "@rushstack/node-core-library": "5.22.0",
23
+ "local-node-rig": "1.0.0",
23
24
  "@rushstack/webpack-workspace-resolve-plugin": "0.6.12",
24
- "@rushstack/heft": "1.2.12",
25
- "local-node-rig": "1.0.0"
25
+ "@rushstack/terminal": "0.22.5"
26
26
  },
27
27
  "exports": {
28
28
  ".": {