1 parent
2b0d35fa8d
commit
3ebc0ce8b3
2 files changed
+13
-1
No files matched your search
@@ -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