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

sort-dependency

v0.3.0

Published

sorting library dependencies

Downloads

4

Readme

sort-dependency

Install

yarn global add sort-dependency

Usage Example

git clone https://github.com/babel/babel.git --depth 1
cd babel

Search top or deep or standalone libraries

sort-dependency --root . --cache-dir .cache
  1. @babel/plugin-codemod-object-assign-to-object-spread
  2. @babel/plugin-codemod-optional-catch-binding
  3. @babel/eslint-config-internal
  4. @babel/eslint-plugin-development
  5. @babel/eslint-plugin
  6. @babel/eslint-shared-fixtures
  7. @babel/eslint-tests
  8. babel
  9. @babel/cli
  10. @babel/helper-explode-class
  11. @babel/helper-plugin-test-runner
  12. @babel/node
  13. @babel/plugin-external-helpers
  14. @babel/plugin-proposal-export-default-from
  15. @babel/plugin-proposal-export-namespace-from
  16. @babel/plugin-proposal-function-bind
  17. @babel/plugin-proposal-function-sent
  18. @babel/plugin-proposal-logical-assignment-operators
  19. @babel/plugin-proposal-numeric-separator
  20. @babel/plugin-proposal-partial-application
  21. @babel/plugin-proposal-throw-expressions
  22. @babel/plugin-syntax-class-properties
  23. @babel/plugin-transform-flow-comments
  24. @babel/plugin-transform-instanceof
  25. @babel/plugin-transform-jscript
  26. @babel/plugin-transform-object-assign
  27. @babel/plugin-transform-object-set-prototype-of-to-assign
  28. @babel/plugin-transform-property-mutators
  29. @babel/plugin-transform-proto-to-assign
  30. @babel/plugin-transform-react-constant-elements
  31. @babel/plugin-transform-react-inline-elements
  32. @babel/plugin-transform-react-jsx-compat
  33. @babel/plugin-transform-runtime
  34. @babel/plugin-transform-strict-mode
  35. @babel/preset-typescript
  36. @babel/runtime-corejs2
  37. @babel/runtime-corejs3
  38. @babel/runtime
  39. @babel/standalone

Info: last independents libraries (Suggest: '--stop')

  1. @babel/helper-plugin-utils
  2. @babel/parser

Info: Standalone library

  1. @babel/eslint-plugin-development
  2. @babel/eslint-tests
  3. babel
  4. @babel/standalone

Find dependency order

Using topological sort: (https://en.wikipedia.org/wiki/Topological_sorting)

sort-dependency \
    --root . \
    --cache-dir .cache \
    --start "@babel/plugin-codemod-object-assign-to-object-spread" \
    --stop "@babel/parser"
  1. @babel/plugin-codemod-object-assign-to-object-spread
  2. @babel/core
  3. @babel/helpers
  4. @babel/traverse
  5. @babel/helper-function-name
  6. @babel/template
  7. @babel/parser

Output dependency graph example

sort-dependency \
    --root .\
    --cache-dir .cache\
    --output library-map.png

Image (very large)

sort-dependency \
    --root . \
    --cache-dir .cache \
    --start "@babel/plugin-codemod-object-assign-to-object-spread" \
    --stop "@babel/parser" \
    --output sorted-graph.png

Sorted graph

License

sort-dependency is MIT licensed.