@nx/expo 16.4.0-beta.1 → 16.4.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/executors.json +10 -0
  2. package/migrations.json +21 -0
  3. package/package.json +11 -11
  4. package/src/executors/build/build.impl.js +5 -0
  5. package/src/executors/build/schema.d.ts +1 -1
  6. package/src/executors/build/schema.json +21 -3
  7. package/src/executors/prebuild/prebuild.impl.js +1 -4
  8. package/src/executors/prebuild/schema.json +1 -1
  9. package/src/executors/run/run.impl.js +1 -8
  10. package/src/executors/run/schema.json +1 -1
  11. package/src/executors/start/schema.d.ts +3 -0
  12. package/src/executors/start/schema.json +5 -0
  13. package/src/executors/start/start.impl.js +9 -1
  14. package/src/executors/submit/compat.d.ts +2 -0
  15. package/src/executors/submit/compat.js +5 -0
  16. package/src/executors/submit/schema.d.ts +12 -0
  17. package/src/executors/submit/schema.json +57 -0
  18. package/src/executors/submit/submit.impl.d.ts +6 -0
  19. package/src/executors/submit/submit.impl.js +74 -0
  20. package/src/executors/update/schema.d.ts +1 -1
  21. package/src/executors/update/schema.json +13 -3
  22. package/src/executors/update/update.impl.js +10 -1
  23. package/src/generators/application/lib/add-project.js +4 -0
  24. package/src/generators/library/files/lib/tsconfig.json.template +1 -1
  25. package/src/migrations/update-16-0-0/add-jest-expo.js +5 -4
  26. package/src/migrations/update-16-0-0/remove-deprecated-targets.js +4 -3
  27. package/src/migrations/update-16-1-4/add-detox-app-json.js +3 -2
  28. package/src/migrations/update-16-1-4/update-eas-scripts.js +4 -3
  29. package/src/migrations/update-16-2-2/add-submit-target.d.ts +5 -0
  30. package/src/migrations/update-16-2-2/add-submit-target.js +26 -0
  31. package/src/utils/versions.d.ts +5 -4
  32. package/src/utils/versions.js +6 -5
package/executors.json CHANGED
@@ -54,6 +54,11 @@
54
54
  "implementation": "./src/executors/export/export.impl",
55
55
  "schema": "./src/executors/export/schema.json",
56
56
  "description": "Export the JavaScript and assets for your app using Metro/webpack bundler"
57
+ },
58
+ "submit": {
59
+ "implementation": "./src/executors/submit/submit.impl",
60
+ "schema": "./src/executors/submit/schema.json",
61
+ "description": "Submit app binary to App Store and/or Play Store"
57
62
  }
58
63
  },
59
64
  "builders": {
@@ -111,6 +116,11 @@
111
116
  "implementation": "./src/executors/export/compat",
112
117
  "schema": "./src/executors/export/schema.json",
113
118
  "description": "Export the JavaScript and assets for your app using Metro/webpack bundler"
119
+ },
120
+ "submit": {
121
+ "implementation": "./src/executors/submit/compat",
122
+ "schema": "./src/executors/submit/schema.json",
123
+ "description": "Submit app binary to App Store and/or Play Store"
114
124
  }
115
125
  }
116
126
  }
package/migrations.json CHANGED
@@ -817,6 +817,27 @@
817
817
  "alwaysAddToPackageJson": false
818
818
  }
819
819
  }
820
+ },
821
+ "16.2.2": {
822
+ "version": "16.2.2-beta.0",
823
+ "packages": {
824
+ "expo": {
825
+ "version": "^48.0.17",
826
+ "alwaysAddToPackageJson": false
827
+ },
828
+ "eas-cli": {
829
+ "version": "~3.13.2",
830
+ "alwaysAddToPackageJson": false
831
+ },
832
+ "react-native": {
833
+ "version": "0.71.8",
834
+ "alwaysAddToPackageJson": false
835
+ },
836
+ "@types/react-native": {
837
+ "version": "0.71.7",
838
+ "alwaysAddToPackageJson": false
839
+ }
840
+ }
820
841
  }
821
842
  }
822
843
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/expo",
3
- "version": "16.4.0-beta.1",
3
+ "version": "16.4.0-beta.2",
4
4
  "private": false,
5
5
  "description": "The Expo Plugin for Nx contains executors and generators for managing and developing an expo application within your workspace. For example, you can directly build for different target platforms as well as generate projects and publish your code.",
6
6
  "keywords": [
@@ -26,14 +26,14 @@
26
26
  "main": "./index",
27
27
  "types": "index.d.ts",
28
28
  "dependencies": {
29
- "@nrwl/expo": "16.4.0-beta.1",
30
- "@nx/detox": "16.4.0-beta.1",
31
- "@nx/devkit": "16.4.0-beta.1",
32
- "@nx/jest": "16.4.0-beta.1",
33
- "@nx/js": "16.4.0-beta.1",
34
- "@nx/linter": "16.4.0-beta.1",
35
- "@nx/react": "16.4.0-beta.1",
36
- "@nx/webpack": "16.4.0-beta.1",
29
+ "@nrwl/expo": "16.4.0-beta.2",
30
+ "@nx/detox": "16.4.0-beta.2",
31
+ "@nx/devkit": "16.4.0-beta.2",
32
+ "@nx/jest": "16.4.0-beta.2",
33
+ "@nx/js": "16.4.0-beta.2",
34
+ "@nx/linter": "16.4.0-beta.2",
35
+ "@nx/react": "16.4.0-beta.2",
36
+ "@nx/webpack": "16.4.0-beta.2",
37
37
  "chalk": "^4.1.0",
38
38
  "enhanced-resolve": "^5.8.3",
39
39
  "fs-extra": "^11.1.0",
@@ -44,7 +44,7 @@
44
44
  "tsconfig-paths-webpack-plugin": "^4.0.0"
45
45
  },
46
46
  "peerDependencies": {
47
- "expo": "^48.0.16"
47
+ "expo": "^48.0.17"
48
48
  },
49
49
  "builders": "./executors.json",
50
50
  "ng-update": {
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "1c4fb934b607f0d93bb23bff2cf0f39b31a8fa43"
58
+ "gitHead": "abb2678056668cc8beaaf9c5ebc2a2e6ad487173"
59
59
  }
@@ -61,6 +61,11 @@ function createBuildOptions(options) {
61
61
  return Object.keys(options).reduce((acc, k) => {
62
62
  const v = options[k];
63
63
  if (typeof v === 'boolean') {
64
+ if (k === 'interactive') {
65
+ if (v === false) {
66
+ acc.push('--non-interactive'); // when is false, the flag is --non-interactive
67
+ }
68
+ }
64
69
  if (v === true) {
65
70
  // when true, does not need to pass the value true, just need to pass the flag in kebob case
66
71
  acc.push(`--${(0, devkit_1.names)(k).fileName}`);
@@ -3,7 +3,7 @@
3
3
  export interface ExpoEasBuildOptions {
4
4
  platform: 'ios' | 'android' | 'all';
5
5
  profile?: string;
6
- nonInteractive: boolean; // default is false
6
+ interactive: boolean; // default is true
7
7
  local: boolean; // default is false
8
8
  output?: string;
9
9
  wait: boolean; // default is true
@@ -7,6 +7,24 @@
7
7
  "title": "Expo EAS Build executor",
8
8
  "description": "Start an EAS build for your expo project.",
9
9
  "type": "object",
10
+ "presets": [
11
+ {
12
+ "name": "Build for a specific platform",
13
+ "keys": ["platform"]
14
+ },
15
+ {
16
+ "name": "Build using a specific profile",
17
+ "keys": ["profile"]
18
+ },
19
+ {
20
+ "name": "Run build locally",
21
+ "keys": ["local"]
22
+ },
23
+ {
24
+ "name": "Clear cache before the build",
25
+ "keys": ["clearCache"]
26
+ }
27
+ ],
10
28
  "properties": {
11
29
  "platform": {
12
30
  "enum": ["ios", "android", "all"],
@@ -25,10 +43,10 @@
25
43
  "examples": ["production", "development", "preview"],
26
44
  "x-priority": "important"
27
45
  },
28
- "nonInteractive": {
46
+ "interactive": {
29
47
  "type": "boolean",
30
- "description": "Run command in non-interactive mode",
31
- "default": false
48
+ "description": "Run command in interactive mode",
49
+ "default": true
32
50
  },
33
51
  "local": {
34
52
  "type": "boolean",
@@ -16,14 +16,11 @@ function prebuildExecutor(options, context) {
16
16
  try {
17
17
  yield tslib_1.__await(prebuildAsync(context.root, projectRoot, options));
18
18
  if (options.install) {
19
- yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, { fix: true }));
19
+ yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {}));
20
20
  if (options.platform === 'ios') {
21
21
  yield tslib_1.__await((0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios')));
22
22
  }
23
23
  }
24
- else {
25
- yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {}));
26
- }
27
24
  yield yield tslib_1.__await({
28
25
  success: true,
29
26
  });
@@ -16,7 +16,7 @@
16
16
  "install": {
17
17
  "type": "boolean",
18
18
  "description": "Installing npm packages and CocoaPods.",
19
- "default": false,
19
+ "default": true,
20
20
  "x-priority": "internal"
21
21
  },
22
22
  "platform": {
@@ -30,18 +30,11 @@ function runExecutor(options, context) {
30
30
  }));
31
31
  }
32
32
  if (options.install) {
33
- yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {
34
- fix: true,
35
- }));
33
+ yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {}));
36
34
  if (options.platform === 'ios') {
37
35
  yield tslib_1.__await((0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios')));
38
36
  }
39
37
  }
40
- else {
41
- yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {
42
- check: true,
43
- }));
44
- }
45
38
  try {
46
39
  yield tslib_1.__await(runCliRun(context.root, projectRoot, options));
47
40
  yield yield tslib_1.__await({ success: true });
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "install": {
55
55
  "type": "boolean",
56
- "description": "Should install missing dependencies before building.",
56
+ "description": "Installing npm packages and CocoaPods before building.",
57
57
  "default": true
58
58
  },
59
59
  "buildCache": {
@@ -19,4 +19,7 @@ export interface ExpoStartOptions {
19
19
  localhost?: boolean;
20
20
  tunnel?: boolean;
21
21
  offline?: boolean;
22
+
23
+ // nx options
24
+ sync?: boolean; // default is true
22
25
  }
@@ -87,6 +87,11 @@
87
87
  "offline": {
88
88
  "type": "boolean",
89
89
  "description": "Allows this command to run while offline"
90
+ },
91
+ "sync": {
92
+ "type": "boolean",
93
+ "description": "Syncs npm dependencies to package.json (for React Native autolink).",
94
+ "default": true
90
95
  }
91
96
  },
92
97
  "examplesFile": "../../../docs/start-examples.md"
@@ -6,11 +6,15 @@ const devkit_1 = require("@nx/devkit");
6
6
  const child_process_1 = require("child_process");
7
7
  const path_1 = require("path");
8
8
  const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
9
+ const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
9
10
  let childProcess;
10
11
  function startExecutor(options, context) {
11
12
  return tslib_1.__asyncGenerator(this, arguments, function* startExecutor_1() {
12
13
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
13
14
  (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
15
+ if (options.sync) {
16
+ (0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, yield tslib_1.__await((0, sync_deps_impl_1.syncDeps)(context.projectName, projectRoot, context.root, context.projectGraph)));
17
+ }
14
18
  try {
15
19
  const baseUrl = `http://localhost:${options.port}`;
16
20
  devkit_1.logger.info(chalk.cyan(`Packager is ready at ${baseUrl}`));
@@ -48,12 +52,16 @@ function startAsync(workspaceRoot, projectRoot, options) {
48
52
  });
49
53
  }
50
54
  // options from https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/start/index.ts
55
+ const nxOptions = ['sync'];
51
56
  function createStartOptions(options) {
52
57
  return Object.keys(options).reduce((acc, k) => {
58
+ if (nxOptions.includes(k)) {
59
+ return acc;
60
+ }
53
61
  const v = options[k];
54
62
  if (k === 'dev') {
55
63
  if (v === false) {
56
- acc.push(`--no-dev`);
64
+ acc.push(`--no-dev`); // only no-dev flag is supported
57
65
  }
58
66
  }
59
67
  else {
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const submit_impl_1 = require("./submit.impl");
5
+ exports.default = (0, devkit_1.convertNxExecutor)(submit_impl_1.default);
@@ -0,0 +1,12 @@
1
+ // command to run https://github.com/expo/eas-cli/tree/main#eas-submit
2
+ // options from https://github.com/expo/eas-cli/blob/main/packages/eas-cli/src/commands/submit.ts
3
+ export interface SubmitExecutorSchema {
4
+ profile?: string;
5
+ platform?: 'ios' | 'android' | 'all';
6
+ id?: string;
7
+ latest?: boolean;
8
+ interactive: boolean; // default is true
9
+ path?: string;
10
+ url?: string;
11
+ wait: boolean; // default is true
12
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "version": 2,
4
+ "title": "EXPO EAS Submit Executor",
5
+ "description": "Submit app binary to App Store and/or Play Store.",
6
+ "type": "object",
7
+ "presets": [
8
+ {
9
+ "name": "Submit for a specific platform",
10
+ "keys": ["platform"]
11
+ },
12
+ {
13
+ "name": "Submit using a specific profile",
14
+ "keys": ["profile"]
15
+ }
16
+ ],
17
+ "properties": {
18
+ "profile": {
19
+ "type": "string",
20
+ "description": "Name of the build profile from eas.json. Defaults to \"production\" if defined in eas.json.",
21
+ "examples": ["production", "development", "preview"],
22
+ "x-priority": "important"
23
+ },
24
+ "platform": {
25
+ "enum": ["ios", "android", "all"],
26
+ "alias": "p",
27
+ "description": "The platform to build the app, example values: ios, android, all.",
28
+ "x-priority": "important"
29
+ },
30
+ "id": {
31
+ "type": "string",
32
+ "description": "Build ID to submit"
33
+ },
34
+ "path": {
35
+ "type": "string",
36
+ "description": "Path to the .apk/.aab/.ipa file"
37
+ },
38
+ "url": {
39
+ "type": "string",
40
+ "description": "URL to the .apk/.aab/.ipa file, app archive url"
41
+ },
42
+ "latest": {
43
+ "type": "boolean",
44
+ "description": "Submit the latest build for specified platform"
45
+ },
46
+ "interactive": {
47
+ "type": "boolean",
48
+ "description": "Run command in interactive mode",
49
+ "default": true
50
+ },
51
+ "wait": {
52
+ "type": "boolean",
53
+ "description": "Wait for build(s) to complete",
54
+ "default": true
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,6 @@
1
+ import { ExecutorContext } from '@nx/devkit';
2
+ import { SubmitExecutorSchema } from './schema';
3
+ export interface ReactNativeSubmitOutput {
4
+ success: boolean;
5
+ }
6
+ export default function submitExecutor(options: SubmitExecutorSchema, context: ExecutorContext): AsyncGenerator<ReactNativeSubmitOutput>;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nx/devkit");
5
+ const path_1 = require("path");
6
+ const child_process_1 = require("child_process");
7
+ const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
8
+ let childProcess;
9
+ function submitExecutor(options, context) {
10
+ return tslib_1.__asyncGenerator(this, arguments, function* submitExecutor_1() {
11
+ const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
12
+ (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
13
+ try {
14
+ yield tslib_1.__await(runCliSubmit(context.root, projectRoot, options));
15
+ yield yield tslib_1.__await({ success: true });
16
+ }
17
+ finally {
18
+ if (childProcess) {
19
+ childProcess.kill();
20
+ }
21
+ }
22
+ });
23
+ }
24
+ exports.default = submitExecutor;
25
+ function runCliSubmit(workspaceRoot, projectRoot, options) {
26
+ return new Promise((resolve, reject) => {
27
+ childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/eas-cli/bin/run'), ['submit', ...createSubmitOptions(options)], {
28
+ cwd: (0, path_1.join)(workspaceRoot, projectRoot),
29
+ env: process.env,
30
+ });
31
+ // Ensure the child process is killed when the parent exits
32
+ process.on('exit', () => childProcess.kill());
33
+ process.on('SIGTERM', () => childProcess.kill());
34
+ childProcess.on('error', (err) => {
35
+ reject(err);
36
+ });
37
+ childProcess.on('exit', (code) => {
38
+ if (code === 0) {
39
+ resolve(code);
40
+ }
41
+ else {
42
+ reject(code);
43
+ }
44
+ });
45
+ });
46
+ }
47
+ function createSubmitOptions(options) {
48
+ return Object.keys(options).reduce((acc, k) => {
49
+ const v = options[k];
50
+ if (typeof v === 'boolean') {
51
+ if (k === 'interactive') {
52
+ if (v === false) {
53
+ acc.push('--non-interactive'); // when is false, the flag is --non-interactive
54
+ }
55
+ }
56
+ else if (k === 'wait') {
57
+ if (v === false) {
58
+ acc.push('--no-wait'); // when is false, the flag is --no-wait
59
+ }
60
+ else {
61
+ acc.push('--wait');
62
+ }
63
+ }
64
+ else if (v === true) {
65
+ // when true, does not need to pass the value true, just need to pass the flag in kebob case
66
+ acc.push(`--${(0, devkit_1.names)(k).fileName}`);
67
+ }
68
+ }
69
+ else {
70
+ acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
71
+ }
72
+ return acc;
73
+ }, []);
74
+ }
@@ -11,5 +11,5 @@ export interface ExpoEasUpdateOptions {
11
11
  json: boolean; // default is false
12
12
  auto: boolean; // default is false
13
13
  privateKeyPath?: string;
14
- nonInteractive: boolean; // default is false
14
+ interactive: boolean; // default is false
15
15
  }
@@ -7,6 +7,16 @@
7
7
  "title": "Expo EAS Update executor",
8
8
  "description": "Start an EAS update for your expo project.",
9
9
  "type": "object",
10
+ "presets": [
11
+ {
12
+ "name": "Update for a specific platform",
13
+ "keys": ["platform"]
14
+ },
15
+ {
16
+ "name": "Update from a specific branch",
17
+ "keys": ["branch"]
18
+ }
19
+ ],
10
20
  "properties": {
11
21
  "branch": {
12
22
  "type": "string",
@@ -55,10 +65,10 @@
55
65
  "type": "string",
56
66
  "description": "File containing the PEM-encoded private key corresponding to the certificate in expo-updates' configuration. Defaults to a file named \"private-key.pem\" in the certificate's directory."
57
67
  },
58
- "nonInteractive": {
68
+ "interactive": {
59
69
  "type": "boolean",
60
- "description": "Run command in non-interactive mode",
61
- "default": false
70
+ "description": "Run command in interactive mode",
71
+ "default": true
62
72
  }
63
73
  },
64
74
  "required": []
@@ -5,10 +5,14 @@ const devkit_1 = require("@nx/devkit");
5
5
  const path_1 = require("path");
6
6
  const child_process_1 = require("child_process");
7
7
  const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
8
+ const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
9
+ const install_impl_1 = require("../install/install.impl");
8
10
  let childProcess;
9
11
  function buildExecutor(options, context) {
10
12
  return tslib_1.__asyncGenerator(this, arguments, function* buildExecutor_1() {
11
13
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
14
+ yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, { packages: ['expo-updates'] }));
15
+ (0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, yield tslib_1.__await((0, sync_deps_impl_1.syncDeps)(context.projectName, projectRoot, context.root, context.projectGraph, ['expo-updates'])));
12
16
  (0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
13
17
  try {
14
18
  yield tslib_1.__await(runCliUpdate(context.root, projectRoot, options));
@@ -45,7 +49,12 @@ function createUpdateOptions(options) {
45
49
  return Object.keys(options).reduce((acc, k) => {
46
50
  const v = options[k];
47
51
  if (typeof v === 'boolean') {
48
- if (v === true) {
52
+ if (k === 'interactive') {
53
+ if (v === false) {
54
+ acc.push('--non-interactive');
55
+ }
56
+ }
57
+ else if (v === true) {
49
58
  // when true, does not need to pass the value true, just need to pass the flag in kebob case
50
59
  acc.push(`--${(0, devkit_1.names)(k).fileName}`);
51
60
  }
@@ -43,6 +43,10 @@ function getTargets(options) {
43
43
  executor: '@nx/expo:build',
44
44
  options: {},
45
45
  };
46
+ architect['submit'] = {
47
+ executor: '@nx/expo:submit',
48
+ options: {},
49
+ };
46
50
  architect['build-list'] = {
47
51
  executor: '@nx/expo:build-list',
48
52
  options: {},
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "extends": "<%= rootTsConfigPath %>",
3
3
  "compilerOptions": {
4
- "jsx": "react-native",
4
+ "jsx": "react-jsx",
5
5
  "allowJs": true,
6
6
  "esModuleInterop": true,
7
7
  "allowSyntheticDefaultImports": true
@@ -8,19 +8,20 @@ const jest_1 = require("@nx/jest");
8
8
  * - changes preset of jest.config to jest-expo
9
9
  */
10
10
  function update(tree) {
11
- var _a, _b, _c, _d, _e;
11
+ var _a, _b, _c, _d, _e, _f, _g;
12
12
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
13
  const projects = (0, devkit_1.getProjects)(tree);
14
14
  for (const [name, config] of projects.entries()) {
15
- if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a['start']) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/expo:start') {
16
- const jestConfigPath = (_e = (_d = (_c = config.targets) === null || _c === void 0 ? void 0 : _c.test) === null || _d === void 0 ? void 0 : _d.options) === null || _e === void 0 ? void 0 : _e.jestConfig;
15
+ if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a['start']) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/expo:start' ||
16
+ ((_d = (_c = config.targets) === null || _c === void 0 ? void 0 : _c['start']) === null || _d === void 0 ? void 0 : _d.executor) === '@nx/expo:start') {
17
+ const jestConfigPath = (_g = (_f = (_e = config.targets) === null || _e === void 0 ? void 0 : _e.test) === null || _f === void 0 ? void 0 : _f.options) === null || _g === void 0 ? void 0 : _g.jestConfig;
17
18
  if (!jestConfigPath || !tree.exists(jestConfigPath))
18
19
  return;
19
20
  try {
20
21
  (0, jest_1.removePropertyFromJestConfig)(tree, jestConfigPath, 'preset');
21
22
  (0, jest_1.addPropertyToJestConfig)(tree, jestConfigPath, 'preset', 'jest-expo');
22
23
  }
23
- catch (_f) {
24
+ catch (_h) {
24
25
  devkit_1.logger.error((0, devkit_1.stripIndents) `Unable to update ${jestConfigPath} for project ${name}.`);
25
26
  }
26
27
  }
@@ -6,11 +6,12 @@ const devkit_1 = require("@nx/devkit");
6
6
  * Remove deprecated @expo/cli targets
7
7
  */
8
8
  function update(tree) {
9
- var _a, _b;
9
+ var _a, _b, _c, _d;
10
10
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
11
  const projects = (0, devkit_1.getProjects)(tree);
12
12
  for (const [name, config] of projects.entries()) {
13
- if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a['start']) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/expo:start') {
13
+ if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a['start']) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/expo:start' ||
14
+ ((_d = (_c = config.targets) === null || _c === void 0 ? void 0 : _c['start']) === null || _d === void 0 ? void 0 : _d.executor) === '@nx/expo:start') {
14
15
  const targetsToDelete = [
15
16
  'build-ios',
16
17
  'build-android',
@@ -26,8 +27,8 @@ function update(tree) {
26
27
  delete config.targets[target];
27
28
  }
28
29
  });
30
+ (0, devkit_1.updateProjectConfiguration)(tree, name, config);
29
31
  }
30
- (0, devkit_1.updateProjectConfiguration)(tree, name, config);
31
32
  }
32
33
  yield (0, devkit_1.formatFiles)(tree);
33
34
  });
@@ -9,8 +9,9 @@ function update(tree) {
9
9
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
10
  const projects = (0, devkit_1.getProjects)(tree);
11
11
  projects.forEach((config) => {
12
- var _a, _b;
13
- if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a['start']) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/expo:start') {
12
+ var _a, _b, _c, _d;
13
+ if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a['start']) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/expo:start' ||
14
+ ((_d = (_c = config.targets) === null || _c === void 0 ? void 0 : _c['start']) === null || _d === void 0 ? void 0 : _d.executor) === '@nx/expo:start') {
14
15
  (0, devkit_1.updateJson)(tree, `${config.root}/app.json`, (json) => {
15
16
  if (!json.expo.plugins) {
16
17
  json.expo.plugins = [];
@@ -7,7 +7,7 @@ const path_1 = require("path");
7
7
  * Update app's package.json to use eas-build-pre-install and eas-build-post-install scripts.
8
8
  */
9
9
  function update(tree) {
10
- var _a, _b;
10
+ var _a, _b, _c, _d;
11
11
  const projects = (0, devkit_1.getProjects)(tree);
12
12
  const packageManagerLockFile = {
13
13
  npm: 'package-lock.json',
@@ -15,7 +15,8 @@ function update(tree) {
15
15
  pnpm: 'pnpm-lock.yaml',
16
16
  };
17
17
  for (const [name, config] of projects.entries()) {
18
- if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a['start']) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/expo:start') {
18
+ if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a['start']) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/expo:start' ||
19
+ ((_d = (_c = config.targets) === null || _c === void 0 ? void 0 : _c['start']) === null || _d === void 0 ? void 0 : _d.executor) === '@nx/expo:start') {
19
20
  try {
20
21
  (0, add_eas_scripts_1.addEasScripts)(tree);
21
22
  (0, devkit_1.updateJson)(tree, (0, path_1.join)(config.root, 'package.json'), (packageJson) => {
@@ -30,7 +31,7 @@ function update(tree) {
30
31
  return packageJson;
31
32
  });
32
33
  }
33
- catch (_c) {
34
+ catch (_e) {
34
35
  devkit_1.logger.error(`Unable to update package.json for project ${name}.`);
35
36
  }
36
37
  }
@@ -0,0 +1,5 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * Add new submit target
4
+ */
5
+ export default function update(tree: Tree): Promise<void>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nx/devkit");
5
+ /**
6
+ * Add new submit target
7
+ */
8
+ function update(tree) {
9
+ var _a, _b;
10
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
+ const projects = (0, devkit_1.getProjects)(tree);
12
+ for (const [name, config] of projects.entries()) {
13
+ if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a['start']) === null || _b === void 0 ? void 0 : _b.executor) === '@nx/expo:start') {
14
+ if (!config.targets['submit']) {
15
+ config.targets['submit'] = {
16
+ executor: '@nx/expo:submit',
17
+ options: {},
18
+ };
19
+ (0, devkit_1.updateProjectConfiguration)(tree, name, config);
20
+ }
21
+ }
22
+ }
23
+ yield (0, devkit_1.formatFiles)(tree);
24
+ });
25
+ }
26
+ exports.default = update;
@@ -1,17 +1,18 @@
1
1
  export declare const nxVersion: any;
2
- export declare const expoVersion = "48.0.16";
2
+ export declare const expoVersion = "48.0.17";
3
3
  export declare const expoMetroConfigVersion = "0.7.1";
4
4
  export declare const expoSplashScreenVersion = "~0.18.2";
5
5
  export declare const expoStatusBarVersion = "~1.4.4";
6
+ export declare const expoUpdatesVersion = "~0.16.4";
6
7
  export declare const expoCliVersion = "~0.7.1";
7
- export declare const easCliVersion = "~3.12.0";
8
+ export declare const easCliVersion = "~3.13.2";
8
9
  export declare const babelPresetExpoVersion = "~9.3.2";
9
10
  export declare const reactVersion = "18.2.0";
10
11
  export declare const reactDomVersion = "18.2.0";
11
12
  export declare const reactTestRendererVersion = "18.2.0";
12
13
  export declare const typesReactVersion = "18.0.28";
13
- export declare const reactNativeVersion = "0.71.7";
14
- export declare const typesReactNativeVersion = "0.71.6";
14
+ export declare const reactNativeVersion = "0.71.8";
15
+ export declare const typesReactNativeVersion = "0.71.7";
15
16
  export declare const reactNativeWebVersion = "~0.18.12";
16
17
  export declare const reactNativeSvgTransformerVersion = "1.0.0";
17
18
  export declare const reactNativeSvgVersion = "13.4.0";
@@ -1,20 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.jestExpoVersion = exports.testingLibraryJestNativeVersion = exports.testingLibraryReactNativeVersion = exports.metroVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.reactNativeWebVersion = exports.typesReactNativeVersion = exports.reactNativeVersion = exports.typesReactVersion = exports.reactTestRendererVersion = exports.reactDomVersion = exports.reactVersion = exports.babelPresetExpoVersion = exports.easCliVersion = exports.expoCliVersion = exports.expoStatusBarVersion = exports.expoSplashScreenVersion = exports.expoMetroConfigVersion = exports.expoVersion = exports.nxVersion = void 0;
3
+ exports.jestExpoVersion = exports.testingLibraryJestNativeVersion = exports.testingLibraryReactNativeVersion = exports.metroVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.reactNativeWebVersion = exports.typesReactNativeVersion = exports.reactNativeVersion = exports.typesReactVersion = exports.reactTestRendererVersion = exports.reactDomVersion = exports.reactVersion = exports.babelPresetExpoVersion = exports.easCliVersion = exports.expoCliVersion = exports.expoUpdatesVersion = exports.expoStatusBarVersion = exports.expoSplashScreenVersion = exports.expoMetroConfigVersion = exports.expoVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
- exports.expoVersion = '48.0.16';
5
+ exports.expoVersion = '48.0.17';
6
6
  exports.expoMetroConfigVersion = '0.7.1';
7
7
  exports.expoSplashScreenVersion = '~0.18.2';
8
8
  exports.expoStatusBarVersion = '~1.4.4';
9
+ exports.expoUpdatesVersion = '~0.16.4';
9
10
  exports.expoCliVersion = '~0.7.1'; // @expo/cli
10
- exports.easCliVersion = '~3.12.0';
11
+ exports.easCliVersion = '~3.13.2';
11
12
  exports.babelPresetExpoVersion = '~9.3.2';
12
13
  exports.reactVersion = '18.2.0';
13
14
  exports.reactDomVersion = '18.2.0';
14
15
  exports.reactTestRendererVersion = '18.2.0';
15
16
  exports.typesReactVersion = '18.0.28';
16
- exports.reactNativeVersion = '0.71.7';
17
- exports.typesReactNativeVersion = '0.71.6';
17
+ exports.reactNativeVersion = '0.71.8';
18
+ exports.typesReactNativeVersion = '0.71.7';
18
19
  exports.reactNativeWebVersion = '~0.18.12';
19
20
  exports.reactNativeSvgTransformerVersion = '1.0.0';
20
21
  exports.reactNativeSvgVersion = '13.4.0';