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 🙏

© 2026 – Pkg Stats / Ryan Hefner

hoist-all

v0.1.1

Published

Copy all non-existing node_modules from apps/* into root node_modules in a monorepo.

Readme

TL;DR

This package fixes errors caused by modules not being found because they exist only in an app’s local node_modules. It hoists (or reverses) them into the right place and now supports scoping, so you can easily switch between sets of dependencies (e.g. mobile, web) without reinstalling everything.


hoist-all

hoist-all is an NPM package for managing dependencies in monorepos. It supports two main features:

  1. Hoisting – copy/symlink modules from app-level node_modules into the root node_modules.
  2. Scoped installs – isolate sets of node_modules into named scopes (mobile, web, etc.) and switch between them instantly.

Installation

Install it in the root package.json:

npm install hoist-all --save-dev

Usage

1. Postinstall Hoisting (classic mode)

Add it to the root package.json:

"scripts": {
  "postinstall": "hoist-all"
}

After you run:

npm i -w your_app

hoist-all will automatically symlink or copy dependencies into the root node_modules.


2. Scoped Workspaces (new)

You can now save and switch between scopes. This is useful if you have many apps/packages but only want certain ones active at a time.

Save a scope

hoist-all s mobile "app1|app2" "shared|ui"
  • mobile → the scope name
  • "app1|app2" → regex for apps to include
  • "shared|ui" → regex for packages to include

This saves the current node_modules into .hoist-all/mobile/ and remembers your regex filters.

Install a scope

hoist-all i mobile
  • Restores node_modules from .hoist-all/mobile/
  • Applies your app/package filters
  • Switches active_scope in .hoist-all/state.json

Example

my-workspace/
  apps/
    app1/
    app2/
    app3/
  packages/
    shared/
    utils/
  node_modules/

# Save only app1 + shared into "mobile" scope
hoist-all s mobile "app1" "shared"

# Switch to mobile
hoist-all i mobile

CLI Reference

hoist-all [appsFolder] [workspaceRoot]
  • appsFolder (optional) – Defaults to apps
  • workspaceRoot (optional) – Defaults to cwd

Scope Commands

hoist-all s <scopeName> [appsRegex] [packagesRegex]
  • -a, --apps <path> – Folder containing apps (default: apps)
  • -p, --packages <path> – Folder containing packages (default: packages)
hoist-all i <scopeName>

Install a previously saved scope.

hoist-all ls

List available scopes and show the active one.


Features

  • Hoist mode: Copy/symlink modules from app-level node_modules → root.

  • Reverse-hoist mode: If hoist.target = "app", copy from root → app.

  • Scoped dependency management:

    • Save root + app/package node_modules into .hoist-all/<scope>
    • Restore instantly without reinstall
  • Regex-based filtering for apps/packages

  • Skips system folders silently

  • Reports copied/restored modules

  • Zero runtime dependencies


Configuration

App-level config

Each app can define where dependencies should live:

{
  "name": "my-app",
  "hoist": {
    "target": "root"   // or "app"
  }
}

Default is "root".

Scope config (auto-managed)

Stored in .hoist-all/state.json:

{
  "active_scope": "mobile",
  "appsFolder": "apps",
  "packagesFolder": "packages",
  "scopes": {
    "mobile": {
      "appsRegex": "app1|app2",
      "packagesRegex": "shared|ui"
    }
  }
}

Example

Workspace

my-workspace/
  node_modules/
  apps/
    app1/
      node_modules/
        lodash/
    app2/
      node_modules/
        axios/

Classic hoist

npx hoist-all

Result: lodash and axios appear in the root node_modules.

Scoped workflow

# Save a scope
hoist-all s web "app2" "ui"

# Switch scopes
hoist-all i mobile
hoist-all i web

License

MIT