Uniswap / sdk-core

⚙️ Code shared across TypeScript Uniswap SDK versions
MIT License
121 stars 354 forks source link

3.2.4. ChainId Breaking Change #65

Closed Florian-S-A-W closed 1 year ago

Florian-S-A-W commented 1 year ago

Version 3.2.4 renamed SupportedChainId to ChainId causing projects that import SupportedChainId to break. I'd suggest adding SupportedChainId as a type alias.

Florian-S-A-W commented 1 year ago

@cbachmeier

cbachmeier commented 1 year ago

Hello @Florian-S-A-W , we've deliberately deprecated SupportedChainId in favor of the more general ChainId. If you need only chains specifically supported by the Uniswap protocol you can use the subset array SUPPORTED_CHAINS and the type based off it, SupportedChainsType. If you need any help refactoring feel free to use this PR where we upgrade this dependency in the Uniswap interface as a reference.

koraykoska commented 1 year ago

@cbachmeier There are about 10 libraries that depend on the core SDK, including the (basically) deprecated Uniswap V2 SDK that a lot of people are still using. Why not release it as a major version bump that at least people can continue using the libraries that depend on the core-sdk?

Florian-S-A-W commented 1 year ago

Hi @cbachmeier , I can understand why these changes where made, but this is still a breaking API change and should therefore require a major version bump as @koraykoska mentions.

cbachmeier commented 1 year ago

@Florian-S-A-W @koraykoska Thank you for the feedback, accordingly we have deprecated 3.2.4 - 3.2.6 and have released a major version 4.0.1.