chore(plugins): publish to JSR alone, and drop the npm build #5

Merged
chrnx merged 4 commits from chore/jsr-only-plugins into develop 2026-09-23 16:35:03 +00:00
4 Commits
Author SHA1 Message Date
chrnx 686a4527cf docs(plugins): give each package a header, and stop leaning on a marketplace
CI / dco (pull_request) Successful in 7s
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 10s
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>
2026-09-23 11:24:09 -05:00
chrnx 16f8329794 docs(plugins): say how to install now that npm is not an option
CI / dco (pull_request) Successful in 5s
CI / build (pull_request) Successful in 15s
CI / runtimes (bun) (pull_request) Successful in 11s
CI / runtimes (edge) (pull_request) Successful in 9s
CI / runtimes (deno) (pull_request) Successful in 11s
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>
2026-09-23 10:26:10 -05:00
chrnx 8499aaa760 fix(ci): resolve core from npm, not Verdaccio
CI / dco (pull_request) Successful in 6s
CI / runtimes (deno) (pull_request) Successful in 12s
CI / build (pull_request) Successful in 14s
CI / runtimes (bun) (pull_request) Successful in 11s
CI / runtimes (edge) (pull_request) Successful in 9s
`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>
2026-09-23 10:21:53 -05:00
chrnx 4caf8809df chore(plugins): publish to JSR alone, and drop the npm build
CI / dco (pull_request) Successful in 4s
CI / build (pull_request) Failing after 8s
CI / runtimes (bun) (pull_request) Failing after 7s
CI / runtimes (deno) (pull_request) Failing after 9s
CI / runtimes (edge) (pull_request) Failing after 7s
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>
2026-09-23 10:13:39 -05:00