@w5s/pnpm-plugin-config 1.12.0 → 1.15.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/README.md CHANGED
@@ -39,7 +39,7 @@ Inspired by [@pnpm/plugin-better-defaults](https://github.com/pnpm/pnpm/tree/mai
39
39
  - `resolutionMode: 'lowest-direct'`
40
40
  - `trustPolicy: 'no-downgrade'`
41
41
  - `trustPolicyIgnoreAfter: 10080` (7 days)
42
- - `verifyDepsBeforeRun: 'install'`
42
+ - `verifyDepsBeforeRun: 'warn'`
43
43
  - Resets `hoistPattern` from `['*']` to `[]` when that is the only pattern
44
44
 
45
45
  ## Usage
@@ -72,7 +72,7 @@ pnpm: >=10.8.0 (`updateConfig` hook)
72
72
 
73
73
  <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[${license}][license-url] © ${author}) -->
74
74
 
75
- [UNLICENSED][license-url] © w5s
75
+ [MIT][license-url] © w5s
76
76
 
77
77
  <!-- AUTO-GENERATED-CONTENT:END -->
78
78
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Cafs, ResolvedFrom } from "@pnpm/cafs-types";
2
2
  //#region src/defaultConfig.d.ts
3
- declare const defaultConfig: Readonly<{
3
+ export declare const defaultConfig: Readonly<{
4
4
  allowBuilds: {
5
5
  '@parcel/watcher': true;
6
6
  '@swc/core': true;
@@ -14,18 +14,20 @@ declare const defaultConfig: Readonly<{
14
14
  protobufjs: true;
15
15
  re2: true;
16
16
  sharp: true;
17
+ sqlite3: true;
17
18
  };
19
+ enableGlobalVirtualStore: false;
20
+ minimumReleaseAgeExclude: string[];
21
+ overrides: {};
22
+ verifyDepsBeforeRun: "warn";
18
23
  blockExoticSubdeps: true;
19
24
  enablePrePostScripts: false;
20
25
  ignorePatchFailures: false;
21
26
  minimumReleaseAge: number;
22
- minimumReleaseAgeExclude: string[];
23
27
  optimisticRepeatInstall: true;
24
- overrides: {};
25
28
  resolutionMode: "lowest-direct";
26
29
  trustPolicy: "no-downgrade";
27
30
  trustPolicyIgnoreAfter: number;
28
- verifyDepsBeforeRun: "install";
29
31
  }>;
30
32
  //#endregion
31
33
  //#region ../../node_modules/.pnpm/@pnpm+catalogs.types@1000.0.0/node_modules/@pnpm/catalogs.types/lib/index.d.ts
@@ -1235,26 +1237,26 @@ interface Config extends OptionsFromRootManifest {
1235
1237
  }
1236
1238
  //#endregion
1237
1239
  //#region src/hooks.d.ts
1238
- declare const hooks: {
1240
+ export declare const hooks: {
1239
1241
  updateConfig(config: Partial<Config>): Partial<Config>;
1240
1242
  };
1241
1243
  //#endregion
1242
1244
  //#region src/meta.d.ts
1243
- declare const meta: Readonly<{
1245
+ export declare const meta: Readonly<{
1244
1246
  buildNumber: number;
1245
1247
  name: string;
1246
1248
  version: string;
1247
1249
  }>;
1248
1250
  //#endregion
1249
1251
  //#region src/PnpmConfig.d.ts
1250
- type PnpmConfig = Config;
1252
+ export type PnpmConfig = Config;
1251
1253
  //#endregion
1252
1254
  //#region src/PnpmUserConfig.d.ts
1253
- type PnpmUserConfig = Partial<PnpmConfig>;
1255
+ export type PnpmUserConfig = Partial<PnpmConfig>;
1254
1256
  /**
1255
1257
  * @namespace
1256
1258
  */
1257
- declare const PnpmUserConfig: Readonly<{
1259
+ export declare const PnpmUserConfig: Readonly<{
1258
1260
  /**
1259
1261
  * Merge two configs immutably. `extension` values win; `base` fills in
1260
1262
  * undefined slots. `allowBuilds` and `overrides` are deep-merged (extension
@@ -1271,9 +1273,8 @@ declare const PnpmUserConfig: Readonly<{
1271
1273
  //#endregion
1272
1274
  //#region src/PnpmHooks.d.ts
1273
1275
  /** Hooks exported by this plugin's pnpmfile. */
1274
- interface PnpmHooks extends Omit<Hooks, 'updateConfig'> {
1276
+ export interface PnpmHooks extends Omit<Hooks, 'updateConfig'> {
1275
1277
  updateConfig?: (config: PnpmUserConfig) => PnpmUserConfig | Promise<PnpmUserConfig>;
1276
1278
  }
1277
1279
  //#endregion
1278
- export { PnpmConfig, PnpmHooks, PnpmUserConfig, defaultConfig, hooks, meta };
1279
1280
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,5 +1,25 @@
1
+ //#region src/internal/betterDefaultConfig.ts
2
+ /**
3
+ * Curated defaults from [@pnpm/plugin-better-defaults](https://github.com/pnpm/plugin-better-defaults).
4
+ *
5
+ * @see https://github.com/pnpm/plugin-better-defaults
6
+ */
7
+ const betterDefaultConfig = Object.freeze({
8
+ blockExoticSubdeps: true,
9
+ enableGlobalVirtualStore: true,
10
+ enablePrePostScripts: false,
11
+ ignorePatchFailures: false,
12
+ minimumReleaseAge: 1440,
13
+ optimisticRepeatInstall: true,
14
+ resolutionMode: "lowest-direct",
15
+ trustPolicy: "no-downgrade",
16
+ trustPolicyIgnoreAfter: 10080,
17
+ verifyDepsBeforeRun: "install"
18
+ });
19
+ //#endregion
1
20
  //#region src/defaultConfig.ts
2
21
  const defaultConfig = Object.freeze({
22
+ ...betterDefaultConfig,
3
23
  allowBuilds: {
4
24
  "@parcel/watcher": true,
5
25
  "@swc/core": true,
@@ -12,19 +32,13 @@ const defaultConfig = Object.freeze({
12
32
  "nx": true,
13
33
  "protobufjs": true,
14
34
  "re2": true,
15
- "sharp": true
35
+ "sharp": true,
36
+ "sqlite3": true
16
37
  },
17
- blockExoticSubdeps: true,
18
- enablePrePostScripts: false,
19
- ignorePatchFailures: false,
20
- minimumReleaseAge: 1440,
38
+ enableGlobalVirtualStore: false,
21
39
  minimumReleaseAgeExclude: ["@w5s/*"],
22
- optimisticRepeatInstall: true,
23
40
  overrides: {},
24
- resolutionMode: "lowest-direct",
25
- trustPolicy: "no-downgrade",
26
- trustPolicyIgnoreAfter: 10080,
27
- verifyDepsBeforeRun: "install"
41
+ verifyDepsBeforeRun: "warn"
28
42
  });
29
43
  //#endregion
30
44
  //#region src/PnpmUserConfig.ts
@@ -89,9 +103,9 @@ const hooks = { updateConfig(config) {
89
103
  //#endregion
90
104
  //#region src/meta.ts
91
105
  const meta = Object.freeze({
92
- buildNumber: 1788368808,
106
+ buildNumber: 1789595370,
93
107
  name: "@w5s/pnpm-plugin-config",
94
- version: "1.12.0"
108
+ version: "1.15.0"
95
109
  });
96
110
  //#endregion
97
111
  export { PnpmUserConfig, defaultConfig, hooks, meta };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/defaultConfig.ts","../src/PnpmUserConfig.ts","../src/hooks.ts","../src/meta.ts"],"sourcesContent":["import type { PnpmUserConfig } from './PnpmUserConfig.js';\n\n// Opinionated defaults inspired by @pnpm/plugin-better-defaults, extended with org-specific settings.\nexport const defaultConfig = Object.freeze({\n allowBuilds: {\n '@parcel/watcher': true,\n '@swc/core': true,\n 'core-js': true,\n 'core-js-pure': true,\n 'electron': true,\n 'es5-ext': true,\n 'esbuild': true,\n 'lefthook': true,\n 'nx': true,\n 'protobufjs': true,\n 're2': true,\n 'sharp': true,\n },\n blockExoticSubdeps: true,\n // enableGlobalVirtualStore: true, FIXME: this does not work\n enablePrePostScripts: false,\n ignorePatchFailures: false,\n minimumReleaseAge: 1 * 24 * 60,\n minimumReleaseAgeExclude: ['@w5s/*'],\n optimisticRepeatInstall: true,\n overrides: {},\n resolutionMode: 'lowest-direct',\n trustPolicy: 'no-downgrade',\n trustPolicyIgnoreAfter: 7 * 24 * 60,\n verifyDepsBeforeRun: 'install',\n} satisfies PnpmUserConfig);\n","import type { PnpmConfig } from './PnpmConfig.js';\n\nexport type PnpmUserConfig = Partial<PnpmConfig>;\n\nfunction arrayMerge<T>(\n base: ReadonlyArray<T> | T | undefined,\n extension: ReadonlyArray<T> | T | undefined,\n): Array<T> | undefined {\n const baseArray = base == null ? [] : Array.isArray(base) ? base : [base];\n const extensionArray = extension == null ? [] : Array.isArray(extension) ? extension : [extension];\n if (baseArray.length === 0 && extensionArray.length === 0) return undefined;\n return [...new Set([...baseArray, ...extensionArray])];\n}\n\nfunction objectMergeDefault<P extends string, V extends object>(\n base: Partial<Record<P, V>>,\n extension: Partial<Record<P, V>>,\n property: P,\n): undefined | V {\n return {\n ...base[property],\n ...extension[property],\n };\n}\n\nfunction objectMergeForce<P extends string, V extends object>(\n base: Partial<Record<P, V>>,\n extension: Partial<Record<P, V>>,\n property: P,\n): undefined | V {\n return {\n ...extension[property],\n ...base[property],\n };\n}\n\n/**\n * @namespace\n */\nexport const PnpmUserConfig = Object.freeze({\n /**\n * Merge two configs immutably. `extension` values win; `base` fills in\n * undefined slots. `allowBuilds` and `overrides` are deep-merged (extension\n * entries win). `minimumReleaseAgeExclude`, `hoistPattern`, and\n * `publicHoistPattern` are merged as deduplicated unions of both arrays\n * (base first, extension second — so pnpm `!`-negation entries in extension\n * can exclude org defaults).\n *\n * @param base\n * @param extension\n */\n merge(base: PnpmUserConfig, extension: PnpmUserConfig): PnpmUserConfig {\n return {\n ...extension,\n allowBuilds: objectMergeForce(base, extension, 'allowBuilds'),\n blockExoticSubdeps: extension.blockExoticSubdeps ?? base.blockExoticSubdeps,\n enableGlobalVirtualStore: extension.enableGlobalVirtualStore ?? base.enableGlobalVirtualStore,\n enablePrePostScripts: extension.enablePrePostScripts ?? base.enablePrePostScripts,\n hoistPattern: arrayMerge(base.hoistPattern, extension.hoistPattern),\n ignorePatchFailures: extension.ignorePatchFailures ?? base.ignorePatchFailures,\n minimumReleaseAge: extension.minimumReleaseAge ?? base.minimumReleaseAge,\n minimumReleaseAgeExclude: arrayMerge(\n base.minimumReleaseAgeExclude,\n extension.minimumReleaseAgeExclude,\n ),\n optimisticRepeatInstall: extension.optimisticRepeatInstall ?? base.optimisticRepeatInstall,\n overrides: objectMergeDefault(base, extension, 'overrides'),\n publicHoistPattern: arrayMerge(\n base.publicHoistPattern,\n extension.publicHoistPattern,\n ),\n resolutionMode: extension.resolutionMode ?? base.resolutionMode,\n trustPolicy: extension.trustPolicy ?? base.trustPolicy,\n trustPolicyIgnoreAfter: extension.trustPolicyIgnoreAfter ?? base.trustPolicyIgnoreAfter,\n verifyDepsBeforeRun: extension.verifyDepsBeforeRun ?? base.verifyDepsBeforeRun,\n } as PnpmUserConfig;\n },\n});\n","import type { PnpmHooks } from './PnpmHooks.js';\n\nimport { defaultConfig } from './defaultConfig.js';\nimport { PnpmUserConfig } from './PnpmUserConfig.js';\n\nexport const hooks = {\n updateConfig(config) {\n return PnpmUserConfig.merge(defaultConfig, config);\n },\n} satisfies PnpmHooks;\n","export const meta = Object.freeze({\n // @ts-ignore - these variables are injected at build time\n buildNumber: (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,\n // @ts-ignore - these variables are injected at build time\n name: (typeof __PACKAGE_NAME__ === 'undefined' ? '' : __PACKAGE_NAME__) as string,\n // @ts-ignore - these variables are injected at build time\n version: (typeof __PACKAGE_VERSION__ === 'undefined' ? '' : __PACKAGE_VERSION__) as string,\n});\n"],"mappings":";AAGA,MAAa,gBAAgB,OAAO,OAAO;CACzC,aAAa;EACX,mBAAmB;EACnB,aAAa;EACb,WAAW;EACX,gBAAgB;EAChB,YAAY;EACZ,WAAW;EACX,WAAW;EACX,YAAY;EACZ,MAAM;EACN,cAAc;EACd,OAAO;EACP,SAAS;CACX;CACA,oBAAoB;CAEpB,sBAAsB;CACtB,qBAAqB;CACrB,mBAAmB;CACnB,0BAA0B,CAAC,QAAQ;CACnC,yBAAyB;CACzB,WAAW,CAAC;CACZ,gBAAgB;CAChB,aAAa;CACb,wBAAwB;CACxB,qBAAqB;AACvB,CAA0B;;;AC1B1B,SAAS,WACP,MACA,WACsB;CACtB,MAAM,YAAY,QAAQ,OAAO,CAAC,IAAI,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI;CACxE,MAAM,iBAAiB,aAAa,OAAO,CAAC,IAAI,MAAM,QAAQ,SAAS,IAAI,YAAY,CAAC,SAAS;CACjG,IAAI,UAAU,WAAW,KAAK,eAAe,WAAW,GAAG,OAAO,KAAA;CAClE,OAAO,CAAC,mBAAG,IAAI,IAAI,CAAC,GAAG,WAAW,GAAG,cAAc,CAAC,CAAC;AACvD;AAEA,SAAS,mBACP,MACA,WACA,UACe;CACf,OAAO;EACL,GAAG,KAAK;EACR,GAAG,UAAU;CACf;AACF;AAEA,SAAS,iBACP,MACA,WACA,UACe;CACf,OAAO;EACL,GAAG,UAAU;EACb,GAAG,KAAK;CACV;AACF;;;;AAKA,MAAa,iBAAiB,OAAO,OAAO;;;;;;;;;;;;AAY1C,MAAM,MAAsB,WAA2C;CACrE,OAAO;EACL,GAAG;EACH,aAAa,iBAAiB,MAAM,WAAW,aAAa;EAC5D,oBAAoB,UAAU,sBAAsB,KAAK;EACzD,0BAA0B,UAAU,4BAA4B,KAAK;EACrE,sBAAsB,UAAU,wBAAwB,KAAK;EAC7D,cAAc,WAAW,KAAK,cAAc,UAAU,YAAY;EAClE,qBAAqB,UAAU,uBAAuB,KAAK;EAC3D,mBAAmB,UAAU,qBAAqB,KAAK;EACvD,0BAA0B,WACxB,KAAK,0BACL,UAAU,wBACZ;EACA,yBAAyB,UAAU,2BAA2B,KAAK;EACnE,WAAW,mBAAmB,MAAM,WAAW,WAAW;EAC1D,oBAAoB,WAClB,KAAK,oBACL,UAAU,kBACZ;EACA,gBAAgB,UAAU,kBAAkB,KAAK;EACjD,aAAa,UAAU,eAAe,KAAK;EAC3C,wBAAwB,UAAU,0BAA0B,KAAK;EACjE,qBAAqB,UAAU,uBAAuB,KAAK;CAC7D;AACF,EACF,CAAC;;;ACxED,MAAa,QAAQ,EACnB,aAAa,QAAQ;CACnB,OAAO,eAAe,MAAM,eAAe,MAAM;AACnD,EACF;;;ACTA,MAAa,OAAO,OAAO,OAAO;CAEhC,aAAA;CAEA,MAAA;CAEA,SAAA;AACF,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/internal/betterDefaultConfig.ts","../src/defaultConfig.ts","../src/PnpmUserConfig.ts","../src/hooks.ts","../src/meta.ts"],"sourcesContent":["import type { PnpmUserConfig } from '../PnpmUserConfig.js';\n\n/**\n * Curated defaults from [@pnpm/plugin-better-defaults](https://github.com/pnpm/plugin-better-defaults).\n *\n * @see https://github.com/pnpm/plugin-better-defaults\n */\nexport const betterDefaultConfig = Object.freeze({\n blockExoticSubdeps: true,\n enableGlobalVirtualStore: true,\n enablePrePostScripts: false,\n ignorePatchFailures: false,\n minimumReleaseAge: 1 * 24 * 60, // 1 day in minutes\n optimisticRepeatInstall: true,\n resolutionMode: 'lowest-direct',\n trustPolicy: 'no-downgrade',\n trustPolicyIgnoreAfter: 7 * 24 * 60, // 7 days in minutes\n verifyDepsBeforeRun: 'install',\n} satisfies PnpmUserConfig);\n","import type { PnpmUserConfig } from './PnpmUserConfig.js';\n\nimport { betterDefaultConfig } from './internal/betterDefaultConfig.js';\n\n// Opinionated defaults inspired by @pnpm/plugin-better-defaults, extended with org-specific settings.\nexport const defaultConfig = Object.freeze({\n ...betterDefaultConfig,\n allowBuilds: {\n '@parcel/watcher': true,\n '@swc/core': true,\n 'core-js': true,\n 'core-js-pure': true,\n 'electron': true,\n 'es5-ext': true,\n 'esbuild': true,\n 'lefthook': true,\n 'nx': true,\n 'protobufjs': true,\n 're2': true,\n 'sharp': true,\n 'sqlite3': true,\n },\n enableGlobalVirtualStore: false, // FIXME: this does not work\n minimumReleaseAgeExclude: ['@w5s/*'],\n overrides: {},\n verifyDepsBeforeRun: 'warn', // FIXME: Causes infinite loop with prepare and pnpm run inside prepare/postinstall\n} satisfies PnpmUserConfig);\n","import type { PnpmConfig } from './PnpmConfig.js';\n\nexport type PnpmUserConfig = Partial<PnpmConfig>;\n\nfunction arrayMerge<T>(\n base: ReadonlyArray<T> | T | undefined,\n extension: ReadonlyArray<T> | T | undefined,\n): Array<T> | undefined {\n const baseArray = base == null ? [] : Array.isArray(base) ? base : [base];\n const extensionArray = extension == null ? [] : Array.isArray(extension) ? extension : [extension];\n if (baseArray.length === 0 && extensionArray.length === 0) return undefined;\n return [...new Set([...baseArray, ...extensionArray])];\n}\n\nfunction objectMergeDefault<P extends string, V extends object>(\n base: Partial<Record<P, V>>,\n extension: Partial<Record<P, V>>,\n property: P,\n): undefined | V {\n return {\n ...base[property],\n ...extension[property],\n };\n}\n\nfunction objectMergeForce<P extends string, V extends object>(\n base: Partial<Record<P, V>>,\n extension: Partial<Record<P, V>>,\n property: P,\n): undefined | V {\n return {\n ...extension[property],\n ...base[property],\n };\n}\n\n/**\n * @namespace\n */\nexport const PnpmUserConfig = Object.freeze({\n /**\n * Merge two configs immutably. `extension` values win; `base` fills in\n * undefined slots. `allowBuilds` and `overrides` are deep-merged (extension\n * entries win). `minimumReleaseAgeExclude`, `hoistPattern`, and\n * `publicHoistPattern` are merged as deduplicated unions of both arrays\n * (base first, extension second — so pnpm `!`-negation entries in extension\n * can exclude org defaults).\n *\n * @param base\n * @param extension\n */\n merge(base: PnpmUserConfig, extension: PnpmUserConfig): PnpmUserConfig {\n return {\n ...extension,\n allowBuilds: objectMergeForce(base, extension, 'allowBuilds'),\n blockExoticSubdeps: extension.blockExoticSubdeps ?? base.blockExoticSubdeps,\n enableGlobalVirtualStore: extension.enableGlobalVirtualStore ?? base.enableGlobalVirtualStore,\n enablePrePostScripts: extension.enablePrePostScripts ?? base.enablePrePostScripts,\n hoistPattern: arrayMerge(base.hoistPattern, extension.hoistPattern),\n ignorePatchFailures: extension.ignorePatchFailures ?? base.ignorePatchFailures,\n minimumReleaseAge: extension.minimumReleaseAge ?? base.minimumReleaseAge,\n minimumReleaseAgeExclude: arrayMerge(\n base.minimumReleaseAgeExclude,\n extension.minimumReleaseAgeExclude,\n ),\n optimisticRepeatInstall: extension.optimisticRepeatInstall ?? base.optimisticRepeatInstall,\n overrides: objectMergeDefault(base, extension, 'overrides'),\n publicHoistPattern: arrayMerge(\n base.publicHoistPattern,\n extension.publicHoistPattern,\n ),\n resolutionMode: extension.resolutionMode ?? base.resolutionMode,\n trustPolicy: extension.trustPolicy ?? base.trustPolicy,\n trustPolicyIgnoreAfter: extension.trustPolicyIgnoreAfter ?? base.trustPolicyIgnoreAfter,\n verifyDepsBeforeRun: extension.verifyDepsBeforeRun ?? base.verifyDepsBeforeRun,\n } as PnpmUserConfig;\n },\n});\n","import type { PnpmHooks } from './PnpmHooks.js';\n\nimport { defaultConfig } from './defaultConfig.js';\nimport { PnpmUserConfig } from './PnpmUserConfig.js';\n\nexport const hooks = {\n updateConfig(config) {\n return PnpmUserConfig.merge(defaultConfig, config);\n },\n} satisfies PnpmHooks;\n","export const meta = Object.freeze({\n // @ts-ignore - these variables are injected at build time\n buildNumber: (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,\n // @ts-ignore - these variables are injected at build time\n name: (typeof __PACKAGE_NAME__ === 'undefined' ? '' : __PACKAGE_NAME__) as string,\n // @ts-ignore - these variables are injected at build time\n version: (typeof __PACKAGE_VERSION__ === 'undefined' ? '' : __PACKAGE_VERSION__) as string,\n});\n"],"mappings":";;;;;;AAOA,MAAa,sBAAsB,OAAO,OAAO;CAC/C,oBAAoB;CACpB,0BAA0B;CAC1B,sBAAsB;CACtB,qBAAqB;CACrB,mBAAmB;CACnB,yBAAyB;CACzB,gBAAgB;CAChB,aAAa;CACb,wBAAwB;CACxB,qBAAqB;AACvB,CAA0B;;;ACb1B,MAAa,gBAAgB,OAAO,OAAO;CACzC,GAAG;CACH,aAAa;EACX,mBAAmB;EACnB,aAAa;EACb,WAAW;EACX,gBAAgB;EAChB,YAAY;EACZ,WAAW;EACX,WAAW;EACX,YAAY;EACZ,MAAM;EACN,cAAc;EACd,OAAO;EACP,SAAS;EACT,WAAW;CACb;CACA,0BAA0B;CAC1B,0BAA0B,CAAC,QAAQ;CACnC,WAAW,CAAC;CACZ,qBAAqB;AACvB,CAA0B;;;ACtB1B,SAAS,WACP,MACA,WACsB;CACtB,MAAM,YAAY,QAAQ,OAAO,CAAC,IAAI,MAAM,QAAQ,IAAI,IAAI,OAAO,CAAC,IAAI;CACxE,MAAM,iBAAiB,aAAa,OAAO,CAAC,IAAI,MAAM,QAAQ,SAAS,IAAI,YAAY,CAAC,SAAS;CACjG,IAAI,UAAU,WAAW,KAAK,eAAe,WAAW,GAAG,OAAO,KAAA;CAClE,OAAO,CAAC,mBAAG,IAAI,IAAI,CAAC,GAAG,WAAW,GAAG,cAAc,CAAC,CAAC;AACvD;AAEA,SAAS,mBACP,MACA,WACA,UACe;CACf,OAAO;EACL,GAAG,KAAK;EACR,GAAG,UAAU;CACf;AACF;AAEA,SAAS,iBACP,MACA,WACA,UACe;CACf,OAAO;EACL,GAAG,UAAU;EACb,GAAG,KAAK;CACV;AACF;;;;AAKA,MAAa,iBAAiB,OAAO,OAAO;;;;;;;;;;;;AAY1C,MAAM,MAAsB,WAA2C;CACrE,OAAO;EACL,GAAG;EACH,aAAa,iBAAiB,MAAM,WAAW,aAAa;EAC5D,oBAAoB,UAAU,sBAAsB,KAAK;EACzD,0BAA0B,UAAU,4BAA4B,KAAK;EACrE,sBAAsB,UAAU,wBAAwB,KAAK;EAC7D,cAAc,WAAW,KAAK,cAAc,UAAU,YAAY;EAClE,qBAAqB,UAAU,uBAAuB,KAAK;EAC3D,mBAAmB,UAAU,qBAAqB,KAAK;EACvD,0BAA0B,WACxB,KAAK,0BACL,UAAU,wBACZ;EACA,yBAAyB,UAAU,2BAA2B,KAAK;EACnE,WAAW,mBAAmB,MAAM,WAAW,WAAW;EAC1D,oBAAoB,WAClB,KAAK,oBACL,UAAU,kBACZ;EACA,gBAAgB,UAAU,kBAAkB,KAAK;EACjD,aAAa,UAAU,eAAe,KAAK;EAC3C,wBAAwB,UAAU,0BAA0B,KAAK;EACjE,qBAAqB,UAAU,uBAAuB,KAAK;CAC7D;AACF,EACF,CAAC;;;ACxED,MAAa,QAAQ,EACnB,aAAa,QAAQ;CACnB,OAAO,eAAe,MAAM,eAAe,MAAM;AACnD,EACF;;;ACTA,MAAa,OAAO,OAAO,OAAO;CAEhC,aAAA;CAEA,MAAA;CAEA,SAAA;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/pnpm-plugin-config",
3
- "version": "1.12.0",
3
+ "version": "1.15.0",
4
4
  "description": "Shared pnpm configuration plugin with org defaults",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -41,5 +41,5 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "de5aba704f6744ba64973b010a848d2b2150341d"
44
+ "gitHead": "e6d13c1ff1528928b37d5e08c97ffcc2b2b2c74f"
45
45
  }
@@ -1,7 +1,10 @@
1
1
  import type { PnpmUserConfig } from './PnpmUserConfig.js';
2
2
 
3
+ import { betterDefaultConfig } from './internal/betterDefaultConfig.js';
4
+
3
5
  // Opinionated defaults inspired by @pnpm/plugin-better-defaults, extended with org-specific settings.
4
6
  export const defaultConfig = Object.freeze({
7
+ ...betterDefaultConfig,
5
8
  allowBuilds: {
6
9
  '@parcel/watcher': true,
7
10
  '@swc/core': true,
@@ -15,17 +18,10 @@ export const defaultConfig = Object.freeze({
15
18
  'protobufjs': true,
16
19
  're2': true,
17
20
  'sharp': true,
21
+ 'sqlite3': true,
18
22
  },
19
- blockExoticSubdeps: true,
20
- // enableGlobalVirtualStore: true, FIXME: this does not work
21
- enablePrePostScripts: false,
22
- ignorePatchFailures: false,
23
- minimumReleaseAge: 1 * 24 * 60,
23
+ enableGlobalVirtualStore: false, // FIXME: this does not work
24
24
  minimumReleaseAgeExclude: ['@w5s/*'],
25
- optimisticRepeatInstall: true,
26
25
  overrides: {},
27
- resolutionMode: 'lowest-direct',
28
- trustPolicy: 'no-downgrade',
29
- trustPolicyIgnoreAfter: 7 * 24 * 60,
30
- verifyDepsBeforeRun: 'install',
26
+ verifyDepsBeforeRun: 'warn', // FIXME: Causes infinite loop with prepare and pnpm run inside prepare/postinstall
31
27
  } satisfies PnpmUserConfig);
@@ -0,0 +1,19 @@
1
+ import type { PnpmUserConfig } from '../PnpmUserConfig.js';
2
+
3
+ /**
4
+ * Curated defaults from [@pnpm/plugin-better-defaults](https://github.com/pnpm/plugin-better-defaults).
5
+ *
6
+ * @see https://github.com/pnpm/plugin-better-defaults
7
+ */
8
+ export const betterDefaultConfig = Object.freeze({
9
+ blockExoticSubdeps: true,
10
+ enableGlobalVirtualStore: true,
11
+ enablePrePostScripts: false,
12
+ ignorePatchFailures: false,
13
+ minimumReleaseAge: 1 * 24 * 60, // 1 day in minutes
14
+ optimisticRepeatInstall: true,
15
+ resolutionMode: 'lowest-direct',
16
+ trustPolicy: 'no-downgrade',
17
+ trustPolicyIgnoreAfter: 7 * 24 * 60, // 7 days in minutes
18
+ verifyDepsBeforeRun: 'install',
19
+ } satisfies PnpmUserConfig);