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

anypm

v0.8.4

Published

Use your favorite package manager locally and let npm be used by your CI!

Downloads

20

Readme

Actions Status Actions Status Actions Status Test Coverage Maintainability Packages npm version

This project aims to use a package manager of your preference locally without the need to change the CI configuration of your project to use this same manager.

At first, the compatibility is made between pnpm and npm, where npm will be the cloud package and pnpm used local. This itself already offer much less space and internet consumed for you, my fellow developer! And if your fellow developer doesn't want to use pnpm, that's okay! He can stick with npm and everyone will be happy!

How to install

npm -g anypm pnpm

As you see, you need to install pnpm along with it, otherwise anypm will just use npm locally too!

How to use it

To execute "npm install" equivalent, with no packages:

anypm install
anypm i

To install one or more packages (if the package have a valid @types, it is installed too)

anypm install express moment
anypm i express moment

To install dev dependencies

anypm install --save-dev jest
anypm i -D jest

To uninstall (correspondent @types are uninstalled too):

anypm uninstall express
anypm un express

To install modules resolving from package-lock (npm ci equivalent):

anypm ci

Replace npm

This is a experimental feature, but, in linux systems, you can replace the npm command by anypm in any call and it'll work seamlessly. First, you need to have nvm installed, then, set the default node version for nvm to your preferred version:

nvm alias default 10

Finally, add it to your initializing script (.zshrc, .bashrc etc...):

anypm nvmrc

This command will add a hook to the cd command and, at every folder change, it'll change the node version if there is any .nvmrc in the current folder, or to default version, if there is none. At each change, it'll also replace the npm command to anypm. Any command anypm does not support will be passed to npm.

Oh my god, pnpm is giving me an error in my project for some package

Some packages with errors in the package.json does not work well with pnpm. Also, pnpm no longer supports node 10 since version 6. If you used anypm nvmrc as described above and you have some project with node 10:

  • Do not install pnpm in your node 10, just in node 12 or above;
  • Install the version 5 in your node 10;

If you have some project using a node version greater than 10 and you're getting erros during the installation:

  • Be like Sherlock Holmes and try to figure out which package is giving your an error (by installing one by one in another folder, for example);
  • Create a file called anypmrc.json in the root folder with the following content:
{
  "command": "npm"
}

This way, just in this project, you'll use npm, not pnpm, as your package manager under anypm

License

Licensed under MIT.