feat(deno): migrate mvt/ Bun → Deno (Class A, standards#253 longtail)#53
Merged
Merged
Conversation
… 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
enabled auto-merge (squash)
May 31, 2026 07:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 themvt/package.jsonBun-runner scripts.Changes
mvt/deno.json(new) — Deno-native tasks fortest/test:watch/serve/dev+ fmt/lint config.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)withDeno.errors.NotFoundcatch (idiomatic Deno file-serve)mvt/package.json(deleted) — was Bun-only, no deps; justbun test+bun src/server.jsscripts.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 testruns the public-goods kernel test suite (usesnode:testwhich Deno supports natively)deno task servestarts the static server on port 5173 (default) or$PORTcurl http://localhost:5173/returns the UI index.htmlcurl http://localhost:5173/../etc/passwdreturns 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