mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-09 14:38:59 +02:00
fix(test): package.json version check accepts the decision-11 npm translation
The bump wrote the npm-valid 3-digit manifest version for the first time this release; the old assertion demanded byte-equality with the 4-digit VERSION. Accept the translation plus the grandfathered pre-v1.67 mirror, matching gstack-version-bump's own drift contract. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
084e2edbb8
commit
730327e45f
@@ -258,10 +258,16 @@ describe('gen-skill-docs', () => {
|
||||
expect(violations).toEqual([]);
|
||||
});
|
||||
|
||||
test('package.json version matches VERSION file', () => {
|
||||
test('package.json version matches VERSION file (npm-valid translation)', () => {
|
||||
// Decision 11 (v1.67 wave): VERSION stays the 4-digit source of truth;
|
||||
// package.json carries the npm-valid 3-digit translation (npm rejects a
|
||||
// fourth component). The pre-v1.67 1:1 four-digit mirror is also accepted
|
||||
// (grandfathered until the next write), matching gstack-version-bump's
|
||||
// own drift contract.
|
||||
const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf-8'));
|
||||
const version = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8').trim();
|
||||
expect(pkg.version).toBe(version);
|
||||
const npmTranslation = version.split('.').slice(0, 3).join('.');
|
||||
expect([npmTranslation, version]).toContain(pkg.version);
|
||||
});
|
||||
|
||||
test('generated files are fresh (match --dry-run)', () => {
|
||||
|
||||
Reference in New Issue
Block a user