Skip to content

Commit 360ba8e

Browse files
docs: overhaul npm README + auto-sync pinned CDN version (#721)
1 parent 9a6f8db commit 360ba8e

8 files changed

Lines changed: 219 additions & 48 deletions

File tree

.github/workflows/pr-health-checks.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,25 @@ jobs:
5151
- 'pnpm-workspace.yaml'
5252
- '.github/workflows/pr-health-checks.yml'
5353
54+
# No path filter: a stale CDN version can drift in via a doc edit OR a bump,
55+
# so check every PR. Pure Node — no pnpm install needed.
56+
version-sync-check:
57+
needs: [detect-changes]
58+
if: needs.detect-changes.outputs.should-skip != 'true'
59+
runs-on: ubuntu-latest
60+
timeout-minutes: 5
61+
steps:
62+
- name: Checkout repository
63+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
64+
65+
- name: Set up Node
66+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
67+
with:
68+
node-version-file: ".nvmrc"
69+
70+
- name: Check README + docs version sync
71+
run: node scripts/sync-library-version.mjs --check
72+
5473
lint-and-format-check:
5574
needs: [detect-changes]
5675
if: needs.detect-changes.outputs.should-skip != 'true' && needs.detect-changes.outputs.code == 'true'
@@ -270,6 +289,7 @@ jobs:
270289
needs:
271290
[
272291
detect-changes,
292+
version-sync-check,
273293
lint-and-format-check,
274294
library-node22-compat,
275295
e2e-tests,

.github/workflows/version-bump.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ jobs:
172172
echo "standalone_version=${STANDALONE_VERSION}" >> "$GITHUB_OUTPUT"
173173
echo "vscode_version=${VSCODE_VERSION}" >> "$GITHUB_OUTPUT"
174174
175+
- name: Sync pinned library version in README + docs
176+
# No-op for the standalone/vscode scopes — library version unchanged.
177+
run: node scripts/sync-library-version.mjs
178+
175179
- name: Regenerate pnpm-lock.yaml
176180
run: pnpm install --lockfile-only --ignore-scripts
177181

@@ -190,7 +194,7 @@ jobs:
190194
library)
191195
BRANCH="chore/library-v${LIB_VERSION}"
192196
COMMIT_TITLE="chore: release @tumaet/apollon@${LIB_VERSION} + standalone v${STANDALONE_VERSION}"
193-
FILES=(library/package.json standalone/webapp/package.json standalone/server/package.json pnpm-lock.yaml)
197+
FILES=(library/package.json standalone/webapp/package.json standalone/server/package.json pnpm-lock.yaml library/README.md docs/library/embedding/vanilla.md docs/src/pages/index.tsx)
194198
;;
195199
standalone)
196200
BRANCH="chore/standalone-v${STANDALONE_VERSION}"

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
[![npm version](https://img.shields.io/npm/v/@tumaet/apollon)](https://www.npmjs.com/package/@tumaet/apollon)
44
[![npm license](https://img.shields.io/npm/l/@tumaet/apollon)](./LICENSE)
55

6-
Apollon is an open-source UML modeling editor for the web. Draw 13 UML and modeling diagram types — including class, component, activity, BPMN, and SFC in the browser, collaborate in real time, and export to SVG, PNG, PDF, or JSON.
6+
Apollon is an open-source UML modeling editor for the web. Draw 13 UML and modeling diagram types (class, component, activity, BPMN, SFC, and more) in the browser, collaborate in real time, and export to SVG, PNG, PDF, or JSON.
77

88
This monorepo contains every piece of the Apollon platform:
99

10-
- **[`library/`](./library)**the embeddable `@tumaet/apollon` React component ([npm](https://www.npmjs.com/package/@tumaet/apollon)).
11-
- **[`standalone/`](./standalone)** standalone web app (server + webapp) built on the library.
12-
- **[`vscode-extension/`](./vscode-extension)** the Apollon VS Code extension.
13-
- **[`docs/`](./docs)** Docusaurus documentation site, published at <https://ls1intum.github.io/Apollon/>.
10+
- **[`library/`](./library)**: the embeddable `@tumaet/apollon` editor ([npm](https://www.npmjs.com/package/@tumaet/apollon)).
11+
- **[`standalone/`](./standalone)**: the standalone web app (server and webapp) built on the library.
12+
- **[`vscode-extension/`](./vscode-extension)**: the Apollon VS Code extension.
13+
- **[`docs/`](./docs)**: the Docusaurus documentation site, published at <https://ls1intum.github.io/Apollon/>.
1414

1515
## Use the library
1616

@@ -36,15 +36,15 @@ pnpm dev
3636
- Server (`tsx watch`) on a printed local HTTP port with a matching WebSocket relay port.
3737
- Webapp (Vite HMR) on a printed local dev URL.
3838

39-
The launcher handles the boring parts:
39+
The launcher handles the setup:
4040

4141
- Resolves port collisions for the webapp, server, WebSocket relay, and Redis.
42-
- Reuses an existing local Redis if one is running; otherwise starts a Redis container on a free host port (Docker required only in that case).
43-
- Needs no `.env` files defaults match the local setup.
42+
- Reuses an existing local Redis if one is running; otherwise it starts a Redis container on a free host port (Docker is only required in that case).
43+
- Needs no `.env` files. The defaults match the local setup.
4444

4545
Override ports via `APOLLON_WEBAPP_PORT`, `APOLLON_SERVER_PORT`, `APOLLON_WS_PORT`, or `APOLLON_REDIS_PORT`.
4646

47-
To preview the documentation site instead, run `pnpm dev:docs` from the repo root — it builds the library and starts the Docusaurus dev server.
47+
To preview the documentation site instead, run `pnpm dev:docs` from the repo root. It builds the library and starts the Docusaurus dev server.
4848

4949
## Tech stack
5050

@@ -58,24 +58,24 @@ To preview the documentation site instead, run `pnpm dev:docs` from the repo roo
5858

5959
## Requirements
6060

61-
- **Node.js** version pinned in [`.nvmrc`](./.nvmrc) (Node 24 LTS).
62-
- **pnpm 11+**the package manager. The exact version is pinned in `package.json` (`packageManager` field). Install with `npm install -g pnpm@11`.
63-
- **Docker** only when `pnpm dev` needs to start a local Redis.
61+
- **Node.js**: version pinned in [`.nvmrc`](./.nvmrc) (Node 24 LTS).
62+
- **pnpm 11+**: the package manager. The exact version is pinned in the `packageManager` field of `package.json`. Install it with `npm install -g pnpm@11`.
63+
- **Docker**: only when `pnpm dev` needs to start a local Redis.
6464

6565
## Documentation
6666

67-
The docs are a [Docusaurus](https://docusaurus.io/) site published at <https://ls1intum.github.io/Apollon/>. Sources live in [`docs/`](./docs); preview locally with `pnpm dev:docs`.
67+
The docs are a [Docusaurus](https://docusaurus.io/) site published at <https://ls1intum.github.io/Apollon/>. Sources live in [`docs/`](./docs); preview them locally with `pnpm dev:docs`.
6868

69-
- [Library](https://ls1intum.github.io/Apollon/library/)embedding the `@tumaet/apollon` React component.
70-
- [User Guide](https://ls1intum.github.io/Apollon/user/) getting started, requirements, and self-hosting.
71-
- [Contributor](https://ls1intum.github.io/Apollon/contributor/) project structure, scripts, deployment, and troubleshooting.
69+
- [Library](https://ls1intum.github.io/Apollon/library/): embedding the `@tumaet/apollon` editor.
70+
- [User Guide](https://ls1intum.github.io/Apollon/user/): getting started, requirements, and self-hosting.
71+
- [Contributor](https://ls1intum.github.io/Apollon/contributor/): project structure, scripts, deployment, and troubleshooting.
7272

73-
Operations, legal-pages, and TUM DSMS material lives in [`ops/`](./ops) in this repo.
73+
Operations, legal pages, and TUM DSMS material live in [`ops/`](./ops) in this repo.
7474

7575
## Contributing
7676

7777
Open an issue or a pull request at <https://github.com/ls1intum/Apollon>. Guidelines live in [`CONTRIBUTING.md`](./CONTRIBUTING.md); see also the [`CODE_OF_CONDUCT.md`](./CODE_OF_CONDUCT.md).
7878

7979
## License
8080

81-
MIT — see [LICENSE](./LICENSE).
81+
MIT. See [LICENSE](./LICENSE).

docs/contributor/deployment/npm-publishing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Standalone starts at `4.2.18` (the library version at the time of the release-pi
1818

1919
All three workflows trigger automatically when their version changes on `main`. There is **one** manual step per release: merge the bump PR.
2020

21+
The `library` bump also rewrites the pinned `@tumaet/apollon@X.Y.Z` CDN URLs in the README and docs (via `scripts/sync-library-version.mjs`) so the published examples never lag the package version. PR Health Checks run the same script with `--check`, so a drift can never merge — run `pnpm sync:version` locally to fix one.
22+
2123
## Cut a release
2224

2325
1. Actions → **Version Bump** → pick `scope` and bump type. Merge the PR that opens.

docs/library/embedding/vanilla.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ can shift between releases. [jsDelivr's `esm.run`](https://www.jsdelivr.com/esm)
4242
is an equivalent substitute.
4343

4444
:::warning Pin the CDN version
45-
Both URLs above pin an exact version (`@4.4.0`). An **unpinned** URL —
45+
Both URLs above pin an exact version. An **unpinned** URL —
4646
`@tumaet/apollon` with no version — always resolves to the latest release, so
4747
a new major can land on the next page refresh and break your embed without
4848
any change on your side. Always pin to a known-good version and bump it

0 commit comments

Comments
 (0)