Skip to content

Cleanup the dependency graph #4288

Description

@Norbiros

There is a really nice initiative called e18e, whose goal is to clean up, optimize, and speed up libraries and their dependency trees in the node ecosystem. Given that this project is ESM-only and requires Node.js >=22.18.0, we could replace some things with native Node.js APIs, better alternatives, etc. to make hey-api safer and lighter.

Quick replacements (i'll open PRs for those):

Harder, so you probably don't have to do any of these:

  • open - users don't need this dependency most of the time. It could be moved to peer dependencies, and if open is not detected, you could just print the URL
  • cross-spawn - make it an optional dependency, since you might not need a formatter
  • @jsdevtools/ono

Tip: I really recommend this site: https://npmgraph.js.org/?q=%40hey-api%2Fopenapi-ts, so you can visualise your dependency tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature 🚀Feature request.important 📌This issue is important and will be addressed when capacity allows.internal ⚙️Internal development work.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions