@nx/expo 16.8.0-beta.3 → 16.8.0-beta.5
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 +10 -10
- package/plugins/metro-resolver.js +4 -5
- package/plugins/with-nx-metro.js +23 -27
- package/plugins/with-nx-webpack.js +34 -38
- package/src/executors/build/build.impl.js +21 -24
- package/src/executors/build-list/build-list.impl.js +14 -17
- package/src/executors/download/download.impl.js +46 -48
- package/src/executors/ensure-symlink/ensure-symlink.impl.js +4 -7
- package/src/executors/export/export.impl.js +12 -15
- package/src/executors/install/install.impl.js +13 -16
- package/src/executors/prebuild/prebuild.impl.js +17 -20
- package/src/executors/run/run.impl.js +25 -28
- package/src/executors/start/start.impl.js +15 -18
- package/src/executors/submit/submit.impl.js +10 -13
- package/src/executors/sync-deps/sync-deps.impl.js +32 -37
- package/src/executors/update/update.impl.js +13 -16
- package/src/generators/application/application.js +23 -21
- package/src/generators/application/lib/add-detox.js +16 -7
- package/src/generators/application/lib/add-project.js +1 -1
- package/src/generators/application/lib/create-application-files.js +6 -2
- package/src/generators/application/lib/normalize-options.js +24 -17
- package/src/generators/component/component.js +11 -11
- package/src/generators/component/lib/normalize-options.js +36 -37
- package/src/generators/init/init.js +27 -24
- package/src/generators/init/lib/add-git-ignore-entry.js +1 -2
- package/src/generators/library/lib/normalize-options.js +23 -20
- package/src/generators/library/library.js +95 -79
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +18 -22
- package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js +11 -15
- package/src/migrations/update-14-4-3/add-eas-build-target.js +26 -30
- package/src/migrations/update-14-5-1/add-eas-update-target.js +12 -16
- package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js +44 -48
- package/src/migrations/update-15-0-3/change-jest-preset.js +17 -21
- package/src/migrations/update-15-8-3/change-webpack-to-metro.js +18 -23
- package/src/migrations/update-16-0-0/add-jest-expo.js +15 -19
- package/src/migrations/update-16-0-0/remove-deprecated-targets.js +23 -27
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +3 -6
- package/src/migrations/update-16-1-4/add-detox-app-json.js +20 -24
- package/src/migrations/update-16-1-4/update-eas-scripts.js +9 -7
- package/src/migrations/update-16-2-2/add-submit-target.js +12 -16
- package/src/migrations/update-16-6-0/add-depends-on.js +11 -15
- package/src/migrations/update-16-6-0/update-metro-config.js +11 -15
- package/src/utils/add-jest.js +19 -22
- package/src/utils/add-linting.js +27 -30
- package/src/utils/find-all-npm-dependencies.js +1 -2
- package/src/utils/symlink-task.js +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
/**
|
|
6
5
|
* Add new @expo/cli targets:
|
|
@@ -9,57 +8,54 @@ const devkit_1 = require("@nx/devkit");
|
|
|
9
8
|
* - add target update
|
|
10
9
|
* - replace target eject
|
|
11
10
|
*/
|
|
12
|
-
function update(tree) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
config.targets['export-web'] = {
|
|
47
|
-
executor: '@nrwl/expo:export',
|
|
48
|
-
options: {
|
|
49
|
-
bundler: 'webpack',
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
config.targets['eject'] = {
|
|
54
|
-
executor: 'nx:run-commands',
|
|
11
|
+
async function update(tree) {
|
|
12
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
13
|
+
for (const [name, config] of projects.entries()) {
|
|
14
|
+
if (config.targets?.['start']?.executor === '@nrwl/expo:start') {
|
|
15
|
+
if (!config.targets['prebuild']) {
|
|
16
|
+
config.targets['prebuild'] = {
|
|
17
|
+
executor: '@nrwl/expo:prebuild',
|
|
18
|
+
options: {},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
if (!config.targets['install']) {
|
|
22
|
+
config.targets['install'] = {
|
|
23
|
+
executor: '@nrwl/expo:install',
|
|
24
|
+
options: {},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
if (!config.targets['update']) {
|
|
28
|
+
config.targets['update'] = {
|
|
29
|
+
executor: '@nrwl/expo:update',
|
|
30
|
+
options: {},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
if (!config.targets['export']) {
|
|
34
|
+
config.targets['export'] = {
|
|
35
|
+
executor: '@nrwl/expo:export',
|
|
36
|
+
options: {
|
|
37
|
+
platform: 'all',
|
|
38
|
+
outputDir: `${(0, devkit_1.offsetFromRoot)(config.root)}dist/${config.root}`,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
if (!config.targets['export-web']) {
|
|
43
|
+
config.targets['export-web'] = {
|
|
44
|
+
executor: '@nrwl/expo:export',
|
|
55
45
|
options: {
|
|
56
|
-
|
|
46
|
+
bundler: 'webpack',
|
|
57
47
|
},
|
|
58
48
|
};
|
|
59
49
|
}
|
|
60
|
-
|
|
50
|
+
config.targets['eject'] = {
|
|
51
|
+
executor: 'nx:run-commands',
|
|
52
|
+
options: {
|
|
53
|
+
command: `nx prebuild ${name}`,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
61
56
|
}
|
|
62
|
-
|
|
63
|
-
}
|
|
57
|
+
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
58
|
+
}
|
|
59
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
64
60
|
}
|
|
65
61
|
exports.default = update;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
|
|
6
5
|
const jest_1 = require("@nx/jest");
|
|
@@ -11,30 +10,27 @@ const path_1 = require("path");
|
|
|
11
10
|
* - changes preset from jest-expo to react-native
|
|
12
11
|
* - change to babel.config.json
|
|
13
12
|
*/
|
|
14
|
-
function update(tree) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
useJestExpo = true;
|
|
25
|
-
}
|
|
13
|
+
async function update(tree) {
|
|
14
|
+
let useJestExpo = false;
|
|
15
|
+
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/jest:jest', (options, projectName) => {
|
|
16
|
+
if (options.jestConfig && tree.exists(options.jestConfig)) {
|
|
17
|
+
const jestConfig = tree.read(options.jestConfig, 'utf-8');
|
|
18
|
+
if (jestConfig.includes(`preset: 'jest-expo'`)) {
|
|
19
|
+
const project = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
|
20
|
+
changePreset(tree, project);
|
|
21
|
+
renameBabelJson(tree, project);
|
|
22
|
+
useJestExpo = true;
|
|
26
23
|
}
|
|
27
|
-
});
|
|
28
|
-
if (useJestExpo) {
|
|
29
|
-
removeJestExpoFromPackageJson(tree);
|
|
30
24
|
}
|
|
31
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
32
25
|
});
|
|
26
|
+
if (useJestExpo) {
|
|
27
|
+
removeJestExpoFromPackageJson(tree);
|
|
28
|
+
}
|
|
29
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
33
30
|
}
|
|
34
31
|
exports.default = update;
|
|
35
32
|
function changePreset(host, project) {
|
|
36
|
-
|
|
37
|
-
const jestConfigPath = (_c = (_b = (_a = project.targets) === null || _a === void 0 ? void 0 : _a.test) === null || _b === void 0 ? void 0 : _b.options) === null || _c === void 0 ? void 0 : _c.jestConfig;
|
|
33
|
+
const jestConfigPath = project.targets?.test?.options?.jestConfig;
|
|
38
34
|
if (!jestConfigPath || !host.exists(jestConfigPath))
|
|
39
35
|
return;
|
|
40
36
|
try {
|
|
@@ -43,7 +39,7 @@ function changePreset(host, project) {
|
|
|
43
39
|
(0, jest_1.removePropertyFromJestConfig)(host, jestConfigPath, 'preset');
|
|
44
40
|
(0, jest_1.addPropertyToJestConfig)(host, jestConfigPath, 'preset', 'react-native');
|
|
45
41
|
}
|
|
46
|
-
catch
|
|
42
|
+
catch {
|
|
47
43
|
devkit_1.logger.error((0, devkit_1.stripIndents) `Unable to update ${jestConfigPath} for project ${project.root}.`);
|
|
48
44
|
}
|
|
49
45
|
}
|
|
@@ -61,7 +57,7 @@ function renameBabelJson(host, project) {
|
|
|
61
57
|
host.write(babelJsonPath, buffer);
|
|
62
58
|
host.delete(babelrcPath);
|
|
63
59
|
}
|
|
64
|
-
catch
|
|
60
|
+
catch {
|
|
65
61
|
devkit_1.logger.error((0, devkit_1.stripIndents) `Unable to rename from ${babelrcPath} to ${babelJsonPath} for project ${project.root}.`);
|
|
66
62
|
}
|
|
67
63
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
/**
|
|
6
5
|
* Change webpack to metro
|
|
@@ -8,29 +7,25 @@ const devkit_1 = require("@nx/devkit");
|
|
|
8
7
|
* - delete webpack.config.js
|
|
9
8
|
* - delete @expo/webpack-config dependency
|
|
10
9
|
*/
|
|
11
|
-
function update(tree) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (config.targets['web']) {
|
|
18
|
-
delete config.targets['web'];
|
|
19
|
-
}
|
|
20
|
-
if (config.targets['export-web']) {
|
|
21
|
-
config.targets['export-web'].options.bundler = 'metro';
|
|
22
|
-
}
|
|
23
|
-
(0, devkit_1.updateJson)(tree, `${config.root}/app.json`, (appJson) => {
|
|
24
|
-
var _a;
|
|
25
|
-
if ((_a = appJson.expo) === null || _a === void 0 ? void 0 : _a.web) {
|
|
26
|
-
appJson.expo.web.bundler = 'metro';
|
|
27
|
-
}
|
|
28
|
-
return appJson;
|
|
29
|
-
});
|
|
10
|
+
async function update(tree) {
|
|
11
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
12
|
+
for (const [name, config] of projects.entries()) {
|
|
13
|
+
if (config.targets?.['start']?.executor === '@nrwl/expo:start') {
|
|
14
|
+
if (config.targets['web']) {
|
|
15
|
+
delete config.targets['web'];
|
|
30
16
|
}
|
|
31
|
-
(
|
|
17
|
+
if (config.targets['export-web']) {
|
|
18
|
+
config.targets['export-web'].options.bundler = 'metro';
|
|
19
|
+
}
|
|
20
|
+
(0, devkit_1.updateJson)(tree, `${config.root}/app.json`, (appJson) => {
|
|
21
|
+
if (appJson.expo?.web) {
|
|
22
|
+
appJson.expo.web.bundler = 'metro';
|
|
23
|
+
}
|
|
24
|
+
return appJson;
|
|
25
|
+
});
|
|
32
26
|
}
|
|
33
|
-
|
|
34
|
-
}
|
|
27
|
+
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
28
|
+
}
|
|
29
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
35
30
|
}
|
|
36
31
|
exports.default = update;
|
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
const jest_1 = require("@nx/jest");
|
|
6
5
|
/**
|
|
7
6
|
* Change the preset in expo's jest config
|
|
8
7
|
* - changes preset of jest.config to jest-expo
|
|
9
8
|
*/
|
|
10
|
-
function update(tree) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
catch (_h) {
|
|
25
|
-
devkit_1.logger.error((0, devkit_1.stripIndents) `Unable to update ${jestConfigPath} for project ${name}.`);
|
|
26
|
-
}
|
|
9
|
+
async function update(tree) {
|
|
10
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
11
|
+
for (const [name, config] of projects.entries()) {
|
|
12
|
+
if (config.targets?.['start']?.executor === '@nrwl/expo:start' ||
|
|
13
|
+
config.targets?.['start']?.executor === '@nx/expo:start') {
|
|
14
|
+
const jestConfigPath = config.targets?.test?.options?.jestConfig;
|
|
15
|
+
if (!jestConfigPath || !tree.exists(jestConfigPath))
|
|
16
|
+
return;
|
|
17
|
+
try {
|
|
18
|
+
(0, jest_1.removePropertyFromJestConfig)(tree, jestConfigPath, 'preset');
|
|
19
|
+
(0, jest_1.addPropertyToJestConfig)(tree, jestConfigPath, 'preset', 'jest-expo');
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
devkit_1.logger.error((0, devkit_1.stripIndents) `Unable to update ${jestConfigPath} for project ${name}.`);
|
|
27
23
|
}
|
|
28
24
|
}
|
|
29
|
-
}
|
|
25
|
+
}
|
|
30
26
|
}
|
|
31
27
|
exports.default = update;
|
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
/**
|
|
6
5
|
* Remove deprecated @expo/cli targets
|
|
7
6
|
*/
|
|
8
|
-
function update(tree) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
]
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
30
|
-
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
31
|
-
}
|
|
7
|
+
async function update(tree) {
|
|
8
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
9
|
+
for (const [name, config] of projects.entries()) {
|
|
10
|
+
if (config.targets?.['start']?.executor === '@nrwl/expo:start' ||
|
|
11
|
+
config.targets?.['start']?.executor === '@nx/expo:start') {
|
|
12
|
+
const targetsToDelete = [
|
|
13
|
+
'build-ios',
|
|
14
|
+
'build-android',
|
|
15
|
+
'build-web',
|
|
16
|
+
'build-status',
|
|
17
|
+
'publish',
|
|
18
|
+
'publish-set',
|
|
19
|
+
'rollback',
|
|
20
|
+
'eject',
|
|
21
|
+
];
|
|
22
|
+
targetsToDelete.forEach((target) => {
|
|
23
|
+
if (config.targets[target]) {
|
|
24
|
+
delete config.targets[target];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
32
28
|
}
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
}
|
|
30
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
35
31
|
}
|
|
36
32
|
exports.default = update;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
const replace_package_1 = require("@nx/devkit/src/utils/replace-package");
|
|
6
|
-
function replacePackage(tree) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
10
|
-
});
|
|
5
|
+
async function replacePackage(tree) {
|
|
6
|
+
await (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/expo', '@nx/expo');
|
|
7
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
11
8
|
}
|
|
12
9
|
exports.default = replacePackage;
|
|
@@ -1,33 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
/**
|
|
6
5
|
* Add detox plugin to app.json for expo
|
|
7
6
|
*/
|
|
8
|
-
function update(tree) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
7
|
+
async function update(tree) {
|
|
8
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
9
|
+
projects.forEach((config) => {
|
|
10
|
+
if (config.targets?.['start']?.executor === '@nrwl/expo:start' ||
|
|
11
|
+
config.targets?.['start']?.executor === '@nx/expo:start') {
|
|
12
|
+
(0, devkit_1.updateJson)(tree, `${config.root}/app.json`, (json) => {
|
|
13
|
+
if (!json.expo.plugins) {
|
|
14
|
+
json.expo.plugins = [];
|
|
15
|
+
}
|
|
16
|
+
json.expo.plugins.push([
|
|
17
|
+
'@config-plugins/detox',
|
|
18
|
+
{
|
|
19
|
+
skipProguard: false,
|
|
20
|
+
subdomains: ['10.0.2.2', 'localhost'],
|
|
21
|
+
},
|
|
22
|
+
]);
|
|
23
|
+
return json;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
31
26
|
});
|
|
27
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
32
28
|
}
|
|
33
29
|
exports.default = update;
|
|
@@ -7,7 +7,6 @@ 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, _c, _d;
|
|
11
10
|
const projects = (0, devkit_1.getProjects)(tree);
|
|
12
11
|
const packageManagerLockFile = {
|
|
13
12
|
npm: 'package-lock.json',
|
|
@@ -15,23 +14,26 @@ function update(tree) {
|
|
|
15
14
|
pnpm: 'pnpm-lock.yaml',
|
|
16
15
|
};
|
|
17
16
|
for (const [name, config] of projects.entries()) {
|
|
18
|
-
if (
|
|
19
|
-
|
|
17
|
+
if (config.targets?.['start']?.executor === '@nrwl/expo:start' ||
|
|
18
|
+
config.targets?.['start']?.executor === '@nx/expo:start') {
|
|
20
19
|
try {
|
|
21
20
|
(0, add_eas_scripts_1.addEasScripts)(tree);
|
|
22
21
|
(0, devkit_1.updateJson)(tree, (0, path_1.join)(config.root, 'package.json'), (packageJson) => {
|
|
23
|
-
|
|
24
|
-
if ((_a = packageJson.scripts) === null || _a === void 0 ? void 0 : _a['postinstall']) {
|
|
22
|
+
if (packageJson.scripts?.['postinstall']) {
|
|
25
23
|
delete packageJson.scripts['postinstall'];
|
|
26
24
|
}
|
|
27
25
|
const packageManager = (0, devkit_1.detectPackageManager)(tree.root);
|
|
28
26
|
const packageLockFile = packageManagerLockFile[packageManager];
|
|
29
27
|
const offset = (0, devkit_1.offsetFromRoot)(config.root);
|
|
30
|
-
packageJson.scripts =
|
|
28
|
+
packageJson.scripts = {
|
|
29
|
+
...packageJson.scripts,
|
|
30
|
+
'eas-build-pre-install': `cd ${offset} && node tools/scripts/eas-build-pre-install.mjs . ${config.root} && cp ${packageLockFile} ${config.root}`,
|
|
31
|
+
'eas-build-post-install': `cd ${offset} && node tools/scripts/eas-build-post-install.mjs . ${config.root}`,
|
|
32
|
+
};
|
|
31
33
|
return packageJson;
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
|
-
catch
|
|
36
|
+
catch {
|
|
35
37
|
devkit_1.logger.error(`Unable to update package.json for project ${name}.`);
|
|
36
38
|
}
|
|
37
39
|
}
|
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
/**
|
|
6
5
|
* Add new submit target
|
|
7
6
|
*/
|
|
8
|
-
function update(tree) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
20
|
-
}
|
|
7
|
+
async function update(tree) {
|
|
8
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
9
|
+
for (const [name, config] of projects.entries()) {
|
|
10
|
+
if (config.targets?.['start']?.executor === '@nx/expo:start') {
|
|
11
|
+
if (!config.targets['submit']) {
|
|
12
|
+
config.targets['submit'] = {
|
|
13
|
+
executor: '@nx/expo:submit',
|
|
14
|
+
options: {},
|
|
15
|
+
};
|
|
16
|
+
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
21
17
|
}
|
|
22
18
|
}
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
}
|
|
20
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
25
21
|
}
|
|
26
22
|
exports.default = update;
|
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
/**
|
|
6
5
|
* This migration adds dependsOn to project.json.
|
|
7
6
|
*
|
|
8
7
|
*/
|
|
9
|
-
function update(tree) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
config.targets['export'].dependsOn = ['ensure-symlink', 'sync-deps'];
|
|
20
|
-
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
21
|
-
}
|
|
8
|
+
async function update(tree) {
|
|
9
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
10
|
+
for (const [name, config] of projects.entries()) {
|
|
11
|
+
if (config.targets?.['start']?.executor === '@nx/expo:start') {
|
|
12
|
+
config.targets['start'].dependsOn = ['ensure-symlink', 'sync-deps'];
|
|
13
|
+
config.targets['run-ios'].dependsOn = ['ensure-symlink', 'sync-deps'];
|
|
14
|
+
config.targets['run-android'].dependsOn = ['ensure-symlink', 'sync-deps'];
|
|
15
|
+
config.targets['prebuild'].dependsOn = ['ensure-symlink', 'sync-deps'];
|
|
16
|
+
config.targets['export'].dependsOn = ['ensure-symlink', 'sync-deps'];
|
|
17
|
+
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
22
18
|
}
|
|
23
|
-
}
|
|
19
|
+
}
|
|
24
20
|
}
|
|
25
21
|
exports.default = update;
|
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
const path_1 = require("path");
|
|
6
5
|
/**
|
|
7
6
|
* This migration updates metro.config.js to export config as a default.
|
|
8
7
|
*
|
|
9
8
|
*/
|
|
10
|
-
function update(tree) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
tree.write((0, path_1.join)(config.root, 'metro-v71.config.js'), oldConfigComment + oldConfig);
|
|
21
|
-
tree.write((0, path_1.join)(config.root, 'metro.config.js'), content);
|
|
22
|
-
}
|
|
9
|
+
async function update(tree) {
|
|
10
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
11
|
+
for (const [_, config] of projects.entries()) {
|
|
12
|
+
if (config.targets?.['start']?.executor === '@nx/expo:start') {
|
|
13
|
+
if (tree.exists((0, path_1.join)(config.root, 'metro.config.js'))) {
|
|
14
|
+
const oldConfig = tree
|
|
15
|
+
.read((0, path_1.join)(config.root, 'metro.config.js'))
|
|
16
|
+
.toString();
|
|
17
|
+
tree.write((0, path_1.join)(config.root, 'metro-v71.config.js'), oldConfigComment + oldConfig);
|
|
18
|
+
tree.write((0, path_1.join)(config.root, 'metro.config.js'), content);
|
|
23
19
|
}
|
|
24
20
|
}
|
|
25
|
-
}
|
|
21
|
+
}
|
|
26
22
|
}
|
|
27
23
|
exports.default = update;
|
|
28
24
|
const oldConfigComment = `/**
|