ci: run the JSR gate on every push, not only on a release tag
release.yml has always run `deno publish --dry-run` before publishing to either registry, and keeps doing so — that copy is the last thing standing between a tag and a JSR version number that can never be replaced. It runs too late to be feedback, though. A slow type in the public API or a Deno type error lands on main in silence and surfaces while cutting a release, which is the same "least time to judge a fix" the audit steps are already ordered to avoid. The workflow made that argument for advisories and not for the registry that type-checks us. This matters more in the next few commits than it did in the last hundred: Task 2.5 adds Hooks, TeardownFn and PluginApi.onShutdown, and exported types are exactly what the slow-types check polices. It is a second compiler over the same source rather than a packaging formality. `npm run typecheck` is tsc with this repo's config; this is Deno's checker with Deno's lib, and it is what found the BodyInit hole on the fetch path that tsc accepted. JSR serves src/ directly, so what it rejects is what a JSR consumer would have received. Measured at 0.68s against 2.0s for the whole vitest suite, so it goes in the runtimes job's Deno leg, which already installs Deno. test:all covers the same ground locally. npm test stays Node-only on purpose — it is the loop you run constantly, and booting three more runtimes into it would tax every run to catch what CI already catches on every push. Verified end to end: 393 vitest, 9 Deno, 5 Bun, edge, and the dry run, in 6.1s. It passes --allow-dirty and CI does not, deliberately: locally you are checking work in progress, and in CI a checkout that is not clean is worth failing on. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
3 files changed
+29
-1
No files matched your search
@@ -259,7 +259,8 @@ green-tea is **beta**, on the road to a release candidate. Express and Fastify h
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm test # vitest (Node only — CI additionally runs the three below on every push)
|
||||
npm test # vitest (Node only) — the fast loop, ~2s
|
||||
npm run test:all # everything below, plus the JSR gate — the pre-push check
|
||||
npm run test:deno # deno test } a change to shared code can pass `npm test`
|
||||
npm run test:bun # bun test } and still be broken on one of these
|
||||
npm run test:edge # workerd via miniflare
|
||||
@@ -268,6 +269,16 @@ npm run build # emit dist/ (tsup: dual ESM + CJS)
|
||||
npm run bench # regenerate BENCHMARKS.md
|
||||
```
|
||||
|
||||
`npm test` stays Node-only on purpose: it is the loop you run constantly, and booting Deno, Bun and
|
||||
workerd into it would tax every run to catch what CI already catches on every push. Nothing here is
|
||||
unguarded — the `runtimes` job runs all three, and `deno publish --dry-run` gates JSR. `test:all` is
|
||||
for the moment before you push, when you would rather find out locally.
|
||||
|
||||
That last one is a second type-checker, not a packaging formality: `npm run typecheck` is `tsc` with
|
||||
this repository's config, while `deno publish --dry-run` is Deno's checker with Deno's lib plus JSR's
|
||||
slow-types rules over the public API. JSR serves `src/` directly, so what it rejects is what a JSR
|
||||
consumer would have received.
|
||||
|
||||
## Roadmap
|
||||
|
||||
- ✅ **transport security** — native TLS/wss, CORS, secure-by-default headers, `trustProxy`.
|
||||
|
||||
Reference in new issue
Block a user