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
This commit is contained in:
Bendik Aagaard Lynghaug
2026-09-08 19:55:20 +02:00
co-authored by Claude Fable 5
parent b957b02410
commit ce1ec9e4a9
42 changed files with 447 additions and 171 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
// Ported from choo 7.1.0 index.js (MIT) — https://github.com/choojs/choo
// Same API, same event flow; ESM, consolidated nano* internals in ./lib.
import morph from '@choojs/html/morph'
import hydrate from '@choojs/html/hydrate'
import morph from '@uhhm/buuh-html/morph'
import hydrate from '@uhhm/buuh-html/hydrate'
import nanotiming from './lib/timing.js'
import Nanorouter from './lib/router.js'
import Nanobus from './lib/bus.js'
+3 -3
View File
@@ -1,5 +1,5 @@
{
"name": "@choojs/core",
"name": "@uhhm/buuh",
"version": "8.0.0-dev",
"description": "A 4kb framework for creating sturdy frontend applications",
"type": "module",
@@ -15,9 +15,9 @@
"node": ">=24"
},
"dependencies": {
"@choojs/html": "*"
"@uhhm/buuh-html": "*"
},
"repository": "choojs/choo",
"repository": "https://project.uhhm.no/uhhm/buuh",
"keywords": [
"client",
"frontend",
@@ -12,8 +12,8 @@ before(async () => {
globalThis.window = win
globalThis.document = win.document
globalThis.requestAnimationFrame = win.requestAnimationFrame.bind(win)
;({ default: choo } = await import('@choojs/core'))
;({ default: html } = await import('@choojs/html/browser'))
;({ default: choo } = await import('@uhhm/buuh'))
;({ default: html } = await import('@uhhm/buuh-html/browser'))
})
const tick = (ms = 30) => new Promise((resolve) => setTimeout(resolve, ms))
+4 -4
View File
@@ -5,11 +5,11 @@
import { test } from 'node:test'
import assert from 'node:assert'
import html from '@choojs/html'
import raw from '@choojs/html/raw'
import choo, { Choo } from '@choojs/core'
import html from '@uhhm/buuh-html'
import raw from '@uhhm/buuh-html/raw'
import choo, { Choo } from '@uhhm/buuh'
test('should render on the server with @choojs/html', () => {
test('should render on the server with @uhhm/buuh-html', () => {
const app = choo()
app.route('/', function (state, emit) {
const strong = '<strong>Hello filthy planet</strong>'
@@ -12,15 +12,15 @@ let choo, browserHtml, serverString
before(async () => {
// Server side first, before any window exists — exactly like production,
// and toString() enforces it.
;({ default: choo } = await import('@choojs/core'))
const { default: serverHtml } = await import('@choojs/html/server')
;({ default: choo } = await import('@uhhm/buuh'))
const { default: serverHtml } = await import('@uhhm/buuh-html/server')
serverString = makeApp(serverHtml).toString('/')
const win = new Window({ url: 'http://localhost/' })
globalThis.window = win
globalThis.document = win.document
globalThis.requestAnimationFrame = win.requestAnimationFrame.bind(win)
;({ default: browserHtml } = await import('@choojs/html/browser'))
;({ default: browserHtml } = await import('@uhhm/buuh-html/browser'))
})
const tick = (ms = 30) => new Promise((resolve) => setTimeout(resolve, ms))
+2 -2
View File
@@ -13,8 +13,8 @@ before(async () => {
globalThis.window = win
globalThis.document = win.document
globalThis.requestAnimationFrame = win.requestAnimationFrame.bind(win)
;({ default: choo, lazy } = await import('@choojs/core'))
;({ default: html } = await import('@choojs/html/browser'))
;({ default: choo, lazy } = await import('@uhhm/buuh'))
;({ default: html } = await import('@uhhm/buuh-html/browser'))
})
const tick = (ms = 30) => new Promise((resolve) => setTimeout(resolve, ms))
+2 -2
View File
@@ -3,8 +3,8 @@
import { test } from 'node:test'
import assert from 'node:assert'
import html from '@choojs/html'
import choo, { lazy } from '@choojs/core'
import html from '@uhhm/buuh-html'
import choo, { lazy } from '@uhhm/buuh'
const wait = (ms, value) => new Promise((resolve) => setTimeout(() => resolve(value), ms))
+2 -2
View File
@@ -4,8 +4,8 @@
import { test } from 'node:test'
import assert from 'node:assert'
import html from '@choojs/html'
import choo from '@choojs/core'
import html from '@uhhm/buuh-html'
import choo from '@uhhm/buuh'
function view (state) {
return html`<div></div>`