Skip to content

▸ acknowledgeBuildScripts(treeOrRoot, packageManager, entries, directory?): void

Records build-script decisions for dependencies that are about to be installed, in whatever form the given package manager understands.

Only pnpm needs this today: pnpm 11+ refuses to install a dependency whose build scripts are neither allowed nor denied, so the generator or command that introduces such a dependency records the decision up front. Other package managers run build scripts unconditionally, so this is a no-op for them.

NameTypeDescription
treeOrRootstring | TreeThe workspace tree, or its root on disk.
packageManagerPackageManagerThe workspace package manager.
entriesRecord<string, boolean>Package name to decision: true runs the package’s build scripts, false skips them. Entries the user already decided are kept.
directory?stringWorkspace root relative to the tree root, for generators that scaffold a workspace into a subdirectory.

void

Example

acknowledgeBuildScripts(tree, detectPackageManager(tree.root), {
esbuild: false,
cypress: true,
});