Skip to content

Commit

Permalink
fix(expo): fixing version conflict of react (#14144)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi authored Jan 9, 2023
1 parent 74d8a48 commit cac1f30
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
8 changes: 3 additions & 5 deletions packages/expo/src/generators/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ import {
easCliVersion,
deprecatedExpoCliVersion,
expoWebpackConfig,
} from '../../utils/versions';

import {
reactDomVersion,
reactVersion,
reactTestRendererVersion,
typesReactVersion,
} from '@nrwl/react/src/utils/versions';
reactDomVersion,
} from '../../utils/versions';

import { runTasksInSerial } from '@nrwl/workspace/src/utilities/run-tasks-in-serial';
import { jestInitGenerator } from '@nrwl/jest';
import { detoxInitGenerator } from '@nrwl/detox';
Expand Down
5 changes: 5 additions & 0 deletions packages/expo/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ export const expoCliVersion = '0.4.10'; // @expo/cli
export const easCliVersion = '3.1.1';
export const babelPresetExpoVersion = '~9.2.2';

export const reactVersion = '18.1.0';
export const reactDomVersion = '18.1.0';
export const reactTestRendererVersion = '18.1.0';
export const typesReactVersion = '18.0.26';

export const reactNativeVersion = '0.70.5';
export const typesReactNativeVersion = '0.70.7';
export const reactNativeWebVersion = '~0.18.10';
Expand Down
10 changes: 5 additions & 5 deletions packages/react-native/src/generators/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@ import { addBabelInputs } from '@nrwl/js/src/utils/add-babel-inputs';

import { jestInitGenerator } from '@nrwl/jest';
import { detoxInitGenerator } from '@nrwl/detox';
import {
reactTestRendererVersion,
reactVersion,
typesReactVersion,
} from '@nrwl/react/src/utils/versions';

import {
babelRuntimeVersion,
jestReactNativeVersion,
metroVersion,
nxVersion,
reactDomVersion,
reactNativeAsyncStorageAsyncStorageVersion,
reactNativeCommunityCli,
reactNativeCommunityCliAndroid,
Expand All @@ -32,10 +28,13 @@ import {
reactNativeSvgTransformerVersion,
reactNativeSvgVersion,
reactNativeVersion,
reactTestRendererVersion,
reactVersion,
testingLibraryJestNativeVersion,
testingLibraryReactNativeVersion,
typesNodeVersion,
typesReactNativeVersion,
typesReactVersion,
} from '../../utils/versions';

import { addGitIgnoreEntry } from './lib/add-git-ignore-entry';
Expand Down Expand Up @@ -76,6 +75,7 @@ export function updateDependencies(host: Tree) {
host,
{
react: reactVersion,
'react-dom': reactDomVersion,
'react-native': reactNativeVersion,
},
{
Expand Down
5 changes: 5 additions & 0 deletions packages/react-native/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export const reactNativeCommunityCli = '9.3.2';
export const reactNativeCommunityCliIos = '9.3.0';
export const reactNativeCommunityCliAndroid = '9.3.1';

export const reactVersion = '18.1.0';
export const reactDomVersion = '18.1.0';
export const reactTestRendererVersion = '18.1.0';
export const typesReactVersion = '18.0.26';

export const reactNativeConfigVersion = '1.4.11';
export const reactNativeAsyncStorageAsyncStorageVersion = '1.17.11';

Expand Down

0 comments on commit cac1f30

Please sign in to comment.