diff --git a/docs/generated/manifests/menus.json b/docs/generated/manifests/menus.json index 81d7ee3d84..88fb6ae598 100644 --- a/docs/generated/manifests/menus.json +++ b/docs/generated/manifests/menus.json @@ -4513,62 +4513,6 @@ "isExternal": false, "disableCollapsible": false }, - { - "id": "build-ios", - "path": "/packages/expo/executors/build-ios", - "name": "build-ios", - "children": [], - "isExternal": false, - "disableCollapsible": false - }, - { - "id": "build-android", - "path": "/packages/expo/executors/build-android", - "name": "build-android", - "children": [], - "isExternal": false, - "disableCollapsible": false - }, - { - "id": "build-web", - "path": "/packages/expo/executors/build-web", - "name": "build-web", - "children": [], - "isExternal": false, - "disableCollapsible": false - }, - { - "id": "build-status", - "path": "/packages/expo/executors/build-status", - "name": "build-status", - "children": [], - "isExternal": false, - "disableCollapsible": false - }, - { - "id": "publish", - "path": "/packages/expo/executors/publish", - "name": "publish", - "children": [], - "isExternal": false, - "disableCollapsible": false - }, - { - "id": "publish-set", - "path": "/packages/expo/executors/publish-set", - "name": "publish-set", - "children": [], - "isExternal": false, - "disableCollapsible": false - }, - { - "id": "rollback", - "path": "/packages/expo/executors/rollback", - "name": "rollback", - "children": [], - "isExternal": false, - "disableCollapsible": false - }, { "id": "run", "path": "/packages/expo/executors/run", diff --git a/docs/generated/manifests/packages.json b/docs/generated/manifests/packages.json index f27d3dc715..15a311d7e6 100644 --- a/docs/generated/manifests/packages.json +++ b/docs/generated/manifests/packages.json @@ -737,69 +737,6 @@ "path": "/packages/expo/executors/download", "type": "executor" }, - "/packages/expo/executors/build-ios": { - "description": "Build and sign a standalone IPA for the Apple App Store", - "file": "generated/packages/expo/executors/build-ios.json", - "hidden": false, - "name": "build-ios", - "originalFilePath": "/packages/expo/src/executors/build-ios/schema.json", - "path": "/packages/expo/executors/build-ios", - "type": "executor" - }, - "/packages/expo/executors/build-android": { - "description": "Build and sign a standalone APK or App Bundle for the Google Play Store", - "file": "generated/packages/expo/executors/build-android.json", - "hidden": false, - "name": "build-android", - "originalFilePath": "/packages/expo/src/executors/build-android/schema.json", - "path": "/packages/expo/executors/build-android", - "type": "executor" - }, - "/packages/expo/executors/build-web": { - "description": "Build the web app for production", - "file": "generated/packages/expo/executors/build-web.json", - "hidden": false, - "name": "build-web", - "originalFilePath": "/packages/expo/src/executors/build-web/schema.json", - "path": "/packages/expo/executors/build-web", - "type": "executor" - }, - "/packages/expo/executors/build-status": { - "description": "Get the status of the latest build for the project", - "file": "generated/packages/expo/executors/build-status.json", - "hidden": false, - "name": "build-status", - "originalFilePath": "/packages/expo/src/executors/build-status/schema.json", - "path": "/packages/expo/executors/build-status", - "type": "executor" - }, - "/packages/expo/executors/publish": { - "description": "Deploy a project to Expo hosting", - "file": "generated/packages/expo/executors/publish.json", - "hidden": false, - "name": "publish", - "originalFilePath": "/packages/expo/src/executors/publish/schema.json", - "path": "/packages/expo/executors/publish", - "type": "executor" - }, - "/packages/expo/executors/publish-set": { - "description": "Specify the channel to serve a published release", - "file": "generated/packages/expo/executors/publish-set.json", - "hidden": false, - "name": "publish-set", - "originalFilePath": "/packages/expo/src/executors/publish-set/schema.json", - "path": "/packages/expo/executors/publish-set", - "type": "executor" - }, - "/packages/expo/executors/rollback": { - "description": "Undo an update to a channel", - "file": "generated/packages/expo/executors/rollback.json", - "hidden": false, - "name": "rollback", - "originalFilePath": "/packages/expo/src/executors/rollback/schema.json", - "path": "/packages/expo/executors/rollback", - "type": "executor" - }, "/packages/expo/executors/run": { "description": "Run the Android app binary locally or run the iOS app binary locally", "file": "generated/packages/expo/executors/run.json", diff --git a/docs/generated/packages-metadata.json b/docs/generated/packages-metadata.json index 47fadabbb4..0ea56eaf56 100644 --- a/docs/generated/packages-metadata.json +++ b/docs/generated/packages-metadata.json @@ -724,69 +724,6 @@ "path": "expo/executors/download", "type": "executor" }, - { - "description": "Build and sign a standalone IPA for the Apple App Store", - "file": "generated/packages/expo/executors/build-ios.json", - "hidden": false, - "name": "build-ios", - "originalFilePath": "/packages/expo/src/executors/build-ios/schema.json", - "path": "expo/executors/build-ios", - "type": "executor" - }, - { - "description": "Build and sign a standalone APK or App Bundle for the Google Play Store", - "file": "generated/packages/expo/executors/build-android.json", - "hidden": false, - "name": "build-android", - "originalFilePath": "/packages/expo/src/executors/build-android/schema.json", - "path": "expo/executors/build-android", - "type": "executor" - }, - { - "description": "Build the web app for production", - "file": "generated/packages/expo/executors/build-web.json", - "hidden": false, - "name": "build-web", - "originalFilePath": "/packages/expo/src/executors/build-web/schema.json", - "path": "expo/executors/build-web", - "type": "executor" - }, - { - "description": "Get the status of the latest build for the project", - "file": "generated/packages/expo/executors/build-status.json", - "hidden": false, - "name": "build-status", - "originalFilePath": "/packages/expo/src/executors/build-status/schema.json", - "path": "expo/executors/build-status", - "type": "executor" - }, - { - "description": "Deploy a project to Expo hosting", - "file": "generated/packages/expo/executors/publish.json", - "hidden": false, - "name": "publish", - "originalFilePath": "/packages/expo/src/executors/publish/schema.json", - "path": "expo/executors/publish", - "type": "executor" - }, - { - "description": "Specify the channel to serve a published release", - "file": "generated/packages/expo/executors/publish-set.json", - "hidden": false, - "name": "publish-set", - "originalFilePath": "/packages/expo/src/executors/publish-set/schema.json", - "path": "expo/executors/publish-set", - "type": "executor" - }, - { - "description": "Undo an update to a channel", - "file": "generated/packages/expo/executors/rollback.json", - "hidden": false, - "name": "rollback", - "originalFilePath": "/packages/expo/src/executors/rollback/schema.json", - "path": "expo/executors/rollback", - "type": "executor" - }, { "description": "Run the Android app binary locally or run the iOS app binary locally", "file": "generated/packages/expo/executors/run.json", diff --git a/docs/generated/packages/expo/executors/start.json b/docs/generated/packages/expo/executors/start.json index 50cab6a6a4..7e4e333aee 100644 --- a/docs/generated/packages/expo/executors/start.json +++ b/docs/generated/packages/expo/executors/start.json @@ -84,17 +84,6 @@ "offline": { "type": "boolean", "description": "Allows this command to run while offline" - }, - "sentTo": { - "type": "string", - "description": "An email address to send a link to", - "alias": "s", - "x-deprecated": "This option will be removed in v16. It is no longer supported by @expo/cli." - }, - "webpack": { - "type": "boolean", - "description": "Start a Webpack dev server for the web app.", - "x-deprecated": "This option will be removed in v16. It is no longer supported by @expo/cli." } }, "examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"start\": {\n \"executor\": \"@nrwl/expo:start\",\n \"options\": {\n \"port\": 8081\n }\n }\n //...\n }\n}\n```\n\n```shell\nnx run mobile:start\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Specify starting on platform\" %}\nThe `ios`, `android` and `web` option allows you to start the server on different platforms.\n\nOpens your app in Expo Go in a currently running iOS simulator on your computer:\n\n```json\n \"start\": {\n \"executor\": \"@nrwl/expo:start\",\n \"options\": {\n \"port\": 8081,\n \"ios\": true\n }\n }\n```\n\nOpens your app in Expo Go on a connected Android device\n\n```json\n \"start\": {\n \"executor\": \"@nrwl/expo:start\",\n \"options\": {\n \"port\": 8081,\n \"android\": true\n }\n }\n```\n\nOpens your app in a web browser:\n\n```json\n \"start\": {\n \"executor\": \"@nrwl/expo:start\",\n \"options\": {\n \"port\": 8081,\n \"web\": true\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Specify the host\" %}\nThe `host` option allows you to specify the type of host to use. `lan` uses the local network; `tunnel` ues any network by tunnel through ngrok; `localhost` connects to the dev server over localhost.\n\n```json\n \"start\": {\n \"executor\": \"@nrwl/expo:start\",\n \"options\": {\n \"port\": 8081,\n \"host\": \"localhost\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Starts the server with cache reset\" %}\n\nThe `clear` option allows you to remove Metro bundler cache.\n\n```json\n \"start\": {\n \"executor\": \"@nrwl/expo:start\",\n \"options\": {\n \"port\": 8081,\n \"clear\": true\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n", diff --git a/packages/expo/executors.json b/packages/expo/executors.json index a893641b14..55cf02c3e6 100644 --- a/packages/expo/executors.json +++ b/packages/expo/executors.json @@ -20,41 +20,6 @@ "schema": "./src/executors/download/schema.json", "description": "Download an EAS build" }, - "build-ios": { - "implementation": "./src/executors/build-ios/build-ios.impl", - "schema": "./src/executors/build-ios/schema.json", - "description": "Build and sign a standalone IPA for the Apple App Store" - }, - "build-android": { - "implementation": "./src/executors/build-android/build-android.impl", - "schema": "./src/executors/build-android/schema.json", - "description": "Build and sign a standalone APK or App Bundle for the Google Play Store" - }, - "build-web": { - "implementation": "./src/executors/build-web/build-web.impl", - "schema": "./src/executors/build-web/schema.json", - "description": "Build the web app for production" - }, - "build-status": { - "implementation": "./src/executors/build-status/build-status.impl", - "schema": "./src/executors/build-status/schema.json", - "description": "Get the status of the latest build for the project" - }, - "publish": { - "implementation": "./src/executors/publish/publish.impl", - "schema": "./src/executors/publish/schema.json", - "description": "Deploy a project to Expo hosting" - }, - "publish-set": { - "implementation": "./src/executors/publish-set/publish-set.impl", - "schema": "./src/executors/publish-set/schema.json", - "description": "Specify the channel to serve a published release" - }, - "rollback": { - "implementation": "./src/executors/rollback/rollback.impl", - "schema": "./src/executors/rollback/schema.json", - "description": "Undo an update to a channel" - }, "run": { "implementation": "./src/executors/run/run.impl", "schema": "./src/executors/run/schema.json", @@ -112,41 +77,6 @@ "schema": "./src/executors/download/schema.json", "description": "Download an EAS build" }, - "build-ios": { - "implementation": "./src/executors/build-ios/compat", - "schema": "./src/executors/build-ios/schema.json", - "description": "Build and sign a standalone IPA for the Apple App Store" - }, - "build-android": { - "implementation": "./src/executors/build-android/compat", - "schema": "./src/executors/build-android/schema.json", - "description": "Build and sign a standalone APK or App Bundle for the Google Play Store" - }, - "build-web": { - "implementation": "./src/executors/build-web/compat", - "schema": "./src/executors/build-web/schema.json", - "description": "Build the web app for production" - }, - "build-status": { - "implementation": "./src/executors/build-status/compat", - "schema": "./src/executors/build-status/schema.json", - "description": "Get the status of the latest build for the project" - }, - "publish": { - "implementation": "./src/executors/publish/compat", - "schema": "./src/executors/publish/schema.json", - "description": "Deploy a project to Expo hosting" - }, - "publish-set": { - "implementation": "./src/executors/publish-set/compat", - "schema": "./src/executors/publish-set/schema.json", - "description": "Specify the channel to serve a published release" - }, - "rollback": { - "implementation": "./src/executors/rollback/compat", - "schema": "./src/executors/rollback/schema.json", - "description": "Undo an update to a channel" - }, "run": { "implementation": "./src/executors/run/compat", "schema": "./src/executors/run/schema.json", diff --git a/packages/expo/migrations.json b/packages/expo/migrations.json index 2225a01a79..0d15c109ae 100644 --- a/packages/expo/migrations.json +++ b/packages/expo/migrations.json @@ -41,6 +41,12 @@ "cli": "nx", "description": "Change webpack to metro in expo projects", "factory": "./src/migrations/update-15-8-3/change-webpack-to-metro" + }, + "remove-deprecated-expo-targets": { + "version": "16.0.0-beta.0", + "cli": "nx", + "description": "Remove deprecated expo targets", + "factory": "./src/migrations/update-16-0-0/remove-deprecated-targets" } }, "packageJsonUpdates": { diff --git a/packages/expo/src/executors/build-android/build-android.impl.ts b/packages/expo/src/executors/build-android/build-android.impl.ts deleted file mode 100644 index 67f2269593..0000000000 --- a/packages/expo/src/executors/build-android/build-android.impl.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { ExecutorContext, logger, names } from '@nrwl/devkit'; -import { join } from 'path'; -import { ChildProcess, fork } from 'child_process'; - -import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink'; - -import { ExpoBuildAndroidOptions } from './schema'; -import { - displayNewlyAddedDepsMessage, - syncDeps, -} from '../sync-deps/sync-deps.impl'; - -export interface ReactNativeBuildOutput { - success: boolean; -} - -let childProcess: ChildProcess; - -export default async function* buildAndroidExecutor( - options: ExpoBuildAndroidOptions, - context: ExecutorContext -): AsyncGenerator { - logger.warn( - '@nrwl/expo:build-android is deprecated and will be removed in Nx 16. Please switch to expo:prebuild and expo:build.' - ); - const projectRoot = - context.projectsConfigurations.projects[context.projectName].root; - ensureNodeModulesSymlink(context.root, projectRoot); - if (options.sync) { - displayNewlyAddedDepsMessage( - context.projectName, - await syncDeps( - context.projectName, - projectRoot, - context.root, - context.projectGraph - ) - ); - } - - try { - await runCliBuild(context.root, projectRoot, options); - yield { success: true }; - } finally { - if (childProcess) { - childProcess.kill(); - } - } -} - -function runCliBuild( - workspaceRoot: string, - projectRoot: string, - options: ExpoBuildAndroidOptions -) { - return new Promise((resolve, reject) => { - childProcess = fork( - join(workspaceRoot, './node_modules/expo-cli/bin/expo.js'), - ['build:android', ...createRunOptions(options)], - { cwd: join(workspaceRoot, projectRoot), env: process.env } - ); - - // Ensure the child process is killed when the parent exits - process.on('exit', () => childProcess.kill()); - process.on('SIGTERM', () => childProcess.kill()); - - childProcess.on('error', (err) => { - reject(err); - }); - childProcess.on('exit', (code) => { - if (code === 0) { - resolve(code); - } else { - reject(code); - } - }); - }); -} - -const nxOptions = ['sync']; - -function createRunOptions(options: ExpoBuildAndroidOptions) { - return Object.keys(options).reduce((acc, k) => { - const v = options[k]; - if (!nxOptions.includes(k)) { - if (typeof v === 'boolean') { - if (v === true) { - // when true, does not need to pass the value true, just need to pass the flag in kebob case - acc.push(`--${names(k).fileName}`); - } - } else { - acc.push(`--${names(k).fileName}`, v); - } - } - return acc; - }, []); -} diff --git a/packages/expo/src/executors/build-android/compat.ts b/packages/expo/src/executors/build-android/compat.ts deleted file mode 100644 index 12465b9fe8..0000000000 --- a/packages/expo/src/executors/build-android/compat.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { convertNxExecutor } from '@nrwl/devkit'; - -import buildAndroidExecutor from './build-android.impl'; - -export default convertNxExecutor(buildAndroidExecutor); diff --git a/packages/expo/src/executors/build-android/schema.d.ts b/packages/expo/src/executors/build-android/schema.d.ts deleted file mode 100644 index 390666a53c..0000000000 --- a/packages/expo/src/executors/build-android/schema.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// options from https://docs.expo.dev/workflow/expo-cli/#expo-buildandroid -export interface ExpoBuildAndroidOptions { - clearCredentials?: boolean; - type?: 'app-bundle' | 'apk'; - releaseChannel?: string; - noPublish?: boolean; - noWait?: boolean; - keystorePath?: string; - keystoreAlias?: string; - publicUrl?: string; - skipWorkflowCheck?: boolean; - sync: boolean; // default is true -} diff --git a/packages/expo/src/executors/build-android/schema.json b/packages/expo/src/executors/build-android/schema.json deleted file mode 100644 index a088a81881..0000000000 --- a/packages/expo/src/executors/build-android/schema.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "$id": "NxExpoBuildAndroid", - "cli": "nx", - "title": "Expo Android Build executor", - "description": "Build and sign a standalone APK or App Bundle for the Google Play Store.", - "type": "object", - "properties": { - "clearCredentials": { - "type": "boolean", - "description": "Clear all credentials stored on Expo servers.", - "alias": "c" - }, - "type": { - "enum": ["app-bundle", "apk"], - "description": "Type of build: [app-bundle⎮apk].", - "alias": "t", - "x-priority": "important" - }, - "releaseChannel": { - "type": "string", - "description": "Pull from specified release channel." - }, - "noPublish": { - "type": "boolean", - "description": "Disable automatic publishing before building." - }, - "noWait": { - "type": "boolean", - "description": "Exit immediately after scheduling build." - }, - "keystorePath": { - "type": "string", - "description": "Path to your Keystore: *.jks." - }, - "keystoreAlias": { - "type": "string", - "description": "Keystore Alias" - }, - "publicUrl": { - "type": "string", - "description": "The URL of an externally hosted manifest (for self-hosted apps)." - }, - "skipWorkflowCheck": { - "type": "boolean", - "description": "Skip warning about build service bare workflow limitations." - }, - "sync": { - "type": "boolean", - "description": "Syncs npm dependencies to package.json (for React Native autolink).", - "default": true, - "x-priority": "internal" - } - }, - "required": [] -} diff --git a/packages/expo/src/executors/build-ios/build-ios.impl.ts b/packages/expo/src/executors/build-ios/build-ios.impl.ts deleted file mode 100644 index 1e3f9d0cf0..0000000000 --- a/packages/expo/src/executors/build-ios/build-ios.impl.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { ExecutorContext, logger, names } from '@nrwl/devkit'; -import { join } from 'path'; -import { ChildProcess, fork } from 'child_process'; - -import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink'; -import { - displayNewlyAddedDepsMessage, - syncDeps, -} from '../sync-deps/sync-deps.impl'; -import { ExpoBuildIOSOptions } from './schema'; - -export interface ExpoRunOutput { - success: boolean; -} - -let childProcess: ChildProcess; - -export default async function* buildIosExecutor( - options: ExpoBuildIOSOptions, - context: ExecutorContext -): AsyncGenerator { - logger.warn( - '@nrwl/expo:build-status is deprecated and will be removed in Nx 16. Please switch to expo:prebuild and expo:build.' - ); - const projectRoot = - context.projectsConfigurations.projects[context.projectName].root; - ensureNodeModulesSymlink(context.root, projectRoot); - if (options.sync) { - displayNewlyAddedDepsMessage( - context.projectName, - await syncDeps( - context.projectName, - projectRoot, - context.root, - context.projectGraph - ) - ); - } - - try { - await runCliBuildIOS(context.root, projectRoot, options); - - yield { success: true }; - } finally { - if (childProcess) { - childProcess.kill(); - } - } -} - -function runCliBuildIOS( - workspaceRoot: string, - projectRoot: string, - options: ExpoBuildIOSOptions -) { - return new Promise((resolve, reject) => { - childProcess = fork( - join(workspaceRoot, './node_modules/expo-cli/bin/expo.js'), - ['build:ios', ...createRunOptions(options)], - { cwd: join(workspaceRoot, projectRoot), env: process.env } - ); - - // Ensure the child process is killed when the parent exits - process.on('exit', () => childProcess.kill()); - process.on('SIGTERM', () => childProcess.kill()); - - childProcess.on('error', (err) => { - reject(err); - }); - childProcess.on('exit', (code) => { - if (code === 0) { - resolve(code); - } else { - reject(code); - } - }); - }); -} - -const nxOptions = ['sync']; - -function createRunOptions(options: ExpoBuildIOSOptions) { - return Object.keys(options).reduce((acc, k) => { - const v = options[k]; - if (!nxOptions.includes(k)) { - if (typeof v === 'boolean') { - if (v === true) { - // when true, does not need to pass the value true, just need to pass the flag in kebob case - acc.push(`--${names(k).fileName}`); - } - } else { - acc.push(`--${names(k).fileName}`, v); - } - } - return acc; - }, []); -} diff --git a/packages/expo/src/executors/build-ios/compat.ts b/packages/expo/src/executors/build-ios/compat.ts deleted file mode 100644 index 3803011250..0000000000 --- a/packages/expo/src/executors/build-ios/compat.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { convertNxExecutor } from '@nrwl/devkit'; - -import buildIosExecutor from './build-ios.impl'; - -export default convertNxExecutor(buildIosExecutor); diff --git a/packages/expo/src/executors/build-ios/schema.d.ts b/packages/expo/src/executors/build-ios/schema.d.ts deleted file mode 100644 index 301f6a713b..0000000000 --- a/packages/expo/src/executors/build-ios/schema.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -// options from https://docs.expo.dev/workflow/expo-cli/#expo-buildios -export interface ExpoBuildIOSOptions { - clearCredentials?: boolean; - clearDistCert?: boolean; - clearPushKey?: boolean; - clearnPushCert?: boolean; - clearProvisioningProfile?: boolean; - revokeCredentials?: boolean; - appleId?: string; - type: 'archive' | 'simulator'; - releaseChannel?: string; - noPublish?: boolean; - noWait?: boolean; - teamId?: string; - dishP12Path?: string; - pushId?: string; - pushP8Path?: string; - provisioningProfile?: string; - publicUrl?: string; - skipCredentialsCheck?: boolean; - skipWorkflowCheck?: boolean; - sync: boolean; // default is true -} diff --git a/packages/expo/src/executors/build-ios/schema.json b/packages/expo/src/executors/build-ios/schema.json deleted file mode 100644 index d33d910e03..0000000000 --- a/packages/expo/src/executors/build-ios/schema.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "$id": "NxExpoBuildIOS", - "cli": "nx", - "title": "Expo iOS Build executor", - "description": "Build and sign a standalone IPA for the Apple App Store.", - "type": "object", - "properties": { - "clearCredentials": { - "type": "boolean", - "description": "Clear all credentials stored on Expo servers.", - "alias": "c" - }, - "clearDistCert": { - "type": "boolean", - "description": "Remove Distribution Certificate stored on Expo servers." - }, - "clearPushKey": { - "type": "boolean", - "description": "Remove Push Notifications Key stored on Expo servers." - }, - "clearPushCert": { - "type": "boolean", - "description": "Remove Push Notifications Certificate stored on Expo servers. Use of Push Notifications Certificates is deprecated." - }, - "clearProvisioningProfile": { - "type": "boolean", - "description": "Remove Provisioning Profile stored on Expo servers." - }, - "revokeCredentials": { - "type": "boolean", - "description": "Revoke credentials on developer.apple.com, select appropriate using --clear-* options.", - "alias": "r" - }, - "appleId": { - "type": "string", - "description": "Apple ID username (please also set the Apple ID password as EXPO_APPLE_PASSWORD environment variable)." - }, - "type": { - "enum": ["archive", "simulator"], - "description": "Type of build: [archive⎮simulator].", - "alias": "t", - "x-priority": "important" - }, - "releaseChannel": { - "type": "string", - "description": "Pull from specified release channel." - }, - "noPublish": { - "type": "boolean", - "description": "Disable automatic publishing before building." - }, - "noWait": { - "type": "boolean", - "description": "Exit immediately after scheduling build." - }, - "teamId": { - "type": "string", - "description": "Apple Team ID." - }, - "distP12Path": { - "type": "string", - "description": "Path to your Distribution Certificate P12 (set password as EXPO_IOS_DIST_P12_PASSWORD environment variable)." - }, - "pushP8Path": { - "type": "string", - "description": "Path to your Push Key .p8 file." - }, - "provisioningProfilePath": { - "type": "string", - "description": "Path to your Provisioning Profile." - }, - "publicUrl": { - "type": "string", - "description": "The URL of an externally hosted manifest (for self-hosted apps)." - }, - "skipCredentialsCheck": { - "type": "boolean", - "description": "Skip checking credentials." - }, - "skipWorkflowCheck": { - "type": "boolean", - "description": "Skip warning about build service bare workflow limitations." - }, - "sync": { - "type": "boolean", - "description": "Syncs npm dependencies to package.json (for React Native autolink).", - "default": true, - "x-priority": "internal" - } - }, - "required": [] -} diff --git a/packages/expo/src/executors/build-status/build-status.impl.ts b/packages/expo/src/executors/build-status/build-status.impl.ts deleted file mode 100644 index 1820e5a4bb..0000000000 --- a/packages/expo/src/executors/build-status/build-status.impl.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { ExecutorContext, logger, names } from '@nrwl/devkit'; -import { join } from 'path'; -import { ChildProcess, fork } from 'child_process'; - -import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink'; - -import { ExpoBuildStatusOptions } from './schema'; - -export interface ReactNativeBuildOutput { - success: boolean; -} - -let childProcess: ChildProcess; - -export default async function* buildStatusExecutor( - options: ExpoBuildStatusOptions, - context: ExecutorContext -): AsyncGenerator { - logger.warn( - '@nrwl/expo:build-status is deprecated and will be removed in Nx 16. Please switch to expo:build-list.' - ); - - const projectRoot = - context.projectsConfigurations.projects[context.projectName].root; - ensureNodeModulesSymlink(context.root, projectRoot); - - try { - await runCliBuild(context.root, projectRoot, options); - yield { success: true }; - } finally { - if (childProcess) { - childProcess.kill(); - } - } -} - -function runCliBuild( - workspaceRoot: string, - projectRoot: string, - options: ExpoBuildStatusOptions -) { - return new Promise((resolve, reject) => { - childProcess = fork( - join(workspaceRoot, './node_modules/expo-cli/bin/expo.js'), - ['build:status', ...createRunOptions(options)], - { cwd: join(workspaceRoot, projectRoot), env: process.env } - ); - - // Ensure the child process is killed when the parent exits - process.on('exit', () => childProcess.kill()); - process.on('SIGTERM', () => childProcess.kill()); - - childProcess.on('error', (err) => { - reject(err); - }); - childProcess.on('exit', (code) => { - if (code === 0) { - resolve(code); - } else { - reject(code); - } - }); - }); -} - -function createRunOptions(options) { - return Object.keys(options).reduce((acc, k) => { - const v = options[k]; - if (typeof v === 'boolean') { - if (v === true) { - // when true, does not need to pass the value true, just need to pass the flag in kebob case - acc.push(`--${names(k).fileName}`); - } - } else { - acc.push(`--${names(k).fileName}`, v); - } - return acc; - }, []); -} diff --git a/packages/expo/src/executors/build-status/compat.ts b/packages/expo/src/executors/build-status/compat.ts deleted file mode 100644 index b2d2934f15..0000000000 --- a/packages/expo/src/executors/build-status/compat.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { convertNxExecutor } from '@nrwl/devkit'; - -import buildStatusExecutor from './build-status.impl'; - -export default convertNxExecutor(buildStatusExecutor); diff --git a/packages/expo/src/executors/build-status/schema.d.ts b/packages/expo/src/executors/build-status/schema.d.ts deleted file mode 100644 index 241aae4116..0000000000 --- a/packages/expo/src/executors/build-status/schema.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// options from https://docs.expo.dev/workflow/expo-cli/#expo-buildweb -export interface ExpoBuildStatusOptions { - publicUrl: string; -} diff --git a/packages/expo/src/executors/build-status/schema.json b/packages/expo/src/executors/build-status/schema.json deleted file mode 100644 index 8bf4754a38..0000000000 --- a/packages/expo/src/executors/build-status/schema.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "$id": "NxExpoBuildStatus", - "cli": "nx", - "title": "Expo web Build executor", - "description": "Get the status of the latest build for the project.", - "type": "object", - "properties": { - "publicUrl": { - "type": "string", - "description": "The URL of an externally hosted manifest (for self-hosted apps)." - } - }, - "required": [] -} diff --git a/packages/expo/src/executors/build-web/build-web.impl.ts b/packages/expo/src/executors/build-web/build-web.impl.ts deleted file mode 100644 index f7984840ca..0000000000 --- a/packages/expo/src/executors/build-web/build-web.impl.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { ExecutorContext, logger, names } from '@nrwl/devkit'; -import { join } from 'path'; -import { ChildProcess, fork } from 'child_process'; - -import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink'; - -import { ExpoBuildWebOptions } from './schema'; - -export interface ReactNativeBuildOutput { - success: boolean; -} - -let childProcess: ChildProcess; - -export default async function* buildWebExecutor( - options: ExpoBuildWebOptions, - context: ExecutorContext -): AsyncGenerator { - logger.warn( - '@nrwl/expo:build-web is deprecated and will be removed in Nx 16. Please switch to expo:export-web.' - ); - - const projectRoot = - context.projectsConfigurations.projects[context.projectName].root; - ensureNodeModulesSymlink(context.root, projectRoot); - - try { - await runCliBuild(context.root, projectRoot, options); - yield { success: true }; - } finally { - if (childProcess) { - childProcess.kill(); - } - } -} - -function runCliBuild( - workspaceRoot: string, - projectRoot: string, - options: ExpoBuildWebOptions -) { - return new Promise((resolve, reject) => { - childProcess = fork( - join(workspaceRoot, './node_modules/expo-cli/bin/expo.js'), - ['build:web', ...createRunOptions(options)], - { cwd: join(workspaceRoot, projectRoot), env: process.env } - ); - - // Ensure the child process is killed when the parent exits - process.on('exit', () => childProcess.kill()); - process.on('SIGTERM', () => childProcess.kill()); - - childProcess.on('error', (err) => { - reject(err); - }); - childProcess.on('exit', (code) => { - if (code === 0) { - resolve(code); - } else { - reject(code); - } - }); - }); -} - -function createRunOptions(options) { - return Object.keys(options).reduce((acc, k) => { - const v = options[k]; - if (typeof v === 'boolean') { - if (v === true) { - // when true, does not need to pass the value true, just need to pass the flag in kebob case - acc.push(`--${names(k).fileName}`); - } - } else { - acc.push(`--${names(k).fileName}`, v); - } - return acc; - }, []); -} diff --git a/packages/expo/src/executors/build-web/compat.ts b/packages/expo/src/executors/build-web/compat.ts deleted file mode 100644 index 9596d59212..0000000000 --- a/packages/expo/src/executors/build-web/compat.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { convertNxExecutor } from '@nrwl/devkit'; - -import buildWebExecutor from './build-web.impl'; - -export default convertNxExecutor(buildWebExecutor); diff --git a/packages/expo/src/executors/build-web/schema.d.ts b/packages/expo/src/executors/build-web/schema.d.ts deleted file mode 100644 index e7e55d18e4..0000000000 --- a/packages/expo/src/executors/build-web/schema.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// options from https://docs.expo.dev/workflow/expo-cli/#expo-buildweb -export interface ExpoBuildWebOptions { - clear?: boolean; - noPwa?: boolean; - dev?: boolean; -} diff --git a/packages/expo/src/executors/build-web/schema.json b/packages/expo/src/executors/build-web/schema.json deleted file mode 100644 index b47ab8ea5d..0000000000 --- a/packages/expo/src/executors/build-web/schema.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "version": 2, - "outputCapture": "direct-nodejs", - "$schema": "http://json-schema.org/schema", - "$id": "NxExpoBuildWeb", - "cli": "nx", - "title": "Expo web Build executor", - "description": "Build the web app for production.", - "type": "object", - "properties": { - "clear": { - "type": "boolean", - "description": "Clear all cached build files and assets.", - "alias": "c" - }, - "noPwa": { - "type": "boolean", - "description": "Prevent webpack from generating the manifest.json and injecting meta into the index.html head." - }, - "dev": { - "type": "boolean", - "description": "Turns dev flag on before bundling" - } - }, - "required": [] -} diff --git a/packages/expo/src/executors/publish-set/compat.ts b/packages/expo/src/executors/publish-set/compat.ts deleted file mode 100644 index 4f8b7b0bb7..0000000000 --- a/packages/expo/src/executors/publish-set/compat.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { convertNxExecutor } from '@nrwl/devkit'; - -import publishSetExecutor from './publish-set.impl'; - -export default convertNxExecutor(publishSetExecutor); diff --git a/packages/expo/src/executors/publish-set/publish-set.impl.ts b/packages/expo/src/executors/publish-set/publish-set.impl.ts deleted file mode 100644 index 3ce0eacc9e..0000000000 --- a/packages/expo/src/executors/publish-set/publish-set.impl.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { ExecutorContext, logger, names } from '@nrwl/devkit'; -import { join } from 'path'; -import { ChildProcess, fork } from 'child_process'; - -import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink'; -import { ExpoPublishSetOptions } from './schema'; - -export interface ExpoPublishSetOutput { - success: boolean; -} - -let childProcess: ChildProcess; - -export default async function* publishSetExecutor( - options: ExpoPublishSetOptions, - context: ExecutorContext -): AsyncGenerator { - logger.warn( - '@nrwl/expo:publish-set is deprecated and will be removed in Nx 16.' - ); - - const projectRoot = - context.projectsConfigurations.projects[context.projectName].root; - ensureNodeModulesSymlink(context.root, projectRoot); - - try { - await runCliPublishSet(context.root, projectRoot, options); - - yield { success: true }; - } finally { - if (childProcess) { - childProcess.kill(); - } - } -} - -function runCliPublishSet( - workspaceRoot: string, - projectRoot: string, - options: ExpoPublishSetOptions -) { - return new Promise((resolve, reject) => { - childProcess = fork( - join(workspaceRoot, './node_modules/expo-cli/bin/expo.js'), - ['publish:set', ...createPublishSetOptions(options)], - { - cwd: projectRoot, - } - ); - - // Ensure the child process is killed when the parent exits - process.on('exit', () => childProcess.kill()); - process.on('SIGTERM', () => childProcess.kill()); - - childProcess.on('error', (err) => { - reject(err); - }); - childProcess.on('exit', (code) => { - if (code === 0) { - resolve(code); - } else { - reject(code); - } - }); - }); -} - -function createPublishSetOptions(options: ExpoPublishSetOptions) { - return Object.keys(options).reduce((acc, k) => { - const v = options[k]; - if (typeof v === 'boolean') { - if (v === true) { - // when true, does not need to pass the value true, just need to pass the flag in kebob case - acc.push(`--${names(k).fileName}`); - } - } else { - acc.push(`--${names(k).fileName}`, v); - } - return acc; - }, []); -} diff --git a/packages/expo/src/executors/publish-set/schema.d.ts b/packages/expo/src/executors/publish-set/schema.d.ts deleted file mode 100644 index 24dc6fce8c..0000000000 --- a/packages/expo/src/executors/publish-set/schema.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// options from https://docs.expo.dev/workflow/expo-cli/#expo-publishrollback -export interface ExpoPublishSetOptions { - releaseChannel: string; - sdkVersion: string; - platform?: 'ios' | 'android'; -} diff --git a/packages/expo/src/executors/publish-set/schema.json b/packages/expo/src/executors/publish-set/schema.json deleted file mode 100644 index 2d272d6ab1..0000000000 --- a/packages/expo/src/executors/publish-set/schema.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxExpoPublishSet", - "$schema": "http://json-schema.org/schema", - "title": "Set Publish Channel for Expo", - "description": "Specify the channel to serve a published release.", - "type": "object", - "properties": { - "releaseChannel": { - "type": "string", - "description": "The release channel to publish to." - }, - "publishId": { - "type": "string", - "description": "The id of the published release to serve from the channel." - } - }, - "required": ["releaseChannel", "publishId"] -} diff --git a/packages/expo/src/executors/publish/compat.ts b/packages/expo/src/executors/publish/compat.ts deleted file mode 100644 index facc63b274..0000000000 --- a/packages/expo/src/executors/publish/compat.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { convertNxExecutor } from '@nrwl/devkit'; - -import publishExecutor from './publish.impl'; - -export default convertNxExecutor(publishExecutor); diff --git a/packages/expo/src/executors/publish/publish.impl.ts b/packages/expo/src/executors/publish/publish.impl.ts deleted file mode 100644 index f4749efa58..0000000000 --- a/packages/expo/src/executors/publish/publish.impl.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { ExecutorContext, logger, names } from '@nrwl/devkit'; -import { join } from 'path'; -import { ChildProcess, fork } from 'child_process'; - -import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink'; -import { - displayNewlyAddedDepsMessage, - syncDeps, -} from '../sync-deps/sync-deps.impl'; -import { ExpoPublishOptions } from './schema'; - -export interface ExpoPublishOutput { - success: boolean; -} - -let childProcess: ChildProcess; - -export default async function* publishExecutor( - options: ExpoPublishOptions, - context: ExecutorContext -): AsyncGenerator { - logger.warn('@nrwl/expo:publish is deprecated and will be removed in Nx 16.'); - - const projectRoot = - context.projectsConfigurations.projects[context.projectName].root; - ensureNodeModulesSymlink(context.root, projectRoot); - if (options.sync) { - displayNewlyAddedDepsMessage( - context.projectName, - await syncDeps( - context.projectName, - projectRoot, - context.root, - context.projectGraph - ) - ); - } - - try { - await runCliPublish(context.root, projectRoot, options); - - yield { success: true }; - } finally { - if (childProcess) { - childProcess.kill(); - } - } -} - -function runCliPublish( - workspaceRoot: string, - projectRoot: string, - options: ExpoPublishOptions -) { - return new Promise((resolve, reject) => { - childProcess = fork( - join(workspaceRoot, './node_modules/expo-cli/bin/expo.js'), - [ - 'publish', - join(workspaceRoot, projectRoot), - ...createPublishOptions(options), - ], - { - cwd: projectRoot, - } - ); - - // Ensure the child process is killed when the parent exits - process.on('exit', () => childProcess.kill()); - process.on('SIGTERM', () => childProcess.kill()); - - childProcess.on('error', (err) => { - reject(err); - }); - childProcess.on('exit', (code) => { - if (code === 0) { - resolve(code); - } else { - reject(code); - } - }); - }); -} - -const nxOptions = ['sync']; - -function createPublishOptions(options: ExpoPublishOptions) { - return Object.keys(options).reduce((acc, k) => { - const v = options[k]; - if (!nxOptions.includes(k)) { - if (typeof v === 'boolean') { - if (v === true) { - // when true, does not need to pass the value true, just need to pass the flag in kebob case - acc.push(`--${names(k).fileName}`); - } - } else { - acc.push(`--${names(k).fileName}`, v); - } - } - return acc; - }, []); -} diff --git a/packages/expo/src/executors/publish/schema.d.ts b/packages/expo/src/executors/publish/schema.d.ts deleted file mode 100644 index 2a9ac7096b..0000000000 --- a/packages/expo/src/executors/publish/schema.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -// options from https://docs.expo.dev/workflow/expo-cli/#expo-publish -export interface ExpoPublishOptions { - quiet: boolean; // default is false - sendTo?: string; - clear: boolean; // default is false - target: 'managed' | 'bare'; - maxWorkers?: number; - releaseChannel: string; // default is 'default' - sync: boolean; // default is true -} diff --git a/packages/expo/src/executors/publish/schema.json b/packages/expo/src/executors/publish/schema.json deleted file mode 100644 index 206bc8e087..0000000000 --- a/packages/expo/src/executors/publish/schema.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxExpoPublish", - "$schema": "http://json-schema.org/schema", - "title": "Publish for Expo", - "description": "Deploy a project to Expo hosting.", - "type": "object", - "properties": { - "quiet": { - "type": "boolean", - "description": "Suppress verbose output from the Metro bundler", - "default": false, - "alias": "q" - }, - "sendTo": { - "type": "string", - "description": "A phone number or email address to send a link to", - "alias": "s" - }, - "clear": { - "type": "boolean", - "description": "Clear the Metro bundler cache", - "default": false, - "alias": "c" - }, - "target": { - "enum": ["managed", "bare"], - "default": "managed", - "description": "Target environment for which this publish is intended. Options are managed or bare.", - "alias": "t", - "x-priority": "important" - }, - "maxWorkers": { - "type": "number", - "description": "Maximum number of tasks to allow Metro to spawn" - }, - "releaseChannel": { - "type": "string", - "description": "The release channel to publish to. Default is 'default'.", - "default": "default" - } - } -} diff --git a/packages/expo/src/executors/rollback/compat.ts b/packages/expo/src/executors/rollback/compat.ts deleted file mode 100644 index de76d98188..0000000000 --- a/packages/expo/src/executors/rollback/compat.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { convertNxExecutor } from '@nrwl/devkit'; - -import rollbackExecutor from './rollback.impl'; - -export default convertNxExecutor(rollbackExecutor); diff --git a/packages/expo/src/executors/rollback/rollback.impl.ts b/packages/expo/src/executors/rollback/rollback.impl.ts deleted file mode 100644 index 0a6abb978e..0000000000 --- a/packages/expo/src/executors/rollback/rollback.impl.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { ExecutorContext, logger, names } from '@nrwl/devkit'; -import { join } from 'path'; -import { ChildProcess, fork } from 'child_process'; - -import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink'; -import { ExpoRollbackOptions } from './schema'; - -export interface ExpoRollbackOutput { - success: boolean; -} - -let childProcess: ChildProcess; - -export default async function* rollbackExecutor( - options: ExpoRollbackOptions, - context: ExecutorContext -): AsyncGenerator { - logger.warn( - '@nrwl/expo:rollback is deprecated and will be removed in Nx 16.' - ); - - const projectRoot = - context.projectsConfigurations.projects[context.projectName].root; - ensureNodeModulesSymlink(context.root, projectRoot); - - try { - await runCliRollback(context.root, projectRoot, options); - - yield { success: true }; - } finally { - if (childProcess) { - childProcess.kill(); - } - } -} - -function runCliRollback( - workspaceRoot: string, - projectRoot: string, - options: ExpoRollbackOptions -) { - return new Promise((resolve, reject) => { - childProcess = fork( - join(workspaceRoot, './node_modules/expo-cli/bin/expo.js'), - ['publish:rollback', ...createRollbackOptions(options)], - { - cwd: projectRoot, - } - ); - - // Ensure the child process is killed when the parent exits - process.on('exit', () => childProcess.kill()); - process.on('SIGTERM', () => childProcess.kill()); - - childProcess.on('error', (err) => { - reject(err); - }); - childProcess.on('exit', (code) => { - if (code === 0) { - resolve(code); - } else { - reject(code); - } - }); - }); -} - -function createRollbackOptions(options: ExpoRollbackOptions) { - return Object.keys(options).reduce((acc, k) => { - const v = options[k]; - if (typeof v === 'boolean') { - if (v === true) { - // when true, does not need to pass the value true, just need to pass the flag in kebob case - acc.push(`--${names(k).fileName}`); - } - } else { - acc.push(`--${names(k).fileName}`, v); - } - return acc; - }, []); -} diff --git a/packages/expo/src/executors/rollback/schema.d.ts b/packages/expo/src/executors/rollback/schema.d.ts deleted file mode 100644 index 83c65f2579..0000000000 --- a/packages/expo/src/executors/rollback/schema.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// options from https://docs.expo.dev/workflow/expo-cli/#expo-publishrollback -export interface ExpoRollbackOptions { - releaseChannel: string; - sdkVersion: string; - platform?: 'ios' | 'android'; -} diff --git a/packages/expo/src/executors/rollback/schema.json b/packages/expo/src/executors/rollback/schema.json deleted file mode 100644 index 0adc8ebb4c..0000000000 --- a/packages/expo/src/executors/rollback/schema.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "version": 2, - "outputCapture": "direct-nodejs", - "cli": "nx", - "$id": "NxExpoRollback", - "$schema": "http://json-schema.org/schema", - "title": "Rollback Publish Command for Expo", - "description": "Undo an update to a channel.", - "type": "object", - "properties": { - "releaseChannel": { - "type": "string", - "description": "The release channel to publish to." - }, - "sdkVersion": { - "type": "string", - "description": "The sdk version to rollback." - }, - "platform": { - "enum": ["ios", "android"], - "description": "The platform to rollback." - } - }, - "required": ["releaseChannel", "sdkVersion"] -} diff --git a/packages/expo/src/executors/start/schema.d.ts b/packages/expo/src/executors/start/schema.d.ts index 9a40b79f97..742555d6c5 100644 --- a/packages/expo/src/executors/start/schema.d.ts +++ b/packages/expo/src/executors/start/schema.d.ts @@ -19,12 +19,4 @@ export interface ExpoStartOptions { localhost?: boolean; tunnel?: boolean; offline?: boolean; - /** - * @deprecated - */ - sendTo?: string; // deprecated from @expo/cli - /** - * @deprecated - */ - webpack?: boolean; // deprecated from @expo/cli } diff --git a/packages/expo/src/executors/start/schema.json b/packages/expo/src/executors/start/schema.json index dc74e5d50d..c7cee12527 100644 --- a/packages/expo/src/executors/start/schema.json +++ b/packages/expo/src/executors/start/schema.json @@ -87,17 +87,6 @@ "offline": { "type": "boolean", "description": "Allows this command to run while offline" - }, - "sentTo": { - "type": "string", - "description": "An email address to send a link to", - "alias": "s", - "x-deprecated": "This option will be removed in v16. It is no longer supported by @expo/cli." - }, - "webpack": { - "type": "boolean", - "description": "Start a Webpack dev server for the web app.", - "x-deprecated": "This option will be removed in v16. It is no longer supported by @expo/cli." } }, "examplesFile": "../../../docs/start-examples.md" diff --git a/packages/expo/src/generators/application/lib/add-project.ts b/packages/expo/src/generators/application/lib/add-project.ts index a4a7122020..a09d1992fc 100644 --- a/packages/expo/src/generators/application/lib/add-project.ts +++ b/packages/expo/src/generators/application/lib/add-project.ts @@ -72,30 +72,6 @@ function getTargets(options: NormalizedSchema) { }, }; - // @deprecated, no longer supported in @expo/cli - architect['build-ios'] = { - executor: '@nrwl/expo:build-ios', - options: {}, - }; - - // @deprecated, no longer supported in @expo/cli - architect['build-android'] = { - executor: '@nrwl/expo:build-android', - options: {}, - }; - - // @deprecated, no longer supported in @expo/cli - architect['build-web'] = { - executor: '@nrwl/expo:build-web', - options: {}, - }; - - // @deprecated, no longer supported in @expo/cli - architect['build-status'] = { - executor: '@nrwl/expo:build-web', - options: {}, - }; - architect['sync-deps'] = { executor: '@nrwl/expo:sync-deps', options: {}, @@ -106,37 +82,11 @@ function getTargets(options: NormalizedSchema) { options: {}, }; - // @deprecated, no longer supported in @expo/cli - architect['publish'] = { - executor: '@nrwl/expo:publish', - options: {}, - }; - - // @deprecated, no longer supported in @expo/cli - architect['publish-set'] = { - executor: '@nrwl/expo:publish-set', - options: {}, - }; - - // @deprecated, no longer supported in @expo/cli - architect['rollback'] = { - executor: '@nrwl/expo:rollback', - options: {}, - }; - architect['prebuild'] = { executor: '@nrwl/expo:prebuild', options: {}, }; - // @deprecated, no longer supported in @expo/cli - architect['eject'] = { - executor: 'nx:run-commands', - options: { - command: `nx prebuild ${options.name}`, - }, - }; - architect['install'] = { executor: '@nrwl/expo:install', options: {}, diff --git a/packages/expo/src/generators/init/init.ts b/packages/expo/src/generators/init/init.ts index 91f687006c..5830e887cd 100644 --- a/packages/expo/src/generators/init/init.ts +++ b/packages/expo/src/generators/init/init.ts @@ -10,7 +10,6 @@ import { import { Schema } from './schema'; import { babelPresetExpoVersion, - deprecatedExpoCliVersion, easCliVersion, expoCliVersion, expoMetroConfigVersion, @@ -101,7 +100,6 @@ export function updateDependencies(host: Tree) { 'react-test-renderer': reactTestRendererVersion, '@testing-library/react-native': testingLibraryReactNativeVersion, '@testing-library/jest-native': testingLibraryJestNativeVersion, - 'expo-cli': deprecatedExpoCliVersion, '@expo/cli': expoCliVersion, 'eas-cli': easCliVersion, 'babel-preset-expo': babelPresetExpoVersion, diff --git a/packages/expo/src/migrations/update-15-8-3/change-webpack-to-metro.ts b/packages/expo/src/migrations/update-15-8-3/change-webpack-to-metro.ts index bdb0ff7438..b5b24a9e2b 100644 --- a/packages/expo/src/migrations/update-15-8-3/change-webpack-to-metro.ts +++ b/packages/expo/src/migrations/update-15-8-3/change-webpack-to-metro.ts @@ -11,7 +11,6 @@ import { * - change target export-web * - delete webpack.config.js * - delete @expo/webpack-config dependency - * - add target update */ export default async function update(tree: Tree) { const projects = getProjects(tree); diff --git a/packages/expo/src/migrations/update-16-0-0/remove-deprecated-targets.ts b/packages/expo/src/migrations/update-16-0-0/remove-deprecated-targets.ts new file mode 100644 index 0000000000..c5aa8385e9 --- /dev/null +++ b/packages/expo/src/migrations/update-16-0-0/remove-deprecated-targets.ts @@ -0,0 +1,37 @@ +import { + Tree, + formatFiles, + getProjects, + updateProjectConfiguration, +} from '@nrwl/devkit'; + +/** + * Remove deprecated @expo/cli targets + */ +export default async function update(tree: Tree) { + const projects = getProjects(tree); + + for (const [name, config] of projects.entries()) { + if (config.targets?.['start']?.executor === '@nrwl/expo:start') { + const targetsToDelete = [ + 'build-ios', + 'build-android', + 'build-web', + 'build-status', + 'publish', + 'publish-set', + 'rollback', + 'eject', + ]; + targetsToDelete.forEach((target) => { + if (config.targets[target]) { + delete config.targets[target]; + } + }); + } + + updateProjectConfiguration(tree, name, config); + } + + await formatFiles(tree); +} diff --git a/packages/expo/src/utils/versions.ts b/packages/expo/src/utils/versions.ts index dc2fb4d896..7f5dad1162 100644 --- a/packages/expo/src/utils/versions.ts +++ b/packages/expo/src/utils/versions.ts @@ -4,7 +4,6 @@ export const expoVersion = '48.0.6'; export const expoMetroConfigVersion = '0.7.1'; export const expoSplashScreenVersion = '~0.18.1'; export const expoStatusBarVersion = '~1.4.4'; -export const deprecatedExpoCliVersion = '6.3.2'; // expo-cli export const expoCliVersion = '0.6.2'; // @expo/cli export const easCliVersion = '3.7.2'; export const babelPresetExpoVersion = '~9.3.0';