@pnpm/lockfile.settings-checker 1001.0.30 → 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.
@@ -1,2 +1 @@
1
- import { type PatchFile } from '@pnpm/lockfile.types';
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>>;
@@ -1,18 +1,8 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
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 { type VersionOverride } from '@pnpm/parse-overrides';
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
- "use strict";
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,13 +1,14 @@
1
- import { type Catalogs } from '@pnpm/catalogs.types';
2
- import { type LockfileObject, type PatchFile } from '@pnpm/lockfile.types';
3
- export type ChangedField = 'catalogs' | 'patchedDependencies' | 'overrides' | 'packageExtensionsChecksum' | 'ignoredOptionalDependencies' | 'settings.autoInstallPeers' | 'settings.excludeLinksFromLockfile' | 'settings.peersSuffixMaxLength' | 'settings.injectWorkspacePackages' | 'pnpmfileChecksum';
4
- export declare function getOutdatedLockfileSetting(lockfile: LockfileObject, { catalogs, overrides, packageExtensionsChecksum, ignoredOptionalDependencies, patchedDependencies, autoInstallPeers, excludeLinksFromLockfile, peersSuffixMaxLength, pnpmfileChecksum, injectWorkspacePackages, }: {
1
+ import type { Catalogs } from '@pnpm/catalogs.types';
2
+ import type { LockfileObject } from '@pnpm/lockfile.types';
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 }: {
5
5
  catalogs?: Catalogs;
6
6
  overrides?: Record<string, string>;
7
7
  packageExtensionsChecksum?: string;
8
- patchedDependencies?: Record<string, PatchFile>;
8
+ patchedDependencies?: Record<string, string>;
9
9
  ignoredOptionalDependencies?: string[];
10
10
  autoInstallPeers?: boolean;
11
+ dedupePeers?: boolean;
11
12
  excludeLinksFromLockfile?: boolean;
12
13
  peersSuffixMaxLength?: number;
13
14
  pnpmfileChecksum?: string;
@@ -1,30 +1,27 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
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, 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 (!(0, equals_1.default)(lockfile.overrides ?? {}, overrides ?? {})) {
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 (!(0, equals_1.default)(lockfile.ignoredOptionalDependencies?.sort() ?? [], ignoredOptionalDependencies?.sort() ?? [])) {
13
+ if (!equals(lockfile.ignoredOptionalDependencies?.sort() ?? [], ignoredOptionalDependencies?.sort() ?? [])) {
20
14
  return 'ignoredOptionalDependencies';
21
15
  }
22
- if (!(0, equals_1.default)(lockfile.patchedDependencies ?? {}, patchedDependencies ?? {})) {
16
+ if (!equals(lockfile.patchedDependencies ?? {}, patchedDependencies ?? {})) {
23
17
  return 'patchedDependencies';
24
18
  }
25
19
  if ((lockfile.settings?.autoInstallPeers != null && lockfile.settings.autoInstallPeers !== autoInstallPeers)) {
26
20
  return 'settings.autoInstallPeers';
27
21
  }
22
+ if (Boolean(lockfile.settings?.dedupePeers) !== Boolean(dedupePeers)) {
23
+ return 'settings.dedupePeers';
24
+ }
28
25
  if (lockfile.settings?.excludeLinksFromLockfile != null && lockfile.settings.excludeLinksFromLockfile !== excludeLinksFromLockfile) {
29
26
  return 'settings.excludeLinksFromLockfile';
30
27
  }
package/lib/index.js CHANGED
@@ -1,10 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getOutdatedLockfileSetting = exports.createOverridesMapFromParsed = exports.calcPatchHashes = void 0;
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": "1001.0.30",
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
- "pnpm10",
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": "commonjs",
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.0",
30
+ "p-map-values": "^0.1.0",
31
31
  "ramda": "npm:@pnpm/ramda@0.28.1",
32
- "@pnpm/catalogs.types": "1000.0.0",
33
- "@pnpm/lockfile.types": "1002.0.9",
34
- "@pnpm/crypto.hash": "1000.2.2",
35
- "@pnpm/parse-overrides": "1001.0.3",
36
- "@pnpm/lockfile.verification": "1001.2.23"
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.29.12",
40
- "@pnpm/prepare": "1000.0.15",
41
- "@pnpm/lockfile.settings-checker": "1001.0.30"
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": ">=18.12"
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": "pnpm run compile",
52
- "compile": "tsc --build && pnpm run lint --fix"
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;QAC7D,YAAY,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAA;IAC3C,CAAC;IACD,OAAO,YAAY,CAAA;AACrB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getOutdatedLockfileSetting.js","sourceRoot":"","sources":["../src/getOutdatedLockfileSetting.ts"],"names":[],"mappings":";;;;;AAiBA,gEA4DC;AA3ED,uEAAoE;AACpE,8DAAqC;AAcrC,SAAgB,0BAA0B,CACxC,QAAwB,EACxB,EACE,QAAQ,EACR,SAAS,EACT,yBAAyB,EACzB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB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