@pnpm/installing.context 1100.0.16 → 1100.0.18
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.d.ts +2 -0
- package/lib/index.js +10 -6
- package/package.json +11 -11
package/lib/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export interface GetContextOptions {
|
|
|
65
65
|
confirmModulesPurge?: boolean;
|
|
66
66
|
force: boolean;
|
|
67
67
|
frozenLockfile?: boolean;
|
|
68
|
+
frozenStore?: boolean;
|
|
68
69
|
enableGlobalVirtualStore?: boolean;
|
|
69
70
|
extraBinPaths: string[];
|
|
70
71
|
extendNodePath?: boolean;
|
|
@@ -125,6 +126,7 @@ export declare function getContextForSingleImporter(manifest: ProjectManifest, o
|
|
|
125
126
|
excludeLinksFromLockfile: boolean;
|
|
126
127
|
peersSuffixMaxLength: number;
|
|
127
128
|
force: boolean;
|
|
129
|
+
frozenStore?: boolean;
|
|
128
130
|
confirmModulesPurge?: boolean;
|
|
129
131
|
extraBinPaths: string[];
|
|
130
132
|
extendNodePath?: boolean;
|
package/lib/index.js
CHANGED
|
@@ -10,9 +10,11 @@ export async function getContext(opts) {
|
|
|
10
10
|
const modulesDir = opts.modulesDir ?? 'node_modules';
|
|
11
11
|
const importersContext = await readProjectsContext(opts.allProjects, { lockfileDir: opts.lockfileDir, modulesDir });
|
|
12
12
|
const virtualStoreDir = pathAbsolute(opts.virtualStoreDir ?? path.join(modulesDir, '.pnpm'), opts.lockfileDir);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if (!opts.frozenStore) {
|
|
14
|
+
await fs.mkdir(opts.storeDir, { recursive: true });
|
|
15
|
+
// Register this project for store prune tracking
|
|
16
|
+
await registerProject(opts.storeDir, opts.lockfileDir);
|
|
17
|
+
}
|
|
16
18
|
for (const project of opts.allProjects) {
|
|
17
19
|
packageManifestLogger.debug({
|
|
18
20
|
initial: project.manifest,
|
|
@@ -96,9 +98,11 @@ export async function getContextForSingleImporter(manifest, opts) {
|
|
|
96
98
|
const modulesDir = importer.modulesDir;
|
|
97
99
|
const importerId = importer.id;
|
|
98
100
|
const virtualStoreDir = pathAbsolute(opts.virtualStoreDir ?? 'node_modules/.pnpm', opts.lockfileDir);
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
if (!opts.frozenStore) {
|
|
102
|
+
await fs.mkdir(storeDir, { recursive: true });
|
|
103
|
+
// Register this project for store prune tracking
|
|
104
|
+
await registerProject(storeDir, opts.lockfileDir);
|
|
105
|
+
}
|
|
102
106
|
const extraBinPaths = [
|
|
103
107
|
...opts.extraBinPaths || [],
|
|
104
108
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/installing.context",
|
|
3
|
-
"version": "1100.0.
|
|
3
|
+
"version": "1100.0.18",
|
|
4
4
|
"description": "Gets context information about a project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -30,22 +30,22 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"path-absolute": "^2.0.0",
|
|
32
32
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
33
|
+
"@pnpm/core-loggers": "1100.2.1",
|
|
34
|
+
"@pnpm/installing.read-projects-context": "1100.0.15",
|
|
33
35
|
"@pnpm/constants": "1100.0.0",
|
|
34
|
-
"@pnpm/
|
|
35
|
-
"@pnpm/
|
|
36
|
-
"@pnpm/
|
|
37
|
-
"@pnpm/
|
|
38
|
-
"@pnpm/
|
|
39
|
-
"@pnpm/store.controller": "1101.0.12",
|
|
40
|
-
"@pnpm/types": "1101.3.1"
|
|
36
|
+
"@pnpm/lockfile.fs": "1100.1.5",
|
|
37
|
+
"@pnpm/resolving.resolver-base": "1100.4.2",
|
|
38
|
+
"@pnpm/store.controller": "1102.0.0",
|
|
39
|
+
"@pnpm/installing.modules-yaml": "1100.0.9",
|
|
40
|
+
"@pnpm/types": "1101.3.2"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@pnpm/logger": "^
|
|
43
|
+
"@pnpm/logger": "^1100.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@jest/globals": "30.
|
|
46
|
+
"@jest/globals": "30.4.1",
|
|
47
47
|
"@types/ramda": "0.31.1",
|
|
48
|
-
"@pnpm/installing.context": "1100.0.
|
|
48
|
+
"@pnpm/installing.context": "1100.0.18",
|
|
49
49
|
"@pnpm/logger": "1100.0.0"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|