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

@nightnetwork/dpm

v0.1.1

Published

Dusk Package Manager — npm-compatible package manager for Node and DuskJS

Readme

@nightnetwork/dpm — Dusk Package Manager

A fast, npm-compatible package manager built for both Node.js and DuskJS runtimes.

Features

  • Full npm compatibility — drop-in replacement for npm, npx, and pnpm commands
  • Registry support — works with the public npm registry and custom registries
  • Lockfile support — generates and reads package-lock.json v3 format
  • Content-addressable cache — SHA-512 integrity-based caching for fast offline installs
  • Integrity verification — SHA-1, SHA-256, and SHA-512 SRI verification of all tarballs
  • Bin shims — automatic node_modules/.bin shim generation with native binary detection
  • Semver resolution — built-in semver parser supporting ^, ~, hyphen ranges, x-ranges, || alternatives, and prerelease tags
  • Dependency hoisting — npm-compatible hoisting with nested fallback for version conflicts
  • Parallel installs — concurrent BFS dependency resolution and parallel tarball fetching
  • Lifecycle scripts — runs preinstall, install, postinstall, prepublish, and prepare scripts
  • CLI aliases — provides npm, npx, and pnpm compatibility shims
  • Dual runtime — works in standard Node.js and as /bin/dpm inside DuskJS

Installation

npm install -g @nightnetwork/dpm

CLI Usage

dpm — Dusk Package Manager

Usage:
  dpm install [packages...]     Install dependencies (alias: dpm i, dpm add)
  dpm uninstall <pkg>           Remove a package (alias: dpm rm, dpm remove)
  dpm run <script> [args...]    Run a package.json script
  dpm exec <command> [args...]  Run a local-bin command
  dpm list                      List installed packages
  dpm init [--yes]              Initialize a new package.json
  dpm cache <clean|verify|ls>   Manage the cache
  dpm config <get|set|delete>   Manage config
  dpm --version                 Print dpm version
  dpm --help                    Show help

Options:
  -D, --save-dev                Save to devDependencies
  -S, --save                    Save to dependencies (default)
  --silent                      Suppress output
  --registry <url>              Custom registry URL

Install dependencies

# Install all dependencies from package.json
dpm install

# Add a package to dependencies
dpm install express

# Add a package to devDependencies
dpm install -D vitest

# Install from a custom registry
dpm install --registry https://registry.example.com

Remove a package

dpm uninstall lodash
# or
dpm rm lodash

Run scripts

dpm run build
dpm run test -- --watch

Execute binaries

# Run a locally installed binary
dpm exec vitest

# Run with dpx (like npx)
dpx create-react-app my-app
dpx -p typescript tsc --init

List installed packages

dpm list

Initialize a project

dpm init
dpm init --yes

Cache management

dpm cache ls
dpm cache verify
dpm cache clean

Configuration

dpm config get registry
dpm config set registry https://registry.example.com
dpm config delete registry

npm / npx / pnpm Compatibility

dpm ships with compatibility aliases that map directly to dpm commands:

| Alias | Maps to | |-------|--------| | npm install | dpm install | | npm uninstall | dpm uninstall | | npm run | dpm run | | npm exec | dpm exec | | npm list | dpm list | | npm init | dpm init | | npm cache | dpm cache | | npm config | dpm config | | npx <cmd> | dpx <cmd> | | pnpm add | dpm install | | pnpm remove | dpm uninstall | | pnpm dlx | dpx | | pnpm run | dpm run | | pnpm exec | dpm exec | | pnpm list | dpm list | | pnpm init | dpm init |

Architecture

Core Modules

| Module | Description | |--------|------------| | core/resolver | Concurrent BFS dependency resolver with npm-compatible hoisting and nested fallback. Handles registry semver ranges, URL tarballs, file: deps, and dist-tags. Includes a multi-pass hoisting algorithm that lifts nested packages to the highest conflict-free position. | | core/registry | HTTP client for npm-compatible registries. Fetches packument metadata (abbreviated format) and tarball bytes. | | core/tarball | Pure-TypeScript gzip decompression and ustar tar parser. Extracts tarballs to disk with configurable component stripping. | | core/lockfile | Reads and writes package-lock.json in lockfile v3 format. Builds lockfile entries from the resolved dependency graph. | | core/cache | Content-addressable filesystem cache using SHA-512 hex sharding (<cacheDir>/<alg>/<AA>/<BB>/<hex>). | | core/integrity | Tarball integrity verification supporting SHA-512, SHA-256, and SHA-1 SRI hashes, plus legacy hex shasums. | | core/bin-shims | Creates node_modules/.bin shims with automatic detection of native binaries (ELF/Mach-O/PE), shebanged scripts, and plain JS files. | | core/manifest | package.json read/write helpers, dependency merging, and package root discovery. | | core/scripts | Lifecycle script runner (preinstall, install, postinstall, prepublish, prepare) with npm-compatible environment variables. | | semver | Minimal built-in semver implementation supporting ^, ~, >, >=, <, <=, =, ||, hyphen ranges, x-ranges, and prerelease comparison. |

Dependency Resolution Strategy

  1. Walk the dependency graph in BFS waves with configurable concurrency
  2. For each transitive dependency, try to satisfy with an already-hoisted version (walking up the parent chain)
  3. If no compatible hoisted version exists, install at the highest level with no conflict
  4. If a transitive dependency's range is incompatible with the hoisted version, install nested under the parent
  5. Post-resolution hoisting pass lifts nested packages to the highest conflict-free ancestor
  6. Single-path lift pass catches remaining deeply-nested packages that can be promoted

Supported Spec Types

  • Registry semver ranges: ^1.2.3, ~1.0.0, >=1, *, latest
  • URL tarballs: https://example.com/foo-1.0.0.tgz
  • File dependencies: file:./packages/shared
  • Dist-tags: latest, next, etc.
  • npm aliases: npm:package@version

DuskJS Integration

When running inside DuskJS, dpm operates as the built-in package manager at /bin/dpm. The runtime is auto-detected via detectRuntime() and isDuskJS() helpers from util/env.

Key differences in DuskJS mode:

  • Cache directory defaults to the DuskJS system cache path
  • Registry URL can be overridden via DuskJS configuration
  • Bin shims include a /bin/node fallback path for JS scripts without shebangs

Configuration

dpm reads configuration via dpm config:

# Set a custom registry
dpm config set registry https://registry.example.com

# View current registry
dpm config get registry

# Remove a config key
dpm config delete registry

The --registry flag on install commands takes precedence over config values.

Programmatic API

dpm exports its core modules for programmatic use:

import {
  installCommand,
  uninstallCommand,
  createRegistryClient,
  resolveDeps,
  extractTarball,
  parseTar,
  verifyIntegrity,
  computeIntegrity,
  createCache,
  readPackageJson,
  writePackageJson,
  buildLockfile,
  readLockfile,
  writeLockfile,
  detectRuntime,
  isDuskJS,
  semver,
} from '@nightnetwork/dpm';

// Resolve dependencies programmatically
const registry = createRegistryClient('https://registry.npmjs.org');
const plan = await resolveDeps({
  registry,
  rootDeps: { express: '^4.18.0' },
});

console.log(`Resolved ${plan.resolved.size} packages`);

Contributing

Contributions are welcome. Please open an issue or pull request on GitHub.

git clone https://github.com/nightnetwork/dpm.git
cd dpm
npm install
npm run build
npm run test

License

Apache-2.0