Plugins now publish to JSR only. The npm half — a tsup config per package, a dual exports map, and a dist/ — is gone.
Why
npx jsr add @green-tea/<name> installs under npm, yarn, pnpm and bun through npm.jsr.io. Measured in a scratch project: it writes one line to .npmrc (@jsr:registry=https://npm.jsr.io) and adds an aliased dependency, so the import specifier stays @green-tea/<name> and the @jsr/ name appears only in the lockfile. require() against the ESM-only tarball works on Node 20.19 and 22 via require(esm).
So the second registry was buying a reader close to nothing, and costing a build that can go stale between a merge and a release.
Nothing is published yet. All three packages 404 on npm and JSR. This costs no consumer anything today, and it is the reversible direction: adding npm later breaks nobody, whereas removing it after a publish would.
JSR is also the only one of the two that records where a plugin runs, per package. That is not cosmetic here — jwt imports node:fs/promises and cannot serve workerd, while metrics imports nothing at all and runs everywhere. npm has nowhere to put that difference, so engines plus the README table (convention 9) was the only place it lived.
What changed
Deleted tsup.config.ts from all three packages, and main / module / types / exports / files / scripts from their package.json.
Dropped the root build script and tsup from devDependencies.
Removed the npm run build step from CI. deno publish --dry-run, already in the runtimes job, is the publish path these packages actually take.
Rewrote convention 11 in AGENTS.md.
test/workspace.test.ts now pins the JSR-only invariant instead of the dual-registry one: private must be true, and none of the npm entry-point fields may come back. private stops being a leftover and becomes the guard that makes an accidental npm publish fail.
Verified
lint
clean (one pre-existing no-explicit-any warning in test/helpers.ts)
format:check / typecheck / complexity:check
clean
npm test
60/60
test:deno / test:bun
31 / 31
test:edge
no package declares workerd — unchanged
deno publish --dry-run
all three simulate clean; slow-types check passes
npm audit --omit=dev
0 vulnerabilities
Two things deliberately left alone
The CI job is still called build even though it no longer builds. Renaming it changes a required status check on the protected branches, which deserves its own change rather than riding along here.
metrics and rate-limit import nothing and could plausibly declare workerd, which would give test:edge something to run. Worth looking at when the runtimeCompat entries are filled in on JSR — same question, and it should be answered once.
Plugins now publish to JSR only. The npm half — a `tsup` config per package, a dual `exports` map, and a `dist/` — is gone.
## Why
`npx jsr add @green-tea/<name>` installs under npm, yarn, pnpm and bun through `npm.jsr.io`. Measured in a scratch project: it writes **one line** to `.npmrc` (`@jsr:registry=https://npm.jsr.io`) and adds an aliased dependency, so **the import specifier stays `@green-tea/<name>`** and the `@jsr/` name appears only in the lockfile. `require()` against the ESM-only tarball works on Node 20.19 and 22 via `require(esm)`.
So the second registry was buying a reader close to nothing, and costing a build that can go stale between a merge and a release.
**Nothing is published yet.** All three packages 404 on npm *and* JSR. This costs no consumer anything today, and it is the reversible direction: adding npm later breaks nobody, whereas removing it after a publish would.
JSR is also the only one of the two that records **where a plugin runs**, per package. That is not cosmetic here — `jwt` imports `node:fs/promises` and cannot serve workerd, while `metrics` imports nothing at all and runs everywhere. npm has nowhere to put that difference, so `engines` plus the README table (convention 9) was the only place it lived.
## What changed
- Deleted `tsup.config.ts` from all three packages, and `main` / `module` / `types` / `exports` / `files` / `scripts` from their `package.json`.
- Dropped the root `build` script and `tsup` from devDependencies.
- Removed the `npm run build` step from CI. `deno publish --dry-run`, already in the `runtimes` job, is the publish path these packages actually take.
- Rewrote convention 11 in `AGENTS.md`.
- `test/workspace.test.ts` now pins the JSR-only invariant instead of the dual-registry one: `private` must be `true`, and none of the npm entry-point fields may come back. `private` stops being a leftover and becomes the guard that makes an accidental `npm publish` fail.
## Verified
| | |
|---|---|
| `lint` | clean (one pre-existing `no-explicit-any` warning in `test/helpers.ts`) |
| `format:check` / `typecheck` / `complexity:check` | clean |
| `npm test` | 60/60 |
| `test:deno` / `test:bun` | 31 / 31 |
| `test:edge` | no package declares workerd — unchanged |
| `deno publish --dry-run` | all three simulate clean; slow-types check passes |
| `npm audit --omit=dev` | 0 vulnerabilities |
## Two things deliberately left alone
**The CI job is still called `build`** even though it no longer builds. Renaming it changes a required status check on the protected branches, which deserves its own change rather than riding along here.
**`metrics` and `rate-limit` import nothing and could plausibly declare `workerd`**, which would give `test:edge` something to run. Worth looking at when the `runtimeCompat` entries are filled in on JSR — same question, and it should be answered once.
The second registry was costing a tsup config per package, a dual `exports`
map and a `dist/` that could go stale between a merge and a release — and it
was not buying a reader anything. `npx jsr add @green-tea/<name>` installs
under npm, yarn, pnpm and bun through `npm.jsr.io`: one line in `.npmrc`, and
the import specifier stays `@green-tea/<name>`. The `@jsr/` name only ever
appears in the lockfile.
Nothing is published yet — all three packages are absent from both registries
— so this costs no consumer anything, and it is the reversible direction:
adding npm later breaks nobody, while removing it after a publish would.
JSR is also the only one of the two that can record *where a plugin runs*, per
package, which is not cosmetic for a framework whose claim is one app on four
runtimes. `jwt` needs `node:fs/promises` and cannot serve workerd; `metrics`
imports nothing and runs everywhere. npm has nowhere to put that.
`private: true` stays and becomes the guard: an accidental `npm publish` now
fails rather than shipping entry points that describe a build nobody runs.
`test/workspace.test.ts` pins that invariant instead of the dual-registry one.
The CI job keeps the name `build` deliberately — renaming it would change a
required status check on the protected branches, which is a separate change.
`deno publish --dry-run` in the `runtimes` job now stands in for the build, and
it is the publish path these packages actually take.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
`npm ci` has been failing on `develop` with `EINTEGRITY` for `@green-tea/core`,
independently of any branch — verified by running it on a clean clone of
`develop` before touching anything. Every job that installs was red; only `dco`,
which does not, was green.
Verdaccio proxies npmjs.org. When core 26.9.0-beta.2 was published for real on
2026-09-22, the staged tarball under the same version was superseded by the
upstream one, and the integrity recorded in the lockfile stopped matching what
the registry serves. Nothing in this repository changed; the thing it pinned
did.
`.npmrc` existed only because that version lived on Verdaccio alone, which its
own comment said would end at Plan B3. It ended early: core is on npmjs.org, so
the scope line goes and the lockfile now resolves from
`registry.npmjs.org` with the integrity npm published.
The `if:` guards keeping CI on Gitea stay. Their stated reason is gone — a
GitHub runner can reach npm — but turning CI on over there is its own change,
and the repository has no GitHub mirror yet.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
The READMEs still described a dual publish, and none of them carried an install
command at all — so the instruction a reader would infer, `npm i
@green-tea/jwt`, is the one command that no longer works. Each package README is
also the page JSR renders, which makes it the first thing anyone sees.
Adds `npx jsr add` to all three, with the deno and bun forms, and says plainly
that there is no npmjs.org package rather than letting someone find out from a
404.
Also corrects a claim in the root README that this branch made false: "installing
one never pulls a second copy of core". Measured while deciding this change — a
plugin names an exact core in `deno.json`, and across a minor boundary npm nests
a second copy instead of deduplicating. The copy is inert, since a plugin's built
code never imports core, and that is worth saying precisely: what is guaranteed
is which core *runs*, not how many are on disk.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Each README now opens the way core's does — logo, name, one line saying what
the package is for. The package README is the page JSR renders, so it is the
first thing anyone sees, and three of them opened with a bare `# @green-tea/x`.
The logo is an absolute URL rather than a relative path, deliberately. Core's
README points at `./assets/logo.png`, and core's `publish.include` does not ship
`assets/` — so that image 404s on core's JSR page today. Repeating the pattern
three more times would have repeated the bug three more times.
Also drops the claim that npmjs.org discovery does not matter "where the
marketplace is the channel anyway". There is no marketplace yet, and a plugin
should stand on its own rather than on a site that has not shipped. The cost is
now stated plainly instead of argued away.
Corrects "their built code never imports it": with JSR publishing the source,
the build is JSR's, not ours. What holds is that a type import leaves nothing
behind, so the published JavaScript never mentions core.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
chrnx
merged commit ea25331631 into develop2026-09-23 16:35:03 +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.
Plugins now publish to JSR only. The npm half — a
tsupconfig per package, a dualexportsmap, and adist/— is gone.Why
npx jsr add @green-tea/<name>installs under npm, yarn, pnpm and bun throughnpm.jsr.io. Measured in a scratch project: it writes one line to.npmrc(@jsr:registry=https://npm.jsr.io) and adds an aliased dependency, so the import specifier stays@green-tea/<name>and the@jsr/name appears only in the lockfile.require()against the ESM-only tarball works on Node 20.19 and 22 viarequire(esm).So the second registry was buying a reader close to nothing, and costing a build that can go stale between a merge and a release.
Nothing is published yet. All three packages 404 on npm and JSR. This costs no consumer anything today, and it is the reversible direction: adding npm later breaks nobody, whereas removing it after a publish would.
JSR is also the only one of the two that records where a plugin runs, per package. That is not cosmetic here —
jwtimportsnode:fs/promisesand cannot serve workerd, whilemetricsimports nothing at all and runs everywhere. npm has nowhere to put that difference, soenginesplus the README table (convention 9) was the only place it lived.What changed
tsup.config.tsfrom all three packages, andmain/module/types/exports/files/scriptsfrom theirpackage.json.buildscript andtsupfrom devDependencies.npm run buildstep from CI.deno publish --dry-run, already in theruntimesjob, is the publish path these packages actually take.AGENTS.md.test/workspace.test.tsnow pins the JSR-only invariant instead of the dual-registry one:privatemust betrue, and none of the npm entry-point fields may come back.privatestops being a leftover and becomes the guard that makes an accidentalnpm publishfail.Verified
lintno-explicit-anywarning intest/helpers.ts)format:check/typecheck/complexity:checknpm testtest:deno/test:buntest:edgedeno publish --dry-runnpm audit --omit=devTwo things deliberately left alone
The CI job is still called
buildeven though it no longer builds. Renaming it changes a required status check on the protected branches, which deserves its own change rather than riding along here.metricsandrate-limitimport nothing and could plausibly declareworkerd, which would givetest:edgesomething to run. Worth looking at when theruntimeCompatentries are filled in on JSR — same question, and it should be answered once.