Check if a package is allowed to define custom commands via package.json
(pkgName: string, config: BumpyConfig)
| 159 | |
| 160 | /** Check if a package is allowed to define custom commands via package.json */ |
| 161 | function isCustomCommandAllowed(pkgName: string, config: BumpyConfig): boolean { |
| 162 | const { allowCustomCommands } = config; |
| 163 | if (allowCustomCommands === true) return true; |
| 164 | if (Array.isArray(allowCustomCommands)) { |
| 165 | return allowCustomCommands.some((pattern) => matchGlob(pkgName, pattern)); |
| 166 | } |
| 167 | return false; |
| 168 | } |
| 169 | |
| 170 | export function getBumpyDir(rootDir: string): string { |
| 171 | return resolve(rootDir, BUMPY_DIR); |
no test coverage detected
searching dependent graphs…