Commit Graph
3 Commits
Author SHA1 Message Date
chrnx 18270779fc ci(api): commit an API report per entry point and fail CI on drift
CI / dco (pull_request) Successful in 6s
CI / runtimes (bun) (pull_request) Successful in 20s
CI / build (pull_request) Successful in 32s
CI / runtimes (edge) (pull_request) Successful in 23s
CI / runtimes (deno) (pull_request) Failing after 34s
CARD-22 / D20. api-extractor 7.59.4 is now a dev dependency.
scripts/api-report.mjs reads the declarations that tsup emits for each
export-map entry (".", "./deno", "./bun", "./edge") and writes
api/<entry>.api.md.

`npm run api` regenerates the reports. `npm run api:check` runs in the
CI build job and fails when a report differs from the build, so a
public type change has to arrive with its regenerated report in the
same PR.

The check also fails on ae-forgotten-export: a public signature that
names a type its entry does not export. In the adapter entries, a root
type such as App or Logger is accepted, because it is importable from
@green-tea/core; any other unexported type still fails. Both failure
paths were verified locally, by adding a field to TlsOptions and by
un-exporting DenoServeOptions.

The reports are not published: npm ships dist/ and JSR ships src/.
CONTRIBUTING documents the check and the additions-only rule.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-10-30 09:31:12 -05:00
chrnx 0fad12688d ci(release): publish the release notes, not just the tag
CI / dco (pull_request) Successful in 4s
CI / runtimes (bun) (pull_request) Successful in 13s
CI / build (pull_request) Successful in 24s
CI / runtimes (edge) (pull_request) Successful in 12s
CI / runtimes (deno) (pull_request) Successful in 18s
The repository had two tags and no releases, so the only way to find out what
a version changed was to open CHANGELOG.md and scroll to the right heading.
The release page is where people who do not read changelogs look, and a
repository with tags and no releases reads as abandoned.

Notes come from CHANGELOG.md rather than from the commit range. The section
was written for humans and already exists by the time a tag is cut; generated
notes would restate merge subjects nobody chose. `scripts/changelog-section.mjs`
extracts one version's section and makes its relative links absolute against
the tag — a release body resolves them against the release page, not the
repository, so `./BENCHMARKS.md` would have 404'd.

That script is a parser writing text that cannot be corrected quietly once it
is published, so its boundaries are pinned by a test rather than checked by
eye at release time. Both of the bugs it caught while being written are in
there: a section swallowing the `[label]: url` block that follows the oldest
version, and a relative link surviving into a body.

The step is idempotent like the publishes before it, so a re-run finishes what
is left instead of stopping here, and `--verify-tag` keeps it from inventing a
tag — it attaches to the one that triggered the run and cannot move it. A
prerelease is marked as one, which is what keeps the "Latest" badge off a beta.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-08-19 14:31:05 -05:00
chrnx 3ca4c8680e chore(qa): add ESLint, Prettier, and a cognitive-complexity gate
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>
2026-07-07 11:59:42 -05:00