@pnpm/installing.context 1100.0.19 → 1100.0.20
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/readLockfiles.js +7 -0
- package/package.json +10 -9
package/lib/readLockfiles.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
1
2
|
import { LOCKFILE_VERSION, WANTED_LOCKFILE, } from '@pnpm/constants';
|
|
3
|
+
import { PnpmError } from '@pnpm/error';
|
|
2
4
|
import { createLockfileObject, existsNonEmptyWantedLockfile, isEmptyLockfile, readCurrentLockfile, readWantedLockfile, readWantedLockfileAndAutofixConflicts, } from '@pnpm/lockfile.fs';
|
|
3
5
|
import { logger } from '@pnpm/logger';
|
|
4
6
|
import { clone, equals } from 'ramda';
|
|
@@ -15,7 +17,9 @@ export async function readLockfiles(opts) {
|
|
|
15
17
|
};
|
|
16
18
|
const fileReads = [];
|
|
17
19
|
let lockfileHadConflicts = false;
|
|
20
|
+
let wantedLockfileFileExists = false;
|
|
18
21
|
if (opts.useLockfile) {
|
|
22
|
+
wantedLockfileFileExists = await existsNonEmptyWantedLockfile(opts.lockfileDir, lockfileOpts);
|
|
19
23
|
if (!opts.frozenLockfile) {
|
|
20
24
|
fileReads.push((async () => {
|
|
21
25
|
try {
|
|
@@ -58,6 +62,9 @@ export async function readLockfiles(opts) {
|
|
|
58
62
|
}
|
|
59
63
|
})());
|
|
60
64
|
const files = await Promise.all(fileReads);
|
|
65
|
+
if (opts.frozenLockfile && wantedLockfileFileExists && files[0] == null) {
|
|
66
|
+
throw new PnpmError('BROKEN_LOCKFILE', `The lockfile at "${path.join(opts.lockfileDir, WANTED_LOCKFILE)}" is broken: it is empty`);
|
|
67
|
+
}
|
|
61
68
|
const sopts = {
|
|
62
69
|
autoInstallPeers: opts.autoInstallPeers,
|
|
63
70
|
excludeLinksFromLockfile: opts.excludeLinksFromLockfile,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/installing.context",
|
|
3
|
-
"version": "1100.0.
|
|
3
|
+
"version": "1100.0.20",
|
|
4
4
|
"description": "Gets context information about a project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"funding": "https://opencollective.com/pnpm",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/pnpm/pnpm/tree/main/installing/context"
|
|
14
|
+
"url": "https://github.com/pnpm/pnpm/tree/main/pnpm11/installing/context"
|
|
15
15
|
},
|
|
16
|
-
"homepage": "https://github.com/pnpm/pnpm/tree/main/installing/context#readme",
|
|
16
|
+
"homepage": "https://github.com/pnpm/pnpm/tree/main/pnpm11/installing/context#readme",
|
|
17
17
|
"bugs": {
|
|
18
18
|
"url": "https://github.com/pnpm/pnpm/issues"
|
|
19
19
|
},
|
|
@@ -30,13 +30,14 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"path-absolute": "^2.0.0",
|
|
32
32
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
33
|
-
"@pnpm/constants": "1100.0.0",
|
|
34
33
|
"@pnpm/core-loggers": "1100.2.1",
|
|
34
|
+
"@pnpm/constants": "1100.0.0",
|
|
35
|
+
"@pnpm/error": "1100.0.1",
|
|
35
36
|
"@pnpm/installing.modules-yaml": "1100.0.9",
|
|
36
|
-
"@pnpm/
|
|
37
|
-
"@pnpm/
|
|
38
|
-
"@pnpm/
|
|
39
|
-
"@pnpm/
|
|
37
|
+
"@pnpm/lockfile.fs": "1100.1.7",
|
|
38
|
+
"@pnpm/installing.read-projects-context": "1100.0.17",
|
|
39
|
+
"@pnpm/store.controller": "1102.0.2",
|
|
40
|
+
"@pnpm/resolving.resolver-base": "1100.5.0",
|
|
40
41
|
"@pnpm/types": "1101.3.2"
|
|
41
42
|
},
|
|
42
43
|
"peerDependencies": {
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@jest/globals": "30.4.1",
|
|
47
48
|
"@types/ramda": "0.31.1",
|
|
48
|
-
"@pnpm/installing.context": "1100.0.
|
|
49
|
+
"@pnpm/installing.context": "1100.0.20",
|
|
49
50
|
"@pnpm/logger": "1100.0.0"
|
|
50
51
|
},
|
|
51
52
|
"engines": {
|