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

megarepo

v0.0.6

Published

Megarepo is a monorepo - but not really. It consists of a set of github repositories that have interdependencies, and the goal fo Megarepo is to make these repos sync nicely.

Downloads

7

Readme

Megarepo

Megarepo is a monorepo - but not really. It consists of a set of github repositories that have interdependencies, and the goal fo Megarepo is to make these repos sync nicely.

Motivation

  • npm link isn't always working and you don't want to be linking everything manually all the time
  • Even if you link manually (which can be a lot of overhead with lots of packages) you will end up with problems in the deployed environment because installation is often cached and it will not install the latest version.
  • monorepos are great, but not if you want to distribute things as small packages and repositories.

More info coming soon.

Convention

  • There is no nestedness in the folder structure (for now)
  • Root of the GitHub repo is also the npm package
  • a Zelda-like CLI can link all packages to eachother with ease.
  • Require the package-name, the repo-name and the folder-name to be all equal.
  • Require the package-name to be available in NPM.
  • Require the package-name to be descriptive, but a little flavor in branding is allowed.
  • I can be flexible in which frontend-frameworks are used as long as it's react-based to keep all code available.

How to have monorepo-like behavior when not using a monorepo?

Run zelda in a package to link everything to everything.

How to take a monorepo package and make it a published and linked NPM package?

  1. change the name of the folder and package.json#name to something that can be published
  2. use global replace to change from "old" into from "new"
  3. run node /Users/king/Desktop/github/os/packages/typescript-swc/development/build/cli/buildEverythingInRightOrder.cli.js to ensure this change is done.
  4. Make repo: git init, git set remote, git add/commit/push
  5. Publish on NPM: npm publish
  6. Copy the folder to github folder (to prevent code breaking)
  7. run addDependency($1)
  8. run zelda in the package
  9. remove the folder from original location (now that new location is linked)

The package should now be auto-linked to every package it's used, including all packages in the monorepo.

How to make a local CLI publicly available

  1. Ensure your executing CLI file has #!/usr/bin/env node on top
  2. Add a "bin": { "your-cli-command": "./path-to-cli.js" } in your package.json
  3. Run chmod +x ./path-to-cli.js
  4. Run npm link

Tips & tricks

How to list all linked packages:

npm ls --link --global

How to see which packages are symlinked in your node_modules:

ls -l node_modules | grep ^l

..or for a specific package:

ls -l node_modules | grep ^l | grep YOUR_PACKAGE