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>
This commit is contained in:
chrnx committed 2026-11-20 00:39:23 -06:00
1 parent cf7d30d8c2
commit 3e55a1c081
12 files changed
+53 -22

No files matched your search

+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
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
CalVer no range can express.
whatever version a plugin was written against.
That is about *loading*, not about disk. A plugin names an exact core in its `deno.json`, and when
your version differs by more than the patch, npm places a second copy under the plugin rather than
deduplicating. Measured, on purpose: it is inert, because nothing ever imports it. What it can do
is make `tsc` resolve a plugin's `Plugin` type against that copy instead of yours, which fails
loudly at compile time rather than quietly at runtime.
The types still come from somewhere, so each plugin's `deno.json` names a core **range**,
`^26.11.0-rc.1`: the version its tests run against, up to the next year. After core's first stable
release only the first release of a year may break, so that range is exactly the set of cores a
plugin stays compatible with, and your application's core satisfies it without a second copy. A
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.
+7 -7
View File
@@ -611,16 +611,16 @@
}
},
"node_modules/@green-tea/core": {
"version": "26.9.0-beta.2",
"resolved": "https://registry.npmjs.org/@green-tea/core/-/core-26.9.0-beta.2.tgz",
"integrity": "sha512-HM8FdRgJz5CUiXqQUEa7vA3C+MLm/xe1Gq+5Unzg/3U6pPxqLedac+kUNcokeuwCNU5UE6bqtraTuHMua+xZ7Q==",
"version": "26.11.0-rc.1",
"resolved": "https://registry.npmjs.org/@green-tea/core/-/core-26.11.0-rc.1.tgz",
"integrity": "sha512-uEGIW/3+59frmF2sJ5Rde07SrbM9GiZYA3mMkm3w03kZVsU6EecQrZLX02cQxN/pdpuodVKgnH4lp0eQiGWB6g==",
"dev": true,
"license": "MIT",
"dependencies": {
"reflect-metadata": "0.2.2"
},
"engines": {
"node": ">=18"
"node": ">=22"
},
"peerDependencies": {
"busboy": "^1.6.0",
@@ -2937,7 +2937,7 @@
"jose": "^6.2.12"
},
"devDependencies": {
"@green-tea/core": "26.9.0-beta.2"
"@green-tea/core": "26.11.0-rc.1"
},
"engines": {
"bun": ">=1.3",
@@ -2950,7 +2950,7 @@
"version": "26.9.0-beta.0",
"license": "MIT",
"devDependencies": {
"@green-tea/core": "26.9.0-beta.2"
"@green-tea/core": "26.11.0-rc.1"
},
"engines": {
"bun": ">=1.3",
@@ -2963,7 +2963,7 @@
"version": "26.9.0-beta.0",
"license": "MIT",
"devDependencies": {
"@green-tea/core": "26.9.0-beta.2"
"@green-tea/core": "26.11.0-rc.1"
},
"engines": {
"bun": ">=1.3",
+9
View File
@@ -1,5 +1,14 @@
# Changelog
## [Unreleased]
### Changed
- **Core is a range, `^26.11.0-rc.1`, 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 (now 26.11.0-rc.1) and stops at the next year, the only core release that may break.
## [26.9.0-beta.0] - 2026-09-23
### Added
+1 -1
View File
@@ -4,7 +4,7 @@
"license": "MIT",
"exports": "./src/index.ts",
"imports": {
"@green-tea/core": "npm:@green-tea/core@26.9.0-beta.2",
"@green-tea/core": "npm:@green-tea/core@^26.11.0-rc.1",
"jose": "npm:jose@^6.2.12"
},
"publish": {
+1 -1
View File
@@ -20,6 +20,6 @@
"jose": "^6.2.12"
},
"devDependencies": {
"@green-tea/core": "26.9.0-beta.2"
"@green-tea/core": "26.11.0-rc.1"
}
}
+9
View File
@@ -1,5 +1,14 @@
# Changelog
## [Unreleased]
### Changed
- **Core is a range, `^26.11.0-rc.1`, 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 (now 26.11.0-rc.1) and stops at the next year, the only core release that may break.
## [26.9.0-beta.0] - 2026-09-23
### Added
+1 -1
View File
@@ -4,7 +4,7 @@
"license": "MIT",
"exports": "./src/index.ts",
"imports": {
"@green-tea/core": "npm:@green-tea/core@26.9.0-beta.2"
"@green-tea/core": "npm:@green-tea/core@^26.11.0-rc.1"
},
"publish": {
"include": ["src", "README.md", "CHANGELOG.md", "deno.json"]
+1 -1
View File
@@ -17,6 +17,6 @@
"bun": ">=1.3"
},
"devDependencies": {
"@green-tea/core": "26.9.0-beta.2"
"@green-tea/core": "26.11.0-rc.1"
}
}
+9
View File
@@ -1,5 +1,14 @@
# Changelog
## [Unreleased]
### Changed
- **Core is a range, `^26.11.0-rc.1`, 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 (now 26.11.0-rc.1) and stops at the next year, the only core release that may break.
## [26.9.0-beta.0] - 2026-09-23
### Added
+1 -1
View File
@@ -4,7 +4,7 @@
"license": "MIT",
"exports": "./src/index.ts",
"imports": {
"@green-tea/core": "npm:@green-tea/core@26.9.0-beta.2"
"@green-tea/core": "npm:@green-tea/core@^26.11.0-rc.1"
},
"publish": {
"include": ["src", "README.md", "CHANGELOG.md", "deno.json"]
+1 -1
View File
@@ -17,6 +17,6 @@
"bun": ">=1.3"
},
"devDependencies": {
"@green-tea/core": "26.9.0-beta.2"
"@green-tea/core": "26.11.0-rc.1"
}
}
+5 -2
View File
@@ -76,8 +76,11 @@ for (const dir of packages) {
assert.equal(pkg.peerDependencies?.['@green-tea/core'], undefined, 'core in peerDependencies');
});
test(`${dir}: JSR maps the core version npm installs`, () => {
assert.equal(deno.imports?.['@green-tea/core'], `npm:@green-tea/core@${pkg.devDependencies?.['@green-tea/core']}`);
// A range, not a pin (core #73): JSR consumers resolve this import, and an exact version gave an app
// 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`, () => {