mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-05 07:46:10 -04:00
fix: let deploy inherit overrides (#9546)
* fix: let deploy inherit overrides Prevents the following error in "pnpm deploy" with "inject-workspace-packages=true": ERR_PNPM_LOCKFILE_CONFIG_MISMATCH Cannot proceed with the frozen installation. The current "overrides" configuration doesn't match the value found in the lockfile * chore: add changeset * docs: update old-symbols-invite.md close #9283 close #9483
This commit is contained in:
committed by
GitHub
parent
272129193c
commit
aad7eebc2d
6
.changeset/old-symbols-invite.md
Normal file
6
.changeset/old-symbols-invite.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-deploy": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Let `pnpm deploy` work in repos with `overrides` when `inject-workspace-packages=true` [#9283](https://github.com/pnpm/pnpm/issues/9283).
|
||||
@@ -119,7 +119,6 @@ export function createDeployFiles ({
|
||||
const result: DeployFiles = {
|
||||
lockfile: {
|
||||
...lockfile,
|
||||
overrides: undefined, // the effects of package overrides should already be part of the package snapshots
|
||||
patchedDependencies: undefined,
|
||||
packageExtensionsChecksum: undefined, // the effects of the package extensions should already be part of the package snapshots
|
||||
pnpmfileChecksum: undefined, // the effects of the pnpmfile should already be part of the package snapshots
|
||||
@@ -136,7 +135,6 @@ export function createDeployFiles ({
|
||||
pnpm: {
|
||||
...rootProjectManifest?.pnpm,
|
||||
...pick(USEFUL_NON_ROOT_PNPM_FIELDS, selectedProjectManifest.pnpm ?? {}),
|
||||
overrides: undefined, // the effects of package overrides should already be part of the package snapshots
|
||||
patchedDependencies: undefined,
|
||||
packageExtensions: undefined, // the effects of the package extensions should already be part of the package snapshots
|
||||
},
|
||||
|
||||
@@ -337,9 +337,9 @@ test('the deploy manifest should inherit the pnpm object from the root manifest
|
||||
const manifest = readPackageJson('deploy') as ProjectManifest
|
||||
expect(manifest.pnpm).toStrictEqual({
|
||||
onlyBuiltDependencies: preparedManifests.root.pnpm!.onlyBuiltDependencies,
|
||||
overrides: preparedManifests.root.pnpm!.overrides,
|
||||
executionEnv: preparedManifests['project-0'].pnpm!.executionEnv,
|
||||
} as ProjectManifest['pnpm'])
|
||||
expect(manifest.pnpm?.overrides).toBeUndefined() // by design
|
||||
|
||||
expect(readPackageJson('deploy/node_modules/is-positive/')).toHaveProperty(['version'], preparedManifests.root.pnpm!.overrides!['is-positive'])
|
||||
expect(project.readLockfile().importers).toStrictEqual({
|
||||
|
||||
Reference in New Issue
Block a user