Refresh metadata and workflows

This commit is contained in:
yeasy
2026-05-18 07:38:58 -07:00
parent 5650315cb4
commit 0b8f6e9b60
11 changed files with 102 additions and 30 deletions
+15
View File
@@ -0,0 +1,15 @@
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
const changelog = fs.readFileSync('CHANGELOG.md', 'utf8');
const readme = fs.readFileSync('README.md', 'utf8');
const topVersion = changelog.match(/^\* ([0-9]+\.[0-9]+\.[0-9]+)\b/m)?.[1];
if (pkg.version !== topVersion) {
throw new Error(`package.json version ${pkg.version} does not match CHANGELOG ${topVersion}`);
}
if (pkg.license !== 'CC-BY-NC-SA-4.0' || !readme.includes('CC BY-NC-SA 4.0')) {
throw new Error('package.json license must match README license');
}