chore(graceful-handoff): 2.0.0 — bump version, remove auto_discover, update CHANGELOG [skip-docs]
Step 8 of v2.0 plan.
This commit is contained in:
parent
a67411ae26
commit
0707d03bea
3 changed files with 90 additions and 4 deletions
46
plugins/graceful-handoff/tests/plugin-manifest.test.mjs
Normal file
46
plugins/graceful-handoff/tests/plugin-manifest.test.mjs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
// plugin-manifest.test.mjs — verify plugin.json schema for v2.0
|
||||
|
||||
import { test } from 'node:test';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const MANIFEST = join(__dirname, '..', '.claude-plugin', 'plugin.json');
|
||||
const CHANGELOG = join(__dirname, '..', 'CHANGELOG.md');
|
||||
|
||||
test('plugin.json version is 2.0.0', () => {
|
||||
const m = JSON.parse(readFileSync(MANIFEST, 'utf-8'));
|
||||
assert.equal(m.version, '2.0.0');
|
||||
});
|
||||
|
||||
test('plugin.json does NOT include auto_discover (not in documented schema)', () => {
|
||||
const m = JSON.parse(readFileSync(MANIFEST, 'utf-8'));
|
||||
assert.ok(!('auto_discover' in m), 'auto_discover field should be removed');
|
||||
});
|
||||
|
||||
test('plugin.json description mentions auto-trigger or context-threshold', () => {
|
||||
const m = JSON.parse(readFileSync(MANIFEST, 'utf-8'));
|
||||
assert.match(m.description, /auto-trigger|context-threshold/i);
|
||||
});
|
||||
|
||||
test('CHANGELOG has [2.0.0] entry', () => {
|
||||
const c = readFileSync(CHANGELOG, 'utf-8');
|
||||
assert.match(c, /## \[2\.0\.0\]/);
|
||||
});
|
||||
|
||||
test('CHANGELOG [2.0.0] entry has BREAKING section', () => {
|
||||
const c = readFileSync(CHANGELOG, 'utf-8');
|
||||
// Get content from [2.0.0] until next ## or end
|
||||
const match = c.match(/## \[2\.0\.0\][\s\S]*?(?=## \[1\.0\.0\]|$)/);
|
||||
assert.ok(match, '[2.0.0] section missing');
|
||||
assert.match(match[0], /### BREAKING/);
|
||||
});
|
||||
|
||||
test('No source files reference version 1.0.0', () => {
|
||||
const m = JSON.parse(readFileSync(MANIFEST, 'utf-8'));
|
||||
// Manifest is the canonical source — check it doesn't accidentally still say 1.0.0
|
||||
const raw = readFileSync(MANIFEST, 'utf-8');
|
||||
assert.doesNotMatch(raw, /"version":\s*"1\.0\.0"/);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue