@w5s/pnpm-plugin-config
v1.7.0
Published
Shared pnpm configuration plugin with org defaults
Readme
w5s pnpm plugin (@w5s/pnpm-plugin-config)
Shared pnpm configuration plugin with org defaults
Installation
Install as a config dependency so pnpm auto-loads the plugin:
pnpm add --config @w5s/pnpm-plugin-configThis adds the package to configDependencies in pnpm-workspace.yaml. Because the package name follows the @*/pnpm-plugin-* convention, pnpm automatically loads pnpmfile.mjs from the package root.
What it changes
Defaults are applied only when a setting is not already defined in your workspace configuration. Inspired by @pnpm/plugin-better-defaults, extended with org-specific settings.
allowBuilds:@swc/core: true,core-js: true,es5-ext: true,esbuild: true,lefthook: true,nx: true,protobufjs: trueblockExoticSubdeps: trueenableGlobalVirtualStore: trueenablePrePostScripts: falseignorePatchFailures: falseminimumReleaseAge: 1440(1 day)minimumReleaseAgeExclude:@w5s/*optimisticRepeatInstall: trueresolutionMode: 'lowest-direct'trustPolicy: 'no-downgrade'trustPolicyIgnoreAfter: 10080(7 days)verifyDepsBeforeRun: 'install'- Resets
hoistPatternfrom['*']to[]when that is the only pattern
Usage
Auto-load (recommended)
pnpm add --config @w5s/pnpm-plugin-configManual compose
Import hooks in your local .pnpmfile.mjs to compose with other hooks:
import { hooks as pluginHooks } from '@w5s/pnpm-plugin-config';
export const hooks = {
updateConfig(config) {
return pluginHooks.updateConfig(config);
},
};Requirements
pnpm: >=10.8.0 (updateConfig hook)
License
UNLICENSED © w5s
