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

[prop-types] v5.0.0. Use semver range dependencies, drop Node <18. #27

Merged
merged 3 commits into from
Oct 12, 2023

Conversation

robhogan
Copy link
Contributor

@robhogan robhogan commented Oct 12, 2023

Old releases of React Native pin to a react-native-deprecated-prop-types version that in turn depends on "@react-native/normalize-colors": *.

This is problematic, because it means breaking changes to RN/NC are automatically pulled in to old RN projects. This has come up twice when we've tried to introduce a Node >=18 requirement to RN/NC, in 0.73.1 and 0.74.0 (facebook/react-native#39692, facebook/react-native#40797).

Let's put a stop to this by capping the prop-types V4 branch at <0.73.0, and releasing a v5.0.0 which:

  • Adds a "node": ">=18" requirement explicitly mirroring the one in RN.
  • Depends on the range "@react-native/normalize-colors": "^0.73.0". We'll be free to expand this to "^0.73.0 || ^0.74.0", etc, as we confirm compatibility.

@robhogan robhogan marked this pull request as ready for review October 12, 2023 15:55
@robhogan robhogan merged commit 9b41cbb into main Oct 12, 2023
1 check passed
@robhogan robhogan deleted the feat/prop-types-v5 branch October 12, 2023 16:06
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Oct 14, 2023
Summary:
To address the root cause of a recurring issue (#40797, #39692) where breaking changes to `react-native/normalize-colors` would be pulled into old versions of `deprecated-react-native-prop-types`, we recently change the dependency in the latter to use a semver range (facebook/react-native-deprecated-modules#27, #40869).

For CI, we generally force `react-native/*` to be resolved only from Verdaccio locally published packages - ie, the current versions at source. The source version (currently `0.74.1`) isn't semver-compatible with `deprecated-react-native-prop-types`'s dependency (`^0.73.0`), so `npm install` was failing in CI with "no package found". We should be getting `0.73.2` from the public registry in this case.

This restores a previous workaround added in #34571 but not updated since facebook/react-native-deprecated-modules#11 meant the dependency was now on the pluralised package. We have no dependency on the old non-plural package any more.

## Changelog:

[INTERNAL] [FIXED] - CI/Verdaccio: Proxy `react-native/normalize-colors` from NPM for the `deprecated-react-native-prop-types` dependency.

Pull Request resolved: #40971

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D50298291

Pulled By: robhogan

fbshipit-source-id: 4bf6503108335ffa52654346d1874c217071ff91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants