mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 07:07:31 +00:00
@
test(server): unpin three fixtures from the 3.x version window The 4.0.0 bump turned three suites red on dev, all for the same reason: they described a world where the host was still 3.x. The plugin install fixtures declared trek ">=3.2.0 <4.0.0" and ">=3.0.0 <4.0.0", so every default artifact became incompatible with its own host and 23 tests failed on the version gate instead of on what they were testing. The upper bound bought nothing — the cases that exercise the gate pass their own range — so it is gone rather than moved to 5.0.0. The system-notice suite named thank-you-support twice. It is capped at 4.0.0 and handed over to release-4-0-0 there, so the established-user case saw a notice it had never been told about, and the per-version recurrence case rode on a notice that no longer applies at all. The first now reads the always-on set out of the registry instead of naming it, and the second drives the mechanism through a notice it pushes itself. Neither ages out at the next release. @
This commit is contained in:
@@ -47,7 +47,7 @@ function writeSource(id: string, opts: { index?: string; native?: boolean; noBui
|
||||
fs.mkdirSync(path.join(dir, 'server'), { recursive: true });
|
||||
// dev-link requires a `trek` range like any other install front door; `opts.trek`
|
||||
// overrides it to exercise the gate.
|
||||
fs.writeFileSync(path.join(dir, 'trek-plugin.json'), JSON.stringify({ id, name: id, version: '1.0.0', type: 'integration', permissions: [], trek: opts.trek ?? '>=3.0.0 <4.0.0' }));
|
||||
fs.writeFileSync(path.join(dir, 'trek-plugin.json'), JSON.stringify({ id, name: id, version: '1.0.0', type: 'integration', permissions: [], trek: opts.trek ?? '>=3.0.0' }));
|
||||
if (!opts.noBuild) fs.writeFileSync(path.join(dir, 'server', 'index.js'), opts.index ?? 'module.exports = {};');
|
||||
if (opts.native) fs.writeFileSync(path.join(dir, 'server', 'addon.node'), '\0');
|
||||
return dir;
|
||||
|
||||
@@ -49,7 +49,7 @@ function tarHeader(name: string, size: number, typeflag = '0'): Buffer {
|
||||
// without it would be testing the version gate rather than whatever the test is about.
|
||||
// Pass an explicit `trek` (or null, spread last) to exercise the gate itself.
|
||||
function makeArtifact(manifest: object): Buffer {
|
||||
const withTrek = { trek: '>=3.2.0 <4.0.0', ...manifest };
|
||||
const withTrek = { trek: '>=3.2.0', ...manifest };
|
||||
const files = [
|
||||
{ name: 'plug-abc/', type: '5' as const, data: '' },
|
||||
{ name: 'plug-abc/trek-plugin.json', type: '0' as const, data: JSON.stringify(withTrek) },
|
||||
|
||||
Reference in New Issue
Block a user