Author SHA1 Message Date
chrnx 49384163e3 chore(release): 26.11.0-rc.2
CI / dco (pull_request) Successful in 3s
CI / build (pull_request) Successful in 13s
CI / runtimes (bun) (pull_request) Successful in 20s
CI / runtimes (deno) (pull_request) Successful in 10s
CI / runtimes (edge) (pull_request) Successful in 8s
Versions track core, so all three packages move from 26.9.0-beta.0 to 26.11.0-rc.2. That core
release fixes nine security advisories reported against rc.1. The range floor follows it:
deno.json imports ^26.11.0-rc.2, and the core devDependency (and so the tested core) is 26.11.0-rc.2.

Refs: Expressive-Tea/green-tea#73
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-11-23 12:41:40 -06:00
chrnx d923ae04fb chore(deps-dev): npm audit fix (typescript-eslint)
Lockfile-only update that clears the moderate typescript-eslint advisories. The five left are
under cognitive-complexity-ts, which npm can only "fix" by downgrading it to 0.6.5. All of them
are dev tooling; nothing here ships to JSR.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-11-23 12:24:45 -06:00
chrnx 3e55a1c081 chore: depend on a core range, ^26.11.0-rc.1
Each plugin's deno.json imported an exact npm:@green-tea/core@26.9.0-beta.2.
JSR consumers resolve that import, so an application on a newer core
got a second, older copy under the plugin. Plugins import core as types
only, so it never ran, but tsc could resolve a plugin's Plugin type
against it.

Import ^26.11.0-rc.1 instead: the floor is the core the tests run
against, now rc.1 (devDependency and lockfile bumped), and ^ stops at
the next year, the only core release that may break under core's
versioning policy. The workspace test now requires that range shape,
and the README no longer says no range can express compatibility.

