mirror of
https://github.com/pnpm/pnpm.git
synced 2026-02-15 17:42:31 -05:00
fix: print warning about ignored builds on repeat install (#9116)
close #9106 close #9111
This commit is contained in:
6
.changeset/spicy-toys-check.md
Normal file
6
.changeset/spicy-toys-check.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/build-modules": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Print warning about ignored builds of dependencies on repeat install [#9106](https://github.com/pnpm/pnpm/issues/9106).
|
||||
@@ -58,6 +58,7 @@ export async function buildModules<T extends string> (
|
||||
warn,
|
||||
}
|
||||
const chunks = buildSequence<T>(depGraph, rootDepPaths)
|
||||
if (!chunks.length) return {}
|
||||
const ignoredPkgs = new Set<string>()
|
||||
const allowBuild = opts.allowBuild ?? (() => true)
|
||||
const groups = chunks.map((chunk) => {
|
||||
|
||||
@@ -318,12 +318,15 @@ test('throw an error when strict-dep-builds is true and there are ignored script
|
||||
|
||||
test('the list of ignored builds is preserved after a repeat install', async () => {
|
||||
const project = prepare({})
|
||||
execPnpmSync(['add', '@pnpm.e2e/pre-and-postinstall-scripts-example@1.0.0', '--config.optimistic-repeat-install=false'])
|
||||
execPnpmSync(['add', '@pnpm.e2e/pre-and-postinstall-scripts-example@1.0.0', 'esbuild@0.25.0', '--config.optimistic-repeat-install=false'])
|
||||
|
||||
const result = execPnpmSync(['install'])
|
||||
// The warning is printed on repeat install too
|
||||
expect(result.stdout.toString()).toContain('Ignored build scripts:')
|
||||
|
||||
const modulesManifest = project.readModulesManifest()
|
||||
expect(modulesManifest?.ignoredBuilds).toStrictEqual(['@pnpm.e2e/pre-and-postinstall-scripts-example'])
|
||||
expect(modulesManifest?.ignoredBuilds?.sort()).toStrictEqual([
|
||||
'@pnpm.e2e/pre-and-postinstall-scripts-example',
|
||||
'esbuild',
|
||||
])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user