mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-23 23:29:17 -05:00
feat: setting only-built-dependencies through .npmrc
This commit is contained in:
6
.changeset/fresh-dots-travel.md
Normal file
6
.changeset/fresh-dots-travel.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/config": minor
|
||||
"@pnpm/plugin-commands-installation": minor
|
||||
---
|
||||
|
||||
Allow to set `only-built-dependencies[]` through `.npmrc`.
|
||||
@@ -148,6 +148,7 @@ export interface Config {
|
||||
embedReadme?: boolean
|
||||
gitShallowHosts?: string[]
|
||||
legacyDirFiltering?: boolean
|
||||
onlyBuiltDependencies?: string[]
|
||||
|
||||
registries: Registries
|
||||
ignoreWorkspaceRootCheck: boolean
|
||||
|
||||
@@ -80,6 +80,7 @@ export const types = Object.assign({
|
||||
noproxy: String,
|
||||
'npm-path': String,
|
||||
offline: Boolean,
|
||||
'only-built-dependencies': [String],
|
||||
'package-import-method': ['auto', 'hardlink', 'clone', 'copy'],
|
||||
pnpmfile: String,
|
||||
'prefer-frozen-lockfile': Boolean,
|
||||
|
||||
@@ -24,13 +24,16 @@ export default function getOptionsFromRootManifest (manifest: ProjectManifest):
|
||||
const peerDependencyRules = manifest.pnpm?.peerDependencyRules
|
||||
const allowedDeprecatedVersions = manifest.pnpm?.allowedDeprecatedVersions
|
||||
const patchedDependencies = manifest.pnpm?.patchedDependencies
|
||||
return {
|
||||
const settings = {
|
||||
allowedDeprecatedVersions,
|
||||
overrides,
|
||||
neverBuiltDependencies,
|
||||
onlyBuiltDependencies,
|
||||
packageExtensions,
|
||||
peerDependencyRules,
|
||||
patchedDependencies,
|
||||
}
|
||||
if (onlyBuiltDependencies) {
|
||||
settings['onlyBuiltDependencies'] = onlyBuiltDependencies
|
||||
}
|
||||
return settings
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user