@nyarthan/pnpm-plugin-base
v0.1.0
Published
Strict base configuration for pnpm
Readme
@nyarthan/pnpm-plugin-base
A strict, reusable base configuration for pnpm. It applies safer dependency-installation defaults through pnpm's updateConfig hook.
Requirements
- pnpm 11 or newer
Installation
Install the package as an exact development dependency:
pnpm add -D @nyarthan/pnpm-plugin-baseExtending the configuration
Create a .pnpmfile.mjs.
Wrap the base hook when a project needs additional exceptions or overrides:
import { hooks as baseHooks } from "@nyarthan/pnpm-plugin-base";
export const hooks = {
...baseHooks,
updateConfig(config) {
const updatedConfig = baseHooks.updateConfig(config);
updatedConfig.allowBuilds = {
...updatedConfig.allowBuilds,
esbuild: true,
};
return updatedConfig;
},
};Apply project-specific changes after calling the base hook so they take precedence.
