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

@marianmeres/sync-versions

v0.2.0

Published

Carry a pnpm workspace's root version into every member manifest, VERSION constant and the changelog — the before-commit step of a one-version release.

Readme

@marianmeres/sync-versions

NPM License

Use this in a pnpm workspace whose packages are all released together at one version. It copies the root package.json version into every member manifest, into any export const VERSION = "…" constants, and into the changelog, where ## Unreleased becomes ## <version> — <date>. It is meant to run between the version bump and the release commit.

Installation

pnpm add -D @marianmeres/sync-versions

Node 24.12 or newer. No runtime dependencies.

Usage

A release tool such as @marianmeres/release bumps one manifest: the root package.json. Run sync-versions as that tool's --before-commit step, so the release commit carries the new version everywhere:

{
  "scripts": {
    "release": "sync-versions --preflight && pnpm run ci && release --before-commit \"sync-versions\"",
    "version:check": "sync-versions --check"
  }
}
  • --preflight runs before anything slow. It checks that the workspace already agrees on one version. It also warns when the changelog has no ## Unreleased section; with --strict, it fails instead.
  • --check belongs in CI or your test suite. It fails when someone edits a version by hand and the rest of the workspace no longer matches.

Run it from the repository root.

What it changes

| Target | Which | How | | ----------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------- | | Member manifests | Every workspace member that has a version, minus any --exclude | The value is replaced in place; formatting is untouched | | VERSION modules | Each --version-module <path>; each must contain exactly one export const VERSION = "…" | Quotes, spacing and a : string annotation are kept | | The changelog | CHANGELOG.md, or --changelog <path>, or nothing with --no-changelog | ## Unreleased becomes ## <version> — <date> (UTC) |

Members are read from the packages: list in pnpm-workspace.yaml. A pattern can be <dir>/* (every child directory with a package.json, hidden ones excluded) or a plain <dir>. Without a packages: list, the repository is treated as a single package, and only the modules and the changelog are synced.

When there is no ## Unreleased section

By default the release still goes through. A ## <version> — <date> heading goes in above the newest section, with a line saying No notes were written for this release., and a warning is printed. The heading keeps --check passing afterwards, and the changelog still lists every release.

With --strict, the release is refused instead. The tool exits 1 before writing anything, and a release tool that restores its bump on failure, such as @marianmeres/release, leaves the tree exactly as it was.

Options

| Option | Meaning | | ------------------------- | ------------------------------------------------------------------------------------------------------- | | (none) | Write mode: copy the version everywhere and stamp the changelog. | | --check | Verify only: exit 1 on drift, write nothing. | | --preflight | Same as --check, plus a warning (a failure with --strict) when there is no ## Unreleased section. | | --strict | Refuse a release with no ## Unreleased section. Not accepted with --check. | | --exclude <dir> | A workspace member to leave alone (repeatable). It must name an existing member. | | --version-module <path> | A file whose export const VERSION gets the version (repeatable). | | --changelog <path> | The changelog. Default: CHANGELOG.md. | | --no-changelog | There is no changelog. | | -h, --help | Show usage. |

Refusals

Anything ambiguous makes it exit 1, and it never writes a file before every check has passed. It refuses when:

  • the root version is missing or not semver
  • a workspace pattern is negated (!…), deeper than <dir>/*, or names a directory that does not exist
  • the packages: list matches no member
  • the repository uses npm or yarn workspaces (only pnpm workspaces are supported)
  • an --exclude matches no member
  • a manifest's first "version" key is not the top-level one
  • a version module has no VERSION export, or more than one
  • the changelog is missing, has two ## Unreleased sections, has one that is not the newest section, or, when releasing, already has a section for the version below the top
  • an unknown flag, a stray argument, or contradictory flags are passed

API

The same logic is available as a library (syncVersions() and its helpers). See API.md.

License

MIT