Versions 0 to 318
Lines 6–21 at 318 (were 6–13 at 0)
88
9−export const PROJECT_FILE = "avcs.json";
9+/** The project file's name: abso.json, or avcs.json from before the rename. A new one is written as abso.json. */
1012
13+/** The name the folder's project file has: abso.json when it is there, else avcs.json when that is, else the new name. */
18+
Lines 28–49 at 318 (were 20–41 at 0)
2028
2230
23−/** The folder's avcs.json, or why it can't be read; null when there is none. */
2432export function readProjectFile(root: string): { file: ProjectFile } | { error: string } | null {
25− const path = join(root, PROJECT_FILE);
31− return { error: `${PROJECT_FILE} isn't valid JSON (${(e as Error).message})` };
34− return { error: `${PROJECT_FILE} should hold an object, like {"check": "npm test"}` };
37− if (o[k] !== undefined && typeof o[k] !== "string")
38− return { error: `"${k}" in ${PROJECT_FILE} should be a string` };
46+ if (o[k] !== undefined && typeof o[k] !== "string") return { error: `"${k}" in ${name} should be a string` };
Lines 60–66 at 318 (were 52–58 at 0)
5462
55−/** A starting avcs.json, guessed from package.json; empty where nothing can be guessed. */
Lines 88–112 at 318 (were 80–104 at 0)
8189
83− * Writes a guessed avcs.json when the folder has none and package.json gives
84− * a check or a build to guess (#39, Agent VCS: a project with nothing to
91+ * Writes a guessed abso.json (unless it has abso.json or avcs.json) when the folder has none and package.json gives
89− if (existsSync(join(root, PROJECT_FILE))) return "exists";
97+ if (existsSync(join(root, PROJECT_FILE)) || existsSync(join(root, OLD_PROJECT_FILE))) return "exists";
95103
96−/** What init says about avcs.json. */
101− `No ${PROJECT_FILE} written: package.json gives no check or build to guess, so CI has nothing to run on each new version. To give it a check, publish an ${PROJECT_FILE} like {"check": "npm test"} (abso ci --help says what it runs).`,
109+ `No ${PROJECT_FILE} written: package.json gives no check or build to guess, so CI has nothing to run on each new version. To give it a check, push an ${PROJECT_FILE} like {"check": "npm test"} (abso ci --help says what it runs).`,
Lines 115–121 at 318 (were 107–113 at 0)
110− " abso publish --check with no command runs its build and check.",
- MCP
- compare on this site's /mcp
- CLI
- abso diff 0 318 client/src/project-file.ts --json
- JSON
- /christopher/abso-core/compare/0..318?file=client%2Fsrc%2Fproject-file.ts&format=json