@pnpm/lockfile.settings-checker 1001.1.0 → 1100.0.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.
- package/lib/calcPatchHashes.d.ts +1 -2
- package/lib/calcPatchHashes.js +5 -15
- package/lib/createOverridesMapFromParsed.d.ts +1 -1
- package/lib/createOverridesMapFromParsed.js +1 -4
- package/lib/getOutdatedLockfileSetting.d.ts +4 -4
- package/lib/getOutdatedLockfileSetting.js +7 -13
- package/lib/index.js +3 -9
- package/package.json +15 -15
- package/lib/calcPatchHashes.js.map +0 -1
- package/lib/createOverridesMapFromParsed.js.map +0 -1
- package/lib/getOutdatedLockfileSetting.js.map +0 -1
- package/lib/index.js.map +0 -1
package/lib/calcPatchHashes.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function calcPatchHashes(patches: Record<string, string>, lockfileDir: string): Promise<Record<string, PatchFile>>;
|
|
1
|
+
export declare function calcPatchHashes(patches: Record<string, string>): Promise<Record<string, string>>;
|
package/lib/calcPatchHashes.js
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.calcPatchHashes = calcPatchHashes;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const p_map_values_1 = __importDefault(require("p-map-values"));
|
|
9
|
-
const crypto_hash_1 = require("@pnpm/crypto.hash");
|
|
10
|
-
async function calcPatchHashes(patches, lockfileDir) {
|
|
11
|
-
return (0, p_map_values_1.default)(async (patchFilePath) => {
|
|
12
|
-
return {
|
|
13
|
-
hash: await (0, crypto_hash_1.createHexHashFromFile)(patchFilePath),
|
|
14
|
-
path: path_1.default.relative(lockfileDir, patchFilePath).replaceAll('\\', '/'),
|
|
15
|
-
};
|
|
1
|
+
import { createHexHashFromFile } from '@pnpm/crypto.hash';
|
|
2
|
+
import { pMapValues } from 'p-map-values';
|
|
3
|
+
export async function calcPatchHashes(patches) {
|
|
4
|
+
return pMapValues(async (patchFilePath) => {
|
|
5
|
+
return createHexHashFromFile(patchFilePath);
|
|
16
6
|
}, patches);
|
|
17
7
|
}
|
|
18
8
|
//# sourceMappingURL=calcPatchHashes.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { VersionOverride } from '@pnpm/config.parse-overrides';
|
|
2
2
|
export declare function createOverridesMapFromParsed(parsedOverrides: VersionOverride[] | undefined): Record<string, string>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createOverridesMapFromParsed = createOverridesMapFromParsed;
|
|
4
|
-
function createOverridesMapFromParsed(parsedOverrides) {
|
|
1
|
+
export function createOverridesMapFromParsed(parsedOverrides) {
|
|
5
2
|
if (!parsedOverrides)
|
|
6
3
|
return {};
|
|
7
4
|
const overridesMap = {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Catalogs } from '@pnpm/catalogs.types';
|
|
2
|
+
import type { LockfileObject } from '@pnpm/lockfile.types';
|
|
3
3
|
export type ChangedField = 'catalogs' | 'patchedDependencies' | 'overrides' | 'packageExtensionsChecksum' | 'ignoredOptionalDependencies' | 'settings.autoInstallPeers' | 'settings.dedupePeers' | 'settings.excludeLinksFromLockfile' | 'settings.peersSuffixMaxLength' | 'settings.injectWorkspacePackages' | 'pnpmfileChecksum';
|
|
4
|
-
export declare function getOutdatedLockfileSetting(lockfile: LockfileObject, { catalogs, overrides, packageExtensionsChecksum, ignoredOptionalDependencies, patchedDependencies, autoInstallPeers, dedupePeers, excludeLinksFromLockfile, peersSuffixMaxLength, pnpmfileChecksum, injectWorkspacePackages
|
|
4
|
+
export declare function getOutdatedLockfileSetting(lockfile: LockfileObject, { catalogs, overrides, packageExtensionsChecksum, ignoredOptionalDependencies, patchedDependencies, autoInstallPeers, dedupePeers, excludeLinksFromLockfile, peersSuffixMaxLength, pnpmfileChecksum, injectWorkspacePackages }: {
|
|
5
5
|
catalogs?: Catalogs;
|
|
6
6
|
overrides?: Record<string, string>;
|
|
7
7
|
packageExtensionsChecksum?: string;
|
|
8
|
-
patchedDependencies?: Record<string,
|
|
8
|
+
patchedDependencies?: Record<string, string>;
|
|
9
9
|
ignoredOptionalDependencies?: string[];
|
|
10
10
|
autoInstallPeers?: boolean;
|
|
11
11
|
dedupePeers?: boolean;
|
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getOutdatedLockfileSetting = getOutdatedLockfileSetting;
|
|
7
|
-
const lockfile_verification_1 = require("@pnpm/lockfile.verification");
|
|
8
|
-
const equals_1 = __importDefault(require("ramda/src/equals"));
|
|
9
|
-
function getOutdatedLockfileSetting(lockfile, { catalogs, overrides, packageExtensionsChecksum, ignoredOptionalDependencies, patchedDependencies, autoInstallPeers, dedupePeers, excludeLinksFromLockfile, peersSuffixMaxLength, pnpmfileChecksum, injectWorkspacePackages, }) {
|
|
10
|
-
if (!(0, lockfile_verification_1.allCatalogsAreUpToDate)(catalogs ?? {}, lockfile.catalogs)) {
|
|
1
|
+
import { allCatalogsAreUpToDate } from '@pnpm/lockfile.verification';
|
|
2
|
+
import { equals } from 'ramda';
|
|
3
|
+
export function getOutdatedLockfileSetting(lockfile, { catalogs, overrides, packageExtensionsChecksum, ignoredOptionalDependencies, patchedDependencies, autoInstallPeers, dedupePeers, excludeLinksFromLockfile, peersSuffixMaxLength, pnpmfileChecksum, injectWorkspacePackages, }) {
|
|
4
|
+
if (!allCatalogsAreUpToDate(catalogs ?? {}, lockfile.catalogs)) {
|
|
11
5
|
return 'catalogs';
|
|
12
6
|
}
|
|
13
|
-
if (!(
|
|
7
|
+
if (!equals(lockfile.overrides ?? {}, overrides ?? {})) {
|
|
14
8
|
return 'overrides';
|
|
15
9
|
}
|
|
16
10
|
if (lockfile.packageExtensionsChecksum !== packageExtensionsChecksum) {
|
|
17
11
|
return 'packageExtensionsChecksum';
|
|
18
12
|
}
|
|
19
|
-
if (!(
|
|
13
|
+
if (!equals(lockfile.ignoredOptionalDependencies?.sort() ?? [], ignoredOptionalDependencies?.sort() ?? [])) {
|
|
20
14
|
return 'ignoredOptionalDependencies';
|
|
21
15
|
}
|
|
22
|
-
if (!(
|
|
16
|
+
if (!equals(lockfile.patchedDependencies ?? {}, patchedDependencies ?? {})) {
|
|
23
17
|
return 'patchedDependencies';
|
|
24
18
|
}
|
|
25
19
|
if ((lockfile.settings?.autoInstallPeers != null && lockfile.settings.autoInstallPeers !== autoInstallPeers)) {
|
package/lib/index.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var calcPatchHashes_js_1 = require("./calcPatchHashes.js");
|
|
5
|
-
Object.defineProperty(exports, "calcPatchHashes", { enumerable: true, get: function () { return calcPatchHashes_js_1.calcPatchHashes; } });
|
|
6
|
-
var createOverridesMapFromParsed_js_1 = require("./createOverridesMapFromParsed.js");
|
|
7
|
-
Object.defineProperty(exports, "createOverridesMapFromParsed", { enumerable: true, get: function () { return createOverridesMapFromParsed_js_1.createOverridesMapFromParsed; } });
|
|
8
|
-
var getOutdatedLockfileSetting_js_1 = require("./getOutdatedLockfileSetting.js");
|
|
9
|
-
Object.defineProperty(exports, "getOutdatedLockfileSetting", { enumerable: true, get: function () { return getOutdatedLockfileSetting_js_1.getOutdatedLockfileSetting; } });
|
|
1
|
+
export { calcPatchHashes } from './calcPatchHashes.js';
|
|
2
|
+
export { createOverridesMapFromParsed } from './createOverridesMapFromParsed.js';
|
|
3
|
+
export { getOutdatedLockfileSetting } from './getOutdatedLockfileSetting.js';
|
|
10
4
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/lockfile.settings-checker",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1100.0.0",
|
|
4
4
|
"description": "Utilities to check if lockfile settings are out-of-date",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
7
|
-
"
|
|
7
|
+
"pnpm11",
|
|
8
8
|
"base32",
|
|
9
9
|
"crypto",
|
|
10
10
|
"hash"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/pnpm/pnpm/issues"
|
|
18
18
|
},
|
|
19
|
-
"type": "
|
|
19
|
+
"type": "module",
|
|
20
20
|
"main": "lib/index.js",
|
|
21
21
|
"types": "lib/index.d.ts",
|
|
22
22
|
"exports": {
|
|
@@ -27,28 +27,28 @@
|
|
|
27
27
|
"!*.map"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"p-map-values": "^1.0
|
|
30
|
+
"p-map-values": "^0.1.0",
|
|
31
31
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
32
|
-
"@pnpm/catalogs.types": "
|
|
33
|
-
"@pnpm/
|
|
34
|
-
"@pnpm/
|
|
35
|
-
"@pnpm/lockfile.verification": "
|
|
36
|
-
"@pnpm/
|
|
32
|
+
"@pnpm/catalogs.types": "1100.0.0",
|
|
33
|
+
"@pnpm/config.parse-overrides": "1100.0.0",
|
|
34
|
+
"@pnpm/crypto.hash": "1100.0.0",
|
|
35
|
+
"@pnpm/lockfile.verification": "1100.0.0",
|
|
36
|
+
"@pnpm/lockfile.types": "1100.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/ramda": "0.
|
|
40
|
-
"@pnpm/lockfile.settings-checker": "
|
|
41
|
-
"@pnpm/prepare": "
|
|
39
|
+
"@types/ramda": "0.31.1",
|
|
40
|
+
"@pnpm/lockfile.settings-checker": "1100.0.0",
|
|
41
|
+
"@pnpm/prepare": "1100.0.0"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=
|
|
44
|
+
"node": ">=22.13"
|
|
45
45
|
},
|
|
46
46
|
"jest": {
|
|
47
47
|
"preset": "@pnpm/jest-config"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"lint": "eslint \"src/**/*.ts\"",
|
|
51
|
-
"test": "
|
|
52
|
-
"compile": "
|
|
51
|
+
"test": "pn compile",
|
|
52
|
+
"compile": "tsgo --build && pn lint --fix"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calcPatchHashes.js","sourceRoot":"","sources":["../src/calcPatchHashes.ts"],"names":[],"mappings":";;;;;AAKA,0CAOC;AAZD,gDAAuB;AACvB,gEAAqC;AACrC,mDAAyD;AAGlD,KAAK,UAAU,eAAe,CAAE,OAA+B,EAAE,WAAmB;IACzF,OAAO,IAAA,sBAAU,EAAC,KAAK,EAAE,aAAa,EAAE,EAAE;QACxC,OAAO;YACL,IAAI,EAAE,MAAM,IAAA,mCAAqB,EAAC,aAAa,CAAC;YAChD,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC;SACtE,CAAA;IACH,CAAC,EAAE,OAAO,CAAC,CAAA;AACb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createOverridesMapFromParsed.js","sourceRoot":"","sources":["../src/createOverridesMapFromParsed.ts"],"names":[],"mappings":";;AAEA,oEAOC;AAPD,SAAgB,4BAA4B,CAAE,eAA8C;IAC1F,IAAI,CAAC,eAAe;QAAE,OAAO,EAAE,CAAA;IAC/B,MAAM,YAAY,GAA2B,EAAE,CAAA;IAC/C,KAAK,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,eAAe,EAAE,CAAC;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