acknowledgeBuildScripts
▸ 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.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
treeOrRoot | string | Tree | The workspace tree, or its root on disk. |
packageManager | PackageManager | The workspace package manager. |
entries | Record<string, boolean> | Package name to decision: true runs the package’s build scripts, false skips them. Entries the user already decided are kept. |
directory? | string | Workspace root relative to the tree root, for generators that scaffold a workspace into a subdirectory. |
Returns
Section titled “Returns”void
Example
acknowledgeBuildScripts(tree, detectPackageManager(tree.root), { esbuild: false, cypress: true,});