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

lts-pin

v1.0.6

Published

**LTS Pin** is a CLI tool that automatically pins your project dependencies to the previous major or minor stable versions, helping you maintain long-term support and avoid unexpected breaking changes.

Downloads

14

Readme

LTS Pin

LTS Pin is a CLI tool that automatically pins your project dependencies to the previous major or minor stable versions, helping you maintain long-term support and avoid unexpected breaking changes.

Features

  • Detects your package manager (bun, pnpm, yarn, or npm)
  • Pins all dependencies, devDependencies, and peerDependencies in your package.json to the previous major or minor version (using ~ for minor/patch updates)
  • Regenerates your lockfile using your detected package manager

Installation & Usage

You can run LTS Pin directly without installing globally using tools like bunx, npx, or similar:

bunx lts-pin
npx lts-pin

Or specify a target directory:

bunx lts-pin ./path/to/project
# or
npx lts-pin ./path/to/project

You can also install globally:

npm install -g lts-pin
lts-pin

How it works

  1. Reads your package.json and collects all dependencies.
  2. For each dependency, fetches metadata from the npm registry and determines the previous major or minor stable version.
  3. Updates your package.json to pin each dependency to ~<previous version>.
  4. Detects your package manager and runs the appropriate install command to update your lockfile.

API

You can also use the main functions programmatically:

  • updateToPreviousVersions: Updates dependencies in a target directory.
  • getPreviousVersion: Gets the previous major or minor version for a package.
  • detectPackageManager: Detects the package manager in a directory.

Why?

I've had too many issues with newer major releases. An example that annoys me often is eslint's upgrade to Version 9 where they introduced new config layouts. None of the underlying plugins for ESlint were compatible for like 6 months, so I always had to downgrade.

I personally don't think that a new major version for a software is anywhere viable until it hits x.1.1, e.g. 5.1.1 for typescript. The only time you shouldn't run this is when the latest version of the prior major release has a vulnerability.

License

MIT


Author: Ashley Jackson