chore: declare version range for peer dependencies #19979
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Specified the peer dependencies version range.
Previously, we used
*, which didn't clearly communicate which versions were actually supported. For example, #19977 requires sass 1.45.0+ and #19978 requires sass 1.70.0+, but this isn't obvious from the currentpackage.jsonand it wasn't clear whether relying on which feature would require a major version.Here's the reasoning behind the chosen ranges for each peer dependency:
^4.0.0^3.8.0 || ^4.0.0becauserewriteUrlsfeature was introduced in 3.8.0 which we might use in the future2020-12-18), I guess it's fine to require that^1.70.0>=0.54.8>=so that we don't need to keep adding|| ^0.xto the range>=5.0.0^3.0.0 || ^4.0.0 || ^5.0.0without much burden. But the breaking changes between them are only dropping Node versions older than 16, so probably ok to simply go with^5.0.0