@pnpm/store.commands 1100.0.15 → 1100.0.17

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.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Remove the lockfile-verification cache JSONL written by the install
3
+ * command's resolution-policy verifier. Pruning the store invalidates
4
+ * derived state; a stale verification record under a different
5
+ * policy/lockfile-content key would otherwise survive into the next
6
+ * install (still correct because of the cache's identity comparator,
7
+ * but visually leaks "alien" files into `cacheDir`).
8
+ *
9
+ * Silent on a missing file — prune is idempotent and the cache may
10
+ * never have been written in the first place.
11
+ */
12
+ export declare function cleanLockfileVerifiedCache(cacheDir: string): void;
@@ -0,0 +1,31 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import util from 'node:util';
4
+ // Mirrors the constant in
5
+ // `installing/deps-installer/src/install/verifyLockfileResolutionsCache.ts`.
6
+ // Kept in sync by hand (both sides own a small string; introducing a
7
+ // shared package just for this would outweigh the cost of the duplicate).
8
+ const LOCKFILE_VERIFIED_CACHE_FILE = 'lockfile-verified.jsonl';
9
+ /**
10
+ * Remove the lockfile-verification cache JSONL written by the install
11
+ * command's resolution-policy verifier. Pruning the store invalidates
12
+ * derived state; a stale verification record under a different
13
+ * policy/lockfile-content key would otherwise survive into the next
14
+ * install (still correct because of the cache's identity comparator,
15
+ * but visually leaks "alien" files into `cacheDir`).
16
+ *
17
+ * Silent on a missing file — prune is idempotent and the cache may
18
+ * never have been written in the first place.
19
+ */
20
+ export function cleanLockfileVerifiedCache(cacheDir) {
21
+ const cacheFilePath = path.join(cacheDir, LOCKFILE_VERIFIED_CACHE_FILE);
22
+ try {
23
+ fs.unlinkSync(cacheFilePath);
24
+ }
25
+ catch (err) {
26
+ if (util.types.isNativeError(err) && 'code' in err && err.code === 'ENOENT')
27
+ return;
28
+ throw err;
29
+ }
30
+ }
31
+ //# sourceMappingURL=cleanLockfileVerifiedCache.js.map
@@ -1,6 +1,7 @@
1
1
  import { cleanOrphanedInstallDirs } from '@pnpm/global.packages';
2
2
  import { streamParser } from '@pnpm/logger';
3
3
  import { cleanExpiredDlxCache } from './cleanExpiredDlxCache.js';
4
+ import { cleanLockfileVerifiedCache } from './cleanLockfileVerifiedCache.js';
4
5
  export async function storePrune(opts) {
5
6
  const reporter = opts?.reporter;
6
7
  if ((reporter != null) && typeof reporter === 'function') {
@@ -13,6 +14,7 @@ export async function storePrune(opts) {
13
14
  dlxCacheMaxAge: opts.dlxCacheMaxAge,
14
15
  now: new Date(),
15
16
  });
17
+ cleanLockfileVerifiedCache(opts.cacheDir);
16
18
  if (opts.globalPkgDir) {
17
19
  cleanOrphanedInstallDirs(opts.globalPkgDir);
18
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/store.commands",
3
- "version": "1100.0.15",
3
+ "version": "1100.0.17",
4
4
  "description": "Commands for controlling and inspecting the store",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -32,25 +32,25 @@
32
32
  "p-filter": "^4.1.0",
33
33
  "ramda": "npm:@pnpm/ramda@0.28.1",
34
34
  "render-help": "^2.0.0",
35
- "@pnpm/cli.utils": "1101.0.3",
35
+ "@pnpm/cli.utils": "1101.0.5",
36
36
  "@pnpm/config.normalize-registries": "1100.0.3",
37
- "@pnpm/config.reader": "1101.3.0",
38
37
  "@pnpm/crypto.integrity": "1100.0.0",
39
- "@pnpm/deps.path": "1100.0.3",
40
- "@pnpm/fs.graceful-fs": "1100.1.0",
41
38
  "@pnpm/error": "1100.0.0",
39
+ "@pnpm/fs.graceful-fs": "1100.1.0",
42
40
  "@pnpm/global.packages": "1100.0.3",
43
- "@pnpm/installing.context": "1100.0.9",
44
- "@pnpm/installing.client": "1100.0.14",
45
- "@pnpm/lockfile.types": "1100.0.5",
46
- "@pnpm/lockfile.utils": "1100.0.7",
41
+ "@pnpm/installing.context": "1100.0.11",
42
+ "@pnpm/installing.client": "1100.1.0",
43
+ "@pnpm/config.reader": "1101.3.2",
44
+ "@pnpm/deps.path": "1100.0.3",
45
+ "@pnpm/lockfile.types": "1100.0.6",
46
+ "@pnpm/lockfile.utils": "1100.0.8",
47
47
  "@pnpm/object.key-sorting": "1100.0.0",
48
48
  "@pnpm/resolving.parse-wanted-dependency": "1100.0.1",
49
- "@pnpm/store.cafs": "1100.1.3",
50
- "@pnpm/store.connection-manager": "1100.1.1",
51
- "@pnpm/store.controller-types": "1100.0.6",
52
- "@pnpm/store.path": "1100.0.1",
49
+ "@pnpm/store.connection-manager": "1100.2.0",
50
+ "@pnpm/store.cafs": "1100.1.5",
53
51
  "@pnpm/store.index": "1100.1.0",
52
+ "@pnpm/store.controller-types": "1100.1.0",
53
+ "@pnpm/store.path": "1100.0.1",
54
54
  "@pnpm/types": "1101.1.0"
55
55
  },
56
56
  "peerDependencies": {
@@ -68,13 +68,13 @@
68
68
  "ssri": "13.0.1",
69
69
  "tempy": "3.0.0",
70
70
  "@pnpm/constants": "1100.0.0",
71
- "@pnpm/assert-store": "1100.0.7",
72
- "@pnpm/exec.commands": "1100.1.6",
73
- "@pnpm/lockfile.fs": "1100.0.7",
71
+ "@pnpm/exec.commands": "1100.1.8",
72
+ "@pnpm/lockfile.fs": "1100.1.0",
74
73
  "@pnpm/logger": "1100.0.0",
75
- "@pnpm/prepare": "1100.0.7",
76
- "@pnpm/store.commands": "1100.0.15",
77
- "@pnpm/store.controller": "1101.0.5"
74
+ "@pnpm/assert-store": "1100.0.9",
75
+ "@pnpm/prepare": "1100.0.9",
76
+ "@pnpm/store.commands": "1100.0.17",
77
+ "@pnpm/store.controller": "1101.0.7"
78
78
  },
79
79
  "engines": {
80
80
  "node": ">=22.13"