@pnpm/installing.deps-restorer 1101.0.1 → 1101.0.2
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/lib/index.js +7 -3
- package/lib/lockfileToHoistedDepGraph.js +2 -1
- package/package.json +20 -20
package/lib/index.js
CHANGED
|
@@ -48,11 +48,15 @@ export async function headlessInstall(opts) {
|
|
|
48
48
|
throw new Error(`Headless installation requires a ${WANTED_LOCKFILE} file`);
|
|
49
49
|
}
|
|
50
50
|
const depsStateCache = {};
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
// `modulesDir` is conventionally a path relative to `lockfileDir`, but
|
|
52
|
+
// some callers pass it as an absolute path. Resolve via `pathAbsolute`
|
|
53
|
+
// so both forms work — `path.join` on Windows would otherwise produce a
|
|
54
|
+
// doubled prefix when the second argument is also absolute.
|
|
55
|
+
const modulesDir = opts.modulesDir ?? 'node_modules';
|
|
56
|
+
const rootModulesDir = await realpathMissing(pathAbsolute(modulesDir, lockfileDir));
|
|
53
57
|
const internalPnpmDir = path.join(rootModulesDir, '.pnpm');
|
|
54
58
|
const currentLockfile = opts.currentLockfile ?? await readCurrentLockfile(internalPnpmDir, { ignoreIncompatible: false });
|
|
55
|
-
const virtualStoreDir = pathAbsolute(opts.virtualStoreDir ?? path.join(
|
|
59
|
+
const virtualStoreDir = pathAbsolute(opts.virtualStoreDir ?? path.join(modulesDir, '.pnpm'), lockfileDir);
|
|
56
60
|
const hoistedModulesDir = path.join(opts.enableGlobalVirtualStore ? internalPnpmDir : virtualStoreDir, 'node_modules');
|
|
57
61
|
const publicHoistedModulesDir = rootModulesDir;
|
|
58
62
|
const selectedProjects = Object.values(pick(opts.selectedProjectDirs, opts.allProjects));
|
|
@@ -6,6 +6,7 @@ import { nameVerFromPkgSnapshot, packageIdFromSnapshot, pkgSnapshotToResolution,
|
|
|
6
6
|
import { logger } from '@pnpm/logger';
|
|
7
7
|
import { getPatchInfo } from '@pnpm/patching.config';
|
|
8
8
|
import { safeReadPackageJsonFromDir } from '@pnpm/pkg-manifest.reader';
|
|
9
|
+
import { pathAbsolute } from 'path-absolute';
|
|
9
10
|
import { pathExists } from 'path-exists';
|
|
10
11
|
export async function lockfileToHoistedDepGraph(lockfile, currentLockfile, opts) {
|
|
11
12
|
let prevGraph;
|
|
@@ -31,7 +32,7 @@ async function _lockfileToHoistedDepGraph(lockfile, opts) {
|
|
|
31
32
|
autoInstallPeers: opts.autoInstallPeers,
|
|
32
33
|
});
|
|
33
34
|
const graph = {};
|
|
34
|
-
const modulesDir =
|
|
35
|
+
const modulesDir = pathAbsolute(opts.modulesDir ?? 'node_modules', opts.lockfileDir);
|
|
35
36
|
const fetchDepsOpts = {
|
|
36
37
|
...opts,
|
|
37
38
|
lockfile,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/installing.deps-restorer",
|
|
3
|
-
"version": "1101.0.
|
|
3
|
+
"version": "1101.0.2",
|
|
4
4
|
"description": "Fast installation using only pnpm-lock.yaml",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -37,31 +37,31 @@
|
|
|
37
37
|
"realpath-missing": "^2.0.0",
|
|
38
38
|
"@pnpm/bins.linker": "1100.0.2",
|
|
39
39
|
"@pnpm/building.during-install": "1101.0.1",
|
|
40
|
-
"@pnpm/core-loggers": "1100.0.1",
|
|
41
|
-
"@pnpm/constants": "1100.0.0",
|
|
42
|
-
"@pnpm/config.package-is-installable": "1100.0.1",
|
|
43
40
|
"@pnpm/building.policy": "1100.0.1",
|
|
44
|
-
"@pnpm/
|
|
41
|
+
"@pnpm/constants": "1100.0.0",
|
|
42
|
+
"@pnpm/config.package-is-installable": "1100.0.2",
|
|
43
|
+
"@pnpm/core-loggers": "1100.0.1",
|
|
44
|
+
"@pnpm/deps.graph-builder": "1100.0.4",
|
|
45
45
|
"@pnpm/deps.graph-hasher": "1100.1.1",
|
|
46
46
|
"@pnpm/deps.path": "1100.0.1",
|
|
47
47
|
"@pnpm/error": "1100.0.0",
|
|
48
48
|
"@pnpm/exec.lifecycle": "1100.0.4",
|
|
49
|
-
"@pnpm/installing.linking.direct-dep-linker": "1100.0.1",
|
|
50
|
-
"@pnpm/installing.linking.hoist": "1100.0.2",
|
|
51
|
-
"@pnpm/installing.linking.modules-cleaner": "1100.0.3",
|
|
52
49
|
"@pnpm/fs.symlink-dependency": "1100.0.1",
|
|
53
|
-
"@pnpm/installing.
|
|
54
|
-
"@pnpm/installing.
|
|
50
|
+
"@pnpm/installing.linking.hoist": "1100.0.2",
|
|
51
|
+
"@pnpm/installing.linking.direct-dep-linker": "1100.0.1",
|
|
55
52
|
"@pnpm/installing.linking.real-hoist": "1100.0.3",
|
|
53
|
+
"@pnpm/installing.linking.modules-cleaner": "1100.0.4",
|
|
54
|
+
"@pnpm/installing.package-requester": "1101.0.1",
|
|
55
|
+
"@pnpm/lockfile.filtering": "1100.0.4",
|
|
56
56
|
"@pnpm/lockfile.fs": "1100.0.3",
|
|
57
57
|
"@pnpm/lockfile.to-pnp": "1100.0.3",
|
|
58
58
|
"@pnpm/lockfile.utils": "1100.0.3",
|
|
59
|
-
"@pnpm/pkg-manifest.reader": "1100.0.1",
|
|
60
59
|
"@pnpm/patching.config": "1100.0.1",
|
|
61
|
-
"@pnpm/
|
|
60
|
+
"@pnpm/pkg-manifest.reader": "1100.0.1",
|
|
61
|
+
"@pnpm/store.controller-types": "1100.0.3",
|
|
62
|
+
"@pnpm/installing.modules-yaml": "1100.0.1",
|
|
62
63
|
"@pnpm/types": "1101.0.0",
|
|
63
|
-
"@pnpm/workspace.project-manifest-reader": "1100.0.2"
|
|
64
|
-
"@pnpm/store.controller-types": "1100.0.3"
|
|
64
|
+
"@pnpm/workspace.project-manifest-reader": "1100.0.2"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"@pnpm/logger": ">=1001.0.0 <1002.0.0",
|
|
@@ -79,16 +79,16 @@
|
|
|
79
79
|
"write-json-file": "^7.0.0",
|
|
80
80
|
"@pnpm/assert-project": "1100.0.3",
|
|
81
81
|
"@pnpm/crypto.object-hasher": "1100.0.0",
|
|
82
|
-
"@pnpm/installing.read-projects-context": "1100.0.
|
|
82
|
+
"@pnpm/installing.read-projects-context": "1100.0.4",
|
|
83
|
+
"@pnpm/installing.deps-restorer": "1101.0.2",
|
|
83
84
|
"@pnpm/logger": "1100.0.0",
|
|
84
|
-
"@pnpm/installing.deps-restorer": "1101.0.1",
|
|
85
|
-
"@pnpm/prepare": "1100.0.3",
|
|
86
85
|
"@pnpm/store.cafs": "1100.1.0",
|
|
86
|
+
"@pnpm/prepare": "1100.0.3",
|
|
87
|
+
"@pnpm/store.path": "1100.0.0",
|
|
87
88
|
"@pnpm/store.index": "1100.0.0",
|
|
88
89
|
"@pnpm/test-ipc-server": "1100.0.0",
|
|
89
|
-
"@pnpm/
|
|
90
|
-
"@pnpm/
|
|
91
|
-
"@pnpm/store.path": "1100.0.0"
|
|
90
|
+
"@pnpm/testing.temp-store": "1100.0.7",
|
|
91
|
+
"@pnpm/test-fixtures": "1100.0.0"
|
|
92
92
|
},
|
|
93
93
|
"engines": {
|
|
94
94
|
"node": ">=22.13"
|