Skip to content

feat: docs/brand polish, runtime portability hardening, and monorepo restructure#6

Merged
rqbazan merged 7 commits into
mainfrom
feat/docs-polish-and-brand-pack
May 16, 2026
Merged

feat: docs/brand polish, runtime portability hardening, and monorepo restructure#6
rqbazan merged 7 commits into
mainfrom
feat/docs-polish-and-brand-pack

Conversation

@rqbazan

@rqbazan rqbazan commented May 16, 2026

Copy link
Copy Markdown
Member

Summary

Two parallel tracks landed on this branch:

  1. Library — runtime portability hardening + brand/docs polish. Tracked in .changeset/*.md (5 changesets).
  2. Monorepo restructure — adopt mise as the single task orchestrator, drop turbo, and make every examples/* truly runtime-isolated. Pure tooling/docs work — package/src/ untouched, no changeset needed.

Library changes (see changesets for details)

  • readEnv() falls back to {} when process is undeclared (Workers without nodejs_compat, Edge)
  • lodash.mergedefu — fixes silent shallow-merge regression on V8 isolate runtimes
  • <ClientEnv /><EnvScript /> in @vlandoss/env/react
  • @vlandoss/env/node entrypoint → @vlandoss/env/fs
  • README + docs polish (brand v2, typography, codeblock theme)

Monorepo restructure

  • mise as the single task API. Root package.json and per-example package.json carry no scripts; everything is a mise run <task>. Same contract for devs and CI.
  • Runtime-isolated examples. examples/* left the pnpm workspace. Each one declares its own runtime + package manager in mise.toml, has its own lockfile, its own biome.json, and consumes @vlandoss/env from a tarball generated by mise run env:pack. No more workspace cheating — each example is a real consumer.
  • Turbo dropped. Workspace shrunk to package + docs; turbo brought no value at that scale. lefthook.yml inlined (no longer pulls the turborepo preset).
  • CI on jdx/mise-action@v2 in both workflows; the e2e matrix uses working_directory: examples/<name> so each job provisions only the runtime that example needs.
  • 9 examples green via mise run test:e2e: 38 tests across Node, Bun, Deno, Cloudflare Workers, Next.js Edge, 2 Vite SPAs, React Router 7, TanStack Start.

New docs

  • CONTRIBUTING.md — branch / commit / changeset conventions, PR checklist, release flow
  • DEVELOPMENT.md — setup, mise tasks reference, the two-layer model (pnpm workspace for lib+docs, mise-isolated examples), troubleshooting
  • Root README.md slimmed; examples/README.md rewritten around the isolation model

Test plan

  • mise install && mise run setup from a cold clone provisions all runtimes, packs the lib, installs every example
  • mise run test:e2e — 38 tests passed across the 9 examples
  • mise run test:static — biome + tsc clean across package + docs
  • mise run examples:test:static — biome + tsc clean across all 9 examples
  • mise run lib:test — vitest unit tests green (81 passed)
  • mise run docs — docs site dev server boots
  • CI green (ci.yml + e2e.yml matrix)

🤖 Generated with Claude Code

rqbazan and others added 7 commits May 15, 2026 20:00
…restructure

Squash of two parallel tracks on this branch:

LIBRARY (changesets cover details — see .changeset/*.md)
- readEnv() falls back to {} when `process` is undeclared so isolate
  runtimes (Workers without nodejs_compat, Edge) work out of the box
- replace lodash.merge with defu — fixes silent shallow-merge regression
  on V8 isolate runtimes where lodash isPlainObject collapses across realms
- rename <ClientEnv /> → <EnvScript /> in @vlandoss/env/react
- rename @vlandoss/env/node entrypoint → @vlandoss/env/fs
- README + docs polish (tone, brand v2, typography, codeblock theme)

MONOREPO TOOLING
- adopt mise as the single task orchestrator; drop turbo
- examples/* leave the pnpm workspace and become runtime-isolated:
  each one declares its own runtime (node/bun/deno/wrangler) and
  package manager (pnpm/bun) in its own mise.toml, has its own
  lockfile, its own biome.json, and consumes @vlandoss/env from a
  packed tarball generated by `mise run env:pack`
- pnpm workspace reduced to package + docs
- root package.json carries no scripts — mise is the only task API
- per-example package.json carries no scripts — mise is the only task API
- lefthook.yml inlined (no longer pulls turborepo preset)
- CI migrated to jdx/mise-action@v2 in both workflows

EXAMPLES
- 9 examples, each runtime-isolated, each green via `mise run test:e2e`
- backend-node: pnpm
- backend-bun: bun
- backend-deno: bun (deno's package manager can't extract local
  file: tarballs; bun does it cleanly with a flat layout deno can read
  via nodeModulesDir: "manual")
- 6 web/edge examples: pnpm

DOCS
- root README slimmed
- new CONTRIBUTING.md (branch / commit / changeset conventions, PR flow)
- new DEVELOPMENT.md (setup, mise tasks reference, troubleshooting,
  the two-layer model: pnpm workspace for lib+docs, mise-isolated examples)
- examples/README.md rewritten around the runtime-isolation model

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The package has browser-mode vitest tests for the React component (via
@vitest/browser-playwright + chromium). Before the monorepo restructure
they worked because `playwright` was a root devDep and pnpm hoisted it.
After moving playwright to per-example devDeps, the package lost access
to the browser binary and `mise run lib:test` started failing in CI.

- package/package.json: add `playwright` 1.59.1 as devDep
- .github/workflows/ci.yml: install Chromium before `mise run lib:test`
- lefthook.yml: simplify tscheck to `pnpm rr tsc` (workspace-recursive)
  and widen the glob to `{package,docs}/**` so docs type regressions
  are caught pre-commit too

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…mple

`pnpm pack` produces a non-deterministic tarball (mtime / platform-dependent
gzip bytes), so the integrity hash committed in each example's pnpm-lock.yaml
won't match the hash of a freshly packed tarball in CI. The default
`--frozen-lockfile` in CI then aborts with ERR_PNPM_TARBALL_INTEGRITY.

The tarball is ephemeral by design — `mise run env:pack` regenerates it
on every install. `--no-frozen-lockfile` keeps the rest of the lockfile
pinned (hono, react, vite, etc.) but lets pnpm refresh the local tarball
hash silently. CI doesn't commit the mutation, so the committed lockfile
stays as the canonical snapshot.

bun-based examples (backend-bun, backend-deno) were not affected —
bun doesn't verify the hash of a local `file:` tarball the same way.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tier limit

Replace fumadocs-core/highlight in the landing-page server fn with a
shiki/core highlighter that only loads the typescript grammar and the
vitesse-dark theme. The previous import pulled the full shiki bundle
(~300 language grammars) into the SSR closure, which alone exceeded
the Worker size limit.

Also drop Mermaid: the single <Mermaid /> usage in concepts/overview
is replaced by a plain ASCII flow, and the component plus the mermaid
dep are removed — that lifts cytoscape, dagre, graphlib and the whole
diagram chunk set out of the Worker.

Worker size (gzip): 3.65 MiB → 820 KiB.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vland-bot

vland-bot Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

Preview release

Latest commit: 2ff9359

Some packages have been released:

Package Version Install
@vlandoss/env v0.1.3-git-2ff9359.0 @vlandoss/env@v0.1.3-git-2ff9359.0

Note

Use the PR number as tag to install any package. For instance:

pnpm add @vlandoss/env@pr-6

@rqbazan
rqbazan merged commit d150a70 into main May 16, 2026
12 of 13 checks passed
@rqbazan
rqbazan deleted the feat/docs-polish-and-brand-pack branch May 16, 2026 06:36
@vland-bot vland-bot Bot mentioned this pull request May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant