rollup / plugins

🍣 The one-stop shop for official Rollup plugins
MIT License
3.57k stars 568 forks source link

fix(typescript): Ensure rollup 4 compatibility #1658

Closed NiGhTTraX closed 5 months ago

NiGhTTraX commented 6 months ago

Rollup Plugin Name: typescript

This PR contains:

Are tests included?

Breaking Changes?

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

Existing v3 setup:

  1. repo has rollup@3 installed
  2. repo has @rollup/plugin-typescript@11.1.0 installed which peer depends on rollup@3
  3. @rollup/plugin-typescript@11.1.0 depends on @rollup/pluginutils@^5.0.1
  4. @rollup/pluginutils@5.0.2 is resolved and saved in the lockfile

Trying to upgrade to v4:

  1. upgrade to rollup@4 and @rollup/plugin-typescript@11.1.5 which peer depends on rollup@4
  2. @rollup/plugin-typescript@11.1.5 still depends on @rollup/pluginutils@^5.0.1
  3. @rollup/pluginutils@5.0.2 is not upgraded because it still matches
  4. @rollup/pluginutils@5.0.2 doesn't peer depend on rollup@4
  5. upgrade fails

This PR bumps the pluginutils dependency to ^5.1.0 which is the earliest version that peer depends on rollup@4.

There are a bunch more errors like this throughout the whole repo, but I'm only fixing this one for now. It's unfortunate that it ended up this way and pnpm install happily passes. I opened https://github.com/pnpm/pnpm/issues/6893 a while ago to report this behaviour.

shellscape commented 5 months ago

thanks!