- MCP
- show on this site's /mcp
- CLI
- abso show 172 --json
- JSON
- /christopher/abso-core/versions/172?format=json
Build the client for Node 20 instead of committing the build: npm run build writes client/bin/abso.mjs from client/abso.ts, and npm run pack:npm -- <version> packs that same build as the npm package @abso-cli/abso (it never publishes). The committed bundle and the check that kept it current are gone, so client changes need no rebuild. The READMEs give the build steps.
of shared·node20··Not checked
Version 171 · Files at version 172
8 files, 108 lines added, 44 removed.
--- a/README.md
+++ b/README.md
@@ -39,15 +39,18 @@
4141
42−From this repository, with nothing to install or build, on Node 20 or later:
4343
4749
48−`client/bin/abso.mjs` is the whole client as one plain-JS file, built from
49−`client/abso.ts` and committed. On Node 24, `node client/abso.ts` runs the
50−TypeScript itself.
5154
5356
@@ -167,10 +170,6 @@
169172
170−After changing anything the client imports, run `npm run build:client` and push
171−the `client/bin/abso.mjs` it writes: the check fails while that file isn't a
172−build of the client as it is.
173−
--- a/abso.json
+++ b/abso.json
@@ -1,5 +1,5 @@
4− "whole": ["package-lock.json", "client/bin/abso.mjs"]
--- a/client/README.md
+++ b/client/README.md
@@ -11,17 +11,17 @@
1313
14−On Node 20 or later, run `client/bin/abso.mjs` instead: the same client built
15−into one plain-JS file, committed, so a fresh clone needs no install or build.
1616
2022
21−Node 20 can't run the `.ts` files (it has no type stripping). After changing
22−anything the client imports, `npm run build:client` rebuilds `bin/abso.mjs`;
23−push it with the change. The project's check (`npm run check:client-bundle`)
24−fails while the file isn't a build of the client as it is.
2525
2727
client/bin/abso.mjsdeleted; this is the file as it was before+0 −0
Binary file client/bin/abso.mjs changed: 601e61926ab4 -> none
--- a/package.json
+++ b/package.json
@@ -11,9 +11,9 @@
1212 "test": "node --import ./client/test/setup.ts --test \"src/**/*.test.ts\" \"worker/project/**/*.test.ts\" \"client/test/**/*.test.ts\" \"scripts/**/*.test.ts\" \"server/test/**/*.test.ts\"",
14− "check": "npm run typecheck && npm run typecheck:server && npm run check:client-bundle && npm test",
15− "build:client": "node scripts/build-client.mjs",
16− "check:client-bundle": "node scripts/build-client.mjs --check",
--- a/scripts/build-client.mjs
+++ b/scripts/build-client.mjs
@@ -2,17 +2,15 @@
22// as one plain-JS file for Node 20 or later. Node 20 can't run the .ts files themselves (it has no type
7−// npm run build:client rebuilds it; run it after changing the client and push the result.
8−// npm run check:client-bundle fails when the file isn't what a build of this folder gives (the check runs it).
8+// The file isn't committed (.gitignore leaves client/bin/ out); build it again after pulling. It sits one
9+// folder under client/, so the client's own folder (client-version.ts) is still client/. scripts/pack-npm.mjs
10−// The file is committed, so a fresh clone runs it with no install and no build. It sits one folder under
11−// client/, so the client's own folder (client-version.ts) is still client/. The build is deterministic:
12−// paths in it are relative to the repo, so it comes out the same on every machine.
13−//
15−import { readFileSync, writeFileSync } from "node:fs";
@@ -20,8 +18,8 @@
2220
23−/** The bundle's text, built in memory. */
24−export function buildClient() {
21+/** The bundle's text, built in memory. `banner` adds lines at its top (the npm package stamps its version). */
@@ -37,9 +35,10 @@
40− "// Built from client/abso.ts by scripts/build-client.mjs (npm run build:client). Don't edit it by hand.",
38+ "// Built from client/abso.ts by scripts/build-client.mjs (npm run build). Don't edit it by hand.",
@@ -53,17 +52,7 @@
5352
56− const text = buildClient();
57− if (process.argv.includes("--check")) {
58− let have = "";
59− try {
60− have = readFileSync(path, "utf8").replace(/\r\n/g, "\n");
61− } catch {}
62− if (have !== text) {
63− process.stderr.write(
64− `${OUT} is not a build of this folder's client: run npm run build:client and push the file it writes.\n`,
65− );
66− process.exit(1);
67− }
68− } else writeFileSync(path, text);
--- /dev/null
+++ b/scripts/pack-npm.mjs
@@ -0,0 +1,73 @@
1+// Packs the npm package @abso-cli/abso from this checkout: the client as scripts/build-client.mjs builds it,
6+// It writes the package to dist/npm/package/ and its tarball, as npm pack names it, to dist/npm/.
7+// The package's layout: bin/abso.mjs checks Node's version and loads dist/abso.mjs, the bundle, stamped
14+
22+
45+ process.stderr.write("abso needs Node ${node} or later, and this is Node " + process.versions.node + ". Install a newer Node from https://nodejs.org and run abso again.\\n");
50+ "dist/abso.mjs": buildClient([`globalThis.__ABSO_PACKAGE_VERSION__ = ${JSON.stringify(version)};`]),
51+ "README.md": `# abso\n\nabso is version control for agents. This package is the abso command line.\n\nIt needs Node ${node} or later. Install it with \`npm install -g @abso-cli/abso\`, or run \`npx @abso-cli/abso help\`.\n\n[abso.dev](https://abso.dev)\n`,
54+
62+// Under npm run, npm_execpath is npm's own script, which runs without a shell on every platform.
68+ : execFileSync("npm", pack, { cwd: root, encoding: "utf8", shell: process.platform === "win32" })
--- a/server/README.md
+++ b/server/README.md
@@ -40,16 +40,19 @@
4040
4242
43−The client is in this repository, built into one plain-JS file that runs on Node 20 or later with nothing to install
44−(`client/bin/abso.mjs`, built from `client/abso.ts`). From the repository's root:
43+The client is in this repository. `npm run build` builds it from `client/abso.ts` into one plain-JS file that runs on
4545
5153
52−On Node 24, `alias abso="node $PWD/client/abso.ts"` runs the TypeScript itself (after `npm ci`).
54+On Node 24, `alias abso="node $PWD/client/abso.ts"` runs the TypeScript itself, with no build. `npm i -g @abso-cli/abso`
5356