Skip to content

Commit afc247f

Browse files
committed
feat: ignorePatchFailures=false and hoistPattern=[]
1 parent 6685aa7 commit afc247f

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
## What it changes
66

77
- Sets [enablePrePostScripts](https://pnpm.io/cli/run#enableprepostscripts) to `false`.
8+
- Sets [hoistPattern](https://pnpm.io/settings#hoistpattern) to an empty array, disabling hoisting.
9+
- Sets [ignorePatchFailures](https://pnpm.io/settings#ignorepatchfailures) to `false`.
810
- Sets [optimisticRepeatInstall](https://pnpm.io/settings#optimisticrepeatinstall) to `true`.
911
- Sets [resolutionMode](https://pnpm.io/settings#resolutionmode) to `lowest-direct`.
1012
- Sets [verifyDepsBeforeRun](https://pnpm.io/settings#verifydepsbeforerun) to `install`.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"description": "Improved defaults for pnpm",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "pnpm install"
88
},
99
"keywords": [],
1010
"license": "MIT",
11-
"packageManager": "pnpm@10.8.0"
11+
"packageManager": "pnpm@10.10.0"
1212
}

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpmfile: pnpmfile.cjs

pnpmfile.cjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
module.exports = {
22
hooks: {
33
updateConfig (config) {
4-
return Object.assign(config, {
4+
Object.assign(config, {
55
enablePrePostScripts: false,
6+
ignorePatchFailures: false,
67
optimisticRepeatInstall: true,
78
resolutionMode: 'lowest-direct',
89
verifyDepsBeforeRun: 'install',
910
})
11+
if (config.hoistPattern?.length === 1 && config.hoistPattern[0] === '*') {
12+
config.hoistPattern = []
13+
}
14+
return config
1015
}
1116
}
1217
}

0 commit comments

Comments
 (0)