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-isolate

v1.0.0

Published

Temporarily isolate a pnpm workspace to a selected package subset

Downloads

123

Readme

pnpm-isolate

pnpm-isolate reduces a pnpm workspace to just the package you want to build and the workspace packages it depends on.

It is mainly meant for temporary build steps, especially Docker.

By default it rewrites both pnpm-lock.yaml and pnpm-workspace.yaml.

Usage

Usually you run it with npx:

npx pnpm-isolate <selector...> [options]

Examples:

npx pnpm-isolate ./app
npx pnpm-isolate @scope/app
npx pnpm-isolate ./app ./common
npx pnpm-isolate ./app --prod
npx pnpm-isolate ./app --dry-run
npx pnpm-isolate ./app --output pnpm-lock.isolated.yaml --workspace-output pnpm-workspace.isolated.yaml

What it does

  • keeps the selected workspace package
  • keeps any workspace packages it depends on
  • rewrites pnpm-lock.yaml
  • rewrites pnpm-workspace.yaml by default
  • can keep or drop the root importer (.)
  • can strip importer devDependencies

Options

--root <path>                 Workspace root directory. Default: nearest pnpm workspace
--output, -o <path>           Output lockfile path. Default: pnpm-lock.yaml
--workspace-output, -w <path> Output workspace manifest path. Default: pnpm-workspace.yaml
--no-prune-workspace          Do not rewrite pnpm-workspace.yaml
--no-keep-root                Do not keep the root importer (`.`)
--prod, -p                    Keep only production importer dependencies
--dry-run                     Show what would be kept without writing files
--help                        Show help

Selectors

Use path selectors like ./app when you mean a workspace path.

Package selectors also work, for example @scope/app.

If a selector does not already contain ..., pnpm-isolate adds it automatically so dependencies are included.

Typical flow

npx pnpm-isolate ./app
pnpm install --frozen-lockfile
pnpm --filter ./app build

If you want to inspect the result first:

npx pnpm-isolate ./app --dry-run

Or write to separate files:

npx pnpm-isolate ./app --output pnpm-lock.isolated.yaml --workspace-output pnpm-workspace.isolated.yaml

Important

This tool is meant for temporary build steps.

It rewrites your workspace files by default. If that is not what you want, use --no-prune-workspace and or write to separate output files first.