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

@overlayed-app/conventional-changelog-dist-tagger

v4.0.2

Published

Helps make standard-version releases using tagged dist data πŸ“¦πŸŽπŸ“ƒ

Downloads

5

Readme

conventional-changelog-dist-tagger

Helps make standard-version releases using tagged dist data. πŸ“¦πŸŽπŸ“ƒ

Example flow diagram

This pattern is useful when you want to have GitHub Releases that contain generated artifacts as part of the source tree, but you do not want these artifacts in master. A common usage of this pattern is the jquery repo - note how the dist/ folder on master is empty, but v3.4.1 contains artifacts.

Further, master still contains a release commit in it's tree, with the updated package.json and CHANGELOG.md, in the tree at the commit from which the dist tag forks. This lets master show releases rolling forward, without containing dist files.

Disclaimer: This pattern is not a good idea if your dist files are large binaries - note that while these files won't appear on the master branch, they're still tracked by git, and will increase the repo size, and slow some git operations. Here's a good stackoverflow article on the topic.

Usage

First, install this package, and standard-version as devDependencies:

npm i -D standard-version @overlayed-app/conventional-changelog-dist-tagger

Then, configure standard-version properly, in your package.json:

"standard-version": {
  "scripts": {
    "postcommit": "npx @overlayed-app/conventional-changelog-dist-tagger"
  },
  "skip": {
    "tag": true
  }
}

Then, run standard-version, with this package as a preset:

# Note: preset name is not a typo, conventional-changelog prefix is implicit
npx standard-version --preset @overlayed-app/dist-tagger

This replaces the built-in standard-version commit parsing logic, and tag generation functionality with our parser and tagger. Our parser is not configurable, by design. However, to further configure our tagger, use the following environment variables:

  • DIST_FILES - the git pathspec used to add dist files. Default: dist/*.
  • REL_BRANCH - the release branch of your repo. Default: master.
  • TAG_BRANCH - the tag branch of your repo. Default tagger/well-known/<version>.

The TAG_BRANCH allows you to specify a branch that will be created as a fork of your REL_BRANCH in the local repo only to house the commit for the tag. This provides a convienient way to reference that specific commit, if you're unable to use the tag itself. In practice, this is rarely needed.

Once you're using the tagger, you probably want to push the commits and tags to github after each Continuous Deployment run. To do so:

git push origin master
git push --tags

Assuming that:

  • Your REL_BRANCH is master
  • Your CD process does not introduce any other tags your wouldn't want pushed

License

MIT