(csConfig: Record<string, unknown>)
| 157 | } |
| 158 | |
| 159 | function migrateChangesetConfig(csConfig: Record<string, unknown>): Record<string, unknown> { |
| 160 | const bumpyConfig: Record<string, unknown> = makeDefaultConfig(); |
| 161 | |
| 162 | // Fields that map directly from changesets → bumpy |
| 163 | const migrateableFields = [ |
| 164 | 'baseBranch', |
| 165 | 'access', |
| 166 | 'fixed', |
| 167 | 'linked', |
| 168 | 'ignore', |
| 169 | 'updateInternalDependencies', |
| 170 | 'privatePackages', |
| 171 | ] as const; |
| 172 | |
| 173 | for (const field of migrateableFields) { |
| 174 | const value = csConfig[field]; |
| 175 | if (value === undefined) continue; |
| 176 | // Skip empty arrays and values that match bumpy defaults — no need to clutter the config |
| 177 | if (Array.isArray(value) && value.length === 0) continue; |
| 178 | if (field === 'baseBranch' && value === 'main') continue; |
| 179 | if (field === 'access' && value === 'public') continue; |
| 180 | if (field === 'updateInternalDependencies' && value === 'out-of-range') continue; |
| 181 | bumpyConfig[field] = value; |
| 182 | } |
| 183 | |
| 184 | // Fields intentionally NOT migrated (changesets-only): |
| 185 | // - commit, changelog, ___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH, etc. |
| 186 | |
| 187 | return bumpyConfig; |
| 188 | } |
| 189 | |
| 190 | async function isPackageInstalled(rootDir: string, pkgName: string): Promise<boolean> { |
| 191 | try { |
no test coverage detected
searching dependent graphs…