The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Align CLI version with Twenty 2.46.0 (#27905)
Weiko71dfe4292153
diff --git a/packages/twenty-cli/CONTRIBUTING.md b/packages/twenty-cli/CONTRIBUTING.mdindex fda3d5ed2f6..c4921491f6a 100644--- a/packages/twenty-cli/CONTRIBUTING.md+++ b/packages/twenty-cli/CONTRIBUTING.md@@ -110,16 +110,26 @@ published. CI runs the same target for CLI and dependency changes.## Releases-The CLI has its own release line. A `cli/vX.Y.Z` tag publishes the `twenty`-package at that version, which must match `package.json`.+Publish the CLI when its changes warrant a release. A server release does not+require a CLI release; skip versions when the CLI has no changes worth shipping.+When publishing, aim to align the CLI version with the corresponding Twenty+server, SDK and UI version.++Publishing is independent through the `cli/` tag family: `cli/v2.46.0` publishes+only `[email protected]`. The tag version must match+`packages/twenty-cli/package.json`. Bumping the package version alone does not+publish the CLI.`app init` pins `twenty-client-sdk`, `twenty-sdk` and `twenty-ui` to the`twenty-sdk` version of the commit the CLI was built from. `main` moves-to the next, unpublished SDK version right after each SDK release, so a CLI-release must be built from the commit of an SDK release:+to the next, unpublished SDK version right after each SDK release:-1. Merge the CLI version bump before that SDK release is tagged.-2. Once the `sdk/vA.B.C` packages are on npm, tag the same commit `cli/vX.Y.Z`.+1. Start from the matching `sdk/vA.B.C` release commit. If a CLI version bump+ is still needed, make it on a branch from that commit.+2. Once the SDK, client SDK and UI packages at `A.B.C` are on npm, tag the+ prepared commit `cli/vA.B.C`.+3. Run the `Publish npm packages` workflow in `twenty-infra` with that tag as+ its `ref`. Creating the tag alone does not publish the package.`yarn npm publish` first runs `scripts/check-publish.mjs`, which needs a freshbuild and npm registry access. It fails when the executable, worker, lazy chunks@@ -127,7 +137,7 @@ or templates are missing, when `dist` was built for another version, when one ofits CLI runs fails or times out, or when `app init` would pin versions that arenot on npm. An unreachable registry is reported separately from a missingversion. The check does not read tags: it confirms that the pinned versions are-published, and tagging the SDK release commit remains a release step.+published. Selecting the matching SDK release remains a release step.`prepublish` then runs `scripts/generate-template-lock.mjs`. It resolves the apptemplate's dependencies with the repository's Yarn against the public registry,diff --git a/packages/twenty-cli/docs/commands.md b/packages/twenty-cli/docs/commands.mdindex cbe4f1c6890..634951de533 100644--- a/packages/twenty-cli/docs/commands.md+++ b/packages/twenty-cli/docs/commands.md@@ -539,7 +539,7 @@ Commands print readable text by default. With `--json`, a command prints exactly"ok": true,"command": "version","data": {- "version": "0.4.0",+ "version": "2.46.0","node": "24.9.0","platform": "darwin","arch": "arm64"diff --git a/packages/twenty-cli/package.json b/packages/twenty-cli/package.jsonindex b5b9683baca..ccdd232ab3f 100644--- a/packages/twenty-cli/package.json+++ b/packages/twenty-cli/package.json@@ -1,6 +1,6 @@{"name": "twenty",- "version": "0.4.0",+ "version": "2.46.0","description": "The Twenty command line.","homepage": "https://twenty.com","repository": {diff --git a/packages/twenty-cli/scripts/check-publish-readiness.mjs b/packages/twenty-cli/scripts/check-publish-readiness.mjsindex e4ecb18018c..e9435deda8e 100644--- a/packages/twenty-cli/scripts/check-publish-readiness.mjs+++ b/packages/twenty-cli/scripts/check-publish-readiness.mjs@@ -310,7 +310,7 @@ const checkPinsArePublished = async ({ registryUrl, pins }) => {if (missing.length > 0) {fail(`app init would pin versions that are not on npm: ${missing.map(({ name, version }) => `${name}@${version}`).join(', ')}. ` +- 'Publish the matching SDK release first, and tag this CLI release on the same commit as its sdk/v* tag.',+ 'Publish the matching SDK release first, then tag the prepared CLI release commit based on that SDK release.',);}