3.0.0 • Published 2 years ago

get-changelog-lib v3.0.0

Weekly downloads
9
License
MIT
Repository
github
Last release
2 years ago

get-changelog-lib version build license

Library to get changelog url

How it works

  1. find git repository using npm registry
  2. find changelog in the repository (changelog, history or changes files and github versions)
  3. return changelog url

Install

npm install get-changelog-lib

Usage

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
})();

Advanced usage

Additional branch check

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 token

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.

CLI integration

See get-changelog-cli

License

MIT: LICENSE

3.0.0

2 years ago

2.1.0

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago