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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@papit/version

v0.0.8

Published

Version flood for npm workspaces: when a package is versioned, every package that depends on it gets the new version and a patch bump. It also resets or syncs versions against the npm registry.

Readme

@papit/version

Version flood for npm workspaces: when a package is versioned, every package that depends on it gets the new version and a patch bump. It also resets or syncs versions against the npm registry.

Logo


Type Tests NPM version


Installation

npm install -D @papit/version

Usage

Hook it into a package's npm lifecycle:

{
    "scripts": {
        "preversion": "papit-version",
        "postversion": "papit-version"
    }
}

Then version the package as usual. Its dependants follow:

cd packages/runtime/lexer
npm version patch
# @papit/lexer 0.0.1 → 0.0.2
# @papit/html depends on it: dependency set to 0.0.2, version 0.0.1 → 0.0.2

Housekeeping from the workspace root:

npx @papit/version --sync   # record the published npm version of every package
npx @papit/version --reset  # set every package back to its published version

CLI flags

| Flag | Description | | --- | --- | | --pre | run the preversion step (automatic inside npm version) | | --post | run the postversion step (automatic inside npm version) | | --force | let --pre continue when the package is already ahead of npm | | --sync | write each package's latest npm version to remoteVersion | | --reset | set each package's version back to its npm version |

Which packages --sync and --reset touch follows the batch flags of @papit/information: from the root that's every package, --individual limits it to the current one. The log level flags from @papit/arguments apply too.

Commands

pre (preversion)

  • Fails when the package's version already differs from its npm version (or remoteVersion when offline), so a package isn't bumped twice between publishes. --force skips the check.
  • Moves the root package-lock.json to temp-package-lock.json, so npm doesn't run an install for the workspace mid-version.

post (postversion)

For the versioned package and every package that depends on it, in dependency order:

  1. Refresh remoteVersion from npm.
  2. Set dependencies, devDependencies and peerDependencies on flooded packages to their new versions.
  3. Patch-bump the package if a runtime dependency changed (a * range doesn't count) or it has never been published, but only if its version still equals remoteVersion, so it's bumped at most once per publish.
  4. Move temp-package-lock.json back to package-lock.json.

--sync

Sets remoteVersion to the latest npm version, or "" when unpublished. version isn't touched.

--reset

Sets version (and remoteVersion) to the npm version, or 0.0.1 for a package that was never published, and aligns dependency ranges between packages of the root's scope. Useful to undo a flood that was never published.

License

Licensed under the @Papit License 1.0 Copyright (c) 2024 Henry Pap (@onkelhoy)

Key points

  • ✅ Free to use in commercial projects
  • ✅ Free to modify and distribute
  • ✅ Attribution required
  • ❌ Cannot resell the component itself as a standalone product

See the LICENSE file for full details.

Related