@pnpm/cli.default-reporter 1100.2.6 → 1100.3.1
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.
|
@@ -11,6 +11,11 @@ export function reportLockfileVerification(lockfileVerification$, opts) {
|
|
|
11
11
|
// both lines are printed.
|
|
12
12
|
return Rx.of(lockfileVerification$.pipe(map((log) => {
|
|
13
13
|
const path_ = formatLockfilePath(log.lockfilePath, opts.cwd, expectedDir);
|
|
14
|
+
if (log.status === 'cached') {
|
|
15
|
+
return {
|
|
16
|
+
msg: `${chalk.green('✓')} Lockfile${path_} passes supply-chain policies (${formatCachedVerdict(log.verifiedAt)})`,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
14
19
|
const entries = `${log.entries} ${log.entries === 1 ? 'entry' : 'entries'}`;
|
|
15
20
|
switch (log.status) {
|
|
16
21
|
case 'started':
|
|
@@ -31,6 +36,18 @@ export function reportLockfileVerification(lockfileVerification$, opts) {
|
|
|
31
36
|
}
|
|
32
37
|
})));
|
|
33
38
|
}
|
|
39
|
+
// Relative "verified 2h ago" when the cached record carries a parseable
|
|
40
|
+
// timestamp; the timeless "previously verified" otherwise. The elapsed
|
|
41
|
+
// time is clamped at zero so a clock that moved backwards between the
|
|
42
|
+
// verification run and this install doesn't render a negative age.
|
|
43
|
+
function formatCachedVerdict(verifiedAt) {
|
|
44
|
+
if (verifiedAt == null)
|
|
45
|
+
return 'previously verified';
|
|
46
|
+
const elapsedMs = Date.now() - Date.parse(verifiedAt);
|
|
47
|
+
if (Number.isNaN(elapsedMs))
|
|
48
|
+
return 'previously verified';
|
|
49
|
+
return `verified ${prettyMs(Math.max(elapsedMs, 0), { compact: true })} ago`;
|
|
50
|
+
}
|
|
34
51
|
// Returns a leading-space-prefixed `at <path>` suffix only when the
|
|
35
52
|
// lockfile sits outside the obvious project/workspace root — otherwise
|
|
36
53
|
// the path is implied and printing it would just add noise to every
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/cli.default-reporter",
|
|
3
|
-
"version": "1100.
|
|
3
|
+
"version": "1100.3.1",
|
|
4
4
|
"description": "The default reporter of pnpm",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -32,40 +32,40 @@
|
|
|
32
32
|
"pnpm-render": "bin/pnpm-render.mjs"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@pnpm/util.lex-comparator": "^
|
|
35
|
+
"@pnpm/util.lex-comparator": "^4.0.1",
|
|
36
36
|
"ansi-diff": "^1.2.0",
|
|
37
37
|
"boxen": "npm:@zkochan/boxen@5.1.2",
|
|
38
38
|
"chalk": "^5.6.2",
|
|
39
|
-
"cli-truncate": "^
|
|
39
|
+
"cli-truncate": "^6.0.0",
|
|
40
40
|
"normalize-path": "^3.0.0",
|
|
41
41
|
"pretty-bytes": "^7.1.0",
|
|
42
42
|
"pretty-ms": "^9.3.0",
|
|
43
43
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
44
44
|
"rxjs": "^7.8.2",
|
|
45
|
-
"semver": "^7.8.
|
|
45
|
+
"semver": "^7.8.4",
|
|
46
46
|
"stacktracey": "^2.2.0",
|
|
47
47
|
"string-length": "^7.0.1",
|
|
48
|
-
"@pnpm/
|
|
49
|
-
"@pnpm/config.reader": "1101.7.0",
|
|
50
|
-
"@pnpm/core-loggers": "1100.1.4",
|
|
51
|
-
"@pnpm/deps.inspection.peers-issues-renderer": "1100.0.5",
|
|
48
|
+
"@pnpm/deps.inspection.peers-issues-renderer": "1100.0.6",
|
|
52
49
|
"@pnpm/error": "1100.0.0",
|
|
53
|
-
"@pnpm/installing.dedupe.issues-renderer": "1100.0.1",
|
|
54
50
|
"@pnpm/installing.dedupe.types": "1100.0.1",
|
|
55
|
-
"@pnpm/types": "1101.3.
|
|
51
|
+
"@pnpm/types": "1101.3.2",
|
|
52
|
+
"@pnpm/cli.meta": "1100.0.8",
|
|
53
|
+
"@pnpm/config.reader": "1101.9.0",
|
|
54
|
+
"@pnpm/installing.dedupe.issues-renderer": "1100.0.1",
|
|
55
|
+
"@pnpm/core-loggers": "1100.2.1"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@pnpm/logger": "^
|
|
58
|
+
"@pnpm/logger": "^1100.0.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@jest/globals": "30.
|
|
61
|
+
"@jest/globals": "30.4.1",
|
|
62
62
|
"@types/normalize-path": "^3.0.2",
|
|
63
63
|
"@types/ramda": "0.31.1",
|
|
64
64
|
"@types/semver": "7.7.1",
|
|
65
65
|
"ghooks": "2.0.4",
|
|
66
66
|
"load-json-file": "^7.0.1",
|
|
67
67
|
"normalize-newline": "5.0.0",
|
|
68
|
-
"@pnpm/cli.default-reporter": "1100.
|
|
68
|
+
"@pnpm/cli.default-reporter": "1100.3.1",
|
|
69
69
|
"@pnpm/logger": "1100.0.0"
|
|
70
70
|
},
|
|
71
71
|
"engines": {
|