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

published

v1.9.1

Published

πŸ“¦ Opinionated NPM publish program

Downloads

466

Readme

published

πŸ“¦ Opinionated NPM publish program

published helps streamline a git based workflow with package publishing through continues delivery. Developers control their branch and version strategies, and published takes care of logical conditioning of when to publish stable versions and/or release candidates.

Run without installation

npx published@1

OR

npm exec published@1 --yes

Options

| option | Description | Example | - | - | - | testing | Dry run | npm exec published --yes -- --testing | slack.webhook | Notify on Slack | npm exec published --yes -- --slack.webhook $SLACK_WEBHOOK | slack.channel | Change Slack webhook channel | npm exec published --yes -- --slack.webhook $SLACK_WEBHOOK --slack.channel "#publish" | quiet | Silent outputs and notifications | npm exec published --yes -- --quiet | git-tag | Push a tag to git, Only from master(latest-branch) or latest branch | npm exec published --yes -- --git-tag | prefix-git-tag | Choose a prefix that will be prepend to git tag. Only from master(latest-branch) or latest branch | npm exec published --yes -- --git-tag --prefix-git-tag=my-prefix@ | on-publish | Execute shell command after a publish event | npm exec published --yes -- --on-publish bash\ ./do-more.sh | on-<tag> | Execute shell command after a publish event with this tag (executes after on-publish) | npm exec published --yes -- --on-latest 'echo "Published!"' | latest-branch | Branch that is considered latest (default is 'master') | npm exec published --yes -- --latest-branch stable | tag-name | Tag name to be used regardless of config. If performed from a branch other than master, needs to be used in conjunction with latest-branch option | npm exec published --yes -- --tag-name next --latest-branch next | no-sha | Disables the commit's SHA suffix for RC versions | npm exec published --yes -- --no-sha

TL;DR

| Branch type | action | | --- | --- | | Feature branch | Release RC versions on tag by branch name. | | Master (latest) branch | Release clean semver on "latest" tag. |

echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc

Flow

Feature branch

  • Publish only versions with a pre-release section containing rc string
  • Unless the --no-sha flag was passed, branch versions get a suffix that matches the commit ID, so you can re install the same tag and get updates
  • Tags are named after the branch name

"master" branch

  • Only publish clean semver versions, no pre-release
  • Publish versions to tag "latest" (or publishConfig.tag from package.json)

* using latest-branch option will switch its behaviour with master

"latest" branch

  • Same as master, but will ignore publishConfig.tag setting.Use this if your master branch points to "next" through publishConfig.tag

Examples

| branch | version | publish | tag | w/o sha | - | - | - | - | - | my_feature_branch, next | 1.3.0 | nothing | N/A | - | my_feature_branch, next | 1.3.1-alpha | nothing | N/A | - | my_feature_branch, next | 1.3.1-rc | 1.3.1-rc | my_feature_branch, next | βœ“ | my_feature_branch, next | 1.3.1-rc.1 | 1.3.1-rc.1 | my_feature_branch, next | βœ“ | my_feature_branch, next | 1.3.1-rc | 1.3.1-rc-c447f6a | my_feature_branch, next | βœ• | my_feature_branch, next | 1.3.1-rc.1 | 1.3.1-rc.1-c447f6a | my_feature_branch, next | βœ• | master, latest | 1.3.0 | 1.3.0 | latest | - | master, latest | 1.3.0-beta | Throws Error | N/A | - | master, latest | 1.3.0-rc | Throws Error | N/A | -

* using latest-branch option will switch its behaviour with master

Package icon by Julien Deveaux from the Noun Project