mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -04:00
8
.changeset/lemon-ties-add.md
Normal file
8
.changeset/lemon-ties-add.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-installation": patch
|
||||
---
|
||||
|
||||
`pnpm install -r` should recreate the modules directory
|
||||
if the hoisting patterns were updated in a local config file.
|
||||
The hoisting patterns are configure via the `hoist-pattern`
|
||||
and `public-hoist-pattern` settings.
|
||||
@@ -107,11 +107,17 @@ when running add/update with the --workspace option')
|
||||
devDependencies: true,
|
||||
optionalDependencies: true,
|
||||
}
|
||||
const forceHoistPattern = typeof opts.rawLocalConfig['hoist-pattern'] !== 'undefined' ||
|
||||
typeof opts.rawLocalConfig['hoist'] !== 'undefined'
|
||||
const forcePublicHoistPattern = typeof opts.rawLocalConfig['shamefully-hoist'] !== 'undefined' ||
|
||||
typeof opts.rawLocalConfig['public-hoist-pattern'] !== 'undefined'
|
||||
if (opts.recursive && opts.allProjects && opts.selectedProjectsGraph && opts.workspaceDir) {
|
||||
await recursive(opts.allProjects,
|
||||
params,
|
||||
{
|
||||
...opts,
|
||||
forceHoistPattern,
|
||||
forcePublicHoistPattern,
|
||||
selectedProjectsGraph: opts.selectedProjectsGraph,
|
||||
workspaceDir: opts.workspaceDir,
|
||||
},
|
||||
@@ -134,6 +140,8 @@ when running add/update with the --workspace option')
|
||||
const store = await createOrConnectStoreController(opts)
|
||||
const installOpts = {
|
||||
...opts,
|
||||
forceHoistPattern,
|
||||
forcePublicHoistPattern,
|
||||
// In case installation is done in a multi-package repository
|
||||
// The dependencies should be built first,
|
||||
// so ignoring scripts for now
|
||||
@@ -144,11 +152,6 @@ when running add/update with the --workspace option')
|
||||
storeController: store.ctrl,
|
||||
storeDir: store.dir,
|
||||
workspacePackages,
|
||||
|
||||
forceHoistPattern: typeof opts.rawLocalConfig['hoist-pattern'] !== 'undefined' ||
|
||||
typeof opts.rawLocalConfig['hoist'] !== 'undefined',
|
||||
forcePublicHoistPattern: typeof opts.rawLocalConfig['shamefully-hoist'] !== 'undefined' ||
|
||||
typeof opts.rawLocalConfig['public-hoist-pattern'] !== 'undefined',
|
||||
}
|
||||
if (!opts.ignorePnpmfile) {
|
||||
installOpts['hooks'] = requireHooks(opts.lockfileDir ?? dir, opts)
|
||||
|
||||
@@ -76,6 +76,8 @@ export default async function recursive (
|
||||
params: string[],
|
||||
opts: RecursiveOptions & {
|
||||
allowNew?: boolean
|
||||
forceHoistPattern?: boolean
|
||||
forcePublicHoistPattern?: boolean
|
||||
ignoredPackages?: Set<string>
|
||||
update?: boolean
|
||||
useBetaCli?: boolean
|
||||
|
||||
Reference in New Issue
Block a user