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 🙏

© 2025 – Pkg Stats / Ryan Hefner

pnpm-dedicated-lockfile

v0.0.4

Published

Write a deterministic lockfile per workspace, based on currently installed dependencies.

Readme

pnpm-dedicated-lockfile

Generate a lockfile that only contains dependencies of a single package.

npm package License

Contents

Introduction

pnpm is a package manager than greatly assists working with monorepo. It stores a manifest of all installed packages in a single file .pnpm-lock.yaml at the root of your workspace. This is necessary for pNpm to manage all dependencies in one place, with appropiate caching and shared references.

However this means it is difficult to tell when changes in an installed dependency impact a given package.

When you have CI jobs that are based on caching, updating a single dependency can trigger every job to re-run, which is slow and expensive.

Instead, you can calculate a single lockfile for a given package, and perform caching based on that.

pnpm-dedicated-lockfile is a CLI that writes this dedicated lockfile to your package.

Note that while this file is directly based on .pnpm-lock.yaml and has a similar format, it is not an actual lockfile and is not interchangeable with .pnpm-lock.yaml. Instead it should only be used for caching, and for visually inspecting dependency impacts to a given package.

Install

npm i pnpm-dedicated-lockfile --save-dev

Example

npx pnpm-dedicated-lockfile --projectDir ./path/to/package

Will write a file at ./path/to/package/.pnpm-lock.

Usage

npx pnpm-dedicated-lockfile --help to get started.

It is generally recommended to only include pnpm-dedicated-lockfile as a dev/test dependency. The resulting files may be checked into version control. They are as deterministic as .pnpm-lock.yaml, but since they may only be used for caching, it is not strictly necessary.

| flag | type | default | description | |------|------|---------|-------------| | --projectDir | string | . | Directory containing package to calculate dedicated lockfile. | | --hash | boolean | false | Write a SHA hash instead of a large JSON file. This has benefits of reduced file size, but may more easily result in collisions. | | --lockfile-name | string | .pnpm-lock | Update the file name to whatever you prefer. | | --omit-comment | boolean | false | Exclude the // DO NOT EDIT comment at top of file. | | --omit-links | boolean | false | Exclude dependencies that are only related to local workspace links (e.g. workspace:^ specifiers). They are included by default | | --dry-run | boolean | false | Don't actually create/update the files. | | --ci | boolean | If is CI environment | If existing file is out-of-date, throws an error. Make sure to explicitly set as false if not checking files into version control. |