@nx/expo 24.0.0-beta.2 → 24.0.0-beta.3

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 (72) hide show
  1. package/dist/plugins/plugin.js +8 -4
  2. package/dist/src/executors/install/{install.impl.d.ts → install-packages.d.ts} +0 -4
  3. package/dist/src/executors/install/{install.impl.js → install-packages.js} +0 -17
  4. package/dist/src/executors/update/update.impl.js +2 -2
  5. package/dist/src/generators/application/application.js +2 -3
  6. package/dist/src/generators/application/files/base/package.json.template +1 -0
  7. package/dist/src/generators/application/lib/add-e2e.js +4 -5
  8. package/dist/src/generators/application/lib/add-eas-scripts.d.ts +3 -0
  9. package/dist/src/generators/application/lib/add-eas-scripts.js +103 -3
  10. package/dist/src/generators/application/lib/add-project.js +1 -82
  11. package/dist/src/generators/application/lib/normalize-options.js +0 -4
  12. package/dist/src/generators/application/schema.d.ts +0 -1
  13. package/dist/src/generators/init/init.js +18 -32
  14. package/dist/src/generators/init/schema.d.ts +0 -1
  15. package/dist/src/generators/library/lib/normalize-options.js +0 -5
  16. package/dist/src/generators/library/library.js +2 -3
  17. package/dist/src/generators/library/schema.d.ts +0 -1
  18. package/dist/src/migrations/update-24-0-0/add-eas-build-pre-install.d.ts +2 -0
  19. package/dist/src/migrations/update-24-0-0/add-eas-build-pre-install.js +42 -0
  20. package/dist/src/migrations/update-24-0-0/add-eas-build-pre-install.md +32 -0
  21. package/dist/src/migrations/update-24-0-0/finish-inferred-conversion.md +12 -0
  22. package/dist/src/migrations/update-24-0-0/remove-deprecated-executors.d.ts +6 -0
  23. package/dist/src/migrations/update-24-0-0/remove-deprecated-executors.js +30 -0
  24. package/dist/src/migrations/update-24-0-0/remove-deprecated-executors.md +72 -0
  25. package/dist/src/utils/add-linting.d.ts +0 -1
  26. package/dist/src/utils/add-linting.js +0 -1
  27. package/dist/src/utils/jest/add-jest.d.ts +1 -1
  28. package/dist/src/utils/jest/add-jest.js +1 -2
  29. package/executors.json +0 -40
  30. package/migrations.json +13 -0
  31. package/package.json +10 -10
  32. package/dist/docs/export-examples.md +0 -107
  33. package/dist/docs/prebuild-examples.md +0 -65
  34. package/dist/docs/run-examples.md +0 -86
  35. package/dist/docs/start-examples.md +0 -100
  36. package/dist/src/executors/build/build.impl.d.ts +0 -6
  37. package/dist/src/executors/build/build.impl.js +0 -142
  38. package/dist/src/executors/build/schema.d.ts +0 -18
  39. package/dist/src/executors/build/schema.json +0 -100
  40. package/dist/src/executors/export/export.impl.d.ts +0 -7
  41. package/dist/src/executors/export/export.impl.js +0 -81
  42. package/dist/src/executors/export/schema.d.ts +0 -13
  43. package/dist/src/executors/export/schema.json +0 -50
  44. package/dist/src/executors/install/schema.json +0 -40
  45. package/dist/src/executors/prebuild/prebuild.impl.d.ts +0 -7
  46. package/dist/src/executors/prebuild/prebuild.impl.js +0 -77
  47. package/dist/src/executors/prebuild/schema.d.ts +0 -7
  48. package/dist/src/executors/prebuild/schema.json +0 -37
  49. package/dist/src/executors/run/run.impl.d.ts +0 -6
  50. package/dist/src/executors/run/run.impl.js +0 -102
  51. package/dist/src/executors/run/schema.d.ts +0 -24
  52. package/dist/src/executors/run/schema.json +0 -67
  53. package/dist/src/executors/serve/lib/is-packager-running.d.ts +0 -1
  54. package/dist/src/executors/serve/lib/is-packager-running.js +0 -13
  55. package/dist/src/executors/serve/schema.d.ts +0 -7
  56. package/dist/src/executors/serve/schema.json +0 -37
  57. package/dist/src/executors/serve/serve.impl.d.ts +0 -10
  58. package/dist/src/executors/serve/serve.impl.js +0 -134
  59. package/dist/src/executors/start/schema.d.ts +0 -22
  60. package/dist/src/executors/start/schema.json +0 -95
  61. package/dist/src/executors/start/start.impl.d.ts +0 -7
  62. package/dist/src/executors/start/start.impl.js +0 -84
  63. package/dist/src/executors/submit/schema.d.ts +0 -12
  64. package/dist/src/executors/submit/schema.json +0 -58
  65. package/dist/src/executors/submit/submit.impl.d.ts +0 -6
  66. package/dist/src/executors/submit/submit.impl.js +0 -75
  67. package/dist/src/utils/deprecation.d.ts +0 -3
  68. package/dist/src/utils/deprecation.js +0 -23
  69. package/dist/src/utils/pod-install-task.d.ts +0 -17
  70. package/dist/src/utils/pod-install-task.js +0 -69
  71. package/dist/src/utils/resolve-expo-cli.d.ts +0 -11
  72. package/dist/src/utils/resolve-expo-cli.js +0 -21
