Skip to content

Commit

Permalink
fix: onlyBuiltDependencies should work (#4377)
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed Feb 22, 2022
1 parent 4dca63d commit 4e3b99a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changeset/smooth-singers-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@pnpm/core": patch
"@pnpm/plugin-commands-installation": patch
"pnpm": patch
---

`onlyBuiltDependencies` should work.
3 changes: 1 addition & 2 deletions packages/core/src/install/extendInstallOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e3b99a

Please sign in to comment.