Do not merge until @green-tea/core RC.1 is published.add cookie uses @cookie and setCookie(), which are new in RC.1. Against the published beta.2, the starter smoke fails with TS2305: no exported member 'cookie'. Once RC.1 is out, this branch also takes the CORE_VERSION bump and drops the edge starter's JSR alias (core#93), and WIP: comes off the title.
What it adds
matcha add cookie:
GET /prefs reads the cookie with @cookie('theme').
POST /prefs sets it through @Transformer and setCookie(), encoding the value. Core has no response-cookie API.
matcha create transformer <Name>: writes src/transformers/<name>.transformer.ts (a typed TransformerFn) and prints the @Transformer(...) line that attaches it. Nothing is wired into a module, since a transformer belongs to a route.
starter-smoke.sh covers both.
Verification
cargo test passes, with new tests for add cookie (including idempotency) and create transformer.
The starter smoke ran against the RC.1 candidate (core df2e4b4, packed) and passed on node, bun, edge and deno.
The starter smoke against the published beta.2 fails on node, as expected (see above).
**Do not merge until `@green-tea/core` RC.1 is published.** `add cookie` uses `@cookie` and `setCookie()`, which are new in RC.1. Against the published beta.2, the starter smoke fails with `TS2305: no exported member 'cookie'`. Once RC.1 is out, this branch also takes the `CORE_VERSION` bump and drops the edge starter's JSR alias (core#93), and `WIP:` comes off the title.
## What it adds
- `matcha add cookie`:
- `GET /prefs` reads the cookie with `@cookie('theme')`.
- `POST /prefs` sets it through `@Transformer` and `setCookie()`, encoding the value. Core has no response-cookie API.
- `matcha create transformer <Name>`: writes `src/transformers/<name>.transformer.ts` (a typed `TransformerFn`) and prints the `@Transformer(...)` line that attaches it. Nothing is wired into a module, since a transformer belongs to a route.
- `starter-smoke.sh` covers both.
## Verification
- `cargo test` passes, with new tests for `add cookie` (including idempotency) and `create transformer`.
- The starter smoke ran against the RC.1 candidate (core `df2e4b4`, packed) and passed on node, bun, edge and deno.
- The starter smoke against the published beta.2 fails on node, as expected (see above).
add cookie reads a cookie with @cookie and sets one through a
@Transformer and setCookie, since core sends Set-Cookie only as a
header. create transformer writes a typed TransformerFn and prints how to
attach it; there is nothing to wire into a module. starter-smoke now
covers both.
add cookie uses @cookie and setCookie, which are new in core RC.1, so
this lands together with the CORE_VERSION bump.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
core#93 is fixed in RC.1: the npm ESM build's createRequire banner no longer throws on workerd, so the edge starter drops its .npmrc and the npm:@jsr alias and installs @green-tea/core from npm like every other runtime. doctor still reads the alias, so edge projects scaffolded before this keep working.
The weekly core-freshness job compares against core's latest dist-tag: release candidates and the stable release publish there, and beta stays on 26.9.0-beta.2.
Starter smoke passes locally on node, deno, bun and edge. Deno needs --minimum-dependency-age=0 until RC.1 is a day old.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
chrnx
marked the pull request as ready for review 2026-11-17 23:35:26 +00:00
chrnx
merged commit 04d7a25402 into develop2026-11-17 23:35:30 +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.
Do not merge until
@green-tea/coreRC.1 is published.add cookieuses@cookieandsetCookie(), which are new in RC.1. Against the published beta.2, the starter smoke fails withTS2305: no exported member 'cookie'. Once RC.1 is out, this branch also takes theCORE_VERSIONbump and drops the edge starter's JSR alias (core#93), andWIP:comes off the title.What it adds
matcha add cookie:GET /prefsreads the cookie with@cookie('theme').POST /prefssets it through@TransformerandsetCookie(), encoding the value. Core has no response-cookie API.matcha create transformer <Name>: writessrc/transformers/<name>.transformer.ts(a typedTransformerFn) and prints the@Transformer(...)line that attaches it. Nothing is wired into a module, since a transformer belongs to a route.starter-smoke.shcovers both.Verification
cargo testpasses, with new tests foradd cookie(including idempotency) andcreate transformer.df2e4b4, packed) and passed on node, bun, edge and deno.