MCPcopy Index your code
hub / github.com/changesets/changesets / exitPre

Function exitPre

packages/pre/src/index.ts:34–47  ·  view source on GitHub ↗
(rootDir: string)

Source from the content-addressed store, hash-verified

32}
33
34export async function exitPre(rootDir: string) {
35 let preStatePath = path.resolve(rootDir, ".changeset", "pre.json");
36 // TODO: verify that the pre state isn't broken
37 let preState = await readPreState(rootDir);
38
39 if (preState === undefined) {
40 throw new PreExitButNotInPreModeError();
41 }
42
43 await fs.outputFile(
44 preStatePath,
45 JSON.stringify({ ...preState, mode: "exit" }, null, 2) + "\n"
46 );
47}
48
49export async function enterPre(rootDir: string, tag: string) {
50 let packages = await getPackages(rootDir);

Callers 2

preFunction · 0.90
index.test.tsFile · 0.90

Calls 1

readPreStateFunction · 0.85

Tested by

no test coverage detected