Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to extend esbuild semver range #647

Closed
5 of 6 tasks
benmccann opened this issue Sep 5, 2024 · 2 comments
Closed
5 of 6 tasks

Request to extend esbuild semver range #647

benmccann opened this issue Sep 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@benmccann
Copy link

Acknowledgements

  • I read the documentation and searched existing issues to avoid duplicates
  • I understand this is a bug tracker and anything other than a proven bug will be closed
  • I understand this is a free project and relies on community contributions
  • I read and understood the Contribution guide

Minimal reproduction URL

"esbuild": "~0.23.0",

Problem & expected behavior (under 200 words)

esbuild is a somewhat heavy library with lots of dependencies. I already have another version of esbuild pulled in by Vite. Is there any chance you'd accept a PR to extend the range of allowed versions so that I don't end up with multiple versions?

E.g. like this: https://github.com/antfu-collective/importx/blob/08d68f31b4c4e927d59c99e0adb488aa7be9df54/package.json#L55

Bugs are expected to be fixed by those affected by it

  • I'm interested in working on this issue

Compensating engineering work will speed up resolution and support the project

  • I'm willing to offer $10 for financial support
@privatenumber
Copy link
Owner

Thanks for the issue.

Regarding the impact of the problem, I think this is low priority as users can address it on their end through dependency overrides. And most tsx users aren't concerned with dependency de-duplication, as the target audience is broad, extending to beginners.

While dependency size is a valid concern in the npm ecosystem, this issue not unique to tsx as many tools leverage esbuild (even if tsx addresses it, you'll still encounter it from another package). Most users can mitigate this by using pnpm, which minimizes disk usage at a system level. But if you're particularly concerned about esbuild's size, addressing it with esbuild level would likely yield bigger wins. For instance, perhaps splitting the Transform API from the Build API could reduce its size, making a more substantial impact across the ecosystem.

As for the request to extend esbuild's version range in tsx, I'm not keen on the maintenance work involved, including adding/removing versions and reviewing PRs. It also raises process questions: when to add/remove versions, what to do if tsx relies on a new esbuild feature (is it a breaking change to drop old esbuild verisons?), or how to handle compatibility changes (do I need to test old esbuild versions?). I don't mind doing meaningful work for free, but the tradeoff between the maintenance work vs the wins here are questionable.

For anyone bothered by esbuild's size, I would recommend using overrides and filing a request with esbuild.

@privatenumber privatenumber added enhancement New feature or request and removed bug Something isn't working pending triage labels Oct 13, 2024
@privatenumber
Copy link
Owner

Also, the Issues tab in tsx is reserved for bugs, and there is no bug here I'll be closing & locking this.

But please feel free to move this discussion to the sponsors-only repo. Happy to continue the conversation there.

@privatenumber privatenumber closed this as not planned Won't fix, can't repro, duplicate, stale Oct 13, 2024
Repository owner locked and limited conversation to collaborators Oct 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants