1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-02-09 01:45:03 +00:00
mon-entreprise/scripts/check-changelog.js

12 lines
381 B
JavaScript

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