Skip to content
This repository was archived by the owner on Jun 9, 2026. It is now read-only.

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

Merged
robhogan merged 3 commits into
mainfrom
feat/prop-types-v5
Oct 12, 2023
Merged

[prop-types] v5.0.0. Use semver range dependencies, drop Node <18.#27
robhogan merged 3 commits into
mainfrom
feat/prop-types-v5

Conversation

@robhogan

@robhoganrobhogan commented Oct 12, 2023

Copy link
Copy Markdown
Contributor

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 (react/react-native#39692, react/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 mainOct 12, 2023
@robhogan
robhogan deleted the feat/prop-types-v5 branch October 12, 2023 16:06
facebook-github-bot pushed a commit to react/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
@robhoganrobhogan mentioned this pull request Nov 16, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@robhogan@huntie@facebook-github-bot