npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@trandaison/changeloger

v1.0.3

Published

A fast and lightweight changelog generator using conventional commits

Downloads

8

Readme

Changeloger

npm version npm downloads Codecov License

A fast and lightweight changelog generator using Conventional Commits.

Support several providers (GitHub, Bitbucket, GitLab, and Git) and multiple output files.

Quick Start

Generate a changelog, without bumping the version or making a git commit:

npx @trandaison/changeloger@latest --noBump --noCommit --noTag

Bump the version, update CHANGELOG.md and make a git commit and tag:

npx @trandaison/changeloger@latest

CLI usage

You can choose to install @trandaison/changeloger globally, or install it as a devDependency in your project, or use npx to run it.

npm install -g @trandaison/changeloger
npm install --save-dev @trandaison/changeloger
npx @trandaison/changeloger@latest

CLI command:

changeloger [path] [...args]

Arguments:

  • path: The path to the project directory. Default: process.cwd() (current working directory).
  • --repositoryUrl: The URL of the repository. By default, it will be read from the package.json file, or guessed from the remote git repository. If it can't be guessed, it will be null.
  • --branch: The branch name. Default is the current branch.
  • --major: Bump as a semver-major version.
  • --minor: Bump as a semver-minor version.
  • --patch: Bump as a semver-patch version.
  • --fromCommit: Start commit reference. When not provided, latest git tag will be used as default.
  • --toCommit: End commit reference. When not provided, latest commit in HEAD will be used as default.
  • --date: The date of the release. Default is the current date. Format: YYYY-MM-DD.
  • --noBump: Do not bump the version in package.json.
  • --noCommit: Do not make a git commit.
  • --noTag: Do not make a git tag.
  • --noPush: Do not push the commit and the new tag to the remote git repository.
  • --debug: Output debug data in changeloger.debug.log for debugging purposes. Set --debug=inline to output debug data in the terminal.
  • And all others options available in changelog.config.json are also available as CLI arguments. The CLI arguments will override the options in the config file.

Configuration

You can use either changelog.config.json or changelog.config.{ts,tsx,js,mjs,cjs} to configure the changelog generation.

Available options and defaults:

| Option | Type | Description | Default | | --- | --- | --- | --- | | provider | 'github' \| 'bitbucket' \| 'gitlab' \| 'git' \| null | The provider of the repository. | null | | header | string | The header of the changelog. | '# Changelog' | | output | string | The path to the output file. You can create multiple changelog files (for multiple branch or multiple environment) by using the placeholder {branch} (e.g. CHANGELOG-{branch}.md). | 'CHANGELOG.md' | | versionPrefix | string | The prefix of the version. | 'v' | | versionBumpType | 'major' \| 'minor' \| 'patch' | The type of the version bump. | patch | | startVersion | string | The start version. | 0.0.0 | | pullRequestOnly | boolean | Only include pull requests in the changelog file. | false | | order | CommitType[] | The order of each section in the changelog. | ['feat', 'perf', 'fix', 'refactor', 'docs', 'chore', 'test', 'style', 'revert'] | | typeTitle | Record<CommitType \| 'other', string> | The title of each section in the changelog. | { feat: '🚀 Features', perf: '⚡️ Performance', fix: '🩹 Bug Fixes', refactor: '💅 Refactors', docs: '📖 Documentation', chore: '🏡 Chores', test: '✅ Tests', style: '✨ Styles', revert: '🔀 Reverts', other: '❓ Unclassified' } | | noPackageJson | boolean | Do not read the package.json file. Use this option when you don't have a package.json file in your project. | false | | clean | boolean | Determine if the working directory is clean and if it is not clean, exit. | true | | releaseCommitMessage | string | The commit message for the release. Placeholder {version} will be replaced with the new version. | 'chore(release): {version}' | | bump | boolean | Bump the version in package.json. This option will be ignored if --noBump is provided in the CLI arguments. | true | | commit | boolean | Make a git commit. This option will be ignored if --noCommit is provided in the CLI arguments. | true | | tag | boolean | Make a git tag. This option will be ignored if --noTag is provided in the CLI arguments. | true | | push | boolean | Push the commit and the new tag to the remote git repository. This option will be ignored if --noPush is provided in the CLI arguments. | true | | remote | string | The name of the remote git repository in case there are multiple remotes or the remote name is not origin. | 'origin' |

See ./src/config/index.ts for the full list of available options and their defaults.

💻 Development

  • Clone the repository
  • Make sure you are using node >= v18.16
  • Install the dependencies: npm install
  • Run the dev script npm run dev or npm run test to test the build (it requires to run npm run build first)

Support

If you find this project useful, you can support its development by buying me a coffee:

Buy Me A Coffee

License

Made with ❤️ by trandaison

Licensed under the MIT License.