egoist / egoist/tsup

Should esbuild be a peer depedency?

Open
#1,032 0 comments 6 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.