From 97278b2e16d52e9f8ee740f86c337cd8920fd5ce Mon Sep 17 00:00:00 2001 From: Jonathan Norris Date: Wed, 29 May 2024 10:19:03 -0400 Subject: [PATCH] chore: update react-native and react-native-expo build system to remove polyfills (#863) --- sdk/react-native-expo/package.json | 4 ++-- sdk/react-native-expo/project.json | 21 ++++----------------- sdk/react-native-expo/tsconfig.lib.json | 3 +-- sdk/react-native/package.json | 4 ++-- sdk/react-native/project.json | 3 ++- sdk/react-native/tsconfig.lib.json | 3 +-- yarn.lock | 8 ++++---- 7 files changed, 16 insertions(+), 30 deletions(-) diff --git a/sdk/react-native-expo/package.json b/sdk/react-native-expo/package.json index 9ed8ee54a..2e36fd818 100644 --- a/sdk/react-native-expo/package.json +++ b/sdk/react-native-expo/package.json @@ -34,7 +34,7 @@ "react-native-get-random-values": "^1.7.2" }, "peerDependencies": { - "react": ">=16.8.0", - "react-native": ">=0.64.0" + "react": ">=17.0.2", + "react-native": ">=0.68.0" } } diff --git a/sdk/react-native-expo/project.json b/sdk/react-native-expo/project.json index 03dae6762..54bcf629f 100644 --- a/sdk/react-native-expo/project.json +++ b/sdk/react-native-expo/project.json @@ -13,27 +13,14 @@ } }, "build": { - "command": "echo Building Expo Target", - "dependsOn": ["build:expo"] - }, - "build:expo": { - "executor": "@altack/nx-bundlefy:run", - "configurations": {}, - "dependsOn": ["build:es5"], - "outputs": ["{options.outputFile}"] - }, - "build:es5": { + "executor": "@nrwl/rollup:rollup", + "outputs": ["{options.outputPath}"], "dependsOn": [ - "shared-types:build:es5", "shared-types:build", - "js:build:es5", "js:build", - "react:build:es5", "react:build", - "react:build:es5" + "react-native:build" ], - "executor": "@nrwl/rollup:rollup", - "outputs": ["{options.outputPath}"], "options": { "outputPath": "dist/sdk/react-native-expo", "tsConfig": "sdk/react-native-expo/tsconfig.lib.json", @@ -42,7 +29,7 @@ "format": ["esm", "cjs"], "external": "all", "rollupConfig": "@nx/react/plugins/bundle-rollup", - "compiler": "babel", + "compiler": "tsc", "assets": [ { "glob": "sdk/react-native-expo/README.md", diff --git a/sdk/react-native-expo/tsconfig.lib.json b/sdk/react-native-expo/tsconfig.lib.json index 8f385cd18..8783e09ac 100644 --- a/sdk/react-native-expo/tsconfig.lib.json +++ b/sdk/react-native-expo/tsconfig.lib.json @@ -2,8 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../../dist/out-tsc", - "types": ["node"], - "jsx": "react-native" + "types": ["node"] }, "exclude": [ "jest.config.ts", diff --git a/sdk/react-native/package.json b/sdk/react-native/package.json index 58ffa1755..775fa93b2 100644 --- a/sdk/react-native/package.json +++ b/sdk/react-native/package.json @@ -33,7 +33,7 @@ "react-native-get-random-values": "^1.7.2" }, "peerDependencies": { - "react": ">=16.8.0", - "react-native": ">=0.64.0" + "react": ">=17.0.2", + "react-native": ">=0.68.0" } } diff --git a/sdk/react-native/project.json b/sdk/react-native/project.json index 2593882ae..d49847fe5 100644 --- a/sdk/react-native/project.json +++ b/sdk/react-native/project.json @@ -15,6 +15,7 @@ "build": { "executor": "@nrwl/rollup:rollup", "outputs": ["{options.outputPath}"], + "dependsOn": ["shared-types:build", "js:build", "react:build"], "options": { "outputPath": "dist/sdk/react-native", "tsConfig": "sdk/react-native/tsconfig.lib.json", @@ -23,7 +24,7 @@ "format": ["esm", "cjs"], "external": "all", "rollupConfig": "@nx/react/plugins/bundle-rollup", - "compiler": "babel", + "compiler": "tsc", "assets": [ { "glob": "sdk/react-native/README.md", diff --git a/sdk/react-native/tsconfig.lib.json b/sdk/react-native/tsconfig.lib.json index 8f385cd18..8783e09ac 100644 --- a/sdk/react-native/tsconfig.lib.json +++ b/sdk/react-native/tsconfig.lib.json @@ -2,8 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../../dist/out-tsc", - "types": ["node"], - "jsx": "react-native" + "types": ["node"] }, "exclude": [ "jest.config.ts", diff --git a/yarn.lock b/yarn.lock index 176ca889c..a463fe3f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4800,8 +4800,8 @@ __metadata: react-native-device-info: ^8.7.0 react-native-get-random-values: ^1.7.2 peerDependencies: - react: ">=16.8.0" - react-native: ">=0.64.0" + react: ">=17.0.2" + react-native: ">=0.68.0" languageName: unknown linkType: soft @@ -4815,8 +4815,8 @@ __metadata: react-native-device-info: ^8.7.0 react-native-get-random-values: ^1.7.2 peerDependencies: - react: ">=16.8.0" - react-native: ">=0.64.0" + react: ">=17.0.2" + react-native: ">=0.68.0" languageName: unknown linkType: soft