@pnpm/installing.env-installer 1100.0.1 → 1100.1.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.
@@ -7,6 +7,13 @@ export interface ResolvePackageManagerIntegritiesOpts {
7
7
  rootDir: string;
8
8
  storeController: StoreController;
9
9
  storeDir: string;
10
+ /**
11
+ * Whether to read from and write to the env lockfile file on disk.
12
+ * When false, resolution happens purely in memory; callers can still use
13
+ * the returned `EnvLockfile` to perform installs without persisting the
14
+ * resolved pnpm integrity info. Defaults to true.
15
+ */
16
+ save?: boolean;
10
17
  }
11
18
  /**
12
19
  * Checks if the wanted pnpm version integrities are already fully resolved in the env lockfile.
@@ -14,7 +21,9 @@ export interface ResolvePackageManagerIntegritiesOpts {
14
21
  export declare function isPackageManagerResolved(envLockfile: EnvLockfile | undefined, pnpmVersion: string): boolean;
15
22
  /**
16
23
  * Resolves integrity checksums for `pnpm`, `@pnpm/exe`, and their dependencies
17
- * by calling resolveManifestDependencies.
18
- * Writes the results to the `packageManagerDependencies` section of pnpm-lock.yaml.
24
+ * by calling resolveManifestDependencies. When `opts.save` is true (the
25
+ * default) the results are written to the `packageManagerDependencies`
26
+ * section of `pnpm-lock.yaml`; when false, resolution happens purely in
27
+ * memory and the returned `EnvLockfile` is never persisted to disk.
19
28
  */
20
29
  export declare function resolvePackageManagerIntegrities(pnpmVersion: string, opts: ResolvePackageManagerIntegritiesOpts): Promise<EnvLockfile>;
@@ -15,11 +15,14 @@ export function isPackageManagerResolved(envLockfile, pnpmVersion) {
15
15
  }
16
16
  /**
17
17
  * Resolves integrity checksums for `pnpm`, `@pnpm/exe`, and their dependencies
18
- * by calling resolveManifestDependencies.
19
- * Writes the results to the `packageManagerDependencies` section of pnpm-lock.yaml.
18
+ * by calling resolveManifestDependencies. When `opts.save` is true (the
19
+ * default) the results are written to the `packageManagerDependencies`
20
+ * section of `pnpm-lock.yaml`; when false, resolution happens purely in
21
+ * memory and the returned `EnvLockfile` is never persisted to disk.
20
22
  */
21
23
  export async function resolvePackageManagerIntegrities(pnpmVersion, opts) {
22
- const envLockfile = opts.envLockfile ?? (await readEnvLockfile(opts.rootDir)) ?? createEnvLockfile();
24
+ const save = opts.save ?? true;
25
+ const envLockfile = opts.envLockfile ?? (save ? await readEnvLockfile(opts.rootDir) : undefined) ?? createEnvLockfile();
23
26
  if (isPackageManagerResolved(envLockfile, pnpmVersion)) {
24
27
  return envLockfile;
25
28
  }
@@ -54,7 +57,9 @@ export async function resolvePackageManagerIntegrities(pnpmVersion, opts) {
54
57
  const prunedFile = convertToLockfileFile(pruned);
55
58
  envLockfile.packages = prunedFile.packages ?? {};
56
59
  envLockfile.snapshots = prunedFile.snapshots ?? {};
57
- await writeEnvLockfile(opts.rootDir, envLockfile);
60
+ if (save) {
61
+ await writeEnvLockfile(opts.rootDir, envLockfile);
62
+ }
58
63
  }
59
64
  return envLockfile;
60
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/installing.env-installer",
3
- "version": "1100.0.1",
3
+ "version": "1100.1.0",
4
4
  "description": "Installer for configurational dependencies",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -28,26 +28,26 @@
28
28
  "@zkochan/rimraf": "^4.0.0",
29
29
  "get-npm-tarball-url": "^2.1.0",
30
30
  "symlink-dir": "^10.0.1",
31
- "@pnpm/core-loggers": "1100.0.1",
32
31
  "@pnpm/config.pick-registry-for-package": "1100.0.1",
33
- "@pnpm/error": "1100.0.0",
34
32
  "@pnpm/constants": "1100.0.0",
35
- "@pnpm/deps.graph-hasher": "1100.0.1",
36
33
  "@pnpm/config.writer": "1100.0.1",
34
+ "@pnpm/deps.graph-hasher": "1100.0.1",
35
+ "@pnpm/core-loggers": "1100.0.1",
36
+ "@pnpm/error": "1100.0.0",
37
37
  "@pnpm/fs.read-modules-dir": "1100.0.0",
38
- "@pnpm/installing.deps-resolver": "1100.0.1",
38
+ "@pnpm/installing.deps-resolver": "1100.0.2",
39
39
  "@pnpm/lockfile.fs": "1100.0.1",
40
40
  "@pnpm/lockfile.pruner": "1100.0.1",
41
+ "@pnpm/lockfile.utils": "1100.0.1",
41
42
  "@pnpm/lockfile.types": "1100.0.1",
42
- "@pnpm/network.auth-header": "1100.0.1",
43
43
  "@pnpm/network.fetch": "1100.0.1",
44
- "@pnpm/resolving.parse-wanted-dependency": "1100.0.0",
44
+ "@pnpm/network.auth-header": "1100.0.1",
45
45
  "@pnpm/pkg-manifest.reader": "1100.0.1",
46
- "@pnpm/store.controller": "1100.0.1",
47
46
  "@pnpm/resolving.npm-resolver": "1100.0.1",
48
- "@pnpm/types": "1101.0.0",
47
+ "@pnpm/resolving.parse-wanted-dependency": "1100.0.0",
49
48
  "@pnpm/store.controller-types": "1100.0.1",
50
- "@pnpm/lockfile.utils": "1100.0.1"
49
+ "@pnpm/store.controller": "1100.0.1",
50
+ "@pnpm/types": "1101.0.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@pnpm/logger": ">=1001.0.0 <1002.0.0",
@@ -57,9 +57,9 @@
57
57
  "@pnpm/registry-mock": "6.0.0",
58
58
  "load-json-file": "^7.0.1",
59
59
  "read-yaml-file": "^3.0.0",
60
- "@pnpm/installing.env-installer": "1100.0.1",
60
+ "@pnpm/installing.env-installer": "1100.1.0",
61
61
  "@pnpm/prepare": "1100.0.1",
62
- "@pnpm/testing.temp-store": "1100.0.1"
62
+ "@pnpm/testing.temp-store": "1100.0.2"
63
63
  },
64
64
  "engines": {
65
65
  "node": ">=22.13"