chore: scaffold v8 monorepo — npm workspaces, node:test, GitHub Actions CI
The v7 source at the repo root is untouched; v8 work lives in packages/. See docs/v8.md for layout and status against the modernization plan. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
This commit is contained in:
co-authored by
Claude Fable 5
parent
3e5988fba5
commit
3d6b474621
+50
@@ -0,0 +1,50 @@
|
||||
# choo v8 — branch notes
|
||||
|
||||
This branch is the working tree for the v8 modernization effort. The v7 code
|
||||
at the repo root is untouched and stays authoritative until 8.0.0 ships;
|
||||
everything new lives under `packages/`.
|
||||
|
||||
## Layout
|
||||
|
||||
- `packages/core` — `@choojs/core`: the Choo class, same API as choo v7
|
||||
(`use`/`route`/`start`/`mount`/`toString`/`emit`), ported to ESM. The
|
||||
nano* internals are consolidated into `lib/` as attributed ports:
|
||||
- `lib/bus.js` ← nanobus 4.5.0
|
||||
- `lib/router.js` ← nanorouter 4.0.0 + wayfarer 7.0.1 (+ trie)
|
||||
- `lib/cache.js` ← choo component/cache.js + nanolru 1.0.0
|
||||
- `lib/raf.js` ← nanoraf 3.1.0, `lib/href.js` ← nanohref 3.1.0
|
||||
- `lib/timing.js` ← nanotiming 7.3.1 (unified on global `performance`)
|
||||
- `lib/dom.js` ← document-ready 2.0.1 + scroll-to-anchor 1.0.0
|
||||
- `lib/query.js` — nanoquery replaced by `URLSearchParams`
|
||||
- `packages/html` — `@choojs/html`: the rendering package.
|
||||
- `server.js` — server-side tagged template (← nanohtml 1.10.0 server,
|
||||
transform branches removed; pure runtime)
|
||||
- `morph.js` — ← nanomorph 5.4.3, consolidated to one module
|
||||
- `browser.js` — **Phase 2**: runtime-only cached template tag (WeakMap
|
||||
keyed on the template strings array, clone-based instantiation,
|
||||
hydration that adopts server DOM). Throws until implemented.
|
||||
- `raw.js` — mark pre-encoded strings
|
||||
|
||||
## Status vs the modernization plan
|
||||
|
||||
- [x] Phase 1: monorepo scaffold, ESM ports, choo v7 node test suite green
|
||||
on `node --test` (Node ≥ 24), CI on GitHub Actions
|
||||
- [ ] Phase 2: browser renderer rewrite + hydration, `@choojs/component`
|
||||
- [ ] Phase 3: v8 wiring (`toStream`, devtools, codemod)
|
||||
- [ ] Phase 4: bankai v10 (Vite 8/Rolldown shell, SSR middleware,
|
||||
103 Early Hints, service worker, precompression)
|
||||
- [ ] Phase 5: docs, examples, launch
|
||||
|
||||
## Deliberate changes from v7
|
||||
|
||||
- `choo()` still works without `new`; `Choo` is also a named export.
|
||||
- nanoquery → `URLSearchParams` (same output shape, repeated keys → arrays).
|
||||
- Assertions live in `lib/assert.js` so production builds can strip them.
|
||||
- Everything targets Node ≥ 24 and Baseline Widely Available browsers; there
|
||||
is no compile step and no transpilation anywhere.
|
||||
|
||||
## Attribution
|
||||
|
||||
All ported modules are MIT-licensed work by the original choojs/nano*
|
||||
authors and contributors; per-file headers note the source package and
|
||||
version. This branch exists to carry that work forward, not to replace it.
|
||||
Reference in New Issue
Block a user