Should esbuild be a peer depedency?
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Description
I'm using tsup apis as part of a build system that includes custom esbuild plugins. Unless my package and the tsup package resolve to the same version of esbuild, I get TypeScript compile errors about the Plugin types not being compatible (apparently this type changed in new esbuild versions). If esbuild was a peer dependency, then it would ensure that the same version is used. Alternatively, I can override the version of esbuild that tsup uses in my package.json but that would break in subtle ways if tsup takes a dependency on a newer version of esbuild, while a change in the required version of a peer dependency would be much more obvious and easier to fix.
Contributor guide
Research direction
The issue names no repository files or tests. Start by inspecting tsup's package.json dependency declaration for esbuild and reproduce the TypeScript Plugin mismatch with a custom plugin; done means the dependency strategy prevents incompatible esbuild Plugin types for consumers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100