@pnpm/deps.inspection.outdated 1100.0.15 → 1100.0.16
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/createManifestGetter.js +15 -15
- package/package.json +12 -12
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPublishedByPolicy } from '@pnpm/config.version-policy';
|
|
2
2
|
import { createResolver, } from '@pnpm/installing.client';
|
|
3
3
|
export function createManifestGetter(opts) {
|
|
4
|
-
const publishedByExclude = opts
|
|
5
|
-
? createPackageVersionPolicy(opts.minimumReleaseAgeExclude)
|
|
6
|
-
: undefined;
|
|
4
|
+
const { publishedBy, publishedByExclude } = getPublishedByPolicy(opts);
|
|
7
5
|
const { resolve } = createResolver({
|
|
8
6
|
...opts,
|
|
9
7
|
configByUri: opts.configByUri,
|
|
10
8
|
filterMetadata: false, // We need all the data from metadata for "outdated --long" to work.
|
|
11
|
-
strictPublishedByCheck: Boolean(opts.minimumReleaseAge) && opts.minimumReleaseAgeStrict === true,
|
|
12
9
|
ignoreMissingTimeField: opts.minimumReleaseAgeIgnoreMissingTime,
|
|
13
10
|
});
|
|
14
|
-
const publishedBy = opts.minimumReleaseAge
|
|
15
|
-
? new Date(Date.now() - opts.minimumReleaseAge * 60 * 1000)
|
|
16
|
-
: undefined;
|
|
17
11
|
return getManifest.bind(null, {
|
|
18
12
|
...opts,
|
|
19
13
|
resolve,
|
|
@@ -30,17 +24,23 @@ export async function getManifest(opts, packageName, bareSpecifier) {
|
|
|
30
24
|
publishedBy: opts.publishedBy,
|
|
31
25
|
publishedByExclude: opts.publishedByExclude,
|
|
32
26
|
});
|
|
27
|
+
// No mature version found within range: the resolver fell back to the
|
|
28
|
+
// lowest immature pick and flagged it inline. `outdated` shouldn't
|
|
29
|
+
// present an immature version as "available", so treat it as no match
|
|
30
|
+
// — matching the pre-violation-collection behavior when the resolver
|
|
31
|
+
// threw `NO_MATURE_MATCHING_VERSION`.
|
|
32
|
+
if (resolution?.policyViolation?.code === 'MINIMUM_RELEASE_AGE_VIOLATION') {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
33
35
|
return resolution?.manifest ?? null;
|
|
34
36
|
}
|
|
35
37
|
catch (err) {
|
|
36
38
|
const code = err.code;
|
|
37
|
-
if (opts.publishedBy &&
|
|
38
|
-
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
// threshold, causing the resolver to throw NO_MATCHING_VERSION instead
|
|
43
|
-
// of NO_MATURE_MATCHING_VERSION.
|
|
39
|
+
if (opts.publishedBy && code === 'ERR_PNPM_NO_MATCHING_VERSION') {
|
|
40
|
+
// No version satisfies the range at all (not a maturity issue).
|
|
41
|
+
// Pre-violation-collection this branch also covered the maturity
|
|
42
|
+
// case via `NO_MATURE_MATCHING_VERSION`; with always-defer, that
|
|
43
|
+
// case is handled above as a `policyViolation`.
|
|
44
44
|
return null;
|
|
45
45
|
}
|
|
46
46
|
throw err;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/deps.inspection.outdated",
|
|
3
|
-
"version": "1100.0.
|
|
3
|
+
"version": "1100.0.16",
|
|
4
4
|
"description": "Check for outdated packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -27,22 +27,22 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
29
29
|
"semver": "^7.7.2",
|
|
30
|
-
"@pnpm/catalogs.resolver": "1100.0.0",
|
|
31
30
|
"@pnpm/catalogs.types": "1100.0.0",
|
|
32
|
-
"@pnpm/
|
|
31
|
+
"@pnpm/config.matcher": "1100.0.1",
|
|
33
32
|
"@pnpm/config.parse-overrides": "1100.0.1",
|
|
33
|
+
"@pnpm/config.version-policy": "1100.1.0",
|
|
34
|
+
"@pnpm/constants": "1100.0.0",
|
|
34
35
|
"@pnpm/deps.path": "1100.0.3",
|
|
35
36
|
"@pnpm/error": "1100.0.0",
|
|
36
|
-
"@pnpm/config.version-policy": "1100.0.3",
|
|
37
37
|
"@pnpm/hooks.read-package-hook": "1100.0.3",
|
|
38
|
-
"@pnpm/installing.client": "1100.0
|
|
39
|
-
"@pnpm/lockfile.
|
|
38
|
+
"@pnpm/installing.client": "1100.1.0",
|
|
39
|
+
"@pnpm/lockfile.fs": "1100.1.0",
|
|
40
|
+
"@pnpm/resolving.npm-resolver": "1101.2.0",
|
|
41
|
+
"@pnpm/catalogs.resolver": "1100.0.0",
|
|
40
42
|
"@pnpm/types": "1101.1.0",
|
|
41
|
-
"@pnpm/
|
|
42
|
-
"@pnpm/pkg-manifest.utils": "1100.1.3",
|
|
43
|
-
"@pnpm/config.matcher": "1100.0.1",
|
|
43
|
+
"@pnpm/pkg-manifest.utils": "1100.1.4",
|
|
44
44
|
"@pnpm/config.pick-registry-for-package": "1100.0.3",
|
|
45
|
-
"@pnpm/
|
|
45
|
+
"@pnpm/lockfile.utils": "1100.0.8"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@pnpm/logger": ">=1001.0.0 <1002.0.0"
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"@jest/globals": "30.3.0",
|
|
52
52
|
"@types/ramda": "0.31.1",
|
|
53
53
|
"@types/semver": "7.7.1",
|
|
54
|
-
"@pnpm/deps.inspection.outdated": "1100.0.
|
|
54
|
+
"@pnpm/deps.inspection.outdated": "1100.0.16",
|
|
55
55
|
"@pnpm/logger": "1100.0.0",
|
|
56
|
-
"@pnpm/resolving.resolver-base": "1100.
|
|
56
|
+
"@pnpm/resolving.resolver-base": "1100.2.0"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">=22.13"
|