mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
chore: renamed react-native-codegen to @react-native/codegen (#34804)
Summary: Renamed react-native-codegen package to react-native/codegen and updated references, without changing the folder name; part of RFC480 (https://github.com/facebook/react-native/issues/34692). Follow-up from https://github.com/facebook/react-native/pull/34578 ## Changelog [General] [Changed] - Renamed react-native-codegen package to react-native/codegen and updated references <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> Pull Request resolved: https://github.com/facebook/react-native/pull/34804 Reviewed By: cortinico Differential Revision: D39883584 Pulled By: hoxyq fbshipit-source-id: 0ef384b75c6edd248b31e37b8f05f64b4d39ca6f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e325c9505a
commit
b7a85b59b5
@@ -12,7 +12,7 @@
|
||||
/**
|
||||
* Wrapper required to abstract away from the actual codegen.
|
||||
* This is needed because, when running tests in Sandcastle, not everything is setup as usually.
|
||||
* For example, the `react-native-codegen` lib is not present.
|
||||
* For example, the `@react-native/codegen` lib is not present.
|
||||
*
|
||||
* Thanks to this wrapper, we are able to mock the getter for the codegen in a way that allow us to return
|
||||
* a custom object which mimics the Codegen interface.
|
||||
@@ -24,7 +24,7 @@ function getCodegen() {
|
||||
try {
|
||||
RNCodegen = require('../../packages/react-native-codegen/lib/generators/RNCodegen.js');
|
||||
} catch (e) {
|
||||
RNCodegen = require('react-native-codegen/lib/generators/RNCodegen.js');
|
||||
RNCodegen = require('@react-native/codegen/lib/generators/RNCodegen.js');
|
||||
}
|
||||
if (!RNCodegen) {
|
||||
throw 'RNCodegen not found.';
|
||||
|
||||
Reference in New Issue
Block a user