Commit Graph
196 Commits
Author SHA1 Message Date
Bendik Aagaard LynghaugandClaude Fable 5 9671670269 fix(ci): glob test files instead of passing directories to node --test
ci / test (24) (push) Successful in 35s
ci / test (26) (push) Successful in 31s
ci / e2e (push) Successful in 1m5s
release / publish (push) Successful in 35s
Node 24's test runner spawns directory arguments as entry modules
(MODULE_NOT_FOUND); Node 26 accepts them. Shell-expanded file globs work
on both — found by the first real CI run on the Gitea runner, where the
Node 24 matrix leg and the release gate failed while 26 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
2026-09-08 21:46:42 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 c5f297a3b7 release: 8.0.0
ci / test (24) (push) Failing after 32s
ci / test (26) (push) Successful in 33s
ci / e2e (push) Failing after 1m6s
release / publish (push) Failing after 33s
All workspace packages to 8.0.0; inter-package ranges tightened from *
to ^8.0.0 for publication.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
2026-09-08 21:35:15 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 ce1ec9e4a9 rebrand: buuh — a friendly public fork under the uhhm org
Packages renamed to the @uhhm scope (@uhhm/buuh, @uhhm/buuh-html,
@uhhm/buuh-component, @uhhm/buuh-devtools, @uhhm/buuh-migrate,
@uhhm/bankai). Scoping is load-bearing twice over: npm routes registries
per scope so @uhhm/* resolves against project.uhhm.no while everything
else stays on npmjs, and it means this fork never squats upstream's
names anywhere. The codemod now migrates choo v7 apps to the @uhhm
names. README rewritten with the fork framing and full upstream credit;
the choojs RFC moves to docs/upstream-rfc-draft.md, in the drawer for if
this work ever goes home. API unchanged — choo() is still choo().

Also: Gitea Actions CI + release workflows (npm publish to the uhhm
registry on tag push, CDN bundle uploaded as a generic package),
npm run bundle producing dist-cdn/buuh.js (the whole framework as one
minified ES module for import-map use), docs/publishing.md explaining
what Gitea Packages is (a real npm registry) and is not (a CDN — serve
the bundle from a static host with module-safe MIME instead), and
onload.js constructing window.MutationObserver to match its own guard
(surfaced by smoke-testing the bundle outside a full browser).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
2026-09-08 19:55:20 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 99f9da1e3b feat(bankai): Phase 4 follow-ups — css convention, live titles, prerender, HTTP/2, size budget
- style.css convention: <entry dir>/style.css is imported by the virtual
  client entry (CSS is a client concern; server code never sees it — the
  v8 answer to sheetify), extracted and hashed by Vite, stylesheet-linked
  in the head and preloaded via Early Hints. Counter example styled.
- SSR <title> from state: the server reads the first stream chunk before
  writing the head, by which point stores and the first render slice have
  run — DOMTitleChange emits land in the document title. Counter emits.
- bankai build --prerender /,/about renders routes through the same
  toStream path to static <route>/index.html (precompressed, precached
  by the service worker, served with Early Hints).
- bankai serve --h2: HTTP/2 with a generated local cert (openssl,
  cached; allowHTTP1) — browsers only act on Early Hints over h2/h3.
  Tested with a real h2 client observing the 103 interim response.
- npm run size: the framework wire-size budget, enforced in CI. Whole
  framework (core + html engine + morph + hydrate) is 7.97 kB min+gzip /
  7.15 kB brotli; budget 8.5 kB with the v7 '4kb' context documented
  (that number excluded the html engine, which lived in the browserify
  transform).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
2026-09-08 19:39:25 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 7e08b585ac feat(bankai): bankai v10 — the isomorphic compiler & server on Vite 8
One command, zero config, and only the client ever bundles: v8 server
code is plain ESM that Node runs as-authored, so there is no server
build to rot (the lesson of v9).

- start: Vite middleware mode + HMR with per-request streaming SSR via
  ssrLoadModule; a virtual client entry generates the browser glue so
  the user writes exactly one isomorphic module (plan decision D5).
- build: client bundle via Vite 8/Rolldown, manifest-derived route
  assets in dist/bankai.json, service worker built with the precache
  list injected (choo-service-worker convention, manifest edition),
  brotli+gzip precompression of every text asset.
- serve: immutable caching + precompressed negotiation for hashed
  assets, 103 Early Hints (res.writeEarlyHints) with the route's assets
  before every page, streaming SSR, and a window.initialState tail with
  script-breakout-safe serialization and choo internals filtered out.
- inspect: raw/gzip/brotli size report.

Integration tests drive the real counter example through build and
serve, asserting the 103 interim response at the HTTP level.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
2026-09-08 19:32:37 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 fd1d05cea0 feat(devtools): add @choojs/devtools — window.choo console tooling
Carries forward the choo-devtools 3.x essentials: live state handle,
emit-from-console, event log, nanotiming measures via PerformanceObserver,
state copy(), help(). No-op on the server; verbose logging opt-in via
localStorage.CHOO_DEVTOOLS_VERBOSE.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
2026-09-08 18:57:51 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 c9f5ba2fda bench: @choojs/html vs nanohtml v1 vs µhtml v5, happy-dom + real Chromium
npm run bench (happy-dom, all three engines) and npm run bench:browser
(Playwright Chromium, the two ESM engines). Honest numbers recorded in
docs/v8.md: we create ~12% faster than µhtml in real Chromium (the
parse-once/clone design), µhtml updates in place ~5x faster than
fresh-tree + nanomorph (choo's architectural cost, mitigated by component
caching), and server strings are on par with nanohtml v1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
2026-09-08 17:59:53 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 63b56144a5 test(e2e): real-browser pass in Playwright Chromium
Three end-to-end scenarios against a static+SSR test server: the
zero-build page (import map + native ESM, no bundler), the SSR page
(rendered content in the raw response, live after hydration, no mismatch
warnings), and adoption (an expando on the server-rendered node survives
a real render). Renders are raf-batched so assertions poll.

Real Chromium flushed out three fixes happy-dom couldn't see:
- nanoraf called an extracted requestAnimationFrame bare — Illegal
  invocation under strict-mode ESM (sloppy CJS had masked it); wrapped.
- the counter example only routed '/', so serving it from any subpath
  threw; it now has a wildcard fallback.
- hydration mismatch detection is now whitespace-insensitive (the parser
  reparents whitespace, e.g. text after </body>), and page scripts belong
  in <head> when a view owns <body> — same convention bankai v9 used.

CI gets an e2e job with chromium-headless-shell.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
2026-09-08 17:57:27 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 84230b1770 feat(html): browser renderer — runtime-cached tagged templates
Each template literal parses once, keyed by its strings array in a
WeakMap: static parts become a <template> with hole markers, renders
clone and fill. Interpolated values never pass through innerHTML (child
values become text nodes or adopted DOM; attributes go through
setAttribute). Event handlers set as properties so nanomorph copies them.
Document-level roots (<body>/<head>/<html>) parse via DOMParser because
<template> drops them. Replaces the v7 browserify transform entirely —
production speed is now a runtime property.

Tests run in happy-dom (new devDependency), including a check that server
and browser renderers serialize identical markup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NgfSjHE11oFpoSnLVKLXd
2026-09-08 16:56:53 +02:00
Bendik Aagaard LynghaugandClaude Fable 5 3d6b474621 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
2026-09-08 15:59:26 +02:00
Renée Kooi 276b07043c 7.1.0 2020-01-23 18:13:33 +01:00
Renée Kooi 2893de86d0 Type improvements (#706)
* use nanobus for the emitter typings

instead of `events`, which is a bit different

* add typings for `cache` option
2020-01-23 18:11:06 +01:00
Bret Comnes 75c6ed6d00 Fix travis stuff 2019-08-14 10:48:33 +02:00
Carl Törnqvist 11aa89d626 7.0.0 2019-08-05 15:46:42 +02:00
Carl Törnqvist 60ed830828 7.0.0-0 2019-06-12 17:25:04 +02:00
Carl Törnqvist 0b4d578f01 Update nanorouter (#701) 2019-06-11 22:51:03 +02:00
alex 555ab4b5f9 Use Object.assign instead of xtend (#616)
As described by #563:

> https://polyfill.io provides a fallback for browsers that don't support it, so for most people this will be a strict improvement.
2019-06-11 22:50:34 +02:00
Carl Törnqvist 3d3b2280f4 6.13.3 2019-04-03 10:53:30 +02:00
Carl Törnqvist a22fca69de Add browser tests (#696) 2019-04-02 14:55:21 +02:00
Carl Törnqvist 5879bdb404 6.13.2 2019-04-02 09:28:02 +02:00
Renée Kooi b9bb656b4c 6.13.1 2018-10-30 12:06:25 +01:00
Renée Kooi d6f6ddb884 Fix inspect script (#654)
`discify` is a different module than intended. discify is an alternative
to disc that works as a plugin, but we were using it as a separate
command line program. This switches it out for disc. The disc command
line program is called `discify` which is probably where the confusion
came from.

Also swapped out unassertify and uglifyify for tinyify, which adds tree
shaking.
2018-10-14 11:06:00 +02:00
Carl Törnqvist 48b19a6654 6.13.0 2018-07-12 12:36:36 +02:00
Carl Törnqvist 6513f4288f Add hash option (#667)
* Add hash option

* Avoid unecessary scroll into view-call

* Update readme with hash option

* Fix typo

* Remove nanolocation dep

* Default hash option to true
2018-07-12 11:29:31 +02:00
Renée Kooi c3a640182c 6.12.1 2018-06-13 15:46:09 +02:00
Renée Kooi ac92939c84 6.12.0 2018-06-13 15:43:19 +02:00
Yerko Palma 1d9b544626 update dependencies (#663) 2018-06-05 10:44:46 -04:00
alex b0cdb6cd63 Build for UMD (#617)
* Build for UMD

8 characters. See choojs/choo#537

* Export UMD as 'Choo' instead, export choo/html also

* Don't export choo/html in all circumstances
2018-05-23 10:28:38 +02:00
Yoshua Wuyts 4ee1e774d3 6.11.0 2018-05-22 10:58:41 +02:00
Renée Kooi 948a4f8a26 Use nanoassert in the browser (#651) 2018-04-04 12:29:01 +02:00
Renée Kooi 4f50c0ae34 Switch to nanohtml (#644) 2018-04-04 12:28:49 +02:00
Yoshua Wuyts 4c6985c819 v6.11.0-preview1 2018-03-30 18:49:08 +02:00
Yoshua Wuyts bddcfbe838 choo components (#639)
* add components

* example: componentize header

* fix choo SSR

* example: componentize footer

* example: fix footer

* update component cache asserts

* componentize todos

* reorder example dir

* fix example tests

* fix dep check test

* Add garbage collection of unused components

* Apply args when calling identity

* update to new component preview

* update nanocomponent

* fix cache err name

* remove static methods from example

* restore app.emit() function

* public API tests

* offset component cache iteration by 2

* whitelist contents of component folder (#643)

* allow lru number arg

* fix lint typo
2018-03-30 18:19:06 +02:00
Yoshua Wuyts 357d50871e 6.10.3 2018-03-14 12:25:47 +01:00
Yoshua Wuyts 74b5f9418e 6.10.2 2018-03-14 12:21:30 +01:00
Renée Kooi 3e95bbdf3c 6.10.1 2018-03-08 23:31:41 +01:00
Yoshua Wuyts 7a86ae8155 6.10.0 2018-03-07 13:21:15 +01:00
Nate Goldman 4251a14015 6.9.0 2018-03-05 15:56:04 -08:00
Nate Goldman cf1f99b94a add support for hyperscript in choo.toString (#635)
* add failing test for hyperscript (#634)

* add support for hyperscript in choo.toString (#634)
2018-03-05 08:11:07 -08:00
Renée Kooi 8937832d5f 6.8.0 2018-02-14 12:52:44 +01:00
Nick Nikolov 658a399e18 Update nanotiming (#628)
In order to resolve https://github.com/choojs/nanotiming/issues/13 in
choo
2018-02-13 22:08:38 +01:00
Yoshua Wuyts 796d41a51b 6.7.0 2018-01-18 00:01:11 +01:00
Marc Bachmann cf8c316189 Separate route matching from rendering (#613)
- This fixes https://github.com/choojs/choo/issues/530
- Adds support for wayfarer/nanorouter subrouters
2018-01-17 23:58:42 +01:00
Yoshua Wuyts 2dab1b593d 6.6.1 2017-12-28 22:18:16 +01:00
Yoshua Wuyts 3c41236669 6.6.0 2017-11-15 12:45:16 +01:00
Yoshua Wuyts ae02900184 use tinyify (#595) 2017-11-01 15:35:03 +01:00
Renée Kooi 2576e2d9ed update repo url (#594) 2017-10-31 12:36:06 +01:00
Yoshua Wuyts b4e561cba1 6.5.1 2017-10-22 15:24:53 +02:00
Yoshua Wuyts 606bfbf0bb 6.5.0 2017-10-20 16:31:23 +02:00
Yoshua Wuyts 2f970403d5 6.4.4 2017-10-20 15:45:46 +02:00