Skip to content

Commit

Permalink
feat(react-native): upgrade react-native to 0.72.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi committed Jul 7, 2023
1 parent d0c3772 commit 14b7a9b
Show file tree
Hide file tree
Showing 70 changed files with 1,352 additions and 769 deletions.
3 changes: 2 additions & 1 deletion docs/generated/packages/expo/executors/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
},
"output": {
"type": "string",
"description": "Output path for local build"
"description": "Output path for local build",
"examples": ["../../dist/MyApp.tar.gz", "../../dist"]
},
"wait": {
"type": "boolean",
Expand Down
17 changes: 12 additions & 5 deletions docs/generated/packages/react-native/executors/build-android.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@
"default": 8081
},
"tasks": {
"type": "array",
"items": { "type": "string" },
"oneOf": [
{ "type": "array", "items": { "type": "string" } },
{ "type": "string" }
],
"description": "Run custom Gradle tasks. By default it's \"assembleDebug\". Will override passed mode and variant arguments.",
"examples": [
"assembleDebug",
Expand All @@ -71,8 +73,12 @@
"default": false
},
"extraParams": {
"type": "string",
"description": "Custom params passed to gradle build command"
"oneOf": [
{ "type": "array", "items": { "type": "string" } },
{ "type": "string" }
],
"description": "Custom params passed to gradle build command",
"examples": ["-x lint -x test"]
},
"interactive": {
"type": "boolean",
Expand All @@ -81,7 +87,8 @@
"sync": {
"type": "boolean",
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
"default": true
"default": true,
"x-deprecated": "Add sync-deps to dependsOn instead"
},
"resetCache": {
"type": "boolean",
Expand Down
13 changes: 7 additions & 6 deletions docs/generated/packages/react-native/executors/build-ios.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
"presets": [
{ "name": "Build iOS for a simulator", "keys": ["simulator"] },
{ "name": "Build iOS for a device", "keys": ["device"] },
{ "name": "Build iOS for a device with udid", "keys": ["udid"] },
{
"name": "Run `pod install` before building iOS app",
"keys": ["install"]
}
{ "name": "Build iOS for a device with udid", "keys": ["udid"] }
],
"properties": {
"simulator": {
Expand Down Expand Up @@ -72,17 +68,22 @@
"description": "Explicitly select which scheme and configuration to use before running a build"
},
"extraParams": {
"type": "string",
"oneOf": [
{ "type": "array", "items": { "type": "string" } },
{ "type": "string" }
],
"description": "Custom params that will be passed to xcodebuild command."
},
"install": {
"type": "boolean",
"description": "Runs `pod install` for native modules before building iOS app.",
"x-deprecated": "Add pod-install to dependsOn in project.json for this target instead",
"default": true
},
"sync": {
"type": "boolean",
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
"x-deprecated": "Add sync-deps to dependsOn in project.json for this target instead",
"default": true
},
"resetCache": {
Expand Down
12 changes: 11 additions & 1 deletion docs/generated/packages/react-native/executors/pod-install.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,19 @@
"type": "object",
"properties": {
"buildFolder": {
"description": "Location for iOS build artifacts. Corresponds to Xcode's \"-derivedDataPath\". Relative to ios directory",
"description": "Location for iOS build artifacts. Corresponds to Xcode's \"-derivedDataPath\". Relative to ios directory.",
"type": "string",
"default": "./build"
},
"repoUpdate": {
"description": "Force running `pod repo update` before install.",
"type": "boolean",
"default": false
},
"deployment": {
"description": "Disallow any changes to the Podfile or the Podfile.lock during installation.",
"type": "boolean",
"default": false
}
},
"required": ["buildFolder"],
Expand Down
12 changes: 9 additions & 3 deletions docs/generated/packages/react-native/executors/run-android.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@
"default": 8081
},
"tasks": {
"type": "array",
"items": { "type": "string" },
"oneOf": [
{ "type": "array", "items": { "type": "string" } },
{ "type": "string" }
],
"description": "Run custom Gradle tasks. By default it's \"assembleDebug\". Will override passed mode and variant arguments.",
"examples": [
"assembleDebug",
Expand All @@ -95,7 +97,10 @@
"default": false
},
"extraParams": {
"type": "string",
"oneOf": [
{ "type": "array", "items": { "type": "string" } },
{ "type": "string" }
],
"description": "Custom params passed to gradle build command"
},
"interactive": {
Expand All @@ -105,6 +110,7 @@
"sync": {
"type": "boolean",
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
"x-deprecated": "Add sync-deps to dependsOn for this target in project.json instead",
"default": true
},
"resetCache": {
Expand Down
9 changes: 7 additions & 2 deletions docs/generated/packages/react-native/executors/run-ios.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,22 @@
"description": "Explicitly select which scheme and configuration to use before running a build"
},
"extraParams": {
"type": "string",
"oneOf": [
{ "type": "array", "items": { "type": "string" } },
{ "type": "string" }
],
"description": "Custom params that will be passed to xcodebuild command."
},
"install": {
"type": "boolean",
"description": "Runs `pod install` for native modules before building iOS app.",
"default": true
"default": true,
"x-deprecated": "Add `pod-install` to dependsOn for this target in project.json instead."
},
"sync": {
"type": "boolean",
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
"x-deprecated": "Add `sync-deps` to dependsOn for this target in project.json instead.",
"default": true
},
"resetCache": {
Expand Down
8 changes: 3 additions & 5 deletions e2e/expo/src/expo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,13 @@ describe('expo', () => {
expect(prebuildResult.combinedOutput).toContain('Config synced');
});

// TODO(emily): expo-cli always fetches the latest version of react native
// re-enable it when expo-cli is fixed
xit('should install', async () => {
it('should install', async () => {
// run install command
const installResults = await runCLIAsync(
`install ${appName} --no-interactive --check`
`install ${appName} --no-interactive`
);
expect(installResults.combinedOutput).toContain(
'Dependencies are up to date'
'Successfully ran target install'
);
});

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@
"magic-string": "~0.26.2",
"markdown-factory": "^0.0.6",
"memfs": "^3.0.1",
"metro-resolver": "^0.74.1",
"metro-config": "0.76.5",
"metro-resolver": "0.76.5",
"mini-css-extract-plugin": "~2.4.7",
"minimatch": "3.0.5",
"next-sitemap": "^3.1.10",
Expand Down
12 changes: 0 additions & 12 deletions packages/detox/src/generators/application/application.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,6 @@ describe('detox application generator', () => {
'cd ../../../my-dir/my-app/android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug',
type: 'android.apk',
},
'android.eas': {
binaryPath: '../../../my-dir/my-app/dist/MyDirMyApp.apk',
build:
'npx nx run my-dir-my-app:download --platform android --distribution simulator --output=../../../my-dir/my-app/dist/',
type: 'android.apk',
},
'android.local': {
binaryPath: '../../../my-dir/my-app/dist/MyDirMyApp.apk',
build:
Expand All @@ -368,12 +362,6 @@ describe('detox application generator', () => {
"cd ../../../my-dir/my-app/ios && xcodebuild -workspace MyDirMyApp.xcworkspace -scheme MyDirMyApp -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' -derivedDataPath ./build -quiet",
type: 'ios.app',
},
'ios.eas': {
binaryPath: '../../../my-dir/my-app/dist/MyDirMyApp.app',
build:
'npx nx run my-dir-my-app:download --platform ios --distribution simulator --output=../../../my-dir/my-app/dist/',
type: 'ios.app',
},
'ios.local': {
binaryPath: '../../../my-dir/my-app/dist/MyDirMyApp.app',
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
"binaryPath": "<%= offsetFromRoot %><%= appRoot %>/ios/build/Build/Products/Release-iphonesimulator/<%= appClassName %>.app"
},
<% if (framework === 'expo') { %>
"ios.eas": {
"type": "ios.app",
"build": "<%= exec %> nx run <%= appFileName %>:download --platform ios --distribution simulator --output=<%= offsetFromRoot %><%= appRoot %>/dist/",
"binaryPath": "<%= offsetFromRoot %><%= appRoot %>/dist/<%= appExpoName %>.app"
},
"ios.local": {
"type": "ios.app",
"build": "<%= exec %> nx run <%= appFileName %>:build --platform ios --profile preview --wait --local --no-interactive --output=<%= offsetFromRoot %><%= appRoot %>/dist/<%= appExpoName %>.tar.gz",
Expand All @@ -42,11 +37,6 @@
"binaryPath": "<%= offsetFromRoot %><%= appRoot %>/android/app/build/outputs/apk/release/app-release.apk"
},
<% if (framework === 'expo') { %>
"android.eas": {
"type": "android.apk",
"build": "<%= exec %> nx run <%= appFileName %>:download --platform android --distribution simulator --output=<%= offsetFromRoot %><%= appRoot %>/dist/",
"binaryPath": "<%= offsetFromRoot %><%= appRoot %>/dist/<%= appExpoName %>.apk"
},
"android.local": {
"type": "android.apk",
"build": "<%= exec %> nx run <%= appFileName %>:build --platform android --profile preview --wait --local --no-interactive --output=<%= offsetFromRoot %><%= appRoot %>/dist/<%= appExpoName %>.apk",
Expand Down Expand Up @@ -78,10 +68,6 @@
"app": "ios.debug"
},
<% if (framework === 'expo') { %>
"ios.sim.eas": {
"device": "simulator",
"app": "ios.eas"
},
"ios.sim.local": {
"device": "simulator",
"app": "ios.local"
Expand All @@ -96,10 +82,6 @@
"app": "android.debug"
},
<% if (framework === 'expo') { %>
"android.emu.eas": {
"device": "emulator",
"app": "android.eas"
},
"android.emu.local": {
"device": "emulator",
"app": "android.local"
Expand Down
13 changes: 3 additions & 10 deletions packages/detox/src/generators/application/lib/get-targets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ describe('getTargets', () => {
it('should return ios test target for expo projects', () => {
expect(expoTestTarget('ios.sim', 'test')).toEqual({
options: {
detoxConfiguration: 'ios.sim.eas',
buildTarget: 'test:build-ios',
detoxConfiguration: 'ios.sim.local',
buildTarget: 'test:build-ios:local',
},
configurations: {
local: {
detoxConfiguration: 'ios.sim.local',
buildTarget: 'test:build-ios:local',
},
bare: {
detoxConfiguration: 'ios.sim.debug',
buildTarget: 'test:build-ios:bare',
Expand All @@ -27,12 +23,9 @@ describe('getTargets', () => {
it('should return ios build target for expo projects', () => {
expect(expoBuildTarget('ios.sim')).toEqual({
options: {
detoxConfiguration: 'ios.sim.eas',
detoxConfiguration: 'ios.sim.local',
},
configurations: {
local: {
detoxConfiguration: 'ios.sim.local',
},
bare: {
detoxConfiguration: 'ios.sim.debug',
},
Expand Down
11 changes: 2 additions & 9 deletions packages/detox/src/generators/application/lib/get-targets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ export function reactNativeBuildTarget(platform: 'ios.sim' | 'android.emu') {
export function expoBuildTarget(platform: 'ios.sim' | 'android.emu') {
return {
options: {
detoxConfiguration: `${platform}.eas`,
detoxConfiguration: `${platform}.local`,
},
configurations: {
local: {
detoxConfiguration: `${platform}.local`,
},
bare: {
detoxConfiguration: `${platform}.debug`,
},
Expand Down Expand Up @@ -58,14 +55,10 @@ export function expoTestTarget(

return {
options: {
detoxConfiguration: `${platform}.eas`,
detoxConfiguration: `${platform}.local`,
buildTarget: `${e2eName}:build-${buildPlatform}`,
},
configurations: {
local: {
detoxConfiguration: `${platform}.local`,
buildTarget: `${e2eName}:build-${buildPlatform}:local`,
},
bare: {
detoxConfiguration: `${platform}.debug`,
buildTarget: `${e2eName}:build-${buildPlatform}:bare`,
Expand Down
65 changes: 65 additions & 0 deletions packages/expo/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,71 @@
"alwaysAddToPackageJson": false
}
}
},
"16.6.0": {
"version": "16.6.0-beta.0",
"packages": {
"expo": {
"version": "^49.0.0-beta.5",
"alwaysAddToPackageJson": false
},
"@expo/metro-config": {
"version": "~0.10.6",
"alwaysAddToPackageJson": false
},
"expo-splash-screen": {
"version": "~0.20.3",
"alwaysAddToPackageJson": false
},
"expo-status-bar": {
"version": "~1.6.0",
"alwaysAddToPackageJson": false
},
"expo-updates": {
"version": "~0.18.7",
"alwaysAddToPackageJson": false
},
"@expo/cli": {
"version": "~0.10.7",
"alwaysAddToPackageJson": false
},
"eas-cli": {
"version": "~3.15.0",
"alwaysAddToPackageJson": false
},
"babel-preset-expo": {
"version": "~9.5.0",
"alwaysAddToPackageJson": false
},
"jest-expo": {
"version": "~49.0.0",
"alwaysAddToPackageJson": false
},
"metro-resolver": {
"version": "0.76.5",
"alwaysAddToPackageJson": false
},
"metro": {
"version": "0.76.5",
"alwaysAddToPackageJson": false
},
"react-native": {
"version": "0.72.1",
"alwaysAddToPackageJson": false
},
"@types/react-native": {
"version": "0.72.2",
"alwaysAddToPackageJson": false
},
"react-native-web": {
"version": "~0.19.6",
"alwaysAddToPackageJson": false
},
"react-native-svg": {
"version": "13.9.0",
"alwaysAddToPackageJson": false
}
}
}
}
}
Loading

0 comments on commit 14b7a9b

Please sign in to comment.