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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@blitzjs/manypkg

v0.19.1

Published

Manypkg is a linter for `package.json` files in Yarn, Bolt or pnpm monorepos.

Downloads

225

Readme

Manypkg

Manypkg is a linter for package.json files in Yarn, Bolt or pnpm monorepos.

Install

yarn add @manypkg/cli

Usage

manypkg check

manypkg check runs all of the checks against your repo, logs any errors and exits with a code

manypkg fix

manypkg check runs all of the checks against your repo and fixes any of problems that can be fixed.

manypkg upgrade <packageName> <tag or version>

This command helps you quickly upgrade your dependencies in a monorepo, or for packages from another scope. This is similar to yarn upgrade with slightly different ergonomics. At its most basic:

manypkg upgrade react

This will find every instance of react in your packages, and upgrade it to latest.

manypkg upgrade react next

This will find every instance of react in your packages, and upgrade it to the next tag on npm.

Using tags respects your version range specifier (carat, or tilde dependency type).

You can also specify a version or version range such as:

manypkg upgrade react ^16.3.0

Upgrading all dependencies in a scope

If you specify a scope, rather than a package name, you can upgrade all packages within a scope, for example:

manypkg upgrade @keystonejs

This would upgrade all packages in the keystone scope to latest across your repository. You can specify a tag, or a version range. If you specify a tag, it will update every package that has a tag at this scope.

If you specify a version range, all packages in the scope will be updated to that version range and then an install will be attempted, but you will have errors if not all packages in the scope have that version.

manypkg npm-tag tagname (--otp OTP_CODE)

This gets each public package in the repo, and adds the npm tag specified to the current version of each. This can be run after publish to give a particular release a name.

manypkg npm-tag charmander

WARNING - npm-tag is not currently particularly robust in its implementation. The logging and feedback are likely to be poor

manypkg run <partial package name or directory> <script>

manypkg run executes scripts for packages within a monorepo.

As an example, let's say there are two packages: @project/package-a at packages/pkg-a and @project/package-b at packages/pkg-a which both have a start script, manypkg run can be used like this:

yarn manypkg run pkg-a start
yarn manypkg run a start
yarn manypkg run package-a start
yarn manypkg run @project/package-a start
yarn manypkg run packages/pkg-a start
yarn manypkg run package-b start
yarn manypkg run b start

The following wouldn't work though because the package and pkg aren't unique among the package names/directories:

yarn manypkg run package start
yarn manypkg run pkg start

In order to target a package with a name that is a substring of another (@project/package-a at packages/pkg-a and @project/package-a-1 at packages/pkg-a-1), use the exact package or directory name:

yarn manypkg run @project/package-a start
yarn manypkg run packages/pkg-a start