
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
changelog-light
Advanced tools
Generate a changelog with conventional commit types.
The basic requirements:
NPM install...
$ npm i changelog-light
$ changelog --help
Generate a CHANGELOG.md with conventional commit types.
Usage: changelog [options]
Options:
-b, --basic Keep updates to [CHANGELOG.md] basic, skip all markdown
link syntax [boolean] [default: false]
-c, --commit Commit [CHANGELOG.md] and package.json with a release
commit [boolean] [default: true]
-d, --date [CHANGELOG.md] release date in the form of a valid date
string. Uses system new Date([your date])
[string] [default: "2024-03-21T13:20:45.593Z"]
-n, --non-cc Allow non-conventional commits to apply a semver weight
and appear in [CHANGELOG.md] under a general type
description. [boolean] [default: false]
-o, --override Use a version you define. [string]
-r, --dry-run Generate [CHANGELOG.md] sample output
[boolean] [default: false]
--branch The local branch used to run `$ git log [branch]`
against, defaults to HEAD, or just `$ git log`
[string] [default: "HEAD"]
--changelog Changelog output filename and relative path
[string] [default: "./CHANGELOG.md"]
--commit-path [CHANGELOG.md] path used for commits. This will be
"joined" with "link-url". Defaults to the commits path
for GitHub. [string] [default: "commit/"]
--compare-path [CHANGELOG.md] path used for version comparison. This
will be "joined" with "link-url". Defaults to the
comparison path for GitHub.
[string] [default: "compare/"]
--link-url Url override for updating all [CHANGELOG.md] base urls.
This should start with "http". Attempts to use "$ git
remote get-url origin", if it starts with "http"
[string]
--lock-file Lock file read and relative path lookup. Defaults to
looking for git related updates to "package-lock.json"
and "yarn.lock" during release. You can pass your own
custom "lock" file if needed. To disable, pass a
falsely value.
[array] [default: ["./package-lock.json","./yarn.lock"]]
--package package.json read, output and relative path
[string] [default: "./package.json"]
--pr-path [CHANGELOG.md] path used for PRs/MRs. This will be
"joined" with "link-url". Defaults to the PR path for
GitHub. [string] [default: "pull/"]
--release-message A list of prefix release scope commit messages. First
list item is the new commit message prefix, the second
list item searches for the prior release message prefix
for range. [write new, search old]
[array] [default: "chore(release)"]
--release-desc Add a description under the release version header
copy. Example, "Lorem ipsum dolor sit!" [string]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
Using changelog-light
within a project requires one primary thing... formatting your commit messages using conventional commit types
This project leverages this conventional commit types resource to determine
how CHANGELOG.md
is generated.
changelog-light
doesn't use tags. Focusing on tags to determine what gets generated works in some environments.
Since handling tags was unnecessary for our purpose, we kept it simple. Instead, changelog-light
looks for the
last commit message, of a specific type, to determine the range of commits...
chore(release): [semver version format]
Using within a project you could apply changelog-light
as a NPM script in package.json
"scripts": {
"release": "changelog"
}
Assuming you're using GitHub as your base. If you're not using GitHub we do expose the url paths used to generate the log.
First, git checkout the branch you want to run changelog-light
on
Next, run the CLI, either directly, or through a NPM script like the above example.
$ changelog --dry-run --non-cc
We recommend you try the --dry-run
and --non-cc
options for your first run.
Review the output, you have a few choices
--dry-run
CHANGELOG.md
and package.json
update. This is the default option --commit
CHANGELOG.md
and package.json
, if you opted to update without a commit, see option --commit=false
That's it!
I want to run changelog-light
from a different branch in the same repository, or from a "forked" repository?
To get your release commit setup from a different branch...
$ changelog --dry-run
$ changelog
If there is more than one commit difference then you incorrectly synced your branch. Confer online, or with your team, for the git commands needed.
The git hash associated with the release commit IS NOT USED until the next time you run
changelog-light
. Having it updated when you merge, or rebase, your commit makes no difference in your markdown.
To get your release commit setup from a "forked" repository...
$ changelog --dry-run --link-url https://github.com/[the remote url].git
$ changelog --link-url https://github.com/[the remote url].git
If there is more than one commit difference then you incorrectly synced your branch. Confer online, or with your team, for the git commands needed.
The git hash associated with the release commit IS NOT USED until the next time you run
changelog-light
. Having it updated when you merge, or rebase, your commit makes no difference in your markdown.
This project is influenced by the deprecated project Standard Version.
The primary differences between Standard Version and this project are the weighting assigned to commit message types and a fraction of the features.
Contributing? Guidelines can be found here CONTRIBUTING.md.
FAQs
Generate a changelog from commits.
The npm package changelog-light receives a total of 80 weekly downloads. As such, changelog-light popularity was classified as not popular.
We found that changelog-light demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.