mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-30 04:52:04 -04:00
fix: pnpm rebuild should not add ignored built pkg to ignoredBuilds (#9344)
close #9338
This commit is contained in:
6
.changeset/nice-squids-sniff.md
Normal file
6
.changeset/nice-squids-sniff.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-rebuild": patch
|
||||
pnpm: patch
|
||||
---
|
||||
|
||||
The `pnpm rebuild` command should not add pkgs included in `ignoredBuiltDependencies` to `ignoredBuilds` in `node_modules/.modules.yaml` [#9338](https://github.com/pnpm/pnpm/issues/9338).
|
||||
@@ -51,7 +51,7 @@ export type StrictRebuildOptions = {
|
||||
peersSuffixMaxLength: number
|
||||
strictStorePkgContentCheck: boolean
|
||||
fetchFullMetadata?: boolean
|
||||
} & Pick<Config, 'sslConfigs' | 'onlyBuiltDependencies' | 'onlyBuiltDependenciesFile' | 'neverBuiltDependencies'>
|
||||
} & Pick<Config, 'sslConfigs' | 'onlyBuiltDependencies' | 'onlyBuiltDependenciesFile' | 'neverBuiltDependencies' | 'ignoredBuiltDependencies'>
|
||||
|
||||
export type RebuildOptions = Partial<StrictRebuildOptions> &
|
||||
Pick<StrictRebuildOptions, 'storeDir' | 'storeController'> & Pick<Config, 'rootProjectManifest' | 'rootProjectManifestDir'>
|
||||
|
||||
@@ -310,7 +310,9 @@ async function _rebuild (
|
||||
const _allowBuild = createAllowBuildFunction(opts) ?? (() => true)
|
||||
const allowBuild = (pkgName: string) => {
|
||||
if (_allowBuild(pkgName)) return true
|
||||
ignoredPkgs.push(pkgName)
|
||||
if (!opts.ignoredBuiltDependencies?.includes(pkgName)) {
|
||||
ignoredPkgs.push(pkgName)
|
||||
}
|
||||
return false
|
||||
}
|
||||
const builtDepPaths = new Set<string>()
|
||||
|
||||
Reference in New Issue
Block a user