mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-24 07:38:12 -05:00
6
.changeset/spicy-wings-help.md
Normal file
6
.changeset/spicy-wings-help.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/cli-utils": minor
|
||||
"pnpm": minor
|
||||
---
|
||||
|
||||
Automatically load pnpmfiles from config dependencies that are named "@_/pnpm-plugin-_" [#9780](https://github.com/pnpm/pnpm/issues/9780).
|
||||
@@ -71,8 +71,14 @@ export async function getConfig (
|
||||
|
||||
function * calcPnpmfilePathsOfPluginDeps (configModulesDir: string, configDependencies: Record<string, string>): Generator<string> {
|
||||
for (const configDepName of Object.keys(configDependencies).sort(lexCompare)) {
|
||||
if (configDepName.startsWith('@pnpm/plugin-') || configDepName.startsWith('pnpm-plugin-')) {
|
||||
if (isPluginName(configDepName)) {
|
||||
yield path.join(configModulesDir, configDepName, 'pnpmfile.cjs')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isPluginName (configDepName: string): boolean {
|
||||
if (configDepName.startsWith('pnpm-plugin-')) return true
|
||||
if (!configDepName.startsWith('@')) return false
|
||||
return configDepName.startsWith('@pnpm/plugin-') || configDepName.includes('/pnpm-plugin-')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user