MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / migrateChangesetConfig

Function migrateChangesetConfig

packages/bumpy/src/commands/init.ts:159–188  ·  view source on GitHub ↗
(csConfig: Record<string, unknown>)

Source from the content-addressed store, hash-verified

157}
158
159function 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
190async function isPackageInstalled(rootDir: string, pkgName: string): Promise<boolean> {
191 try {

Callers 1

initCommandFunction · 0.85

Calls 1

makeDefaultConfigFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…