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

Put @types/node as an optional peerDependency #2169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

QuentinLemCode
Copy link
Contributor

Hello

This PR put @types/node as an optional peerDependency.

There was already previous attempt to move it to "devDependency" in order to avoid the size overhead of node types for Javascript project or even production builds.
#1274

However, this would cause issue because the Typescript compiler wouldn't provide correct error types.

In this PR, the @types/node library as been put in devDependencies and in optional peerDependencies.

This allow :

  • To have the node types available when developing on the stripe-node library
  • To provide correct type error for typescript project using stripe-node (assuming project already have @types/node installed)
  • To remove the @types/node dependency for javascript project (reducing size overhead)

@QuentinLemCode QuentinLemCode requested a review from a team as a code owner September 5, 2024 13:49
@QuentinLemCode QuentinLemCode requested review from xavdid-stripe and removed request for a team September 5, 2024 13:49
@QuentinLemCode
Copy link
Contributor Author

This will probably conflict with #2168

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.

1 participant