Skip to content

feat(deno): migrate mvt/ Bun → Deno (Class A, standards#253 longtail)#53

Merged
hyperpolymath merged 1 commit into
mainfrom
campaign-253/migrate-mvt-bun-to-deno
May 31, 2026
Merged

feat(deno): migrate mvt/ Bun → Deno (Class A, standards#253 longtail)#53
hyperpolymath merged 1 commit into
mainfrom
campaign-253/migrate-mvt-bun-to-deno

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

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.PORTDeno.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

… longtail)

Class A — pure-Deno port. Three changes:

1. Add `mvt/deno.json` with deno-native tasks (test/serve/dev). Tests
   use `node:test` (which Deno supports natively); serve uses
   `Deno.serve` + `Deno.readFile`.

2. Port `mvt/src/server.js`:
   - `Bun.env.PORT` → `Deno.env.get("PORT")`
   - `Bun.serve({port, fetch})` → `Deno.serve({port}, fetch)` (Deno API)
   - `Bun.file(url).exists() + new Response(file)` → `await Deno.readFile(url)` with `Deno.errors.NotFound` catch (Deno's idiomatic file-serve pattern)

3. Delete `mvt/package.json` (was Bun-only; no deps, only `test` +
   `serve` scripts).

Tests use `node:test` + `node:assert/strict`, both of which Deno
supports natively without flags. The path-traversal guard
(`fileUrl.pathname.startsWith(root.pathname)`) is preserved.

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.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath
hyperpolymath enabled auto-merge (squash) May 31, 2026 07:23
@hyperpolymath
hyperpolymath merged commit d1c04c0 into main May 31, 2026
21 of 24 checks passed
@hyperpolymath
hyperpolymath deleted the campaign-253/migrate-mvt-bun-to-deno branch May 31, 2026 07:33
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