@@ -1,58 +0,0 @@
1
- {
2
- "$schema": "https://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
- "x-deprecated": "The `@nx/expo:submit` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/expo:convert-to-inferred` to migrate to the `@nx/expo/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
8
- "presets": [
9
- {
10
- "name": "Submit for a specific platform",
11
- "keys": ["platform"]
12
- },
13
- {
14
- "name": "Submit using a specific profile",
15
- "keys": ["profile"]
16
- }
17
- ],
18
- "properties": {
19
- "profile": {
20
- "type": "string",
21
- "description": "Name of the build profile from eas.json. Defaults to \"production\" if defined in eas.json.",
22
- "examples": ["production", "development", "preview"],
23
- "x-priority": "important"
24
- },
25
- "platform": {
26
- "enum": ["ios", "android", "all"],
27
- "alias": "p",
28
- "description": "The platform to build the app, example values: ios, android, all.",
29
- "x-priority": "important"
30
- },
31
- "id": {
32
- "type": "string",
33
- "description": "Build ID to submit"
34
- },
35
- "path": {
36
- "type": "string",
37
- "description": "Path to the .apk/.aab/.ipa file"
38
- },
39
- "url": {
40
- "type": "string",
41
- "description": "URL to the .apk/.aab/.ipa file, app archive url"
42
- },
43
- "latest": {
44
- "type": "boolean",
45
- "description": "Submit the latest build for specified platform"
46
- },
47
- "interactive": {
48
- "type": "boolean",
49
- "description": "Run command in interactive mode",
50
- "default": true
51
- },
52
- "wait": {
53
- "type": "boolean",
54
- "description": "Wait for build(s) to complete",
55
- "default": true
56
- }
57
- }
58
- }
@@ -1,6 +0,0 @@
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>;
@@ -1,75 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = submitExecutor;
4
- const devkit_1 = require("@nx/devkit");
5
- const internal_1 = require("@nx/devkit/internal");
6
- const path_1 = require("path");
7
- const child_process_1 = require("child_process");
8
- const resolve_eas_1 = require("../../utils/resolve-eas");
9
- const deprecation_1 = require("../../utils/deprecation");
10
- let childProcess;
11
- async function* submitExecutor(options, context) {
12
- (0, deprecation_1.warnExpoExecutorDeprecation)('submit');
13
- const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
14
- try {
15
- await runCliSubmit(context.root, projectRoot, options);
16
- yield { success: true };
17
- }
18
- finally {
19
- if (childProcess) {
20
- childProcess.kill();
21
- }
22
- }
23
- }
24
- function runCliSubmit(workspaceRoot, projectRoot, options) {
25
- return new Promise((resolve, reject) => {
26
- childProcess = (0, child_process_1.fork)((0, resolve_eas_1.resolveEas)(workspaceRoot), ['submit', ...createSubmitOptions(options)], {
27
- cwd: (0, path_1.resolve)(workspaceRoot, projectRoot),
28
- env: process.env,
29
- });
30
- // Ensure the child process is killed when the parent exits
31
- process.on('exit', () => childProcess.kill());
32
- process.on('SIGTERM', () => childProcess.kill());
33
- childProcess.on('error', (err) => {
34
- reject(err);
35
- });
36
- childProcess.on('exit', (code, signal) => {
37
- if (code === null)
38
- code = (0, internal_1.signalToCode)(signal);
39
- if (code === 0) {
40
- resolve(code);
41
- }
42
- else {
43
- reject(code);
44
- }
45
- });
46
- });
47
- }
48
- function createSubmitOptions(options) {
49
- return Object.keys(options).reduce((acc, k) => {
50
- const v = options[k];
51
- if (typeof v === 'boolean') {
52
- if (k === 'interactive') {
53
- if (v === false) {
54
- acc.push('--non-interactive'); // when is false, the flag is --non-interactive
55
- }
56
- }
57
- else if (k === 'wait') {
58
- if (v === false) {
59
- acc.push('--no-wait'); // when is false, the flag is --no-wait
60
- }
61
- else {
62
- acc.push('--wait');
63
- }
64
- }
65
- else if (v === true) {
66
- // when true, does not need to pass the value true, just need to pass the flag in kebob case
67
- acc.push(`--${(0, devkit_1.names)(k).fileName}`);
68
- }
69
- }
70
- else {
71
- acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
72
- }
73
- return acc;
74
- }, []);
75
- }
@@ -1,3 +0,0 @@
1
- export declare function warnExpoExecutorDeprecation(executorName: string): void;
2
- export declare function expoSchemaDeprecationMessage(executorName: string): string;
3
- export declare function warnExpoExecutorGenerating(): void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.warnExpoExecutorDeprecation = warnExpoExecutorDeprecation;
4
- exports.expoSchemaDeprecationMessage = expoSchemaDeprecationMessage;
5
- exports.warnExpoExecutorGenerating = warnExpoExecutorGenerating;
6
- const devkit_1 = require("@nx/devkit");
7
- // TODO(v24): Remove the @nx/expo:build, :export, :install, :prebuild, :run,
8
- // :serve, :start, and :submit executors. The inferred plugin
9
- // (@nx/expo/plugin) and the convert-to-inferred generator stay supported.
10
- // (`@nx/expo:build-list`, `:sync-deps`, `:update`, and `:ensure-symlink`
11
- // are not covered by `convert-to-inferred` and stay as-is.)
12
- function buildMessage(executorName) {
13
- return `The \`@nx/expo:${executorName}\` executor is deprecated and will be removed in Nx v24. Run \`nx g @nx/expo:convert-to-inferred\` to migrate to the \`@nx/expo/plugin\` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.`;
14
- }
15
- function warnExpoExecutorDeprecation(executorName) {
16
- devkit_1.logger.warn(buildMessage(executorName));
17
- }
18
- function expoSchemaDeprecationMessage(executorName) {
19
- return buildMessage(executorName);
20
- }
21
- function warnExpoExecutorGenerating() {
22
- devkit_1.logger.warn('Generating targets that use the deprecated `@nx/expo:build`, `@nx/expo:export`, `@nx/expo:install`, `@nx/expo:prebuild`, `@nx/expo:run`, `@nx/expo:serve`, `@nx/expo:start`, and `@nx/expo:submit` executors. These executors will be removed in Nx v24. Run `nx g @nx/expo:convert-to-inferred` next to migrate these targets to the `@nx/expo/plugin` inferred plugin and prevent future generators from emitting executor targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.');
23
- }
@@ -1,17 +0,0 @@
1
- import { GeneratorCallback } from '@nx/devkit';
2
- /**
3
- * Run pod install on ios directory
4
- * @deprecated This should be removed as Expo runs this automatically on `run-ios`
5
- * @param iosDirectory ios directory that contains Podfile
6
- * @returns resolve with 0 if not error, reject with error otherwise
7
- */
8
- export declare function runPodInstall(iosDirectory: string, install?: boolean, options?: {
9
- buildFolder?: string;
10
- repoUpdate?: boolean;
11
- deployment?: boolean;
12
- }): GeneratorCallback;
13
- export declare function podInstall(iosDirectory: string, options?: {
14
- buildFolder?: string;
15
- repoUpdate?: boolean;
16
- deployment?: boolean;
17
- }): void;
@@ -1,69 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runPodInstall = runPodInstall;
4
- exports.podInstall = podInstall;
5
- const tslib_1 = require("tslib");
6
- const child_process_1 = require("child_process");
7
- const node_fs_1 = require("node:fs");
8
- const os_1 = require("os");
9
- const path_1 = require("path");
10
- const pc = tslib_1.__importStar(require("picocolors"));
11
- const devkit_1 = require("@nx/devkit");
12
- const podInstallErrorMessage = `
13
- Running ${pc.bold('pod install')} failed, see above.
14
- Do you have CocoaPods (https://cocoapods.org/) installed?
15
-
16
- Check that your XCode path is correct:
17
- ${pc.bold('sudo xcode-select --print-path')}
18
-
19
- If the path is wrong, switch the path: (your path may be different)
20
- ${pc.bold('sudo xcode-select --switch /Applications/Xcode.app')}
21
- `;
22
- /**
23
- * Run pod install on ios directory
24
- * @deprecated This should be removed as Expo runs this automatically on `run-ios`
25
- * @param iosDirectory ios directory that contains Podfile
26
- * @returns resolve with 0 if not error, reject with error otherwise
27
- */
28
- function runPodInstall(iosDirectory, install = true, options = {
29
- buildFolder: './build',
30
- repoUpdate: false,
31
- deployment: false,
32
- }) {
33
- return () => {
34
- if ((0, os_1.platform)() !== 'darwin') {
35
- devkit_1.logger.info('Skipping `pod install` on non-darwin platform');
36
- return;
37
- }
38
- if (!install || !(0, node_fs_1.existsSync)((0, path_1.join)(iosDirectory, 'Podfile'))) {
39
- devkit_1.logger.info('Skipping `pod install`');
40
- return;
41
- }
42
- devkit_1.logger.info(`Running \`pod install\` from "${iosDirectory}"`);
43
- return podInstall(iosDirectory, options);
44
- };
45
- }
46
- function podInstall(iosDirectory, options = {
47
- buildFolder: './build',
48
- repoUpdate: false,
49
- deployment: false,
50
- }) {
51
- try {
52
- if ((0, node_fs_1.existsSync)((0, path_1.join)(iosDirectory, '.xcode.env'))) {
53
- (0, child_process_1.execSync)('touch .xcode.env', {
54
- cwd: iosDirectory,
55
- stdio: 'inherit',
56
- windowsHide: true,
57
- });
58
- }
59
- (0, child_process_1.execSync)(`pod install ${options.repoUpdate ? '--repo-update' : ''} ${options.deployment ? '--deployment' : ''}`, {
60
- cwd: iosDirectory,
61
- stdio: 'inherit',
62
- windowsHide: true,
63
- });
64
- }
65
- catch (e) {
66
- devkit_1.logger.error(podInstallErrorMessage);
67
- throw e;
68
- }
69
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Resolve the path to the Expo CLI entry point.
3
- *
4
- * Expo SDK 55+ ships `@expo/cli` with an `exports` map where subpaths resolve
5
- * to `*.js` (`"./*": "./*.js"`). The CLI bin file is `build/bin/cli` (with no
6
- * extension), so `require.resolve('@expo/cli/build/bin/cli')` now fails with
7
- * MODULE_NOT_FOUND. The `expo` package's `bin/cli` is the stable entry point
8
- * (the same one `npx expo` uses) across all supported SDK versions, so prefer
9
- * it and fall back to the legacy `@expo/cli` path for older setups.
10
- */
11
- export declare function resolveExpoCliPath(): string;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveExpoCliPath = resolveExpoCliPath;
4
- /**
5
- * Resolve the path to the Expo CLI entry point.
6
- *
7
- * Expo SDK 55+ ships `@expo/cli` with an `exports` map where subpaths resolve
8
- * to `*.js` (`"./*": "./*.js"`). The CLI bin file is `build/bin/cli` (with no
9
- * extension), so `require.resolve('@expo/cli/build/bin/cli')` now fails with
10
- * MODULE_NOT_FOUND. The `expo` package's `bin/cli` is the stable entry point
11
- * (the same one `npx expo` uses) across all supported SDK versions, so prefer
12
- * it and fall back to the legacy `@expo/cli` path for older setups.
13
- */
14
- function resolveExpoCliPath() {
15
- try {
16
- return require.resolve('expo/bin/cli');
17
- }
18
- catch {
19
- return require.resolve('@expo/cli/build/bin/cli');
20
- }
21
- }