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

Function setupPkg

packages/bumpy/test/core/check-pkgjson-fields.test.ts:48–55  ·  view source on GitHub ↗

Set up a single-package monorepo on main, then branch to "feature".

(pkgJson: Record<string, unknown>)

Source from the content-addressed store, hash-verified

46
47 /** Set up a single-package monorepo on main, then branch to "feature". */
48 async function setupPkg(pkgJson: Record<string, unknown>): Promise<void> {
49 await writeJson('package.json', { name: 'root', private: true, workspaces: ['packages/*'] });
50 await writeJson('packages/app/package.json', { name: 'app', version: '1.0.0', ...pkgJson });
51 gitInDir(['add', '.'], tmpDir);
52 gitInDir(['commit', '-m', 'init'], tmpDir);
53 await setupOriginMain();
54 gitInDir(['checkout', '-b', 'feature'], tmpDir);
55 }
56
57 async function detect(): Promise<string[]> {
58 const config = await loadConfig(tmpDir);

Callers 1

Calls 3

gitInDirFunction · 0.90
writeJsonFunction · 0.70
setupOriginMainFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…