@w5s/pnpm-plugin-config 1.0.0-alpha.2 → 1.0.0-alpha.3

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/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ declare const defaultConfig: Readonly<{
9
9
  lefthook: true;
10
10
  nx: true;
11
11
  protobufjs: true;
12
+ sqlite3: true;
12
13
  };
13
14
  blockExoticSubdeps: true;
14
15
  enableGlobalVirtualStore: true;
package/dist/index.js CHANGED
@@ -7,7 +7,8 @@ const defaultConfig = Object.freeze({
7
7
  "esbuild": true,
8
8
  "lefthook": true,
9
9
  "nx": true,
10
- "protobufjs": true
10
+ "protobufjs": true,
11
+ "sqlite3": true
11
12
  },
12
13
  blockExoticSubdeps: true,
13
14
  enableGlobalVirtualStore: true,
@@ -87,7 +88,7 @@ const hooks = { updateConfig(config) {
87
88
  const meta = Object.freeze({
88
89
  buildNumber: 1,
89
90
  name: "@w5s/pnpm-plugin-config",
90
- version: "1.0.0-alpha.2"
91
+ version: "1.0.0-alpha.3"
91
92
  });
92
93
  //#endregion
93
94
  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 '@swc/core': true,\n 'core-js': true,\n 'es5-ext': true,\n 'esbuild': true,\n 'lefthook': true,\n 'nx': true,\n 'protobufjs': true,\n },\n blockExoticSubdeps: true,\n enableGlobalVirtualStore: true,\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> | undefined,\n extension: ReadonlyArray<T> | undefined,\n): Array<T> | undefined {\n const baseArray = base ?? [];\n const extensionArray = 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 } as V;\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 } as V;\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` is merged as a deduplicated union\n * of both arrays. A `hoistPattern` of `['*']` in extension is normalized to\n * `[]` following pnpm-plugin-better-defaults behavior.\n *\n * @param base\n * @param extension\n */\n merge(base: PnpmUserConfig, extension: PnpmUserConfig): PnpmUserConfig {\n const hoistPattern =\n extension.hoistPattern?.length === 1 && extension.hoistPattern[0] === '*'\n ? []\n : (extension.hoistPattern ?? base.hoistPattern);\n\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,\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: extension.publicHoistPattern ?? base.publicHoistPattern,\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: 1 as number, // (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,aAAa;EACb,WAAW;EACX,WAAW;EACX,WAAW;EACX,YAAY;EACZ,MAAM;EACN,cAAc;CAChB;CACA,oBAAoB;CACpB,0BAA0B;CAC1B,sBAAsB;CACtB,qBAAqB;CACrB,mBAA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B,UAAU,uBAAuB,KAAK;CAC7D;AACF,EACF,CAAC;;;ACzED,MAAa,QAAQ,EACnB,aAAa,QAAQ;CACnB,OAAO,eAAe,MAAM,eAAe,MAAM;AACnD,EACF;;;ACTA,MAAa,OAAO,OAAO,OAAO;CAEhC,aAAa;CAEb,MAAA;CAEA,SAAA;AACF,CAAC"}
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 '@swc/core': true,\n 'core-js': true,\n 'es5-ext': true,\n 'esbuild': true,\n 'lefthook': true,\n 'nx': true,\n 'protobufjs': true,\n 'sqlite3': true,\n },\n blockExoticSubdeps: true,\n enableGlobalVirtualStore: true,\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> | undefined,\n extension: ReadonlyArray<T> | undefined,\n): Array<T> | undefined {\n const baseArray = base ?? [];\n const extensionArray = 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 } as V;\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 } as V;\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` is merged as a deduplicated union\n * of both arrays. A `hoistPattern` of `['*']` in extension is normalized to\n * `[]` following pnpm-plugin-better-defaults behavior.\n *\n * @param base\n * @param extension\n */\n merge(base: PnpmUserConfig, extension: PnpmUserConfig): PnpmUserConfig {\n const hoistPattern =\n extension.hoistPattern?.length === 1 && extension.hoistPattern[0] === '*'\n ? []\n : (extension.hoistPattern ?? base.hoistPattern);\n\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,\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: extension.publicHoistPattern ?? base.publicHoistPattern,\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: 1 as number, // (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,aAAa;EACb,WAAW;EACX,WAAW;EACX,WAAW;EACX,YAAY;EACZ,MAAM;EACN,cAAc;EACd,WAAW;CACb;CACA,oBAAoB;CACpB,0BAA0B;CAC1B,sBAAsB;CACtB,qBAAqB;CACrB,mBAAmB;CACnB,0BAA0B,CAAC,QAAQ;CACnC,yBAAyB;CACzB,WAAW,CAAC;CACZ,gBAAgB;CAChB,aAAa;CACb,wBAAwB;CACxB,qBAAqB;AACvB,CAA0B;;;ACtB1B,SAAS,WACP,MACA,WACsB;CACtB,MAAM,YAAY,QAAQ,CAAC;CAC3B,MAAM,iBAAiB,aAAa,CAAC;CACrC,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;;;;;;;;;;;AAW1C,MAAM,MAAsB,WAA2C;CACrE,MAAM,eACJ,UAAU,cAAc,WAAW,KAAK,UAAU,aAAa,OAAO,MAClE,CAAC,IACA,UAAU,gBAAgB,KAAK;CAEtC,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;EACA,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,UAAU,sBAAsB,KAAK;EACzD,gBAAgB,UAAU,kBAAkB,KAAK;EACjD,aAAa,UAAU,eAAe,KAAK;EAC3C,wBAAwB,UAAU,0BAA0B,KAAK;EACjE,qBAAqB,UAAU,uBAAuB,KAAK;CAC7D;AACF,EACF,CAAC;;;ACzED,MAAa,QAAQ,EACnB,aAAa,QAAQ;CACnB,OAAO,eAAe,MAAM,eAAe,MAAM;AACnD,EACF;;;ACTA,MAAa,OAAO,OAAO,OAAO;CAEhC,aAAa;CAEb,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.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.3",
4
4
  "description": "Shared pnpm configuration plugin with org defaults",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -16,7 +16,7 @@
16
16
  "url": "git@github.com:w5s/project-config.git",
17
17
  "directory": "packages/pnpm-plugin-config"
18
18
  },
19
- "license": "UNLICENSED",
19
+ "license": "MIT",
20
20
  "type": "module",
21
21
  "exports": {
22
22
  "./package.json": "./package.json",
@@ -41,5 +41,5 @@
41
41
  "access": "public"
42
42
  },
43
43
  "sideEffect": false,
44
- "gitHead": "777b9cf23d9ef48f1c048ccb49e3fa91d1774f1a"
44
+ "gitHead": "10517ba78d89eb1a17d98f7f1c2d17258c2437b1"
45
45
  }
@@ -10,6 +10,7 @@ export const defaultConfig = Object.freeze({
10
10
  'lefthook': true,
11
11
  'nx': true,
12
12
  'protobufjs': true,
13
+ 'sqlite3': true,
13
14
  },
14
15
  blockExoticSubdeps: true,
15
16
  enableGlobalVirtualStore: true,