From cde9bdfa6d92c2926ba6741e7a7606302f2d56cf Mon Sep 17 00:00:00 2001 From: Silvano Stralla Date: Fri, 28 Aug 2026 10:13:43 +0200 Subject: [PATCH] chore: collect repo automation under toolchain/ --- CLAUDE.md | 2 +- package.json | 4 ++-- toolchain/README.md | 8 ++++++++ {bin => toolchain}/publish.mjs | 0 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 toolchain/README.md rename {bin => toolchain}/publish.mjs (100%) diff --git a/CLAUDE.md b/CLAUDE.md index b2f6174..5e77a7d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -62,7 +62,7 @@ npm run publish # Build, test, version, publish to npm, tag, release note npm run publish-next # The same, under the 'next' dist-tag ``` -`bin/publish.mjs` implements it. The ordering is the point: everything fallible runs before anything irreversible, and npm is published before git is tagged, so a tag can never point at a version nobody can install. There is no rollback — every step is idempotent, so an interrupted release is resumed by re-running it. Tags are per package (`datocms-structured-text-utils@6.1.0`); the historical `vX.Y.Z` tags stay where they are. +`toolchain/publish.mjs` implements it. The ordering is the point: everything fallible runs before anything irreversible, and npm is published before git is tagged, so a tag can never point at a version nobody can install. There is no rollback — every step is idempotent, so an interrupted release is resumed by re-running it. Tags are per package (`datocms-structured-text-utils@6.1.0`); the historical `vX.Y.Z` tags stay where they are. ## Architecture diff --git a/package.json b/package.json index 9131637..d74507e 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "test": "npm run lint && cross-env NODE_OPTIONS=--experimental-vm-modules jest", "build": "turbo run build", "changeset": "changeset", - "publish": "node bin/publish.mjs", - "publish-next": "node bin/publish.mjs --tag next", + "publish": "node toolchain/publish.mjs", + "publish-next": "node toolchain/publish.mjs --tag next", "lint": "eslint . --ext .ts,.tsx", "prettier": "prettier --write \"**/*.{ts,tsx,js,mjs,json,md,yml}\"", "prettier:check": "prettier --check \"**/*.{ts,tsx,js,mjs,json,md,yml}\"", diff --git a/toolchain/README.md b/toolchain/README.md new file mode 100644 index 0000000..e099a64 --- /dev/null +++ b/toolchain/README.md @@ -0,0 +1,8 @@ +# toolchain + +Everything that acts on **this repository** rather than shipping to a user. + +`packages/*` is the product. This is the machinery that turns the product into +releases: it reads the repo, writes into it, and produces something outside it — +a version bump, a changelog, a commit, a tag, an npm package, a GitHub release. +Nothing in here is published, and nothing in here is imported by code that is. diff --git a/bin/publish.mjs b/toolchain/publish.mjs similarity index 100% rename from bin/publish.mjs rename to toolchain/publish.mjs