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

@repo-toolkit/publish-package

v0.6.0

Published

Build, stage, and publish a single package to npm

Readme

@repo-toolkit/publish-package

Build, stage, and publish a single package to npm.

Installation

pnpm add -D @repo-toolkit/publish-package

CLI

repo-toolkit-publish-package

When package.json.version already contains the real release version, you can omit --version. If it still uses the placeholder, pass --version explicitly.

Useful flags:

  • --config <path>
  • --cwd <path>
  • --root-dir <path>
  • --package-json <path>
  • --version <version> (alias: --tag)
  • --npm-tag <dist-tag>
  • --publish-dir <path>
  • --version-placeholder <text>
  • --package-files <file>[,<file>] (replaces defaults)
  • --include-package-file <path> (repeatable, additive)
  • --no-default-package-files
  • --root-files <file>[,<file>] (replaces defaults)
  • --include-root-file <path> (repeatable, additive)
  • --no-default-root-files
  • --build-command <command>
  • --skip-build
  • --access <level>
  • --registry <url>
  • --otp <code>
  • --provenance
  • --dry-run

JavaScript API

import { publishPackage } from '@repo-toolkit/publish-package';

publishPackage({
  cwd: '/path/to/package',
  version: '1.2.3',
  rootFiles: ['LICENSE'],
  packageFiles: ['README.md', 'CHANGELOG.md'],
  publishDir: 'dist',
  versionPlaceholder: '0.0.0-PLACEHOLDER',
  dryRun: true,
});

Exports

  • createPublishPackageJson(...) — rewrite a package manifest for publish.
  • resolvePublishPackagePlan(options) — resolve file/version/publish metadata without publishing.
  • publishPackage(options) — run the build/copy/npm-publish pipeline for one package.
  • inferNpmTag(version) — derive the npm dist-tag from a version string.
  • isPlainObject(value) — shared object guard used by the config loaders and manifest rewriters.

Options

  • cwd (string) Package root directory. Defaults to process.cwd().
  • rootDir (string) Directory to source rootFiles from. Defaults to cwd.
  • packageJsonPath (string) Source package.json path. Defaults to package.json.
  • version (string) Target package version. Defaults to package.json.version. A leading v is stripped.
  • npmTag (string) npm dist-tag. Defaults to the prerelease preid.
  • packageFiles (string[]) Files copied from the package root into the publish dir (default: ['README.md', 'CHANGELOG.md', 'llms.txt']). Missing files are skipped. Subpaths are flattened (docs/llms.txtdist/llms.txt).
  • includePackageFiles (string[]) Additional files appended to packageFiles.
  • noDefaultPackageFiles (boolean) Skip copying default package files.
  • rootFiles (string[]) Files copied from rootDir into the publish dir (default: ['LICENSE']). Missing files are skipped.
  • includeRootFiles (string[]) Additional files appended to rootFiles.
  • noDefaultRootFiles (boolean) Skip copying default root files.
  • publishDir (string) Publish directory inside the package root (default: dist).
  • versionPlaceholder (string) Placeholder rewritten to the target version (default: 0.0.0-PLACEHOLDER).
  • buildCommand (string) Command used to build the publish dir (default: pnpm build).
  • skipBuild (boolean) Skip the build step.
  • access (string) npm publish access level (default: public).
  • registry (string) npm registry URL.
  • otp (string) npm OTP code.
  • provenance (boolean) Request npm provenance attestation.
  • dryRun (boolean) Forward --dry-run to npm publish.
  • internalPackageNames (string[] | Set<string>) Names treated as internal workspace packages for dependency-range rewriting.

Docs

The longer guide lives in the workspace documentation site under website/docs/packages/publish-package.md.