The project shipped no linting or formatting; add both ahead of the first
npm publish. ESLint (flat config, typescript-eslint) + Prettier enforce a
consistent style, and a cognitive-complexity gate (ccts, threshold 25)
keeps any function from regressing into the unreadable.
Both run in CI and in a pre-commit hook (.githooks, enabled via
core.hooksPath + the `prepare` script). Cyclomatic complexity stays
advisory-only — its ??-chain false positives make it a poor gate.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Packaging was broken for consumers: `main` resolved to a nonexistent
dist/index.js (tsc emitted dist/src/index.js), and the tarball shipped
tests, benches and sources. Build with tsup to emit CJS + ESM (+ types)
behind an `exports` map so `require` and `import` both resolve; a
createRequire banner keeps the lazy require('ws')/require('busboy') working
under ESM. Add the `files` allowlist and a `prepublishOnly` gate.
Bump to the first CalVer beta, published under the npm `beta` dist-tag.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Restructure first: split the two oversized files by cohesion (http.ts 449
→ http/{router,request,stream,ws,server,types}; app.ts 556 → app/{types,
introspect,index}), rename cryptic locals, JSDoc the public API, and
extract helpers so no function exceeds the complexity gate (createApp
187 → <15, listen 113 → 6). Public import paths are unchanged (barrels).
On that structure, five features that close the biggest gaps vs
Express/Fastify/Nest for a comparable beta:
- routing: `:name*` catch-all, specificity precedence (static ▸ param ▸
catch-all, not registration order), and 405 + Allow when a path exists
under a different method (was 404)
- visible degradation: optional providers that fail boot are summarized on
listen() and queryable via app.degraded(), instead of a silent warn
- mesh is alpha — gated behind `experimental: true`; createApp throws if
`mesh` is configured without it
- multipart moves to the optional `busboy` peer dependency (clear 501 when
absent), keeping the core at one runtime dependency
- `@header('name')` as a singular alias of `@headers`
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Bring the README in line with what shipped and fill the gaps a technical
reader comparing frameworks needs: the busboy peer dep and dual build, a
Routing section with its limits, an explicit "bring your own auth" scope
note, why legacy decorators is a design choice (not laziness), and CalVer
beta versioning.
Add a full Astro Starlight docs site under website/ — getting started,
concepts, per-feature guides, and an API reference — migrated from the
tested quickstart so the examples stay accurate.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
chrnx
merged commit 40d3390ddb into develop2026-07-07 20:21:31 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Packaging was broken for consumers: `main` resolved to a nonexistent dist/index.js (tsc emitted dist/src/index.js), and the tarball shipped tests, benches and sources. Build with tsup to emit CJS + ESM (+ types) behind an `exports` map so `require` and `import` both resolve; a createRequire banner keeps the lazy require('ws')/require('busboy') working under ESM. Add the `files` allowlist and a `prepublishOnly` gate. Bump to the first CalVer beta, published under the npm `beta` dist-tag. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>Restructure first: split the two oversized files by cohesion (http.ts 449 → http/{router,request,stream,ws,server,types}; app.ts 556 → app/{types, introspect,index}), rename cryptic locals, JSDoc the public API, and extract helpers so no function exceeds the complexity gate (createApp 187 → <15, listen 113 → 6). Public import paths are unchanged (barrels). On that structure, five features that close the biggest gaps vs Express/Fastify/Nest for a comparable beta: - routing: `:name*` catch-all, specificity precedence (static ▸ param ▸ catch-all, not registration order), and 405 + Allow when a path exists under a different method (was 404) - visible degradation: optional providers that fail boot are summarized on listen() and queryable via app.degraded(), instead of a silent warn - mesh is alpha — gated behind `experimental: true`; createApp throws if `mesh` is configured without it - multipart moves to the optional `busboy` peer dependency (clear 501 when absent), keeping the core at one runtime dependency - `@header('name')` as a singular alias of `@headers` Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>