diff --git a/.changeset/smooth-singers-smell.md b/.changeset/smooth-singers-smell.md new file mode 100644 index 0000000000..fa25230bba --- /dev/null +++ b/.changeset/smooth-singers-smell.md @@ -0,0 +1,7 @@ +--- +"@pnpm/core": patch +"@pnpm/plugin-commands-installation": patch +"pnpm": patch +--- + +`onlyBuiltDependencies` should work. diff --git a/packages/core/src/install/extendInstallOptions.ts b/packages/core/src/install/extendInstallOptions.ts index c3b6af0bb8..af828a6735 100644 --- a/packages/core/src/install/extendInstallOptions.ts +++ b/packages/core/src/install/extendInstallOptions.ts @@ -49,7 +49,7 @@ export interface StrictInstallOptions { rawConfig: object verifyStoreIntegrity: boolean engineStrict: boolean - neverBuiltDependencies: string[] + neverBuiltDependencies?: string[] onlyBuiltDependencies?: string[] nodeExecPath?: string nodeLinker?: 'isolated' | 'hoisted' | 'pnp' @@ -133,7 +133,6 @@ const defaults = async (opts: InstallOptions) => { }, lockfileDir: opts.lockfileDir ?? opts.dir ?? process.cwd(), lockfileOnly: false, - neverBuiltDependencies: [] as string[], nodeVersion: process.version, nodeLinker: 'isolated', overrides: {}, diff --git a/packages/plugin-commands-installation/src/getOptionsFromRootManifest.ts b/packages/plugin-commands-installation/src/getOptionsFromRootManifest.ts index b1c2574513..24f7b38d99 100644 --- a/packages/plugin-commands-installation/src/getOptionsFromRootManifest.ts +++ b/packages/plugin-commands-installation/src/getOptionsFromRootManifest.ts @@ -15,7 +15,7 @@ export default function getOptionsFromRootManifest (manifest: ProjectManifest): // but we really replace the version specs to any other version spec, not only to exact versions, // so we cannot call it resolutions const overrides = manifest.pnpm?.overrides ?? manifest.resolutions - const neverBuiltDependencies = manifest.pnpm?.neverBuiltDependencies ?? [] + const neverBuiltDependencies = manifest.pnpm?.neverBuiltDependencies const onlyBuiltDependencies = manifest.pnpm?.onlyBuiltDependencies const packageExtensions = manifest.pnpm?.packageExtensions const peerDependencyRules = manifest.pnpm?.peerDependencyRules