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

dag-rs

v0.3.1

Published

`dag-rs` (Directed Acyclic Graph) parses workspace and constructs a Directed Acyclic Graph (DAG) of local package dependencies within a monorepo or similar setups. Each edge in the graph represents a `dependent → dependency` relationship.

Readme

dag-rs

dag-rs (Directed Acyclic Graph) parses workspace and constructs a Directed Acyclic Graph (DAG) of local package dependencies within a monorepo or similar setups. Each edge in the graph represents a dependent → dependency relationship.

Installation

npm install dag-rs
# or
yarn add dag-rs

[!NOTE] Right now getAffectedPkg doesnt support circular dependency it might log `[1] 867885 segmentation fault (core dumped) node usage.cjs

Usage

CommonJS

const { dag, getAffectedPkg } = require('dag-rs');

for (const obj of dag()) {
    console.log(obj);
}

for (const obj of getAffectedPkg("@rocket.chat/fuselage")) {
    console.log(obj);
}

ESM

import { dag, getAffectedPkg } from 'dag-rs';

for (const obj of dag()) {
  console.log(obj);
}

for (const obj of getAffectedPkg("@rocket.chat/fuselage")) {
    console.log(obj);
}

Example Output :

getAffectedPkg("@rocket.chat/fuselage") → returns all the direct , transitive dependencies

// dependents of @rocket.chat/fuselage package

@rocket.chat/layout
@rocket.chat/fuselage-toastbar
@rocket.chat/fuselage-forms
@rocket.chat/onboarding-ui

Example Output:

dag() → returns all packages in the project

// dependent : dependency

{ '@rocket.chat/fuselage-monorepo': '@rocket.chat/prettier-config' }
{ '@rocket.chat/fuselage-monorepo': 'update-readme' }
{ '@rocket.chat/css-in-js': '@rocket.chat/css-supports' }
{ '@rocket.chat/css-in-js': '@rocket.chat/memo' }
{
  '@rocket.chat/css-in-js': '@rocket.chat/stylis-logical-props-middleware'
}
{ '@rocket.chat/css-in-js': 'lint-all' }
{ '@rocket.chat/css-supports': '@rocket.chat/memo' }
{ '@rocket.chat/css-supports': 'lint-all' }
{ '@rocket.chat/emitter': 'lint-all' }
{ '@rocket.chat/fuselage': '@rocket.chat/css-in-js' }
{ '@rocket.chat/fuselage': '@rocket.chat/css-supports' }
{ '@rocket.chat/fuselage': '@rocket.chat/fuselage-tokens' }
{ '@rocket.chat/fuselage': '@rocket.chat/memo' }
{ '@rocket.chat/fuselage': '@rocket.chat/styled' }
{ '@rocket.chat/fuselage': '@rocket.chat/fuselage-hooks' }
{ '@rocket.chat/fuselage': '@rocket.chat/icons' }
{ '@rocket.chat/fuselage': '@rocket.chat/fuselage-hooks' }
{ '@rocket.chat/fuselage': '@rocket.chat/icons' }
{ '@rocket.chat/fuselage': '@rocket.chat/storybook-dark-mode' }
{ '@rocket.chat/fuselage': 'lint-all' }
{ '@rocket.chat/fuselage': 'testing-utils' }
{ '@rocket.chat/fuselage-forms': '@rocket.chat/emitter' }
{ '@rocket.chat/fuselage-forms': '@rocket.chat/fuselage' }
{ '@rocket.chat/fuselage-forms': '@rocket.chat/fuselage-hooks' }
{ '@rocket.chat/fuselage-forms': '@rocket.chat/fuselage' }
{ '@rocket.chat/fuselage-forms': '@rocket.chat/fuselage-tokens' }
{ '@rocket.chat/fuselage-forms': '@rocket.chat/storybook-dark-mode' }
{ '@rocket.chat/fuselage-forms': 'lint-all' }
{ '@rocket.chat/fuselage-hooks': '@rocket.chat/emitter' }
{ '@rocket.chat/fuselage-hooks': '@rocket.chat/fuselage-tokens' }
{ '@rocket.chat/fuselage-hooks': '@rocket.chat/emitter' }
{ '@rocket.chat/fuselage-hooks': '@rocket.chat/fuselage-tokens' }
{ '@rocket.chat/fuselage-hooks': 'lint-all' }
{ '@rocket.chat/fuselage-hooks': 'testing-utils' }
{ '@rocket.chat/fuselage-toastbar': '@rocket.chat/fuselage' }
{ '@rocket.chat/fuselage-toastbar': '@rocket.chat/fuselage-hooks' }
{ '@rocket.chat/fuselage-toastbar': '@rocket.chat/styled' }
{ '@rocket.chat/fuselage-toastbar': '@rocket.chat/fuselage' }
{ '@rocket.chat/fuselage-toastbar': '@rocket.chat/fuselage-hooks' }
{ '@rocket.chat/fuselage-toastbar': '@rocket.chat/fuselage-tokens' }
{ '@rocket.chat/fuselage-toastbar': '@rocket.chat/layout' }
{
  '@rocket.chat/fuselage-toastbar': '@rocket.chat/storybook-dark-mode'
}
{ '@rocket.chat/fuselage-toastbar': '@rocket.chat/styled' }
{ '@rocket.chat/fuselage-toastbar': 'lint-all' }
{ '@rocket.chat/fuselage-tokens': 'build-design-tokens' }
{ '@rocket.chat/fuselage-tokens': 'lint-all' }
{ '@rocket.chat/icons': 'build-icons' }
{ '@rocket.chat/icons': 'lint-all' }
{ '@rocket.chat/layout': '@rocket.chat/fuselage' }
{ '@rocket.chat/layout': '@rocket.chat/fuselage' }
{ '@rocket.chat/layout': '@rocket.chat/fuselage-tokens' }
{ '@rocket.chat/layout': '@rocket.chat/storybook-dark-mode' }
{ '@rocket.chat/layout': 'lint-all' }
{ '@rocket.chat/logo': '@rocket.chat/fuselage-hooks' }
{ '@rocket.chat/logo': '@rocket.chat/styled' }
{ '@rocket.chat/logo': '@rocket.chat/fuselage-tokens' }
{ '@rocket.chat/logo': 'build-logo' }
{ '@rocket.chat/logo': 'lint-all' }
{ '@rocket.chat/memo': 'lint-all' }
{ '@rocket.chat/mp3-encoder': 'lint-all' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/fuselage' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/fuselage-hooks' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/icons' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/layout' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/logo' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/styled' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/fuselage' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/fuselage-hooks' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/fuselage-tokens' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/icons' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/layout' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/logo' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/storybook-dark-mode' }
{ '@rocket.chat/onboarding-ui': '@rocket.chat/styled' }
{ '@rocket.chat/onboarding-ui': 'lint-all' }
{ '@rocket.chat/prettier-config': 'lint-all' }
{ '@rocket.chat/storybook-dark-mode': 'lint-all' }
{ '@rocket.chat/string-helpers': 'lint-all' }
{ '@rocket.chat/styled': '@rocket.chat/css-in-js' }
{ '@rocket.chat/styled': 'lint-all' }
{
  '@rocket.chat/stylis-logical-props-middleware': '@rocket.chat/css-supports'
}
{ '@rocket.chat/stylis-logical-props-middleware': 'lint-all' }
{ 'build-design-tokens': 'tools-utils' }
{ 'build-design-tokens': 'lint-all' }
{ 'build-icons': 'tools-utils' }
{ 'build-icons': 'lint-all' }
{ 'build-logo': 'lint-all' }
{ 'build-logo': 'tools-utils' }
{ 'testing-utils': 'lint-all' }
{ 'tools-utils': 'lint-all' }
{ 'update-readme': 'lint-all' }

Building dag-rs

Building dag requires a supported version of Node and Rust.

To run the build, run:

$ yarn install
$ yarn build

Project Layout

| Entry | Purpose | |----------------|------------------------------------------------------------------------------------------------------------------------------------------| | Cargo.toml | The Cargo manifest file, which informs the cargo command. | | README.md | This file. | | src/ | The directory tree containing the Rust source code for the project. | | lib.rs | Entry point for the Rust source code. | | index.node | The main module, a Node addon generated by the build and pointed to by "main" in package.json. | | package.json | The npm manifest file, which informs the npm command. | | target/ | Binary artifacts generated by the Rust build. |

Contribution

All forms of contribution are welcome!