Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9c864fa

Browse files
Silic0nS0ldierzkochan
authored andcommitted
fix: only validate modules directory if required (e.g. for install)
1 parent 496fbec commit 9c864fa

22 files changed

+304
-287
lines changed

.changeset/itchy-horses-wink.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pnpm/get-context": major
3+
---
4+
5+
Don't validate (and possibly purge) modules directory as a side effect of `getContext` and `getContextForSingleImporter` [#8657](https://github.com/pnpm/pnpm/pull/8657).

.changeset/long-peaches-applaud.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"pnpm": patch
3+
---
4+
5+
Don't validate (and possibly purge) `node_modules` in commands which should not modify it (e.g. `pnpm install --lockfile-only`) [#8657](https://github.com/pnpm/pnpm/pull/8657).

.changeset/many-cooks-develop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pnpm/get-context": major
3+
---
4+
5+
`PnpmContext.hoistPattern` and `PnpmContext.publicHoistPattern` are no longer affected by modules directory state [#8657](https://github.com/pnpm/pnpm/pull/8657). Prior behavior can be recreated with the new properties `PnpmContext.currentHoistPattern` (`_.currentHoistPattern ?? _.hoistPattern`) and `PnpmContext.currentPublicHoistPattern` (`_.currentPublicHoistPattern ?? _.publicHoistPattern`).

.changeset/perfect-spoons-call.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pnpm/get-context": major
3+
---
4+
5+
`PnpmSingleContext.hoistPattern` and `PnpmSingleContext.publicHoistPattern` are no longer affected by modules directory state [#8657](https://github.com/pnpm/pnpm/pull/8657).

.changeset/pretty-houses-refuse.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pnpm/core": patch
3+
---
4+
5+
Don't validate (and possibly purge) modules directory in operations that do not mutate the structure (e.g. `mutateModules({ ... }, { ..., lockfileOnly: true })`) [#8657](https://github.com/pnpm/pnpm/pull/8657).

.changeset/spicy-apricots-beam.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pnpm/get-context": major
3+
---
4+
5+
`UnexpectedStoreError` and `UnexpectedVirtualStoreDirError` are no longer exported [#8657](https://github.com/pnpm/pnpm/pull/8657). They can be imported from `@pnpm/core` instead.

.changeset/tiny-terms-help.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pnpm/get-context": major
3+
---
4+
5+
Argument `alreadyPurged` removed from `getContextForSingleImporter` [#8657](https://github.com/pnpm/pnpm/pull/8657).

pkg-manager/core/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@
6464
"@pnpm/types": "workspace:*",
6565
"@pnpm/which-version-is-pinned": "workspace:*",
6666
"@zkochan/rimraf": "catalog:",
67+
"ci-info": "catalog:",
68+
"enquirer": "catalog:",
6769
"is-inner-link": "catalog:",
6870
"is-subdir": "catalog:",
6971
"load-json-file": "catalog:",

pkg-manager/core/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ export type {
99
export type { HoistingLimits } from '@pnpm/headless'
1010
export * from './api'
1111

12-
export { type ProjectOptions, UnexpectedStoreError, UnexpectedVirtualStoreDirError } from '@pnpm/get-context'
12+
export { type ProjectOptions } from '@pnpm/get-context'
13+
export { UnexpectedStoreError } from './install/checkCompatibility/UnexpectedStoreError'
14+
export { UnexpectedVirtualStoreDirError } from './install/checkCompatibility/UnexpectedVirtualStoreDirError'
1315
export type { InstallOptions } from './install/extendInstallOptions'
1416

1517
export type { WorkspacePackages } from '@pnpm/resolver-base'
File renamed without changes.

0 commit comments

Comments
 (0)