@nx/expo 19.3.0 → 19.3.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/expo",
|
|
3
|
-
"version": "19.3.
|
|
3
|
+
"version": "19.3.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": [
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"main": "./index",
|
|
29
29
|
"types": "index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@nx/devkit": "19.3.
|
|
31
|
+
"@nx/devkit": "19.3.2",
|
|
32
32
|
"chalk": "^4.1.0",
|
|
33
33
|
"enhanced-resolve": "^5.8.3",
|
|
34
34
|
"fs-extra": "^11.1.0",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"node-fetch": "^2.6.7",
|
|
38
38
|
"tslib": "^2.3.0",
|
|
39
39
|
"tsconfig-paths": "^4.1.2",
|
|
40
|
-
"@nx/jest": "19.3.
|
|
41
|
-
"@nx/js": "19.3.
|
|
42
|
-
"@nx/eslint": "19.3.
|
|
43
|
-
"@nx/react": "19.3.
|
|
44
|
-
"@nx/web": "19.3.
|
|
45
|
-
"@nx/webpack": "19.3.
|
|
46
|
-
"@nrwl/expo": "19.3.
|
|
40
|
+
"@nx/jest": "19.3.2",
|
|
41
|
+
"@nx/js": "19.3.2",
|
|
42
|
+
"@nx/eslint": "19.3.2",
|
|
43
|
+
"@nx/react": "19.3.2",
|
|
44
|
+
"@nx/web": "19.3.2",
|
|
45
|
+
"@nx/webpack": "19.3.2",
|
|
46
|
+
"@nrwl/expo": "19.3.2"
|
|
47
47
|
},
|
|
48
48
|
"executors": "./executors.json",
|
|
49
49
|
"ng-update": {
|
package/plugins/plugin.js
CHANGED
|
@@ -57,8 +57,7 @@ function buildExpoTargets(projectRoot, options, context) {
|
|
|
57
57
|
const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
|
|
58
58
|
const targets = {
|
|
59
59
|
[options.startTargetName]: {
|
|
60
|
-
|
|
61
|
-
options: { cwd: projectRoot },
|
|
60
|
+
executor: `@nx/expo:start`,
|
|
62
61
|
},
|
|
63
62
|
[options.serveTargetName]: {
|
|
64
63
|
command: `expo start --web`,
|
|
@@ -81,8 +80,7 @@ function buildExpoTargets(projectRoot, options, context) {
|
|
|
81
80
|
outputs: [getOutputs(projectRoot, 'dist')],
|
|
82
81
|
},
|
|
83
82
|
[options.installTargetName]: {
|
|
84
|
-
|
|
85
|
-
options: { cwd: devkit_1.workspaceRoot }, // install at workspace root
|
|
83
|
+
executor: '@nx/expo:install',
|
|
86
84
|
},
|
|
87
85
|
[options.prebuildTargetName]: {
|
|
88
86
|
executor: `@nx/expo:prebuild`,
|
|
@@ -4,4 +4,5 @@ export interface ExpoInstallOutput {
|
|
|
4
4
|
success: boolean;
|
|
5
5
|
}
|
|
6
6
|
export default function installExecutor(options: ExpoInstallOptions, context: ExecutorContext): AsyncGenerator<ExpoInstallOutput>;
|
|
7
|
+
export declare function installAndUpdatePackageJson(context: ExecutorContext, options: ExpoInstallOptions): Promise<void>;
|
|
7
8
|
export declare function installAsync(workspaceRoot: string, options: ExpoInstallOptions): Promise<number>;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.installAsync = void 0;
|
|
3
|
+
exports.installAsync = exports.installAndUpdatePackageJson = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const fileutils_1 = require("nx/src/utils/fileutils");
|
|
5
6
|
const child_process_1 = require("child_process");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
|
|
6
9
|
let childProcess;
|
|
7
10
|
async function* installExecutor(options, context) {
|
|
8
|
-
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
9
11
|
try {
|
|
10
|
-
await
|
|
12
|
+
await installAndUpdatePackageJson(context, options);
|
|
11
13
|
yield {
|
|
12
14
|
success: true,
|
|
13
15
|
};
|
|
@@ -19,6 +21,19 @@ async function* installExecutor(options, context) {
|
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
exports.default = installExecutor;
|
|
24
|
+
async function installAndUpdatePackageJson(context, options) {
|
|
25
|
+
await installAsync(context.root, options);
|
|
26
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
27
|
+
const workspacePackageJsonPath = (0, path_1.join)(context.root, 'package.json');
|
|
28
|
+
const projectPackageJsonPath = (0, path_1.join)(context.root, projectRoot, 'package.json');
|
|
29
|
+
const workspacePackageJson = (0, fileutils_1.readJsonFile)(workspacePackageJsonPath);
|
|
30
|
+
const projectPackageJson = (0, fileutils_1.readJsonFile)(projectPackageJsonPath);
|
|
31
|
+
const packages = typeof options.packages === 'string'
|
|
32
|
+
? options.packages.split(',')
|
|
33
|
+
: options.packages;
|
|
34
|
+
(0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, await (0, sync_deps_impl_1.syncDeps)(context.projectName, projectPackageJson, projectPackageJsonPath, workspacePackageJson, context.projectGraph, packages));
|
|
35
|
+
}
|
|
36
|
+
exports.installAndUpdatePackageJson = installAndUpdatePackageJson;
|
|
22
37
|
function installAsync(workspaceRoot, options) {
|
|
23
38
|
return new Promise((resolve, reject) => {
|
|
24
39
|
childProcess = (0, child_process_1.fork)(require.resolve('@expo/cli/build/bin/cli'), ['install', ...createInstallOptions(options)], { cwd: workspaceRoot, env: process.env });
|
|
@@ -4,18 +4,14 @@ const devkit_1 = require("@nx/devkit");
|
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const child_process_1 = require("child_process");
|
|
6
6
|
const resolve_eas_1 = require("../../utils/resolve-eas");
|
|
7
|
-
const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
|
|
8
7
|
const install_impl_1 = require("../install/install.impl");
|
|
9
8
|
let childProcess;
|
|
10
9
|
async function* buildExecutor(options, context) {
|
|
11
10
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
12
|
-
const workspacePackageJsonPath = (0, path_1.join)(context.root, 'package.json');
|
|
13
|
-
const projectPackageJsonPath = (0, path_1.join)(context.root, projectRoot, 'package.json');
|
|
14
|
-
const workspacePackageJson = (0, devkit_1.readJsonFile)(workspacePackageJsonPath);
|
|
15
|
-
const projectPackageJson = (0, devkit_1.readJsonFile)(projectPackageJsonPath);
|
|
16
|
-
await (0, install_impl_1.installAsync)(context.root, { packages: ['expo-updates'] });
|
|
17
|
-
(0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, await (0, sync_deps_impl_1.syncDeps)(context.projectName, projectPackageJson, projectPackageJsonPath, workspacePackageJson, context.projectGraph, ['expo-updates']));
|
|
18
11
|
try {
|
|
12
|
+
await (0, install_impl_1.installAndUpdatePackageJson)(context, {
|
|
13
|
+
packages: ['expo-updates'],
|
|
14
|
+
});
|
|
19
15
|
await runCliUpdate(context.root, projectRoot, options);
|
|
20
16
|
yield { success: true };
|
|
21
17
|
}
|