fix: publicly hoist anything that has "types" in the name

PR #2865
This commit is contained in:
Zoltan Kochan
2020-09-17 11:06:44 +03:00
committed by GitHub
parent 7f74cd173f
commit 767212f4ef
2 changed files with 11 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/config": patch
---
Packages like @babel/types should be publicly hoisted by default.

View File

@@ -148,7 +148,12 @@ export default async (
'link-workspace-packages': true,
'package-lock': npmDefaults['package-lock'],
pending: false,
'public-hoist-pattern': ['@types/*', '*eslint*'],
'public-hoist-pattern': [
// Packages like @types/node, @babel/types
// should be publicly hoisted because TypeScript only searches in the root of node_modules
'*types*',
'*eslint*',
],
'recursive-install': true,
registry: npmDefaults.registry,
'save-peer': false,