Refs: Expressive-Tea/green-tea#73
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-11-20 00:39:23 -06:00
chrnx cf7d30d8c2 Merge pull request 'test(metrics): read the content-type as string | string[]' (#15) from test/core-rc1-header-arrays into develop
CI / dco (push) Has been skipped
CI / runtimes (bun) (push) Successful in 10s
CI / build (push) Successful in 12s
CI / runtimes (deno) (push) Successful in 10s
CI / runtimes (edge) (push) Successful in 9s
Promote → GitHub / push-github (push) Successful in 7s
2026-10-30 15:55:10 +00:00
chrnx 29b2fa0483 test(metrics): read the content-type as string | string[]
CI / dco (pull_request) Successful in 4s
CI / build (pull_request) Successful in 13s
CI / runtimes (bun) (pull_request) Successful in 10s
CI / runtimes (edge) (pull_request) Successful in 7s
CI / runtimes (deno) (pull_request) Successful in 10s
Core RC.1 widens response header values to string | string[] (core
#113, a documented Breaking change for readers). The metrics test read
the transformer's content-type as a string and fails to typecheck
against the RC.1 candidate. Narrowing with String() also typechecks on
26.9.0-beta.2. Plugin source is unaffected.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-10-30 10:24:34 -05:00
chrnx 5ed24d415b Merge pull request 'ci: move workflow actions off the deprecated Node 20 runtime' (#14) from chore/ci-node24-actions into develop
CI / dco (push) Has been skipped
CI / runtimes (bun) (push) Successful in 10s
CI / build (push) Successful in 12s
CI / runtimes (edge) (push) Successful in 8s
CI / runtimes (deno) (push) Successful in 10s
Promote → GitHub / push-github (push) Successful in 5s
2026-10-18 04:42:13 +00:00
chrnx 9379b58dd8 ci: move workflow actions off the deprecated Node 20 runtime
CI / dco (pull_request) Successful in 4s
CI / runtimes (bun) (pull_request) Successful in 10s
CI / build (pull_request) Successful in 12s
CI / runtimes (edge) (pull_request) Successful in 8s
CI / runtimes (deno) (pull_request) Successful in 10s
actions/checkout and actions/setup-node v4 -> v5, softprops/action-gh-release
v2 -> v3; all three run on Node 24. setup-deno@v2, setup-bun@v2 and
crates-io-auth-action@v1 already resolve to Node 24 releases. Jobs keep
node-version 22.

Refs Green-Tea/core#103

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-10-17 22:55:51 -05:00
chrnx c87dccedd0 Merge pull request 'fix(ci): install bun in the release workflow' (#11) from fix/release-needs-bun into develop
CI / dco (pull_request) Successful in 5s
CI / runtimes (bun) (pull_request) Successful in 12s
CI / dco (push) Has been skipped
CI / build (pull_request) Successful in 13s
CI / runtimes (edge) (pull_request) Successful in 8s
CI / runtimes (deno) (pull_request) Successful in 12s
CI / runtimes (bun) (push) Successful in 10s
CI / runtimes (deno) (push) Successful in 10s
CI / runtimes (edge) (push) Successful in 9s
CI / build (push) Successful in 15s
Promote → GitHub / push-github (push) Successful in 6s
2026-09-23 17:53:05 +00:00
chrnx fc495fa3cb fix(ci): install bun in the release workflow
CI / dco (pull_request) Successful in 4s
CI / build (pull_request) Successful in 14s
CI / runtimes (deno) (pull_request) Successful in 10s
CI / runtimes (bun) (pull_request) Successful in 10s
CI / runtimes (edge) (pull_request) Successful in 9s
`release.yml` runs `npm run test:bun` but never installed bun. `ci.yml` gets
away with one setup action per matrix entry; the release job runs every suite in
the same job, so it needs both.

Leaving it out does not skip the suite. `scripts/run-runtime.mjs` spawns `bun`,
gets `ENOENT`, and `process.exit(status ?? 1)` turns a missing binary into a
failure — verified: `spawnSync` on a missing command returns `status: null`,
which that expression maps to 1.

Nothing would have been published, since the gates run before the publish. What
it would have cost is a tag sitting on GitHub with no release against it, which
has to be deleted before the same tag can be tried again.

Found during the pre-flight for the first tag, by checking which tools the steps
use against which ones the job installs, rather than by pushing the tag and
reading the failure.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-23 12:52:21 -05:00
chrnx 1f3a42e747 Merge pull request 'ci: publish to JSR from a dated tag, and close the changelogs' (#9) from ci/release-to-jsr into develop
CI / dco (pull_request) Successful in 5s
CI / build (pull_request) Successful in 12s
CI / runtimes (bun) (pull_request) Successful in 13s
CI / runtimes (deno) (pull_request) Successful in 12s
CI / build (push) Successful in 14s
CI / runtimes (edge) (push) Successful in 10s
Promote → GitHub / push-github (push) Successful in 5s
CI / runtimes (edge) (pull_request) Successful in 9s
CI / dco (push) Has been skipped
CI / runtimes (bun) (push) Successful in 10s
CI / runtimes (deno) (push) Successful in 10s
2026-09-23 17:35:33 +00:00
chrnx d5e8c8a827 fix(ci): stop a failed publish from reporting as a successful release
CI / runtimes (edge) (pull_request) Successful in 7s
CI / dco (pull_request) Successful in 4s
CI / build (pull_request) Successful in 14s
CI / runtimes (bun) (pull_request) Successful in 9s
CI / runtimes (deno) (pull_request) Successful in 12s
Two bugs in one line, both silent, both found in review before anything shipped.

**The pipe swallowed the exit status.** `deno publish | tee` reports the status
of the last command in the pipeline, and that is `tee`, which always succeeds.
GitHub's default shell is `bash -e` *without* `pipefail`, so a failed publish
would have been a green step — and the workflow would have gone on to cut a
GitHub release for it. Demonstrated rather than assumed:

    bash -e   -c 'false | tee /dev/null'  -> exit 0
    bash -eo pipefail -c 'false | tee /dev/null'  -> exit 1

Naming `shell: bash` gets `-eo pipefail`.

**And the log was going to be empty anyway.** deno's logger is env_logger,
whose default target is stderr, so the `Successfully published` lines never
reach stdout. Measured against a real `deno publish`: 0 lines on stdout, all of
them on stderr. So `--notes` would have found nothing and announced that nothing
shipped, on every successful release. `2>&1` fixes it.

The second bug is the reason for the third change: `--notes` now refuses a log
carrying neither marker instead of reporting it as "nothing was published". A log
this script cannot read and a release where nothing shipped are indistinguishable
from the text, and guessing wrong is silent in the direction that matters. Now it
fails and says to check the redirect and the pipeline.

Verified all three paths: an empty log exits 1, an all-skipped log renders the
"already on JSR" line and exits 0, and a real publish log renders per-package
sections.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-23 12:34:30 -05:00
chrnx 32baf0c592 ci: publish to JSR from a dated tag, and close the changelogs
CI / build (pull_request) Successful in 15s
CI / runtimes (edge) (pull_request) Successful in 8s
CI / dco (pull_request) Successful in 4s
CI / runtimes (bun) (pull_request) Successful in 10s
CI / runtimes (deno) (pull_request) Successful in 12s
Adds the release workflow and the script it leans on, plus the `[Unreleased]`
sections these three packages have carried since they were written.

**The tag is a date, not a version.** `release-26.9.23` says when; the release
body says what moved. A version-shaped tag would be a lie here — three packages
carry three independent versions, so `plugins-v26.9.0` would match none of them
and invite being read as `@green-tea/jwt@26.9.0`.

**Tag-driven, not push-driven.** JSR's own setup page offers an example that
publishes on every push to `main`. For this repository that means every
promotion publishes, and a JSR version can never be replaced or removed, so one
distracted merge would burn a version number permanently. A tag is a decision; a
merge is not.

**Publishing all three at once is safe, and that is measured rather than
assumed.** `deno publish` queries the registry per package and drops the ones
already there (`filter_out_published_packages` in denoland/deno,
cli/tools/publish/mod.rs); skipping logs a warning, and a workspace with nothing
left to do exits 0 with "All packages are already published". So a tag cut after
changing one package publishes that one and leaves the others alone, with no
per-package logic here.

`scripts/release.mjs --check` runs **before** the publish and refuses when a
version about to ship has no changelog entry. That ordering is the point: core's
equivalent runs after npm and JSR have already published, so a missing heading
fails a release that has already shipped. Worth not inheriting.

`--notes` builds the release body from what `deno publish` actually reported
rather than from a prediction of it — predicting means duplicating Deno's
filtering and being wrong about it silently.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-23 12:30:18 -05:00
chrnx 4a98046da2 Merge pull request 'Prepare the repository to be public: scrub infrastructure, add community files' (#8) from chore/scrub-before-publish into develop
CI / dco (pull_request) Successful in 5s
CI / runtimes (bun) (pull_request) Successful in 11s
CI / runtimes (edge) (pull_request) Successful in 9s
CI / build (pull_request) Successful in 14s
CI / runtimes (deno) (pull_request) Successful in 12s
CI / dco (push) Has been skipped
CI / build (push) Successful in 12s
CI / runtimes (edge) (push) Successful in 9s
CI / runtimes (deno) (push) Successful in 11s
CI / runtimes (bun) (push) Successful in 11s
Promote → GitHub / push-github (push) Successful in 6s
2026-09-23 17:01:05 +00:00
chrnx 57c4707bc5 ci: run on both forges, and watch contrib
CI / dco (pull_request) Successful in 5s
CI / build (pull_request) Successful in 12s
CI / runtimes (bun) (pull_request) Successful in 12s
CI / runtimes (deno) (pull_request) Successful in 11s
CI / runtimes (edge) (pull_request) Successful in 9s
Adding `contrib` to the mirror without adding it here was a hole, not a gap.
A pull request against a branch a workflow does not list triggers **nothing** —
not a reduced set of checks, none — so an external contributor would have seen
no signal at all, and neither would whoever merged their work. The branch and
its CI had to land together; the previous commit shipped only half of that.

So `contrib` joins `develop` and `main` in both trigger lists, and the three
`github.server_url != 'https://github.com'` guards are gone. Their reason went
with Verdaccio: the packages used to build against a core that existed only on
an internal registry a public runner cannot reach, and they resolve
`@green-tea/core` from npmjs.org now. Guarding CI to one forge while inviting
contributions to the other cannot both be true.

The dco job keeps `github.event_name == 'pull_request'`, matching core, so it
reports on pull requests and costs nothing on push.

Verified the way a public runner would: the workflow names no secrets and no
internal hosts, and a fresh clone runs `npm ci`, lint, typecheck, the Node suite
and `deno publish --dry-run` with nothing configured.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-23 11:58:48 -05:00
chrnx e1ea1542c9 docs: add the community files GitHub expects before this goes public
CI / dco (pull_request) Successful in 5s
CI / build (pull_request) Successful in 12s
CI / runtimes (bun) (pull_request) Successful in 11s
CI / runtimes (deno) (pull_request) Successful in 11s
CI / runtimes (edge) (pull_request) Successful in 8s
The repository had a LICENSE and nothing else. Adds CONTRIBUTING, a code of
conduct, a security policy, the DCO, issue templates and a pull request
template — the set GitHub checks for, written for these packages rather than
copied from core.

**This adds a `contrib` branch, reversing a decision made earlier today.** The
promotion originally mirrored `main` alone, on the reasoning that a repository
with no documented contribution flow does not need a branch nobody targets. That
reasoning held right up until we decided to document one. CONTRIBUTING has to
send people somewhere, `main` is the wrong answer — a pull request there puts the
forges out of step and breaks the next promotion — so `develop → contrib` is
back, the same arrangement core runs.

What is adapted rather than inherited:

- Node 22, not core's 18, which is what every package here already requires.
- No build step anywhere. JSR transpiles the source, so `deno publish --dry-run`
  is what stands in for one.
- The four traps an assistant falls into *here*: turning `import type` into a
  value import, adding a build, writing for Node alone, and changing `engines`
  without the README's Runtimes table.
- SECURITY scopes each package separately, and sends vulnerabilities in the
  framework itself to core — same people, but the advisory has to live where the
  fix does.

There is also a plugin proposal template, which exists to ask the question that
is cheaper in a paragraph than in a written pull request: whether a thing belongs
in the official set at all, or is better as the author's own package. The
template says the second outcome is first-class, because it usually is.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-23 11:55:22 -05:00
chrnx a3f57e61d9 chore(ci): stop naming internal infrastructure in files that go public
`main` is about to be mirrored to a public repository for the first time, so
everything in the tree becomes readable by anyone. Two things in here were
written when only the development forge could see them.

`ci.yml` carried the internal registry's hostname in a step that authenticated
to it — twice. That step is also dead: `.npmrc` no longer points the @green-tea
scope anywhere, and core resolves from npmjs.org. So this removes a published
hostname and an instruction that does nothing, in the same edit.

`AGENTS.md` named the origin by its repository path. Core's public copy says
"Development lives on a private Gitea instance" and stops there, which is the
right level: a reader learns the shape of the workflow without learning where it
lives, and a path they cannot reach tells them nothing anyway.

`promote.yml` keeps saying the forge by name, because core's public copy does and
the two should read alike. Naming the product is not the problem; naming the host
was.

Checked the rest while here: no credentials, no keys, no personal paths or
addresses, no issue templates routing anyone to a forge they cannot open.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-23 11:50:52 -05:00
chrnx fd82d10c2b Merge pull request 'ci(plugins): mirror Gitea main to GitHub main' (#6) from ci/promote-to-github into develop
CI / dco (push) Has been skipped
CI / build (push) Successful in 13s
CI / runtimes (bun) (push) Successful in 12s
CI / runtimes (edge) (push) Successful in 9s
CI / runtimes (deno) (push) Successful in 11s
CI / dco (pull_request) Successful in 3s
CI / runtimes (bun) (pull_request) Successful in 10s
CI / build (pull_request) Successful in 14s
CI / runtimes (edge) (pull_request) Successful in 9s
CI / runtimes (deno) (pull_request) Successful in 11s
2026-09-23 16:43:30 +00:00
26 changed files with 911 additions and 153 deletions

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
---
name: Bug report
about: A plugin behaves differently from what its README or its types promise
labels: bug
---
## Which plugin
<!-- @green-tea/jwt, @green-tea/metrics or @green-tea/rate-limit -->
## What happened
## What you expected
## Minimal reproduction
The smallest app that shows it — the `createApp` call, the plugin options, and the route:
```ts
```
## Environment
- Plugin version:
- `@green-tea/core` version:
- Runtime and version: <!-- Node 22.11 / Deno 2.1 / Bun 1.3 / Cloudflare Workers -->
- OS:
<!--
If it works on one runtime and not another, say which. That difference is usually
the bug rather than a detail of it.
Each README has a Runtimes table. If the behaviour you hit is a runtime the table
already rules out, that is a documentation problem rather than a bug — still worth
filing, just say so.
-->
+14
View File
@@ -0,0 +1,14 @@
# Design questions and "should this live here?" threads do not fit a form, and they are
# worth having. Keep the blank option available.
blank_issues_enabled: true
contact_links:
- name: Security vulnerability
url: https://github.com/Expressive-Tea/green-tea-plugins/security/advisories/new
about: Report it privately instead. Never in a public issue — see SECURITY.md.
- name: A bug in green-tea itself
url: https://github.com/Expressive-Tea/green-tea/issues/new
about: The framework lives in its own repository. Plugins are types-only against it.
- name: Documentation
url: https://green-tea.expressive-tea.io/docs/
about: How to wire a route, a module, a plugin or a runtime adapter.
+35
View File
@@ -0,0 +1,35 @@
---
name: Plugin proposal
about: Suggest something for the official set — before writing it
labels: enhancement
---
## What it does
<!-- One paragraph. What a user gets that they do not have today. -->
## Why it belongs in the official set
<!--
The honest question is not whether the code would be good. It is whether this
belongs here rather than as your own package.
A plugin that depends on a service, a vendor or a protocol we cannot test is
usually better as `@you/green-tea-whatever`, published to JSR or npm. That is a
first-class outcome, not a consolation — say so if you already plan it that way
and only want a sanity check.
-->
## Runtimes it could support
<!--
Node, Deno, Bun, workerd — and which it cannot, with the reason. A plugin that
needs a filesystem cannot serve workerd, for instance, and knowing that early
changes the design rather than the documentation.
-->
## Shape
```ts
// The call as a user would write it.
```
+26
View File
@@ -0,0 +1,26 @@
> **Base branch:** on GitHub this must target `contrib`, not `main`. You can change it above before you submit — and [here is why](https://github.com/Expressive-Tea/green-tea-plugins/blob/main/CONTRIBUTING.md#where-to-send-your-changes). Delete this line once the base is right.
## What this changes
<!-- A sentence or two, on the why rather than the what. -->
Closes #
## Which runtimes you ran
<!-- Not all four are expected for a typo. Say which you ran rather than leaving it to be guessed. -->
- [ ] `npm test` (Node)
- [ ] `npm run test:deno`
- [ ] `npm run test:bun`
- [ ] `npm run test:edge`
## Checklist
- [ ] The base branch above is `contrib`
- [ ] Commits are signed off (`git commit -s`)
- [ ] `lint`, `format:check`, `typecheck`, `complexity:check` and `deno publish --dry-run` pass locally
- [ ] New behaviour has a test
- [ ] Core is still imported as `import type` only — never a value import
- [ ] If `engines` changed, the package README's Runtimes table changed with it
- [ ] A breaking change is under `### Breaking`, first in that package's CHANGELOG
+19 -21
View File
@@ -1,22 +1,30 @@
name: CI name: CI
# Gitea only, for now. Every package builds against @green-tea/core@26.9.0-beta.2, which exists on # Runs on BOTH forges. It used to be guarded to the development forge, because the packages built
# Verdaccio alone, and a GitHub runner cannot reach Verdaccio. Plan B3 moves the packages to a core on # against a core that existed only on an internal registry a public runner cannot reach. They now
# npm, removes these guards and adds the GitHub mirror; until then GitHub has no copy to run against. # resolve `@green-tea/core` from npmjs.org, so that reason is gone and the guards are too.
#
# `contrib` is in both lists because external pull requests target it (CONTRIBUTING.md). Leaving it
# out is not a smaller version of running CI — it is none: a pull request against a branch that is
# not listed triggers nothing at all, so a contributor gets no signal and neither does whoever
# merges it.
#
# GitHub does not run workflows on pull requests from forks until a maintainer approves them, so a
# contributor's first push may sit with no checks for a while. That is not a rejection.
on: on:
push: push:
branches: [develop, main] branches: [develop, main, contrib]
pull_request: pull_request:
branches: [develop, main] branches: [develop, main, contrib]
jobs: jobs:
# Its own job so a missing sign-off reports on its own and costs nothing on push. Checks that the # Its own job so a missing sign-off reports on its own and costs nothing on push. Checks that the
# trailer is present, not that it matches the author. # trailer is present, not that it matches the author.
dco: dco:
if: github.event_name == 'pull_request' && github.server_url != 'https://github.com' if: github.event_name == 'pull_request'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Every commit needs a Signed-off-by - name: Every commit needs a Signed-off-by
@@ -38,17 +46,12 @@ jobs:
# Node 22 is the lowest `engines.node` any package declares (spec 2.5: build on the floor). # Node 22 is the lowest `engines.node` any package declares (spec 2.5: build on the floor).
build: build:
if: github.server_url != 'https://github.com'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-node@v4 - uses: actions/setup-node@v5
with: with:
node-version: '22' node-version: '22'
- name: Authenticate to Verdaccio
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH }}
run: npm config set //npm.svc.zoit.services/:_authToken "$NODE_AUTH_TOKEN"
- run: npm ci - run: npm ci
- run: npm run lint - run: npm run lint
- run: npm run format:check - run: npm run format:check
@@ -62,21 +65,16 @@ jobs:
# A fixed matrix, not `fromJSON`: Gitea Actions support for a dynamic matrix was not verified. Each # A fixed matrix, not `fromJSON`: Gitea Actions support for a dynamic matrix was not verified. Each
# entry runs only the packages whose engines name that runtime (scripts/run-runtime.mjs). # entry runs only the packages whose engines name that runtime (scripts/run-runtime.mjs).
runtimes: runtimes:
if: github.server_url != 'https://github.com'
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
runtime: [deno, bun, edge] runtime: [deno, bun, edge]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
- uses: actions/setup-node@v4 - uses: actions/setup-node@v5
with: with:
node-version: '22' node-version: '22'
- name: Authenticate to Verdaccio
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH }}
run: npm config set //npm.svc.zoit.services/:_authToken "$NODE_AUTH_TOKEN"
- run: npm ci - run: npm ci
- if: matrix.runtime == 'deno' - if: matrix.runtime == 'deno'
uses: denoland/setup-deno@v2 uses: denoland/setup-deno@v2
+21 -14
View File
@@ -1,44 +1,51 @@
name: Promote → GitHub name: Promote → GitHub
# Promotion. Runs on GITEA ONLY. Mirrors one branch to the public GitHub repo and nothing else: # Promotion. Runs on GITEA ONLY. Mirrors two branches to the public GitHub repo and nothing else:
# #
# main → GitHub main # main → GitHub main what has been promoted
# develop → GitHub contrib what outside contributors fork from and target
# #
# Development happens on `develop` and feature branches, and those stay Gitea-private — which is # Feature branches stay private, which is why this is a workflow rather than a push-mirror — that
# why this is a workflow rather than Gitea's push-mirror, since that would expose every branch. # would expose every branch.
# #
# Only `main`, and no `contrib` counterpart yet: unlike core, this repository has no documented # `contrib` exists because CONTRIBUTING.md sends people there. A pull request against `main` would
# flow for outside contributions, so there is nothing for a second mirrored branch to serve. Add # put the two forges out of step, so contributors need a branch that tracks current development,
# one here when that flow exists, rather than shipping a branch nobody targets. # and this is it. Same arrangement as core.
# #
# The push is NOT forced. A refusal means GitHub `main` holds commits that Gitea `main` does not, # Neither push is forced. For `contrib` that is the guard rather than a limitation: the push is
# which is a question to answer rather than an obstacle to remove. # refused exactly when `contrib` holds external merges nobody has carried into `develop` yet. Carry
# them, and the next develop push fast-forwards.
# #
# Tags are deliberately NOT mirrored, and `--tags` is left off the push for the same reason. These # Tags are deliberately NOT mirrored, and `--tags` is left off the push for the same reason. These
# packages publish to JSR, where a version can never be replaced or removed — so promoting a tag # packages publish to JSR, where a version can never be replaced or removed — so promoting a tag
# has to stay a decision someone takes deliberately, never a side effect of promoting a branch. # has to stay a decision someone takes deliberately, never a side effect of promoting a branch.
on: on:
push: push:
branches: [main] branches: [main, develop]
jobs: jobs:
push-github: push-github:
if: ${{ github.server_url != 'https://github.com' }} if: ${{ github.server_url != 'https://github.com' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
fetch-depth: 0 # full history for a clean push fetch-depth: 0 # full history for a clean push
- name: Push to GitHub - name: Push to GitHub
env: env:
GH_TOKEN: ${{ secrets.GH_PROMOTE_TOKEN }} GH_TOKEN: ${{ secrets.GH_PROMOTE_TOKEN }}
run: | run: |
case "$GITHUB_REF_NAME" in
main) target=main ;;
develop) target=contrib ;;
*) echo "::error::promote runs for main and develop only, got '$GITHUB_REF_NAME'"; exit 1 ;;
esac
if [ -z "$GH_TOKEN" ]; then if [ -z "$GH_TOKEN" ]; then
echo "::error::GH_PROMOTE_TOKEN is not set on this repository. Add it in Settings → Actions → Secrets; core carries the same secret." echo "::error::GH_PROMOTE_TOKEN is not set on this repository. Add it in Settings → Actions → Secrets."
exit 1 exit 1
fi fi
git remote add github "https://x-access-token:${GH_TOKEN}@github.com/Expressive-Tea/green-tea-plugins.git" git remote add github "https://x-access-token:${GH_TOKEN}@github.com/Expressive-Tea/green-tea-plugins.git"
if ! git push github "HEAD:refs/heads/main"; then if ! git push github "HEAD:refs/heads/${target}"; then
echo "::error::GitHub main has commits that Gitea main does not. Find out what they are and carry them; never force this push." echo "::error::GitHub ${target} has commits that ${GITHUB_REF_NAME} does not. For contrib that means external merges not yet carried into develop — carry them (CONTRIBUTING.md); never force this push."
exit 1 exit 1
fi fi
+98
View File
@@ -0,0 +1,98 @@
name: Release → JSR
# Publishes the workspace to JSR. Runs on GITHUB ONLY, on a `release-*` tag.
#
# **The tag is a date, not a version.** `release-26.9.23` says when, and the release body says what
# moved. A version-shaped tag would be a lie here: three packages carry three independent versions,
# so `plugins-v26.9.0` would match none of them and invite exactly the confusion of reading it as
# `@green-tea/jwt@26.9.0`.
#
# Tag-driven rather than push-driven, unlike the example JSR's own setup page offers. That example
# publishes on every push to `main`, which for this repository means every promotion publishes — and
# a JSR version can never be replaced or removed, so a distracted merge would burn a version number
# forever. A tag is a decision; a merge is not.
#
# Publishing all three at once is safe, and this is the fact the whole design rests on: `deno publish`
# queries the registry per package and drops the ones already there, logging
# `Warning: Skipping, already published` for each. If every version is already published it prints
# `Success: All packages are already published` and exits 0. So a tag cut after changing one package
# publishes that one and leaves the others alone, with no per-package logic here.
# (denoland/deno, cli/tools/publish/mod.rs — `filter_out_published_packages`.)
on:
push:
tags: ['release-*']
jobs:
publish:
if: ${{ github.server_url == 'https://github.com' }}
runs-on: ubuntu-latest
permissions:
id-token: write # OIDC — this is what publishes, and what earns provenance
contents: write # create the GitHub release for this tag
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: '22'
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
# Both runtimes, because the gates below run both suites. `ci.yml` installs these one per
# matrix entry; here every suite runs in the same job, so both have to be present. Leaving
# bun out does not skip its suite — `scripts/run-runtime.mjs` spawns `bun`, gets ENOENT, and
# `process.exit(status ?? 1)` turns that into a failure that aborts the release.
- uses: oven-sh/setup-bun@v2
- run: npm ci
# The same gates CI runs. They ran on `main` already, and they run again here because this is
# the last moment they can still change the outcome: after the publish there is no amending a
# version, only publishing another one.
- run: npm run lint
- run: npm run format:check
- run: npm run typecheck
- run: npm run complexity:check
- run: npm test
- run: npm run test:deno
- run: npm run test:bun
- run: npm run test:edge
# Before the publish, on purpose. This reports which versions the tag would ship and refuses
# when one has no CHANGELOG entry — a package whose own changelog says it was never released
# is not something to discover afterwards, because afterwards is permanent.
- name: Every version about to ship has a changelog entry
run: node scripts/release.mjs --check
# JSR checks things no other gate does — slow types, module analysis — and learning about them
# mid-publish leaves a tag half-shipped.
- run: deno publish --dry-run
# No token: OIDC exchanges the workflow's id-token, which is also what attaches provenance.
# `tee` because the release body is built from what this actually did rather than from a guess
# about what it would do.
#
# Two details in this one line, both of which produce a *silently wrong* release when missed:
#
# `shell: bash` — the default shell here is `bash -e`, without `pipefail`, so a pipeline
# reports the exit status of its LAST command. That is `tee`, which always
# succeeds. A failed publish would have been reported as a green step, and
# a GitHub release created for it. Naming the shell gets `-eo pipefail`.
#
# `2>&1` — deno's logger is env_logger, whose default target is stderr, so every
# "Successfully published" line goes there. Measured: a publish writes 0
# lines to stdout and all of them to stderr. Without this the log is empty
# and the release notes say nothing shipped while three packages did.
- name: Publish
shell: bash
run: deno publish 2>&1 | tee /tmp/publish.log
- name: Release notes
run: node scripts/release.mjs --notes /tmp/publish.log "$GITHUB_REF_NAME" > /tmp/notes.md
- name: GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$GITHUB_REF_NAME" \
--title "$GITHUB_REF_NAME" \
--notes-file /tmp/notes.md \
--prerelease
+32 -13
View File
@@ -24,30 +24,49 @@ Run all of them before proposing anything as finished. CI runs each one and each
## Two forges ## Two forges
Gitea `Green-Tea/plugins` is the origin. `develop` and `main` are protected; everything lands through Development lives on a private Gitea instance. GitHub is a downstream mirror that receives `main`,
a pull request. and `develop` under the name `contrib`. On the development forge `develop` and `main` are
protected; everything lands through a pull request.
``` ```
feature/* → develop → main → [promote.yml] → GitHub main feature/* → develop → main → [promote.yml] → GitHub main
│ │
└─[promote.yml]┴──→ GitHub contrib ← external pull requests
``` ```
`promote.yml` runs on Gitea only and mirrors `main`, and nothing else. Feature branches and `promote.yml` runs on the development forge only. Feature branches stay private, which is why this
`develop` stay private, which is why this is a workflow rather than Gitea's push-mirror — that is a workflow rather than a push-mirror — that would expose every branch. Neither push is forced.
would expose every branch. The push is never forced: a refusal means GitHub `main` holds commits
Gitea `main` does not, and that is a question to answer, not an obstacle to remove.
There is **no `contrib` branch** here, unlike core. This repository has no documented flow for `contrib` exists because `CONTRIBUTING.md` sends people there: a pull request against `main` would
outside contributions yet, so there is nothing for a second mirrored branch to serve. Add one when put the two forges out of step, so contributors need a branch that tracks current development. For
that flow exists rather than shipping a branch nobody targets. `contrib` the unforced push is the guard rather than a limitation — it is refused exactly when
`contrib` holds external merges nobody has carried into `develop` yet. Carry them and the next
develop push fast-forwards. Never force it.
**External contributions** arrive on `contrib`. Merge the pull request there, fetch `contrib` into
a branch on the development forge, then open a pull request from it into `develop` and merge that.
The next develop push mirrors back and fast-forwards, because `develop` now contains everything
`contrib` had. Merge rather than rebase: rewriting a contributor's SHAs gains nothing and leaves
`contrib` holding commits `develop` does not have, which is exactly the state that makes the
mirror push refuse.
**Tags are not mirrored.** These packages publish to JSR, where a version can never be replaced or **Tags are not mirrored.** These packages publish to JSR, where a version can never be replaced or
removed, so promoting a tag has to stay a deliberate act rather than a side effect of promoting a removed, so promoting a tag has to stay a deliberate act rather than a side effect of promoting a
branch. branch.
CI itself still runs on Gitea only, through the `if:` guards in `ci.yml` — but the reason is gone: **CI runs on both forges, and `contrib` is one of the branches it watches.** It used to be guarded
`@green-tea/core@26.9.0-beta.2` shipped to npmjs.org on 2026-09-22, so the packages no longer need to the development forge, because the packages built against a core that existed only on an
Verdaccio and a GitHub runner can resolve them. Removing those guards is unblocked rather than done, internal registry a public runner cannot reach; they resolve `@green-tea/core` from npmjs.org now,
and until it happens the mirrored repository carries workflows that skip every job. so the guards are gone.
Adding `contrib` to the mirror without adding it to `ci.yml` would have been worse than not having
the branch. A pull request against a branch a workflow does not list triggers **nothing** — not a
reduced set of checks, none — so a contributor would see no signal and neither would whoever merged
it. The two changes belong together.
GitHub does not run workflows on pull requests from forks until a maintainer approves them, so a
contributor's first push may sit with no checks for a while. That is not a rejection, and it is
worth saying so rather than letting silence read as one.
## The plugin convention ## The plugin convention
+89
View File
@@ -0,0 +1,89 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at **compliance@expressive-tea.io**. All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
If you would rather write to a named person than to an address, the project lead reads
diego.resendez@expressive-tea.io. Reports about a maintainer, including the project lead,
should go to compliance@expressive-tea.io, which is not maintained by the project team.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of actions.
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
+136
View File
@@ -0,0 +1,136 @@
# Contributing to green-tea plugins
Thanks for your interest. These are the official plugins for [green-tea](https://github.com/Expressive-Tea/green-tea), and they are open source — but nobody pushes directly. Everything lands through a reviewed pull request with a **DCO sign-off**.
## Where to send your changes
Development happens on a private Gitea instance. The GitHub repository is a downstream mirror: it receives `main`, and `develop` under the name `contrib`.
**Open your pull request against `contrib`. Not `main`.** `main` is a mirror of what has been promoted, and merging into it puts the two forges out of step and breaks the next promotion. A maintainer reviews on `contrib` and carries your commits upstream with your authorship and your sign-off intact. Because `contrib` follows `develop`, you are working against current code rather than the last promotion.
### Worked example
```bash
# fork Expressive-Tea/green-tea-plugins on GitHub, then
git clone git@github.com:<you>/green-tea-plugins.git
cd green-tea-plugins
git remote add upstream https://github.com/Expressive-Tea/green-tea-plugins.git
git fetch upstream
# branch from contrib, not from main
git checkout -b fix/sweep-interval upstream/contrib
# ... make the change, add a test ...
git commit -s -m "fix(rate-limit): clear the sweep timer on close"
git push origin fix/sweep-interval
```
`contrib` moves whenever development does. If your branch has been open a while, rebase onto the current `contrib` before pushing again.
## Developer Certificate of Origin (DCO)
We use the [Developer Certificate of Origin](./DCO) instead of a CLA. It is a per-commit affirmation that you have the right to submit your work under this project's license. No copyright assignment, no paperwork.
**Every commit must be signed off:**
```bash
git commit -s -m "feat(metrics): count upgrades separately"
```
That appends `Signed-off-by: Your Name <your.email@example.com>`, and the name and email must match your real `git config`. Commits without it are rejected by CI.
Forgot on a range you already wrote?
```bash
git rebase --signoff <base>
```
Or on the commit you just made: `git commit --amend -s`, then `git push --force-with-lease`.
## Local setup
Node 22 or newer, which is what every package's `engines` requires and what CI runs.
```bash
npm install
```
That points `core.hooksPath` at `.githooks/`, which installs a pre-commit gate: it formats and lint-fixes your staged sources, then refuses the commit if `lint` or `complexity:check` fails. It exists so CI tells you nothing you could not have heard locally. Confirm it took:
```bash
git config core.hooksPath # should print .githooks
```
If it prints nothing, run `git config core.hooksPath .githooks` yourself.
**There is no build step.** These packages publish to JSR, which transpiles the TypeScript and generates the declarations, so what you edit in `src/` is what ships. `deno publish --dry-run` is the closest thing to a build, and CI runs it.
## Before you open a pull request
Run what CI runs:
```bash
npm run lint
npm run format:check
npm run typecheck
npm run complexity:check
npm test # Node: every package's contract tests plus the workspace checks
npm run test:deno # packages whose engines declare deno
npm run test:bun # packages whose engines declare bun
npm run test:edge # packages whose engines declare workerd
deno publish --dry-run # the actual publish path, including the slow-types check
```
You are not expected to install every runtime to fix a typo. You are expected to run the one your change touches, and to say in the pull request which ones you ran.
## What a plugin has to do
The full list is in [`AGENTS.md`](./AGENTS.md), and `test/workspace.test.ts` enforces most of it so you will hear about a miss before a reviewer has to mention it. The parts that catch people out:
- **A plugin imports core as types only.** `import type { Plugin } from '@green-tea/core'` — never a value import. A type import leaves nothing behind when it compiles, which is what keeps a plugin from dragging a second copy of the framework into someone's application.
- **Runtimes are declared twice and the two must agree:** as `engines` keys, and as the Runtimes table in the package README, which lists all four with a reason beside every one that is not supported. Nobody should have to open an issue to find out where a plugin runs.
- **Errors carry the `Symbol.for('green-tea.http-error')` brand** rather than extending `HttpError`. A lint rule and the workspace test enforce it.
- **A breaking change goes under `### Breaking`**, first in that package's CHANGELOG.
- **Relative imports carry the `.ts` extension.** Deno and JSR require it.
## Commits
Follow [Conventional Commits](https://www.conventionalcommits.org/), scoped to the package where that helps: `fix(jwt):`, `feat(metrics):`, `docs:`. Focus the message on the *why*. Do not add AI co-authoring attribution.
## Working with AI assistance
Use one if it helps. There is no permission to ask for and nothing to declare.
What we do ask is that you read what it hands you before it becomes a pull request. Every line that lands here is reviewed by a person, by hand, and usually that person is one person. A diff its own author has not read moves that work onto them, and turns review into proofreading — which is the thing review is worst at.
So go through the diff the way you would go through a stranger's, because that is what it is. If you cannot say why a line is there, it is not ready to send.
**What assistants tend to get wrong in this repository in particular:**
- They turn `import type` into a value import, which is the one thing a plugin must never do to core.
- They add a build. There isn't one, and `package.json` deliberately carries no `main`, `exports` or `files`.
- They write for Node and assume the rest follows. `npm test` does not cover Deno, Bun or workerd.
- They update `engines` without the README table, or the table without `engines`.
**Where you are unsure, say so** — not as a disclosure, as a pointer. "I am not confident about the Deno path here" tells a reviewer where to spend their attention, and that is worth more than a pull request that merely looks clean.
None of this changes the sign-off. `Signed-off-by` says you have the right to submit the work under this project's license, and that stays true however the text was produced.
If your assistant reads repository instructions, [`AGENTS.md`](./AGENTS.md) has the conventions.
## Proposing a new plugin
Open an issue before writing it. The useful question is not whether the code is good — it is whether the thing belongs in the official set at all, and that is cheaper to answer in a paragraph than in a pull request you have already written.
A plugin that depends on a service, a vendor or a protocol we cannot test is usually better as your own package. Nothing stops you publishing `@you/green-tea-whatever` to JSR or npm, and that is a first-class outcome rather than a consolation.
## Reporting issues
Open an issue with a minimal reproduction: which plugin and version, the runtime and version, and the smallest app that shows the problem.
**Except for security.** If what you found is exploitable, do not open an issue — an issue is world-readable the moment you press the button. See [`SECURITY.md`](./SECURITY.md).
## Code of conduct
By taking part here you agree to the [Code of Conduct](./CODE_OF_CONDUCT.md), which is the Contributor Covenant 2.1. Reports go to compliance@expressive-tea.io.
+37
View File
@@ -0,0 +1,37 @@
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
+8 -7
View File
@@ -35,11 +35,12 @@ That works under every package manager: `jsr add` writes one line to `.npmrc` an
Plugins import core as types only, and a type import leaves nothing behind when it compiles — the Plugins import core as types only, and a type import leaves nothing behind when it compiles — the
JavaScript JSR publishes never mentions core. So the core that runs is always your application's, JavaScript JSR publishes never mentions core. So the core that runs is always your application's,
whatever version a plugin was written against, and nothing warns about a version range, which under whatever version a plugin was written against.
CalVer no range can express.
That is about *loading*, not about disk. A plugin names an exact core in its `deno.json`, and when The types still come from somewhere, so each plugin's `deno.json` names a core **range**,
your version differs by more than the patch, npm places a second copy under the plugin rather than `^26.11.0-rc.2`: the version its tests run against, up to the next year. After core's first stable
deduplicating. Measured, on purpose: it is inert, because nothing ever imports it. What it can do release only the first release of a year may break, so that range is exactly the set of cores a
is make `tsc` resolve a plugin's `Plugin` type against that copy instead of yours, which fails plugin stays compatible with, and your application's core satisfies it without a second copy. A
loudly at compile time rather than quietly at runtime. plugin published before this named an exact core, and an application on a newer one could get a
second, older copy under the plugin. It was inert at runtime, but `tsc` could resolve the plugin's
`Plugin` type against it and fail at compile time.
+47
View File
@@ -0,0 +1,47 @@
# Security Policy
## Reporting a vulnerability
Email **security@expressive-tea.io**. Please do not open a public issue for something exploitable — an issue is world-readable from the moment you press the button, and that is the one thing a security report cannot be.
Include whatever you have: which plugin, the version, the runtime, and the smallest app that shows it. A route and a request is usually enough. If you have a working exploit, send it; if you only have a suspicion, send that instead of sitting on it.
You can also report privately through GitHub's [security advisory form](https://github.com/Expressive-Tea/green-tea-plugins/security/advisories/new), which reaches the same people.
## What happens next
Acknowledgement within **5 working days**. A verdict on whether we agree it is a vulnerability within **15**. If we agree, you get the fix timeline and a heads-up before the advisory goes public. If we don't, you get the reasoning rather than silence.
Those numbers are deliberately slower than the 24 to 48 hours you will see quoted elsewhere. That figure describes vendors and coordinators — organizations with someone on rotation. This project is one person. A number that only holds in a good week is worse than an honest one.
Which is why there is an escape hatch, and you should use it. **If you have no acknowledgement after 10 working days**, write directly to diego.resendez@expressive-tea.io. If that is also met with silence, consider yourself released from any embargo and disclose as you see fit. You will not have done anything wrong: a project that goes quiet on a security report has spent whatever claim it had on your patience.
## Disclosure window
We ask for **90 days** from your report before public disclosure, or until the fix ships, whichever comes first. If the fix is out in a week, so is the advisory.
If a vulnerability is being actively exploited, the window is however long it takes us to ship, and we will say so rather than hold you to 90 days while users are being attacked.
We publish a GitHub advisory for anything that affects a released version, and credit you by the name you ask for. Say so if you would rather not be named.
There is no bug bounty and no money, which we would rather state here than leave you to find out after the work.
## Supported versions
Nothing has been released yet. When the first versions ship, only the most recent of each package receives fixes, and this section gets the real table.
## Scope
Each package is its own scope, and a report should name which one.
**In scope** — anything in a package's `src/` that ships:
- `@green-tea/jwt` — key loading, signature verification, claim validation, and anything that could make a bad token verify or a good one fail open.
- `@green-tea/rate-limit` — anything that lets a caller exceed a configured limit, or that lets one caller's traffic count against another's.
- `@green-tea/metrics` — anything that puts request data into the metrics output that should not be there, since that endpoint is often less protected than the app around it.
**Out of scope:** the test suites, dev-only tooling, and anything that requires an attacker to already control your application code. A misconfiguration is not a vulnerability — a plugin that does what you told it to, where what you told it was unsafe, belongs in an issue or the documentation rather than here. If you are unsure which one you have, send it and let us decide.
**Vulnerabilities in green-tea itself** go to the [core repository](https://github.com/Expressive-Tea/green-tea/security/advisories/new) instead. Same address, same people, but the advisory needs to live where the fix does.
Advisories in a dependency — `jose`, for instance — are worth telling us about, and we handle them as ordinary dependency updates rather than as vulnerabilities in these packages. If the advisory is exploitable *through* the way a plugin uses that dependency, that is a real report and we want it.
+97 -83
View File
@@ -611,16 +611,16 @@
} }
}, },
"node_modules/@green-tea/core": { "node_modules/@green-tea/core": {
"version": "26.9.0-beta.2", "version": "26.11.0-rc.2",
"resolved": "https://registry.npmjs.org/@green-tea/core/-/core-26.9.0-beta.2.tgz", "resolved": "https://registry.npmjs.org/@green-tea/core/-/core-26.11.0-rc.2.tgz",
"integrity": "sha512-HM8FdRgJz5CUiXqQUEa7vA3C+MLm/xe1Gq+5Unzg/3U6pPxqLedac+kUNcokeuwCNU5UE6bqtraTuHMua+xZ7Q==", "integrity": "sha512-fvpJsK67vRQZ/TidhNclMO8KUXeSxZIbGq6lHHP2fRQVGh5ys8iOzcKE8sXTucUjV00dTe+VjNnWq2BTpndXig==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"reflect-metadata": "0.2.2" "reflect-metadata": "0.2.2"
}, },
"engines": { "engines": {
"node": ">=18" "node": ">=22"
}, },
"peerDependencies": { "peerDependencies": {
"busboy": "^1.6.0", "busboy": "^1.6.0",
@@ -731,6 +731,13 @@
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/@isaacs/nonrecursive-glob-match": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz",
"integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==",
"dev": true,
"license": "BlueOak-1.0.0"
},
"node_modules/@one-ini/wasm": { "node_modules/@one-ini/wasm": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz", "resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz",
@@ -795,17 +802,17 @@
} }
}, },
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.70.1", "version": "8.74.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.70.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.74.0.tgz",
"integrity": "sha512-nDNrUQ/4ruSNYbu749TRY7cfrzPtoLHEXSNBI8aaNY32LlZCajixqRf3FqcKC4p5Cam4VOHYx/t+i5+nKXvrqA==", "integrity": "sha512-z3KXk1+Vm+d82ZRplOoC89ho4Rf1da5ju6sx8//92GnN532U62DGPjECXkkVqtYzIv0zoJlpO39SX2Z9tk6LVw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@eslint-community/regexpp": "^4.12.2", "@eslint-community/regexpp": "^4.12.2",
"@typescript-eslint/scope-manager": "8.70.1", "@typescript-eslint/scope-manager": "8.74.0",
"@typescript-eslint/type-utils": "8.70.1", "@typescript-eslint/type-utils": "8.74.0",
"@typescript-eslint/utils": "8.70.1", "@typescript-eslint/utils": "8.74.0",
"@typescript-eslint/visitor-keys": "8.70.1", "@typescript-eslint/visitor-keys": "8.74.0",
"ignore": "^7.0.5", "ignore": "^7.0.5",
"natural-compare": "^1.4.0", "natural-compare": "^1.4.0",
"ts-api-utils": "^2.5.0" "ts-api-utils": "^2.5.0"
@@ -818,15 +825,15 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
}, },
"peerDependencies": { "peerDependencies": {
"@typescript-eslint/parser": "^8.70.1", "@typescript-eslint/parser": "^8.74.0",
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
"typescript": ">=4.8.4 <6.1.0" "typescript": ">=4.8.4 <6.1.0"
} }
}, },
"node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
"version": "7.0.10", "version": "7.0.16",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.10.tgz", "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.16.tgz",
"integrity": "sha512-HpbUakT7xp5miBUywCHf36ZEuAJNklBJDDsGpUIjMzOSmM8ELSfA9Sa/QDPeNeqeoN31u+UTCkL4klCOVvRm4Q==", "integrity": "sha512-52N+Y4HRMOJmbLmr+DqO4iSRyyB7N52gm7PWCT6h0p978+oKbqHCB7gIJIwZvBUsjlSdWbrBFqUSmIFNZMpn0A==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -834,16 +841,16 @@
} }
}, },
"node_modules/@typescript-eslint/parser": { "node_modules/@typescript-eslint/parser": {
"version": "8.70.1", "version": "8.74.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.70.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.74.0.tgz",
"integrity": "sha512-nO974WLllwhSFWQXnMLj6nDGa8f0khKEz1JzpPJ1u7Vm/4X1X6ZHajpoknU4bb41vJyMB0HHVyS2GqdhWfIXZw==", "integrity": "sha512-ecr8AYdig7avVkxaHdQvxHnIJ/mOyliO4Gv/uWF8q69vBew/z3sexqBwHUZX5Vql+Ns0w4sH6gBLkICGbOvJkA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "8.70.1", "@typescript-eslint/scope-manager": "8.74.0",
"@typescript-eslint/types": "8.70.1", "@typescript-eslint/types": "8.74.0",
"@typescript-eslint/typescript-estree": "8.70.1", "@typescript-eslint/typescript-estree": "8.74.0",
"@typescript-eslint/visitor-keys": "8.70.1", "@typescript-eslint/visitor-keys": "8.74.0",
"debug": "^4.4.3" "debug": "^4.4.3"
}, },
"engines": { "engines": {
@@ -859,14 +866,14 @@
} }
}, },
"node_modules/@typescript-eslint/project-service": { "node_modules/@typescript-eslint/project-service": {
"version": "8.70.1", "version": "8.74.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.70.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.74.0.tgz",
"integrity": "sha512-62xOgboPfwc3/IgPSX/W6oQR3ZbF04194FPGUGH8HL8iLFHbt/456/8Ph1wLNUgVF+s94FlHoipBsz+v7+LMnA==", "integrity": "sha512-z/mymuE+JlEeSFIv3Mo70EvgG1Zz74Hl0IDfExfXutARAP834bt+MppTD7mVAwmZO0GdxdOAi0jbTam749eH6g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/tsconfig-utils": "^8.70.1", "@typescript-eslint/tsconfig-utils": "^8.74.0",
"@typescript-eslint/types": "^8.70.1", "@typescript-eslint/types": "^8.74.0",
"debug": "^4.4.3" "debug": "^4.4.3"
}, },
"engines": { "engines": {
@@ -881,14 +888,14 @@
} }
}, },
"node_modules/@typescript-eslint/scope-manager": { "node_modules/@typescript-eslint/scope-manager": {
"version": "8.70.1", "version": "8.74.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.70.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.74.0.tgz",
"integrity": "sha512-Pa0EeSeAusQc1WbjQMac+YfenewYTBu0KjgYvkUKwhXaHUKbFog23Dm/rp0DX/6tyYOQ3Xl1a+3EcFNZynGHCw==", "integrity": "sha512-kpOdpu4CpWN5U38ox3f727DwWRBtUAVhyUJtqTBYe5gf2wYoxac7PgKP14txrxN7ICVtcjlLdzjqfRgpSnDKvQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.70.1", "@typescript-eslint/types": "8.74.0",
"@typescript-eslint/visitor-keys": "8.70.1" "@typescript-eslint/visitor-keys": "8.74.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -899,9 +906,9 @@
} }
}, },
"node_modules/@typescript-eslint/tsconfig-utils": { "node_modules/@typescript-eslint/tsconfig-utils": {
"version": "8.70.1", "version": "8.74.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.70.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.74.0.tgz",
"integrity": "sha512-jumze1fPI+sDOaM2TWGQdn39PDxTr7TZGeuyLkAbNyx2vtMT3uRnVKChN0hfht5V2TugphJzF6bYXvBcE09qqg==", "integrity": "sha512-p07wAuaS6BjCYgOSXKJi4YhvTnAf7fiG37e9THcpnYaQEt2QiTTYZWKwUFNgeRiywiMudazhzgddAirZ0GgHtQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -916,15 +923,15 @@
} }
}, },
"node_modules/@typescript-eslint/type-utils": { "node_modules/@typescript-eslint/type-utils": {
"version": "8.70.1", "version": "8.74.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.70.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.74.0.tgz",
"integrity": "sha512-7zKTnyvaVWqzLZHPFQtX1hVHqgkMC+WebPWakNCSyrQVbIP1AM0L0TlBZtACldIRb6PptI8Odk+jyZ5kP3B1VA==", "integrity": "sha512-CV3Y3la8l3F9ANfxcfpgSSiQgJTe4IeLEoZV4O/gcW86Ugp8X6SKiQ0vm+QegXaRIbbDMokZZSF3A1CgiU/kPw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.70.1", "@typescript-eslint/types": "8.74.0",
"@typescript-eslint/typescript-estree": "8.70.1", "@typescript-eslint/typescript-estree": "8.74.0",
"@typescript-eslint/utils": "8.70.1", "@typescript-eslint/utils": "8.74.0",
"debug": "^4.4.3", "debug": "^4.4.3",
"ts-api-utils": "^2.5.0" "ts-api-utils": "^2.5.0"
}, },
@@ -941,9 +948,9 @@
} }
}, },
"node_modules/@typescript-eslint/types": { "node_modules/@typescript-eslint/types": {
"version": "8.70.1", "version": "8.74.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.70.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.74.0.tgz",
"integrity": "sha512-Dm1ypdhhrGCTyyehxElhgJ6kgk8MVCv5qXdoOVqPr1uqk42jX8KjrZqhROvdShczA8qrDoYiOWn1ykWlx2k81Q==", "integrity": "sha512-MpnMrJCVNpP1iVL8NiHkQZgQqIMBH5ewDGUPBh1pqQXwFtMFjsl1M03QcYPXmv6stCKEiF0PN7CGbU1ZbXFzEA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -955,18 +962,18 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree": { "node_modules/@typescript-eslint/typescript-estree": {
"version": "8.70.1", "version": "8.74.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.70.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.74.0.tgz",
"integrity": "sha512-TU8PwyGN0PQJUcE96mw8eCQ44SmxGdQlJmlWakHaHQ15eIuuvye5yNtmh/i6oS88jzXVQB71xdNkbkB/fMwL0g==", "integrity": "sha512-wL348k6l92DNG+kPP5rVpKwNBoz7a3xRZy3TPKc1uymQttd7u7gcMv3eENmcuh4CjC4mO3FTM0DYstFXMyDLuw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/project-service": "8.70.1", "@typescript-eslint/project-service": "8.74.0",
"@typescript-eslint/tsconfig-utils": "8.70.1", "@typescript-eslint/tsconfig-utils": "8.74.0",
"@typescript-eslint/types": "8.70.1", "@typescript-eslint/types": "8.74.0",
"@typescript-eslint/visitor-keys": "8.70.1", "@typescript-eslint/visitor-keys": "8.74.0",
"debug": "^4.4.3", "debug": "^4.4.3",
"minimatch": "^10.2.2", "minimatch": "^11.0.1",
"semver": "^7.7.3", "semver": "^7.7.3",
"tinyglobby": "^0.2.15", "tinyglobby": "^0.2.15",
"ts-api-utils": "^2.5.0" "ts-api-utils": "^2.5.0"
@@ -979,7 +986,13 @@
"url": "https://opencollective.com/typescript-eslint" "url": "https://opencollective.com/typescript-eslint"
}, },
"peerDependencies": { "peerDependencies": {
"@typescript/native": "npm:typescript@>=7.1.0-dev.20261009.1 || >=7.1.0-beta <7.1.0-dev",
"typescript": ">=4.8.4 <6.1.0" "typescript": ">=4.8.4 <6.1.0"
},
"peerDependenciesMeta": {
"@typescript/native": {
"optional": true
}
} }
}, },
"node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": {
@@ -993,9 +1006,9 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
"version": "5.0.12", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.1.0.tgz",
"integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "integrity": "sha512-aa11Dv491GKnYqxaul3aRJ0szew7yMJMfZPnqD44NjGrZXoj62l41OEDDpdpC4eE2P88vBFfLuSyRhpG91NUvg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -1006,32 +1019,33 @@
} }
}, },
"node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
"version": "10.2.6", "version": "11.0.9",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.9.tgz",
"integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "integrity": "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==",
"dev": true, "dev": true,
"license": "BlueOak-1.0.0", "license": "BlueOak-1.0.0",
"dependencies": { "dependencies": {
"brace-expansion": "^5.0.8" "@isaacs/nonrecursive-glob-match": "^1.1.0",
"brace-expansion": "^5.0.12"
}, },
"engines": { "engines": {
"node": "18 || 20 || >=22" "node": "20 || >=22"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/isaacs" "url": "https://github.com/sponsors/isaacs"
} }
}, },
"node_modules/@typescript-eslint/utils": { "node_modules/@typescript-eslint/utils": {
"version": "8.70.1", "version": "8.74.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.70.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.74.0.tgz",
"integrity": "sha512-Esgul8MsnKnRLdYU2Eb2cRV9bS5HJYtKj1ByJnOzzG2M58DGdSUQ1jUuILxipqcpB2h9WLrbD5GijIWUjX/Tqw==", "integrity": "sha512-IpWXPxXXomzxyTcvjhZJexgdvtTR1TooLAPpuxzaGqQ8BHll1lf4Ysp/BTE/l0U5TJ+x1j7B4bEM8pLRrvY+XA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.9.1", "@eslint-community/eslint-utils": "^4.9.1",
"@typescript-eslint/scope-manager": "8.70.1", "@typescript-eslint/scope-manager": "8.74.0",
"@typescript-eslint/types": "8.70.1", "@typescript-eslint/types": "8.74.0",
"@typescript-eslint/typescript-estree": "8.70.1" "@typescript-eslint/typescript-estree": "8.74.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -1046,13 +1060,13 @@
} }
}, },
"node_modules/@typescript-eslint/visitor-keys": { "node_modules/@typescript-eslint/visitor-keys": {
"version": "8.70.1", "version": "8.74.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.70.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.74.0.tgz",
"integrity": "sha512-Vwj9lUIW5Xq3wQ9w6gv3R86g1hMK8f2zNOdGTAgeXUMMXFK78G9ruCjjqutHMNJc0+CH7LYRnHeUB9IT8wFmcw==", "integrity": "sha512-XSZmOtMUbWCBIM+2BK134FyMFxmll1mW2mPLk/PSwYQYzGIPMgJAqL929U4qXVizLv7Xq5b7r41/o7Ombuwk0g==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/types": "8.70.1", "@typescript-eslint/types": "8.74.0",
"eslint-visitor-keys": "^5.0.0" "eslint-visitor-keys": "^5.0.0"
}, },
"engines": { "engines": {
@@ -2725,16 +2739,16 @@
} }
}, },
"node_modules/typescript-eslint": { "node_modules/typescript-eslint": {
"version": "8.70.1", "version": "8.74.0",
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.70.1.tgz", "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.74.0.tgz",
"integrity": "sha512-AcWG7KDjZ2THNXsgwttMaGmzVi0VFRlFYfqFHYQRbDpF3owuYbuiL8c7UUrd2k8s3PoSfIQrWfrGXfcElrWLYA==", "integrity": "sha512-OsWQlsedt1ZpZXfZZMNK3m4SoQONFFcy4h/uRznsCeRfVuEic3gh4KGUs2pJJ5o0Jj0Jr7keUHQGN1Ns9aDw7Q==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@typescript-eslint/eslint-plugin": "8.70.1", "@typescript-eslint/eslint-plugin": "8.74.0",
"@typescript-eslint/parser": "8.70.1", "@typescript-eslint/parser": "8.74.0",
"@typescript-eslint/typescript-estree": "8.70.1", "@typescript-eslint/typescript-estree": "8.74.0",
"@typescript-eslint/utils": "8.70.1" "@typescript-eslint/utils": "8.74.0"
}, },
"engines": { "engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0" "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -2931,13 +2945,13 @@
}, },
"packages/jwt": { "packages/jwt": {
"name": "@green-tea/jwt", "name": "@green-tea/jwt",
"version": "26.9.0-beta.0", "version": "26.11.0-rc.2",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"jose": "^6.2.12" "jose": "^6.2.12"
}, },
"devDependencies": { "devDependencies": {
"@green-tea/core": "26.9.0-beta.2" "@green-tea/core": "26.11.0-rc.2"
}, },
"engines": { "engines": {
"bun": ">=1.3", "bun": ">=1.3",
@@ -2947,10 +2961,10 @@
}, },
"packages/metrics": { "packages/metrics": {
"name": "@green-tea/metrics", "name": "@green-tea/metrics",
"version": "26.9.0-beta.0", "version": "26.11.0-rc.2",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@green-tea/core": "26.9.0-beta.2" "@green-tea/core": "26.11.0-rc.2"
}, },
"engines": { "engines": {
"bun": ">=1.3", "bun": ">=1.3",
@@ -2960,10 +2974,10 @@
}, },
"packages/rate-limit": { "packages/rate-limit": {
"name": "@green-tea/rate-limit", "name": "@green-tea/rate-limit",
"version": "26.9.0-beta.0", "version": "26.11.0-rc.2",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@green-tea/core": "26.9.0-beta.2" "@green-tea/core": "26.11.0-rc.2"
}, },
"engines": { "engines": {
"bun": ">=1.3", "bun": ">=1.3",
+16
View File
@@ -2,8 +2,24 @@
## [Unreleased] ## [Unreleased]
## [26.11.0-rc.2] - 2026-11-23
### Changed
- **Versions track core.** This release is 26.11.0-rc.2, the core it is tested against.
- **Core is a range, `^26.11.0-rc.2`, not an exact `26.9.0-beta.2`.** JSR consumers resolve the
`@green-tea/core` import in `deno.json`, and the exact pin gave an application on a newer core a
second, older copy whose types `tsc` could pick up. The range starts at the core the tests run
against (26.11.0-rc.2, which fixes nine security advisories reported against rc.1) and stops at
the next year, the only core release that may break.
## [26.9.0-beta.0] - 2026-09-23
### Added ### Added
- `jwt({ keys, provides? })`: loads each JWK file while providers boot and publishes a `JwtRegistry` - `jwt({ keys, provides? })`: loads each JWK file while providers boot and publishes a `JwtRegistry`
under `provides` (default `jwt`). `Signer` signs with `iat` and a random `jti`, and verifies issuer under `provides` (default `jwt`). `Signer` signs with `iat` and a random `jti`, and verifies issuer
and audience. `JwtRegistry.publicJwk(name)` returns a key's public half for a JWKS endpoint. and audience. `JwtRegistry.publicJwk(name)` returns a key's public half for a JWKS endpoint.
[26.11.0-rc.2]: https://jsr.io/@green-tea/jwt@26.11.0-rc.2
[26.9.0-beta.0]: https://jsr.io/@green-tea/jwt@26.9.0-beta.0
+2 -2
View File
@@ -1,10 +1,10 @@
{ {
"name": "@green-tea/jwt", "name": "@green-tea/jwt",
"version": "26.9.0-beta.0", "version": "26.11.0-rc.2",
"license": "MIT", "license": "MIT",
"exports": "./src/index.ts", "exports": "./src/index.ts",
"imports": { "imports": {
"@green-tea/core": "npm:@green-tea/core@26.9.0-beta.2", "@green-tea/core": "npm:@green-tea/core@^26.11.0-rc.2",
"jose": "npm:jose@^6.2.12" "jose": "npm:jose@^6.2.12"
}, },
"publish": { "publish": {
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@green-tea/jwt", "name": "@green-tea/jwt",
"version": "26.9.0-beta.0", "version": "26.11.0-rc.2",
"private": true, "private": true,
"description": "Loads JWT signing keys at boot and publishes a sign/verify registry into the green-tea graph.", "description": "Loads JWT signing keys at boot and publishes a sign/verify registry into the green-tea graph.",
"license": "MIT", "license": "MIT",
@@ -20,6 +20,6 @@
"jose": "^6.2.12" "jose": "^6.2.12"
}, },
"devDependencies": { "devDependencies": {
"@green-tea/core": "26.9.0-beta.2" "@green-tea/core": "26.11.0-rc.2"
} }
} }
+16
View File
@@ -2,9 +2,25 @@
## [Unreleased] ## [Unreleased]
## [26.11.0-rc.2] - 2026-11-23
### Changed
- **Versions track core.** This release is 26.11.0-rc.2, the core it is tested against.
- **Core is a range, `^26.11.0-rc.2`, not an exact `26.9.0-beta.2`.** JSR consumers resolve the
`@green-tea/core` import in `deno.json`, and the exact pin gave an application on a newer core a
second, older copy whose types `tsc` could pick up. The range starts at the core the tests run
against (26.11.0-rc.2, which fixes nine security advisories reported against rc.1) and stops at
the next year, the only core release that may break.
## [26.9.0-beta.0] - 2026-09-23
### Added ### Added
- `metrics({ provides? })`: subscribes to the lifecycle stream and publishes a `Metrics` with - `metrics({ provides? })`: subscribes to the lifecycle stream and publishes a `Metrics` with
`render()`. Counts `request:end` as requests and `request:failed` separately, labelled on the `render()`. Counts `request:end` as requests and `request:failed` separately, labelled on the
bounded `route` rather than on the caller-controlled `name`. `prometheus` is a `TransformerFn` for bounded `route` rather than on the caller-controlled `name`. `prometheus` is a `TransformerFn` for
serving `render()` from a route the application owns. Closes green-tea#68. serving `render()` from a route the application owns. Closes green-tea#68.
[26.11.0-rc.2]: https://jsr.io/@green-tea/metrics@26.11.0-rc.2
[26.9.0-beta.0]: https://jsr.io/@green-tea/metrics@26.9.0-beta.0
+2 -2
View File
@@ -1,10 +1,10 @@
{ {
"name": "@green-tea/metrics", "name": "@green-tea/metrics",
"version": "26.9.0-beta.0", "version": "26.11.0-rc.2",
"license": "MIT", "license": "MIT",
"exports": "./src/index.ts", "exports": "./src/index.ts",
"imports": { "imports": {
"@green-tea/core": "npm:@green-tea/core@26.9.0-beta.2" "@green-tea/core": "npm:@green-tea/core@^26.11.0-rc.2"
}, },
"publish": { "publish": {
"include": ["src", "README.md", "CHANGELOG.md", "deno.json"] "include": ["src", "README.md", "CHANGELOG.md", "deno.json"]
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@green-tea/metrics", "name": "@green-tea/metrics",
"version": "26.9.0-beta.0", "version": "26.11.0-rc.2",
"private": true, "private": true,
"description": "Counts green-tea's lifecycle events and renders them in the Prometheus text format.", "description": "Counts green-tea's lifecycle events and renders them in the Prometheus text format.",
"license": "MIT", "license": "MIT",
@@ -17,6 +17,6 @@
"bun": ">=1.3" "bun": ">=1.3"
}, },
"devDependencies": { "devDependencies": {
"@green-tea/core": "26.9.0-beta.2" "@green-tea/core": "26.11.0-rc.2"
} }
} }
+2 -1
View File
@@ -88,7 +88,8 @@ test('the transformer serves the text format with the content type Prometheus ex
const rendered = prometheus('green_tea_requests_total{route="/x",method="GET",status="200"} 1\n'); const rendered = prometheus('green_tea_requests_total{route="/x",method="GET",status="200"} 1\n');
assert.equal(rendered.status, 200); assert.equal(rendered.status, 200);
assert.match(rendered.headers!['content-type'], /text\/plain/); // Core RC.1 widens response header values to `string | string[]` (core #113), so a reader narrows.
assert.match(String(rendered.headers!['content-type']), /text\/plain/);
assert.match(rendered.body, /green_tea_requests_total/); assert.match(rendered.body, /green_tea_requests_total/);
}); });
+16
View File
@@ -2,9 +2,25 @@
## [Unreleased] ## [Unreleased]
## [26.11.0-rc.2] - 2026-11-23
### Changed
- **Versions track core.** This release is 26.11.0-rc.2, the core it is tested against.
- **Core is a range, `^26.11.0-rc.2`, not an exact `26.9.0-beta.2`.** JSR consumers resolve the
`@green-tea/core` import in `deno.json`, and the exact pin gave an application on a newer core a
second, older copy whose types `tsc` could pick up. The range starts at the core the tests run
against (26.11.0-rc.2, which fixes nine security advisories reported against rc.1) and stops at
the next year, the only core release that may break.
## [26.9.0-beta.0] - 2026-09-23
### Added ### Added
- `rateLimit({ rules, store?, keyOf?, provides? })`: publishes a `RateLimiter` under `provides` - `rateLimit({ rules, store?, keyOf?, provides? })`: publishes a `RateLimiter` under `provides`
(default `rateLimit`). Exceeding a rule throws `TooManyRequests`, a branded 429 carrying (default `rateLimit`). Exceeding a rule throws `TooManyRequests`, a branded 429 carrying
`Retry-After`. The default `MemoryStore` sweeps expired windows on an interval and is released by `Retry-After`. The default `MemoryStore` sweeps expired windows on an interval and is released by
the plugin's `onShutdown`. the plugin's `onShutdown`.
[26.11.0-rc.2]: https://jsr.io/@green-tea/rate-limit@26.11.0-rc.2
[26.9.0-beta.0]: https://jsr.io/@green-tea/rate-limit@26.9.0-beta.0
+2 -2
View File
@@ -1,10 +1,10 @@
{ {
"name": "@green-tea/rate-limit", "name": "@green-tea/rate-limit",
"version": "26.9.0-beta.0", "version": "26.11.0-rc.2",
"license": "MIT", "license": "MIT",
"exports": "./src/index.ts", "exports": "./src/index.ts",
"imports": { "imports": {
"@green-tea/core": "npm:@green-tea/core@26.9.0-beta.2" "@green-tea/core": "npm:@green-tea/core@^26.11.0-rc.2"
}, },
"publish": { "publish": {
"include": ["src", "README.md", "CHANGELOG.md", "deno.json"] "include": ["src", "README.md", "CHANGELOG.md", "deno.json"]
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@green-tea/rate-limit", "name": "@green-tea/rate-limit",
"version": "26.9.0-beta.0", "version": "26.11.0-rc.2",
"private": true, "private": true,
"description": "A per-request rate limiter published into the green-tea graph, with a branded 429 and a swept in-memory store.", "description": "A per-request rate limiter published into the green-tea graph, with a branded 429 and a swept in-memory store.",
"license": "MIT", "license": "MIT",
@@ -17,6 +17,6 @@
"bun": ">=1.3" "bun": ">=1.3"
}, },
"devDependencies": { "devDependencies": {
"@green-tea/core": "26.9.0-beta.2" "@green-tea/core": "26.11.0-rc.2"
} }
} }
+148
View File
@@ -0,0 +1,148 @@
#!/usr/bin/env node
// Two jobs around a `deno publish`, both about the same thing: a JSR version can never be replaced
// or removed, so anything wrong has to be caught *before* the publish rather than reported after it.
//
// --check Which packages this tag would publish, and whether each has a CHANGELOG entry
// to match. Exits non-zero when one does not. Run this BEFORE publishing.
// --notes <log> The GitHub release body, built from what `deno publish` actually did.
//
// The order matters and is the whole point of splitting it in two. core's equivalent script runs
// after npm and JSR have already published, so a missing heading fails a release that has already
// shipped — a wart worth not inheriting.
import { readFileSync, readdirSync } from 'node:fs';
import { join } from 'node:path';
const ROOT = new URL('..', import.meta.url).pathname;
const PACKAGES = join(ROOT, 'packages');
const REPO = 'Expressive-Tea/green-tea-plugins';
/** Every workspace package, with the version its deno.json declares. */
function readPackages() {
return readdirSync(PACKAGES, { withFileTypes: true })
.filter((entry) => entry.isDirectory())
.map((entry) => {
const deno = JSON.parse(readFileSync(join(PACKAGES, entry.dir ?? entry.name, 'deno.json'), 'utf8'));
return { dir: entry.name, name: deno.name, version: deno.version };
});
}
/** Whether JSR already serves this exact version. A 404 for a package with no versions at all is
* not an error — it is what every one of these looks like until its first publish. */
async function isPublished({ name, version }) {
const [scope, pkg] = name.replace(/^@/, '').split('/');
const url = `https://api.jsr.io/scopes/${scope}/packages/${pkg}/versions/${version}`;
const response = await fetch(url, { headers: { accept: 'application/json' } });
if (response.status === 404) return false;
if (!response.ok) throw new Error(`${name}@${version}: ${url} answered ${response.status}`);
return true;
}
/** One version's section of a package CHANGELOG, heading excluded. */
function changelogSection(dir, version) {
const lines = readFileSync(join(PACKAGES, dir, 'CHANGELOG.md'), 'utf8').split('\n');
const start = lines.findIndex((line) => line.startsWith(`## [${version}]`));
if (start === -1) return null;
const rest = lines.slice(start + 1);
const end = rest.findIndex((line) => line.startsWith('## '));
return (end === -1 ? rest : rest.slice(0, end))
// Link reference definitions belong to the file, not to the entry. Nothing separates them from
// the last section, so without this they ride along into the release body as a stray line.
.filter((line) => !/^\[[^\]]+\]:\s/.test(line))
.join('\n')
.trim();
}
async function check() {
const packages = readPackages();
const published = await Promise.all(packages.map(isPublished));
const pending = packages.filter((_, i) => !published[i]);
if (pending.length === 0) {
console.log('Nothing to publish: every package version is already on JSR.');
return 0;
}
let missing = 0;
for (const pkg of pending) {
const section = changelogSection(pkg.dir, pkg.version);
if (section) {
console.log(` ok ${pkg.name}@${pkg.version}`);
} else {
// Deliberately an error rather than a warning. A version heading is a claim that the release
// exists, and publishing without one leaves a package on JSR that its own changelog says was
// never released — permanently, because the version cannot be replaced.
console.error(` MISSING ${pkg.name}@${pkg.version} has no "## [${pkg.version}]" in packages/${pkg.dir}/CHANGELOG.md`);
missing += 1;
}
}
packages
.filter((_, i) => published[i])
.forEach((pkg) => console.log(` skip ${pkg.name}@${pkg.version} (already on JSR)`));
return missing === 0 ? 0 : 1;
}
/** Parse what `deno publish` reported. Its own output is the only honest source for this: predicting
* it means duplicating the filtering Deno already did, and being wrong about it silently. */
function notes(logPath, tag) {
const log = readFileSync(logPath, 'utf8');
// Colour codes survive when a terminal is attached and vanish in CI. Strip either way.
const plain = log.replace(/\u001b\[[0-9;]*m/g, '');
const shipped = [...plain.matchAll(/Successfully published (@[^@\s]+\/[^@\s]+)@(\S+)/g)]
.map(([, name, version]) => ({ name, version }));
// A log carrying neither marker is not "nothing was published" — it is a log this script cannot
// read, and the two are indistinguishable from the text alone. Saying nothing shipped when three
// packages did is the worse failure, and it is silent, so refuse instead of guessing.
//
// This is not hypothetical: the first version of this workflow piped only stdout, while deno logs
// to stderr, so every successful release would have produced an empty log and a release body
// announcing that nothing happened.
if (shipped.length === 0 && !/already published/.test(plain)) {
throw new Error(
`${logPath} contains neither "Successfully published" nor "already published". ` +
'Either the publish did not run, or its output is not being captured — check that the step ' +
'redirects stderr (deno logs there) and that the pipeline uses pipefail.',
);
}
if (shipped.length === 0) {
return `No package versions were published by \`${tag}\` — every version in the workspace was already on JSR.`;
}
const byName = Object.fromEntries(readPackages().map((pkg) => [pkg.name, pkg.dir]));
const body = shipped.map(({ name, version }) => {
const dir = byName[name];
const section = (dir && changelogSection(dir, version)) || '_No changelog entry._';
const link = `https://github.com/${REPO}/blob/${tag}/packages/${dir}/CHANGELOG.md`;
return `## [${name}@${version}](https://jsr.io/${name}@${version})\n\n${section}\n\n[Full changelog](${link})`;
});
const untouched = readPackages().filter((pkg) => !shipped.some((s) => s.name === pkg.name));
const footer = untouched.length
? `\n\n---\n\nUnchanged in this release: ${untouched.map((p) => `\`${p.name}@${p.version}\``).join(', ')}.`
: '';
return `${body.join('\n\n')}${footer}`;
}
const [mode, arg] = process.argv.slice(2);
if (mode === '--check') {
process.exit(await check());
} else if (mode === '--notes') {
if (!arg) {
console.error('usage: release.mjs --notes <publish-log> [tag]');
process.exit(2);
}
console.log(notes(arg, process.argv[4] ?? 'main'));
} else {
console.error('usage: release.mjs --check | --notes <publish-log> [tag]');
process.exit(2);
}
+5 -2
View File
@@ -76,8 +76,11 @@ for (const dir of packages) {
assert.equal(pkg.peerDependencies?.['@green-tea/core'], undefined, 'core in peerDependencies'); assert.equal(pkg.peerDependencies?.['@green-tea/core'], undefined, 'core in peerDependencies');
}); });
test(`${dir}: JSR maps the core version npm installs`, () => { // A range, not a pin (core #73): JSR consumers resolve this import, and an exact version gave an app
assert.equal(deno.imports?.['@green-tea/core'], `npm:@green-tea/core@${pkg.devDependencies?.['@green-tea/core']}`); // on a newer core the plugin's older core types. The floor is the version the tests run against;
// `^` stops at the next year, the only release that may break (core's versioning policy).
test(`${dir}: JSR maps a core range whose floor is the version npm installs`, () => {
assert.equal(deno.imports?.['@green-tea/core'], `npm:@green-tea/core@^${pkg.devDependencies?.['@green-tea/core']}`);
}); });
test(`${dir}: engines declares runtimes, and only known ones`, () => { test(`${dir}: engines declares runtimes, and only known ones`, () => {