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-injected-sync

v0.0.4

Published

Sync PNPM injected dependencies in your workspace with file watching support.

Readme

pnpm-injected-sync

Sync PNPM injected dependencies in your workspace with file watching support.

This is a CLI wrapper for pnpm's official @pnpm/workspace.injected-deps-syncer package.

Installation

npm install -g pnpm-injected-sync
# or
pnpm add -g pnpm-injected-sync

Commands

| Command | Purpose | Use Case | |---------|---------|----------| | sync | One-time sync | Build scripts, CI/CD pipelines | | watch | Continuous watching | Standalone development watching | | run <cmd> | Wrap command with auto-syncing | Development servers (vite, webpack, etc.) |

Usage Examples

One-time Sync

Sync all injected dependencies once and exit:

pnpm-injected-sync sync

Watch Mode

Watch for changes and sync continuously:

pnpm-injected-sync watch

Run with Auto-sync

Run a command with automatic dependency syncing. Multiple processes share a single watcher:

pnpm-injected-sync run vite
pnpm-injected-sync run "npm run dev"

Integration with package.json

{
  "scripts": {
    "dev": "pnpm-injected-sync run vite",
    "build": "pnpm-injected-sync sync && vite build",
    "watch": "pnpm-injected-sync watch"
  }
}

Environment Variables

PNPM_INJECTED_SYNC_DISABLED

Set to a truthy value to disable all syncing functionality. Useful for CI environments or when you want to temporarily disable syncing.

Accepted truthy values: true, 1, yes, on (case-insensitive)

Features

  • 🔄 Automatic synchronization of PNPM injected dependencies
  • 👀 File watching with debounced updates (100ms)
  • 🚀 Shared watcher for multiple processes to reduce resource usage
  • 🔧 Automatic failover - clients promote to watcher when master process exits
  • 📦 Process wrapping with proper signal forwarding and exit code preservation
  • 🛠️ One-time sync for build scripts and CI/CD
  • 🎯 Workspace detection automatically finds your PNPM workspace root

How It Works

  1. Workspace Detection: Automatically finds your PNPM workspace by looking for pnpm-workspace.yaml
  2. Dependency Discovery: Reads injected dependencies from .pnpm-state.yaml
  3. Synchronization: Uses PNPM's official syncer to update dependencies
  4. File Watching: Monitors changes in source packages and syncs automatically

Shared Watcher Mode (run command)

When using pnpm-injected-sync run:

  • First process becomes the watcher
  • Additional processes register as clients
  • Watcher continues until all client processes exit
  • Proper signal forwarding (Ctrl+C works correctly)
  • Exit codes are preserved from child processes

Requirements

  • PNPM workspace with injected dependencies
  • Node.js 14+

License

ISC