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

semver-demo

v1.0.0

Published

Demo showing how compliance with the conventional commit message spec can automate CHANGELOG and semantic version bumps (and more).

Downloads

10

Readme

semver-demo

License NPM version NSP StatusReadme Score Build Status Coverage percentage Codacy Badge Dependency Status

Demo showing how compliance with the conventional commit message spec can automate CHANGELOG and semantic version bumps (and more).

1. Table of contents

2. Installation

Run the following command in a shell:


$ npm install --save semver-demo

3. Usage

semver-demo demonstrates how software products -- libraries, packages, and applications -- can automate

3.1. Git commit message format

The conventional commit message specification, which is based on the AngularJS Git Commit Guidelines, prescribe a precise, parsable commit message format. This not only encourages succinct and consistent change logs, but also enables automated release management with the standard-version package.

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:


<type>(<scope>): <subject>
<BLANK LINE>
<[body]>
<BLANK LINE>
<footer>

3.1.1. type

types describe the kinds of changes made to a software product. Valid types are:

  1. build: Changes to build configuration
  2. chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
  3. ci: Changes associated with continuous integration and continuous delivery
  4. docs: Documentation only changes
  5. feat: A new feature
  6. fix: A bug fix
  7. perf: A code change that improves performance
  8. refactor: A code change that neither fixes a bug nor adds a feature
  9. revert: Commits that revert to a previous version.
  10. style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  11. test: Adding missing or correcting existing tests

3.1.2. scope, subject, body, footer, and BREAKING CHANGEs

The AngularJS Git Commit Guidelines document the other parts of a commit message. Please refer to that document for details.

3.2. Git commit message validation

The package commitplease installs a configurable pre-commit hook that validates commit messages.

3.3. Git commit message wizards

Some teams prefer commitizen, which provides a CLI "wizard" that ensures commit messages are valid.

[Commitizen add wizard]

3.4. Automated CHANGELOG and semantic versioning

standard-version parses Git commit messages to:

  • "Bump" your software's semantic version based by parsing the types in your commit messages.

| Type | Semantic version bump | Example | |:-------------------|:-----------------------------|:------------------| | BREAKING CHANGE | MAJOR: v**X.Y.Z | 1.0.02.0.0 | | feat | MINOR: vX.Y.Z | 1.0.01.1.0 | | fix | PATCH: vX.Y.Z** | 1.0.01.0.1 |

  • Run git tag with the latest semantic version.
  • Generate (or update an existing) CHANGELOG.md. This includes semantic version links to tags and commit links for BREAKING CHANGEs, features, and fixes.

:page_facing_up: semantic-release is another popular tool that automates all release tasks by simply merging source code into the master branch.

3.5. Putting it into practice

3.5.1. Add a change to your software.

3.5.2. Commit with a valid conventional commit message:


feat(qa-gates): automate travis-ci qa-gates and security checks (#5)

1. Build with Travis-CI.
2. Add Coveralls for code coverage reports.
3. Check for Node.js vulnerabilities with the Node Security Program (nsp).
4. Automate code reviews with Codacy.
5. Lint source code with ESLint.
6. Identify dependency drift with David-DM.
7. Grade README.md documentation with ScoreMe.
8. Link to latest release on NPM.
9. Add open-source license badge.

Closes #2

3.5.3.Push to your topic branch.

3.5.4. Ensure your automated pull request

  • Builds,
  • All tests pass,
  • Your coverage threshold is met,
  • There are no security vulnerabilities,
  • Your documentation is good, and
  • Passes any other automated quality gates.

3.5.5. Squash and merge your topic branch into

3.5.6. Release your product, e.g.,


$ npm run release -- --dry-run

> [email protected] release /Users/swindle/Projects/github/gregswindle/semver-demo
> standard-version "--dry-run"

✔ bumping version in package.json from 0.0.0 to 0.1.0
✔ created CHANGELOG.md
✔ outputting changes to CHANGELOG.md

---
<a name="0.1.0"></a>
# 0.1.0 (2017-06-21)


\ ### Features

* **qa-gates:** automate travis-ci qa-gates and security checks ([#5](https://github.com/gregswindle/semver-demo/issues/5)) ([8d82c46](https://github.com/gregswindle/semver-demo/commit/8d82c46)), closes [#2](https://github.com/gregswindle/semver-demo/issues/2)
---

✔ committing package.json and CHANGELOG.md
✔ tagging release 0.1.0
ℹ  Run `git push --follow-tags origin master; npm publish` to publish

4. Contributions

:family: We warmly welcome contributors. Check out the guidelines for Contributing to semver-demo and our Contributor Covenant Code of Conduct.

Contributions are stories with a beginning, a middle, and an end, all told through issues and pull requests.

5. License

Apache-2.0 © Greg Swindle.


Greenkeeper badge