feat: version lint

This commit is contained in:
TrèsAbhi committed 2023-11-25 21:03:29 -06:00
1 parent 3bbbbfa402
commit 750e145f03
4 files changed
+49

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import { readdir } from 'fs/promises';
import packageJSON from '../package.json';
const { version } = packageJSON;
const changelogs = await readdir('docs/changelogs');
const hasVersion = changelogs.includes(`${version}.md`);
if (hasVersion) {
console.log(`Version ${version} found in changelogs`);
} else {
throw new Error(`Version ${version} not found in changelogs`);
}