Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
change-log
Advanced tools
Changelog
[v2.1.0] - 2017-12-18
Readme
Command line generation of a Semantic Versioning based change log.
Please note: the tool intelligence is currently low. Be careful not to
remove sections created by change-log init
, especially under the
Unreleased section.
You can see an editable example of this format here.
This project was inspired by Keep a Change Log but the format is different, with a focus on the SemVer versions.
Execute without arguments to view a list of command arguments and options
change-log
Create a new CHANGELOG.md file. The name is taken from package.json if it exists, and from the folder name if it does not.
change-log init
Add an entry under Major in the Unreleased section.
The message is echoed to stdout.
change-log major "What was changed"
Add an entry under Minor in the Unreleased section.
The message is echoed to stdout.
change-log minor "What was added"
Add an entry under Patch in the Unreleased section.
The message is echoed to stdout.
change-log patch "What was fixed"
Marks the unreleased section as a release:
change-log release
For the major, minor, and patch commands, the message you provided is echoed to STDOUT.
# major
git commit -am "$(change-log major 'message')"
# minor
git commit -am "$(change-log minor 'message')"
# patch
git commit -am "$(change-log patch 'message')"
For the release command, the version, of form v#.#.#
is written to stdout.
# release
git commit -am "$(change-log release)"
The following options will cause git commands to be executed when using the major, minor, patch and release commands.
This option calls git commit -m "message"
, committing only staged changes.
The CHANGELOG.md file will be automatically staged before committing.
For the release command, package.json will be automatically staged, and
also npm-shrinkwrap.json and package-lock.json if they exist (the version will
have been updated in these files if they exist).
change-log release 'message' --commit
This option calls git commit -am "message"
, committing all changes, both
staged and unstaged.
change-log release 'message' --commit-all
Default settings can be overridden using a .changelog
file in the
current working directory or in your home directory. You can also
specify the same options at command line.
Here are the options that can be provided to override the defaults:
Here are the recognized tokens that will be replaced in each string template above:
These tokens are replaced with a simple find and replace operation, with no evaluation of what is between the braces.
Example .changelog
file:
{
"unreleasedUriTemplate": "https://github.com/${organization}/${name}/compare/v${toVersion}...master",
"startUriTemplate": "https://github.com/${organization}/${name}/commits/v${toVersion}",
"uriTemplate": "https://github.com/${organization}/${name}/compare/v${fromVersion}...v${toVersion}",
"organization": "myOrg",
"name": "projectName"
}
Example cli options:
change-log release --unreleasedUriTemplate="https://github.com/${organization}/${name}/compare/v${toVersion}...master"
See the change log for this project for a full working example of the format.
Here is an example of creating a new file, adding changes and cutting a release:
$ change-log init && cat CHANGELOG.md
# change-log Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased] - YYYY-MM-DD
### Major
### Minor
### Patch
[Unreleased]: https://github.com/majgis/change-log/commits/v1.0.0
$ change-log minor "Added a new feature" && cat CHANGELOG.md
# change-log Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased] - YYYY-MM-DD
### Major
### Minor
- Added a new feature
### Patch
[Unreleased]: https://github.com/majgis/change-log/commits/v1.0.0
$ change-log patch "Fixed an issue" && cat CHANGELOG.md
# change-log Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased] - YYYY-MM-DD
### Major
### Minor
- Added a new feature
### Patch
- Fixed an issue
[Unreleased]: https://github.com/majgis/change-log/commits/v1.0.0
$ change-log release && cat CHANGELOG.md
v1.0.0
# change-log Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased] - YYYY-MM-DD
### Major
### Minor
### Patch
## [v1.0.0] - 2016-11-15
### Minor
- Added a new feature
### Patch
- Fixed an issue
[Unreleased]: https://github.com/majgis/change-log/compare/v1.0.0...master
[v1.0.0]: https://github.com/majgis/change-log/commits/v1.0.0
FAQs
Command line generation of a Semantic Versioning based change log
The npm package change-log receives a total of 25 weekly downloads. As such, change-log popularity was classified as not popular.
We found that change-log demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.