Skip to content

Commit 16e90a7

Browse files
chore(deps): modernize toolchain (Vite 8, TS 6, ESLint 10, Hono) + cut 14 direct deps (-139 pkgs) (#786)
1 parent 91d36ad commit 16e90a7

84 files changed

Lines changed: 3312 additions & 4988 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@tumaet/apollon": patch
3+
---
4+
5+
Modernize the build toolchain and cut a runtime dependency, behavior-identical. `uuid` is gone — the editor now mints RFC-4122 v4 IDs from an embed-safe `crypto.getRandomValues` (works in any context, unlike `crypto.randomUUID`). The build moves to Vite 8 (Rolldown/Oxc), TypeScript 6.0, and vite-plugin-dts 5 (+ `@microsoft/api-extractor`), and every remaining runtime dependency (`@base-ui/react`, `lucide-react`, `@chenglou/pretext`, …) is verified at its latest release. No public API or rendering change.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@tumaet/server": patch
3+
"@tumaet/webapp": patch
4+
---
5+
6+
Modernize the standalone runtimes, behavior-preserving.
7+
8+
**Server:** migrate Express 5 → Hono 4 + `@hono/node-server` (both zero-runtime-dependency), dropping `express`/`cors`/`cookie`/`pino-http` and ~18 transitives. Routes, status codes, response bodies/headers, the owner-cookie HMAC, CORS policy, the zod error envelopes and the yjs collaboration WebSocket relay are all preserved. Runtime majors bumped: zod 4, redis 6 (RESP2-pinned to keep raw reply shapes), pino 10, ulid 3, and `dotenv` replaced by Node's built-in `util.parseEnv`.
9+
10+
**Webapp:** replace `@ionic/react` (imported only for `isPlatform()` UA checks) with a 45-line vendored `platform.ts`, cutting the Stencil runtime from the initial bundle (~−47% initial gzip) and de-duplicating the editor; `uuid` → native `crypto.randomUUID`.

.changeset/ui-drop-cmdk.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@tumaet/ui": patch
3+
---
4+
5+
Drop the unused `cmdk` command-palette component (zero importers) and its dependency, plus a dead `@vitest/coverage-v8` dev dependency. Migrate React linting to `@eslint-react` for ESLint 10 and bump the toolchain (Tailwind 4.3). No component API change.

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ jobs:
213213
# Browser-specific key: the chromium and firefox jobs share this cache
214214
# path but install different browsers, so they must not share a key
215215
# (a firefox-only cache would make this job skip its chromium install).
216-
key: playwright-chromium-${{ runner.os }}-v1.59.1-${{ hashFiles('standalone/webapp/package.json') }}
216+
key: playwright-chromium-${{ runner.os }}-v1.61.1-${{ hashFiles('standalone/webapp/package.json') }}
217217

218218
- name: Install Playwright browsers
219219
if: steps.playwright-cache.outputs.cache-hit != 'true'
220220
# Invoke @playwright/test's own CLI (not `pnpm exec playwright`): the
221-
# webapp also has `playwright@1.61` for Storybook's vitest browser runner,
222-
# so the bare `playwright` bin resolves to 1.61 and installs browsers the
223-
# 1.59.1 test runner can't find. cli.js installs 1.59.1's browsers.
221+
# webapp also has the `playwright` package (Storybook's vitest browser
222+
# runner), and both ship a `playwright` bin, so the bare bin can resolve
223+
# to the wrong package. cli.js pins the install to @playwright/test.
224224
run: pnpm --filter @tumaet/webapp exec node node_modules/@playwright/test/cli.js install chromium
225225

226226
# Shared with perf-firefox-tests; the dpkg-lock hang it guards is
@@ -232,8 +232,8 @@ jobs:
232232

233233
- name: Run E2E tests
234234
# Use the test:e2e script (node …/@playwright/test/cli.js): running via
235-
# `pnpm exec playwright test` picks up the 1.61 runner against 1.59.1 test
236-
# files → "did not expect test.describe()".
235+
# `pnpm exec playwright test` can pick up the `playwright` package's CLI
236+
# (bin collision) instead of @playwright/test's test runner.
237237
run: pnpm --filter @tumaet/webapp run test:e2e
238238

239239
# No chromium document-growth budget: the metric is engine-independent and
@@ -286,12 +286,13 @@ jobs:
286286
path: ~/.cache/ms-playwright
287287
# Firefox-specific key — must differ from the chromium jobs' key (same
288288
# cache path, different browser) so neither poisons the other's cache.
289-
key: playwright-firefox-${{ runner.os }}-v1.59.1-${{ hashFiles('standalone/webapp/package.json') }}
289+
key: playwright-firefox-${{ runner.os }}-v1.61.1-${{ hashFiles('standalone/webapp/package.json') }}
290290

291291
- name: Install Playwright Firefox
292292
if: steps.playwright-cache.outputs.cache-hit != 'true'
293-
# @playwright/test's own CLI, so Firefox matches the 1.59.1 test runner
294-
# (see the e2e job's install step for why `pnpm exec playwright` is wrong).
293+
# @playwright/test's own CLI, so the install targets the test runner's
294+
# package — both packages ship a `playwright` bin (see the e2e job's
295+
# install step for why `pnpm exec playwright` is wrong).
295296
run: pnpm --filter @tumaet/webapp exec node node_modules/@playwright/test/cli.js install firefox
296297

297298
# Shared with e2e-tests; the dpkg-lock hang it guards is documented in
@@ -393,7 +394,7 @@ jobs:
393394
runs-on: ubuntu-latest
394395
timeout-minutes: 30
395396
container:
396-
image: mcr.microsoft.com/playwright:v1.59.1-noble
397+
image: mcr.microsoft.com/playwright:v1.61.1-noble
397398
steps:
398399
- name: Checkout repository
399400
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

.github/workflows/update-visual-baselines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
runs-on: ubuntu-latest
3434
timeout-minutes: 30
3535
container:
36-
image: mcr.microsoft.com/playwright:v1.59.1-noble
36+
image: mcr.microsoft.com/playwright:v1.61.1-noble
3737
steps:
3838
- name: Checkout target branch
3939
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ To preview the documentation site instead, run `pnpm dev:docs` from the repo roo
5454
| Component | Technology |
5555
| ------------- | -------------------------------------------------------------------- |
5656
| Library | React, TypeScript, React Flow (`@xyflow/react`), Yjs, Zustand, Vite |
57-
| Server | Express 5, Redis (RedisJSON), WebSocket relay |
57+
| Server | Hono 4, Redis (RedisJSON), WebSocket relay |
5858
| Webapp | React, TypeScript, Vite, shadcn-style UI (Base UI), Tailwind |
5959
| Storage | Redis with RedisJSON (diagrams expire after 120 days via native TTL) |
6060
| Reverse proxy | Traefik v3 (production) |

docs/contributor/development/project-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Apollon/
1919
│ ├── src/ # components, stories, compiled CSS sources
2020
│ └── package.json
2121
├── standalone/
22-
│ ├── server/ # @tumaet/server — Express + Redis + WebSocket relay
22+
│ ├── server/ # @tumaet/server — Hono + Redis + WebSocket relay
2323
│ │ ├── src/
2424
│ │ ├── Dockerfile
2525
│ │ └── package.json

docs/contributor/development/visual-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Regenerating Playwright snapshots inside the pinned Docker image.
66

77
# Visual regression tests
88

9-
Apollon's visual regression tests run on **every PR** as the `visual-regression-tests` job in `pr-health-checks.yml`, feeding the required **PR Health Gate** check. Gating per-PR forces a rendering change to refresh its own baselines in the same PR; running them nightly-only instead lets a rendering change merge green and resurface later as an orphaned failure on an unrelated PR. They use Playwright with the `mcr.microsoft.com/playwright:v1.59.1-noble` Docker image so snapshots are pinned to one Linux rendering stack regardless of contributor OS.
9+
Apollon's visual regression tests run on **every PR** as the `visual-regression-tests` job in `pr-health-checks.yml`, feeding the required **PR Health Gate** check. Gating per-PR forces a rendering change to refresh its own baselines in the same PR; running them nightly-only instead lets a rendering change merge green and resurface later as an orphaned failure on an unrelated PR. They use Playwright with the `mcr.microsoft.com/playwright:v1.61.1-noble` Docker image so snapshots are pinned to one Linux rendering stack regardless of contributor OS.
1010

1111
## Regenerating baselines
1212

@@ -22,7 +22,7 @@ From the repo root:
2222

2323
```sh
2424
docker run --rm -v "$(pwd)":/work -w /work --ipc=host \
25-
mcr.microsoft.com/playwright:v1.59.1-noble \
25+
mcr.microsoft.com/playwright:v1.61.1-noble \
2626
bash -c "curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
2727
&& apt-get install -y nodejs \
2828
&& npm install -g pnpm@11.1.3 \

docs/library/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Apollon ships as an npm library that any framework can embed. The public API is
1919
`@tumaet/apollon` ships a single build that externalizes every runtime
2020
dependency a host can install — the React family (`react`, `react-dom`,
2121
`@xyflow/react`), the CRDT singletons (`yjs`, `y-protocols`), and Apollon's own
22-
runtime deps (`@base-ui/react`, `lucide-react`, `@dnd-kit`, `zustand`, `uuid`,
22+
runtime deps (`@base-ui/react`, `lucide-react`, `@dnd-kit`, `zustand`,
2323
`@chenglou/pretext`), which install transitively with the package. Your bundler
2424
resolves and de-duplicates each one against your app's `node_modules`, and your
2525
bundle analyzer / SBOM tooling sees them as the real packages they are — never a

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"@docusaurus/faster": "3.10.1",
1919
"@docusaurus/preset-classic": "3.10.1",
2020
"@docusaurus/theme-mermaid": "3.10.1",
21-
"@easyops-cn/docusaurus-search-local": "0.55.1",
21+
"@easyops-cn/docusaurus-search-local": "0.55.2",
2222
"@mdx-js/react": "3.1.1",
23-
"@mermaid-js/layout-elk": "0.2.1",
23+
"@mermaid-js/layout-elk": "0.2.2",
2424
"@tumaet/apollon": "workspace:*",
2525
"@xyflow/react": "catalog:",
2626
"clsx": "catalog:",

0 commit comments

Comments
 (0)