Commit d1c04c0
feat(deno): migrate mvt/ Bun → Deno (Class A, standards#253 longtail) (#53)
## Summary
Class A — pure-Deno port. The only Bun-specific code was
`mvt/src/server.js` (35 lines, `Bun.serve` + `Bun.file` + `Bun.env`)
plus the `mvt/package.json` Bun-runner scripts.
## Changes
1. **`mvt/deno.json`** (new) — Deno-native tasks for
`test`/`test:watch`/`serve`/`dev` + fmt/lint config.
2. **`mvt/src/server.js`** — Bun → Deno API port:
- `Bun.env.PORT` → `Deno.env.get("PORT")`
- `Bun.serve({port, fetch})` → `Deno.serve({port}, fetch)`
- `Bun.file(url).exists() + new Response(file)` → `await
Deno.readFile(url)` with `Deno.errors.NotFound` catch (idiomatic Deno
file-serve)
3. **`mvt/package.json`** (deleted) — was Bun-only, no deps; just `bun
test` + `bun src/server.js` scripts.
Tests use `node:test` + `node:assert/strict`, both supported by Deno
natively without flags — no test-file changes needed.
The path-traversal guard (`fileUrl.pathname.startsWith(root.pathname)`)
is preserved unchanged.
## Test plan
- [ ] `deno task test` runs the public-goods kernel test suite (uses
`node:test` which Deno supports natively)
- [ ] `deno task serve` starts the static server on port 5173 (default)
or `$PORT`
- [ ] `curl http://localhost:5173/` returns the UI index.html
- [ ] `curl http://localhost:5173/../etc/passwd` returns 403
(path-traversal guard intact)
Per per-repo follow-up tracker for standards#253 (campaign closed
2026-05-31, longtail tracked in
`project_estate_npm_to_deno_2026_05_28.md`).
Refs hyperpolymath/standards#253.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6905e26 commit d1c04c0
3 files changed
Lines changed: 38 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
18 | 16 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
27 | 20 | | |
| 21 | + | |
| 22 | + | |
28 | 23 | | |
29 | 24 | | |
30 | 25 | | |
31 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments