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

Remove carets from internal versions #2424

Closed

Conversation

tuncaulubilge
Copy link

Removes flexible versions from all the packages to address issue: #2338

Flexible versions with carets or tilde are causing issues when installing older versions of victory

@gksander
Copy link
Contributor

Hi @tuncaulubilge – thank you for putting this together! One concern with pinning everything across all packages is that if an end-user is installing packages individually, and happens to install different patch versions of two separate packages – they won't be able to share victory-core packages as intended, due to the inflexibility of version pinning.

However, that's not really a concern for the main victory and victory-native packages, since those just expose all of the individual packages. What do you think about just pinning all of the package dependencies in victory and victory-native (and not the sub-packages, like victory-area etc)? Would that make sense for your use-case?

@tuncaulubilge
Copy link
Author

Hi @gksander , if we don't use pinned versions in sub-packages (such as victory-area), we would have resolution conflicts, and potentially end up with multiple versions of another sub-package.

Let's assume victory pins to version 35.0.0 of victory-area and victory-bar, but version 35.0.0 of victory-area depends on version ^35.0.0 of victory-bar (with the caret). We could end up with multiple versions of victory-bar installed, as ^35.0.0 would resolve 35.1.2. Yarn v1 is not smart enough to resolve both 35.0.0 and ^35.0.0 to 35.0.0

As for your concern for end-users installing packages individually, we can address the problem by utilising peerDependencies. Each sub-package should define a peer dependency to the exact same version of the victory core package, so it'd throw an error during install if you are installing two separate versions. To implement this, we might need to update the changesets script to regularly change the version of the peer dependency.

@carbonrobot
Copy link
Contributor

Closing as we change our build system and focus on a releasing a new single-package for Victory that is highly treeshakeable in v40

@carbonrobot carbonrobot closed this Jan 8, 2024
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

3 participants