Naughty Programmer's Madness
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    @studio/changespublic

    Studio Changes

    📦 Generate a changelog as part of the npm version command.

    Usage

    • Use npm version [patch|minor|major] to create a release
    • Your editor will open with a generated CHANGES.md file
    • When you're done writing the release notes, save and close the editor to continue
    • To abort the release, remove the heading with the new version number

    Install

    $ npm install @studio/changes --save-dev

    Configure

    Add this to your package.json:

    {
      "scripts": {
        "preversion": "npm test",
        "version": "changes",
        "postversion": "git push --follow-tags && npm publish"
      },
      "devDependencies": {
        "@studio/changes": "^1.0.0"
      }
    }

    The scripts can also be added with changes --init, if they do not exist yet:

    $ node_modules/.bin/changes --init

    Or with npx:

    $ npx changes --init

    If the "version" script already exists, this has no effect. Existing file indentation style will be preserved.

    Options

    • --help, -h: Display a help message.
    • --file, -f: Specify the name of the changelog file. Defaults to CHANGES.md.
    • --init: Add version lifecycle scripts to package.json.
    • --tag: Use a custom git tag, supports simple replacement of package.json fields. Defaults to v${version}.

    Configure your preferred editor with the $EDITOR environment variable.

    Preview changes for next release

    If the current version in your package.json is already in the changelog, the changes command aborts and shows the unreleased commits. Preview the release notes for the next release like this:

    $ node_modules/.bin/changes

    Or with npx:

    $ npx changes

    License

    MIT

    Made with ❤️ on 🌍

    install

    npm i @studio/changes

    Downloadsweekly downloads

    96

    version

    1.4.0

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar