react-native-web icon indicating copy to clipboard operation
react-native-web copied to clipboard

refactor(deps): removing fbjs dependency by creating a local module for invariant and warning

Open mateoguzmana opened this issue 4 months ago • 1 comments

As part of https://github.com/necolas/react-native-web/issues/2333, invariant and warning are the last two dependencies in the project used from fbjs and removing them allows removing that external dependency.

In this PR:

  • Local module for invariant and replacing the imports
  • Local module for warning which had another dependency of emptyFunction hence it has been added as well.
  • fbjs dependency has been removed from packages/react-native-web/package.json.

I can still see fbjs in the main package-lock.json as there are other packages within the repo that have react-native-web installed as a dependency, hence it might potentially be removed once that dependency is upgraded as well.

Ps: I did the replacement of warning in the same PR as it was fairly small, but happy to split this up in another PR if needed.

mateoguzmana avatar Oct 19 '24 11:10 mateoguzmana