yarnpkg / berry

📦🐈 Active development trunk for Yarn ⚒
https://yarnpkg.com
BSD 2-Clause "Simplified" License
7.23k stars 1.07k forks source link

fix(sdks): only patch typescript entry point for >= 5.5 #6263

Closed merceyz closed 2 months ago

merceyz commented 2 months ago

What's the problem this PR addresses?

The SDK changes in https://github.com/yarnpkg/berry/pull/6248 broke support for older TypeScript versions. I tested it on 5.4.1-rc (master) and it was fine but it crashes on 5.2.0-beta (https://github.com/yarnpkg/berry/blob/4308dca8091438e8f88682e59ef5ba5bc72241ca/package.json#L26)

How did you fix it?

Check the TypeScript version and only apply the patch if needed.

Checklist