@pnpm/outdated 1001.0.35 → 1001.1.0
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,5 +1,5 @@
|
|
|
1
1
|
import { type ClientOptions, type ResolveFunction } from '@pnpm/client';
|
|
2
|
-
import { type DependencyManifest } from '@pnpm/types';
|
|
2
|
+
import { type PackageVersionPolicy, type DependencyManifest } from '@pnpm/types';
|
|
3
3
|
interface GetManifestOpts {
|
|
4
4
|
dir: string;
|
|
5
5
|
lockfileDir: string;
|
|
@@ -7,7 +7,7 @@ interface GetManifestOpts {
|
|
|
7
7
|
minimumReleaseAge?: number;
|
|
8
8
|
minimumReleaseAgeExclude?: string[];
|
|
9
9
|
}
|
|
10
|
-
export type ManifestGetterOptions = Omit<ClientOptions, 'authConfig'> & GetManifestOpts & {
|
|
10
|
+
export type ManifestGetterOptions = Omit<ClientOptions, 'authConfig' | 'minimumReleaseAgeExclude'> & GetManifestOpts & {
|
|
11
11
|
fullMetadata: boolean;
|
|
12
12
|
rawConfig: Record<string, string>;
|
|
13
13
|
};
|
|
@@ -15,6 +15,6 @@ export declare function createManifestGetter(opts: ManifestGetterOptions): (pack
|
|
|
15
15
|
export declare function getManifest(opts: GetManifestOpts & {
|
|
16
16
|
resolve: ResolveFunction;
|
|
17
17
|
publishedBy?: Date;
|
|
18
|
-
|
|
18
|
+
publishedByExclude?: PackageVersionPolicy;
|
|
19
19
|
}, packageName: string, bareSpecifier: string): Promise<DependencyManifest | null>;
|
|
20
20
|
export {};
|
|
@@ -3,8 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createManifestGetter = createManifestGetter;
|
|
4
4
|
exports.getManifest = getManifest;
|
|
5
5
|
const client_1 = require("@pnpm/client");
|
|
6
|
-
const
|
|
6
|
+
const config_version_policy_1 = require("@pnpm/config.version-policy");
|
|
7
7
|
function createManifestGetter(opts) {
|
|
8
|
+
const publishedByExclude = opts.minimumReleaseAgeExclude
|
|
9
|
+
? (0, config_version_policy_1.createPackageVersionPolicy)(opts.minimumReleaseAgeExclude)
|
|
10
|
+
: undefined;
|
|
8
11
|
const { resolve } = (0, client_1.createResolver)({
|
|
9
12
|
...opts,
|
|
10
13
|
authConfig: opts.rawConfig,
|
|
@@ -14,30 +17,26 @@ function createManifestGetter(opts) {
|
|
|
14
17
|
const publishedBy = opts.minimumReleaseAge
|
|
15
18
|
? new Date(Date.now() - opts.minimumReleaseAge * 60 * 1000)
|
|
16
19
|
: undefined;
|
|
17
|
-
const isExcludedMatcher = opts.minimumReleaseAgeExclude
|
|
18
|
-
? (0, matcher_1.createMatcher)(opts.minimumReleaseAgeExclude)
|
|
19
|
-
: undefined;
|
|
20
20
|
return getManifest.bind(null, {
|
|
21
21
|
...opts,
|
|
22
22
|
resolve,
|
|
23
23
|
publishedBy,
|
|
24
|
-
|
|
24
|
+
publishedByExclude,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
async function getManifest(opts, packageName, bareSpecifier) {
|
|
28
|
-
const isExcluded = opts.isExcludedMatcher?.(packageName);
|
|
29
|
-
const effectivePublishedBy = isExcluded ? undefined : opts.publishedBy;
|
|
30
28
|
try {
|
|
31
29
|
const resolution = await opts.resolve({ alias: packageName, bareSpecifier }, {
|
|
32
30
|
lockfileDir: opts.lockfileDir,
|
|
33
31
|
preferredVersions: {},
|
|
34
32
|
projectDir: opts.dir,
|
|
35
|
-
publishedBy:
|
|
33
|
+
publishedBy: opts.publishedBy,
|
|
34
|
+
publishedByExclude: opts.publishedByExclude,
|
|
36
35
|
});
|
|
37
36
|
return resolution?.manifest ?? null;
|
|
38
37
|
}
|
|
39
38
|
catch (err) {
|
|
40
|
-
if (err.code === 'ERR_PNPM_NO_MATCHING_VERSION' &&
|
|
39
|
+
if (err.code === 'ERR_PNPM_NO_MATCHING_VERSION' && opts.publishedBy) {
|
|
41
40
|
// No versions found that meet the minimumReleaseAge requirement
|
|
42
41
|
return null;
|
|
43
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createManifestGetter.js","sourceRoot":"","sources":["../src/createManifestGetter.ts"],"names":[],"mappings":";;AAoBA,oDAwBC;AAED,
|
|
1
|
+
{"version":3,"file":"createManifestGetter.js","sourceRoot":"","sources":["../src/createManifestGetter.ts"],"names":[],"mappings":";;AAoBA,oDAwBC;AAED,kCAyBC;AAvED,yCAIqB;AACrB,uEAAwE;AAexE,SAAgB,oBAAoB,CAClC,IAA2B;IAE3B,MAAM,kBAAkB,GAAG,IAAI,CAAC,wBAAwB;QACtD,CAAC,CAAC,IAAA,kDAA0B,EAAC,IAAI,CAAC,wBAAwB,CAAC;QAC3D,CAAC,CAAC,SAAS,CAAA;IAEb,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAc,EAAC;QACjC,GAAG,IAAI;QACP,UAAU,EAAE,IAAI,CAAC,SAAS;QAC1B,cAAc,EAAE,KAAK,EAAE,oEAAoE;QAC3F,sBAAsB,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC;KACxD,CAAC,CAAA;IAEF,MAAM,WAAW,GAAG,IAAI,CAAC,iBAAiB;QACxC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,iBAAiB,GAAG,EAAE,GAAG,IAAI,CAAC;QAC3D,CAAC,CAAC,SAAS,CAAA;IAEb,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE;QAC5B,GAAG,IAAI;QACP,OAAO;QACP,WAAW;QACX,kBAAkB;KACnB,CAAC,CAAA;AACJ,CAAC;AAEM,KAAK,UAAU,WAAW,CAC/B,IAIC,EACD,WAAmB,EACnB,aAAqB;IAErB,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE;YAC3E,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,iBAAiB,EAAE,EAAE;YACrB,UAAU,EAAE,IAAI,CAAC,GAAG;YACpB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;SAC5C,CAAC,CAAA;QACF,OAAO,UAAU,EAAE,QAAQ,IAAI,IAAI,CAAA;IACrC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAK,GAAyB,CAAC,IAAI,KAAK,8BAA8B,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YAC3F,gEAAgE;YAChE,OAAO,IAAI,CAAA;QACb,CAAC;QACD,MAAM,GAAG,CAAA;IACX,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/outdated",
|
|
3
|
-
"version": "1001.0
|
|
3
|
+
"version": "1001.1.0",
|
|
4
4
|
"description": "Check for outdated packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -29,19 +29,20 @@
|
|
|
29
29
|
"semver": "^7.7.1",
|
|
30
30
|
"@pnpm/catalogs.resolver": "1000.0.5",
|
|
31
31
|
"@pnpm/catalogs.types": "1000.0.0",
|
|
32
|
-
"@pnpm/
|
|
32
|
+
"@pnpm/config.version-policy": "1000.0.0",
|
|
33
|
+
"@pnpm/client": "1001.1.3",
|
|
34
|
+
"@pnpm/dependency-path": "1001.1.3",
|
|
33
35
|
"@pnpm/constants": "1001.3.1",
|
|
34
|
-
"@pnpm/dependency-path": "1001.1.2",
|
|
35
36
|
"@pnpm/error": "1000.0.5",
|
|
36
|
-
"@pnpm/hooks.read-package-hook": "1000.0.
|
|
37
|
-
"@pnpm/lockfile.utils": "1003.0.
|
|
38
|
-
"@pnpm/
|
|
39
|
-
"@pnpm/
|
|
40
|
-
"@pnpm/
|
|
41
|
-
"@pnpm/
|
|
37
|
+
"@pnpm/hooks.read-package-hook": "1000.0.15",
|
|
38
|
+
"@pnpm/lockfile.utils": "1003.0.3",
|
|
39
|
+
"@pnpm/manifest-utils": "1001.0.6",
|
|
40
|
+
"@pnpm/lockfile.fs": "1001.1.21",
|
|
41
|
+
"@pnpm/matcher": "1000.1.0",
|
|
42
|
+
"@pnpm/npm-resolver": "1004.4.0",
|
|
42
43
|
"@pnpm/parse-overrides": "1001.0.3",
|
|
43
|
-
"@pnpm/pick-registry-for-package": "1000.0.
|
|
44
|
-
"@pnpm/types": "1000.
|
|
44
|
+
"@pnpm/pick-registry-for-package": "1000.0.11",
|
|
45
|
+
"@pnpm/types": "1000.9.0"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
48
|
"@pnpm/logger": ">=1001.0.0 <1002.0.0"
|
|
@@ -50,8 +51,8 @@
|
|
|
50
51
|
"@types/ramda": "0.29.12",
|
|
51
52
|
"@types/semver": "7.5.3",
|
|
52
53
|
"@pnpm/logger": "1001.0.1",
|
|
53
|
-
"@pnpm/outdated": "1001.0
|
|
54
|
-
"@pnpm/resolver-base": "1005.0
|
|
54
|
+
"@pnpm/outdated": "1001.1.0",
|
|
55
|
+
"@pnpm/resolver-base": "1005.1.0"
|
|
55
56
|
},
|
|
56
57
|
"engines": {
|
|
57
58
|
"node": ">=18.12"
|