Library to get changelog url
- find git repository using npm registry
- find changelog in the repository (changelog, history or changes files and github versions)
- return changelog url
npm install get-changelog-lib
const ChangelogFinder = require('get-changelog-lib');
(async () => {
const changeLogFinder = new ChangelogFinder();
const changelogUrl = await changeLogFinder.getChangelog('express');
console.log(changelogUrl); // https://github.com/expressjs/express/blob/master/History.md
})();
By default changelog search are only performed on the master
branch. It is possible to check additional branches (main branch for example) with the branches
configuration field.
const changeLogFinder = new ChangelogFinder({ branches: ['main'] }); // search changelogs in master and main branches
Github API is used to fetch the default branch and verify releases of each repository, this API is limited to 60 requests per hours. In order to increase this rate limit it's possible to add a github token (without specific permissions) in the CHANGELOGFINDER_GITHUB_AUTH_TOKEN
environment variable.
The procedure to generate this token is described on the github documentation.
This tool could be a little less accurate (but more performant) without this token. As no default branch or release verification are performed.
MIT: LICENSE