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

fix(typescript): allow tslib peerDependency to be optional for npm and pnpm #1191

Merged
merged 1 commit into from Jun 10, 2022

Conversation

runspired
Copy link
Contributor

@runspired runspired commented May 20, 2022

Rollup Plugin Name: @rollup/plugin-typescript

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Testing this would be akin to testing npm.

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

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

tslib is an optional dependency and in a large set of projects goes completely unused (notably anything compiling with babel or which does not require use of the helpers).

Historically, yarn and npm would warn for peerDependencies but not error, but as better package managers have fixed this mistake (most notably pnpm) and worked their way into being industry defaults this behavior has shifted from minor-nuisance to build-breaking.

This PR uses the spec peerDependencyMeta respected by both npm and pnpm to declare the tslib peerDependency as entirely optional.

@shellscape
Copy link
Collaborator

our issue and pull request templates are not optional. please replace the template and fill it in and it's entirety if you would like to move forward.

@runspired
Copy link
Contributor Author

runspired commented May 21, 2022

@shellscape apparently they are optional as opening one in this manner didn't give me one :P (This manner meaning editing the file via the github interface and selecting the open-pr option)

@shellscape shellscape changed the title Make tslib peerDependency optional for typescript plugin fix(typescript): allow tslib peerDependency to be optional for npm and pnpm Jun 10, 2022
@shellscape
Copy link
Collaborator

thanks!

@shellscape shellscape merged commit c762e54 into rollup:master Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants