@pnpm/lockfile.verification 1001.2.3 → 1001.2.4
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.
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.localTarballDepsAreUpToDate = localTarballDepsAreUpToDate;
|
|
7
30
|
const crypto_hash_1 = require("@pnpm/crypto.hash");
|
|
8
|
-
const
|
|
31
|
+
const dp = __importStar(require("@pnpm/dependency-path"));
|
|
9
32
|
const lockfile_utils_1 = require("@pnpm/lockfile.utils");
|
|
10
33
|
const types_1 = require("@pnpm/types");
|
|
11
34
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -30,10 +53,30 @@ async function localTarballDepsAreUpToDate({ fileIntegrityCache, lockfilePackage
|
|
|
30
53
|
return true;
|
|
31
54
|
}
|
|
32
55
|
return (0, p_every_1.default)(Object.entries(lockfileDeps), async ([depName, ref]) => {
|
|
33
|
-
if (!
|
|
56
|
+
if (!ref.startsWith('file:')) {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
// The tarball ref can contain peers. Ex: file:bar.tgz(react@19.1.0)
|
|
60
|
+
//
|
|
61
|
+
// Trim out the peer suffix version to get a path to the local tarball.
|
|
62
|
+
//
|
|
63
|
+
// - file:bar.tgz → file:bar.tgz
|
|
64
|
+
// - file:bar.tgz(react@19.1.0) → file:bar.tgz
|
|
65
|
+
//
|
|
66
|
+
const depPath = dp.refToRelative(ref, depName);
|
|
67
|
+
if (depPath == null) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
const parsed = dp.parse(depPath);
|
|
71
|
+
const tarballRefWithoutPeersSuffix = parsed.nonSemverVersion;
|
|
72
|
+
// Tarball refs aren't "semver" versions. If the nonSemverVersion field
|
|
73
|
+
// is empty, this isn't a depPath for a tarball.
|
|
74
|
+
if (tarballRefWithoutPeersSuffix == null) {
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
if (!(0, lockfile_utils_1.refIsLocalTarball)(tarballRefWithoutPeersSuffix)) {
|
|
34
78
|
return true;
|
|
35
79
|
}
|
|
36
|
-
const depPath = (0, dependency_path_1.refToRelative)(ref, depName);
|
|
37
80
|
const packageSnapshot = depPath != null ? lockfilePackages?.[depPath] : null;
|
|
38
81
|
// If there's no snapshot for this local tarball yet, the project is out
|
|
39
82
|
// of date and needs to be resolved. This should only happen with a
|
|
@@ -41,7 +84,8 @@ async function localTarballDepsAreUpToDate({ fileIntegrityCache, lockfilePackage
|
|
|
41
84
|
if (packageSnapshot == null) {
|
|
42
85
|
return false;
|
|
43
86
|
}
|
|
44
|
-
const
|
|
87
|
+
const fileRelativePath = tarballRefWithoutPeersSuffix.slice('file:'.length);
|
|
88
|
+
const filePath = node_path_1.default.join(lockfileDir, fileRelativePath);
|
|
45
89
|
const fileIntegrityPromise = fileIntegrityCache.get(filePath) ?? (0, crypto_hash_1.getTarballIntegrity)(filePath);
|
|
46
90
|
if (!fileIntegrityCache.has(filePath)) {
|
|
47
91
|
fileIntegrityCache.set(filePath, fileIntegrityPromise);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localTarballDepsAreUpToDate.js","sourceRoot":"","sources":["../src/localTarballDepsAreUpToDate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"localTarballDepsAreUpToDate.js","sourceRoot":"","sources":["../src/localTarballDepsAreUpToDate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,kEAkFC;AAjHD,mDAAuD;AACvD,0DAA2C;AAM3C,yDAAwD;AACxD,uCAAiD;AACjD,0DAA4B;AAC5B,sDAA4B;AAY5B;;;;;;;;GAQG;AACI,KAAK,UAAU,2BAA2B,CAC/C,EACE,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,GACqB,EAClC,OAEC;IAED,OAAO,IAAA,iBAAM,EAAC,2BAAmB,EAAE,CAAC,QAAQ,EAAE,EAAE;QAC9C,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAE/C,4EAA4E;QAC5E,2DAA2D;QAC3D,qEAAqE;QACrE,2CAA2C;QAC3C,IAAI,YAAY,IAAI,IAAI,EAAE,CAAC;YACzB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,OAAO,IAAA,iBAAM,EACX,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAC5B,KAAK,EAA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Q,CAAC,CAAA;YAC9F,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACtC,kBAAkB,CAAC,GAAG,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAA;YACxD,CAAC;YAED,IAAI,aAAqB,CAAA;YACzB,IAAI,CAAC;gBACH,aAAa,GAAG,MAAM,oBAAoB,CAAA;YAC5C,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,oEAAoE;gBACpE,qEAAqE;gBACrE,wBAAwB;gBACxB,OAAO,KAAK,CAAA;YACd,CAAC;YAED,OAAQ,eAAe,CAAC,UAAgC,CAAC,SAAS,KAAK,aAAa,CAAA;QACtF,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/lockfile.verification",
|
|
3
|
-
"version": "1001.2.
|
|
3
|
+
"version": "1001.2.4",
|
|
4
4
|
"description": "Checks a lockfile",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"semver": "^7.7.1",
|
|
31
31
|
"version-selector-type": "^3.0.0",
|
|
32
32
|
"@pnpm/catalogs.types": "1000.0.0",
|
|
33
|
-
"@pnpm/dependency-path": "1001.0.2",
|
|
34
|
-
"@pnpm/get-context": "1001.1.3",
|
|
35
|
-
"@pnpm/lockfile.types": "1001.1.0",
|
|
36
33
|
"@pnpm/crypto.hash": "1000.2.0",
|
|
37
|
-
"@pnpm/
|
|
38
|
-
"@pnpm/
|
|
39
|
-
"@pnpm/lockfile.
|
|
34
|
+
"@pnpm/dependency-path": "1001.1.0",
|
|
35
|
+
"@pnpm/get-context": "1001.1.4",
|
|
36
|
+
"@pnpm/lockfile.types": "1002.0.0",
|
|
37
|
+
"@pnpm/lockfile.utils": "1003.0.0",
|
|
38
|
+
"@pnpm/resolver-base": "1005.0.0",
|
|
39
|
+
"@pnpm/read-package-json": "1000.0.11",
|
|
40
40
|
"@pnpm/types": "1000.7.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"@types/semver": "7.5.3",
|
|
48
48
|
"@types/tar-stream": "^2.2.3",
|
|
49
49
|
"tar-stream": "^2.2.0",
|
|
50
|
-
"@pnpm/constants": "1001.
|
|
51
|
-
"@pnpm/lockfile.verification": "1001.2.
|
|
50
|
+
"@pnpm/constants": "1001.3.0",
|
|
51
|
+
"@pnpm/lockfile.verification": "1001.2.4",
|
|
52
52
|
"@pnpm/logger": "1001.0.0",
|
|
53
|
-
"@pnpm/prepare": "0.0.
|
|
53
|
+
"@pnpm/prepare": "0.0.123"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=18.12"
|