1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-03-14 07:55:06 +00:00
mon-entreprise/modele-social/check-changelog.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
457 B
JavaScript
Raw Normal View History

// Ensure that current package version is referenced in the Changelog.md
import { readFileSync } from 'fs'
const packageVersion = JSON.parse(
readFileSync(new URL('./package.json', import.meta.url).pathname)
).version
const changelog = readFileSync(
new URL('./CHANGELOG.md', import.meta.url).pathname
)
if (!changelog.includes(`## ${packageVersion}\n`)) {
throw Error(
`Current version ${packageVersion} is not referenced in the CHANGELOG.md`
)
}