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

pnpm-export

v0.2.1

Published

Export one package from a pnpm workspace into an npm-installable directory.

Downloads

283

Readme

pnpm-export

Tests NPM version

Export one package from a pnpm workspace into a self-contained directory that installs with plain npm. Local workspace: dependencies come along, all specifiers are rewritten to npm-compatible ones, and package-lock.json is built from pnpm-lock.yaml.

npx pnpm-export --cwd packages/api --output /tmp/api
cd /tmp/api
npm install

vs pnpm pack / pnpm deploy

  • pnpm pack tarballs a single package and drops its workspace dependencies.
  • pnpm deploy ships a tree but keeps pnpm-specific behavior.
  • pnpm-export rewrites workspace: deps to file: links and resolves catalog: references, so the output runs on plain npm.

Use cases

  • Deploy a single service from a pnpm monorepo to AWS Lambda, Google App Engine, Cloud Run, Cloudflare Workers, Azure Functions, Heroku, Vercel, Netlify, Render, Fly.io, or Railway — anywhere the build step runs npm install and chokes on workspace:* or catalog: specifiers.
  • Slim Docker images — copy one self-contained directory into the container instead of the whole monorepo, with no pnpm needed at build or runtime.
  • CI artifact handoff — produce the export in one job, then install it in another job, machine, or downstream pipeline that doesn't have pnpm.
  • Vendor or publish a package without exposing pnpm-only specifiersworkspace: deps become real file: links, catalog: refs resolve to concrete versions, and package-lock.json is generated from pnpm-lock.yaml for reproducible installs.
  • Air-gapped or offline builds — the output is one self-contained directory plus a lockfile, easy to review, ship, or mirror.

Flags

Usage: pnpm-export [options]

Export one package from a pnpm workspace for npm install.

Options:
  -v, --version                output the version number
  -C, --cwd <dir>              source package directory
  -o, --output <dir>           output directory
  -D, --dev-dependencies       Follow "workspace:" devDependencies (default:
                               true)
  --no-dev-dependencies        Skip "workspace:" devDependencies
  -P, --peer-dependencies      Follow "workspace:" peerDependencies (default:
                               true)
  --no-peer-dependencies       Skip "workspace:" peerDependencies
  -O, --optional-dependencies  Follow "workspace:" optionalDependencies
                               (default: true)
  --no-optional-dependencies   Skip "workspace:" optionalDependencies
  --patch-dependencies <mode>  patch dependency handling: ignore | warning |
                               try-replace (default: "try-replace")
  --clean                      wipe output directory contents before writing
                               (default: false)
  --lockfile                   emit package-lock.json (experimental) (default:
                               false)
  --dry-run                    print planned actions without writing (default:
                               false)
  --silent                     suppress non-error output (default: false)
  -h, --help                   display help for command

Programmatic API

import { App, Config, makeDependencies, pnpmExport } from 'pnpm-export';

const config = new Config({
  options: {
    cwd: 'packages/api',
    output: '/tmp/api',
    clean: true,
  },
});
const deps = makeDependencies({ config });
const app = new App({ deps });

await pnpmExport(app);

License

Licensed under MIT.