@nx/expo 18.3.0-beta.0 → 18.3.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/expo",
|
|
3
|
-
"version": "18.3.0-beta.
|
|
3
|
+
"version": "18.3.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,7 +26,7 @@
|
|
|
26
26
|
"main": "./index.js",
|
|
27
27
|
"types": "index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@nx/devkit": "18.3.0-beta.
|
|
29
|
+
"@nx/devkit": "18.3.0-beta.2",
|
|
30
30
|
"chalk": "^4.1.0",
|
|
31
31
|
"enhanced-resolve": "^5.8.3",
|
|
32
32
|
"fs-extra": "^11.1.0",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"tslib": "^2.3.0",
|
|
37
37
|
"tsconfig-paths": "^4.1.2",
|
|
38
38
|
"tsconfig-paths-webpack-plugin": "^4.0.0",
|
|
39
|
-
"@nx/jest": "18.3.0-beta.
|
|
40
|
-
"@nx/js": "18.3.0-beta.
|
|
41
|
-
"@nx/eslint": "18.3.0-beta.
|
|
42
|
-
"@nx/react": "18.3.0-beta.
|
|
43
|
-
"@nx/web": "18.3.0-beta.
|
|
44
|
-
"@nx/webpack": "18.3.0-beta.
|
|
45
|
-
"@nrwl/expo": "18.3.0-beta.
|
|
39
|
+
"@nx/jest": "18.3.0-beta.2",
|
|
40
|
+
"@nx/js": "18.3.0-beta.2",
|
|
41
|
+
"@nx/eslint": "18.3.0-beta.2",
|
|
42
|
+
"@nx/react": "18.3.0-beta.2",
|
|
43
|
+
"@nx/web": "18.3.0-beta.2",
|
|
44
|
+
"@nx/webpack": "18.3.0-beta.2",
|
|
45
|
+
"@nrwl/expo": "18.3.0-beta.2"
|
|
46
46
|
},
|
|
47
47
|
"executors": "./executors.json",
|
|
48
48
|
"ng-update": {
|
package/plugins/with-nx-metro.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.withNxMetro = void 0;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const metro_config_1 = require("metro-config");
|
|
6
6
|
const fs_extra_1 = require("fs-extra");
|
|
7
|
+
const path_1 = require("path");
|
|
7
8
|
const metro_resolver_1 = require("./metro-resolver");
|
|
8
9
|
async function withNxMetro(userConfig, opts = {}) {
|
|
9
10
|
const extensions = ['', 'ts', 'tsx', 'js', 'jsx', 'json'];
|
|
@@ -13,7 +14,7 @@ async function withNxMetro(userConfig, opts = {}) {
|
|
|
13
14
|
extensions.push(...opts.extensions);
|
|
14
15
|
let watchFolders = (0, fs_extra_1.readdirSync)(devkit_1.workspaceRoot)
|
|
15
16
|
.filter((fileName) => !['dist', 'e2e'].includes(fileName) && !fileName.startsWith('.'))
|
|
16
|
-
.map((fileName) => (0,
|
|
17
|
+
.map((fileName) => (0, path_1.join)(devkit_1.workspaceRoot, fileName))
|
|
17
18
|
.filter((filePath) => (0, fs_extra_1.statSync)(filePath).isDirectory());
|
|
18
19
|
if (opts.watchFolders?.length) {
|
|
19
20
|
watchFolders = watchFolders.concat(opts.watchFolders);
|
|
@@ -22,7 +23,7 @@ async function withNxMetro(userConfig, opts = {}) {
|
|
|
22
23
|
const nxConfig = {
|
|
23
24
|
resolver: {
|
|
24
25
|
resolveRequest: (0, metro_resolver_1.getResolveRequest)(extensions),
|
|
25
|
-
nodeModulesPaths: [(0,
|
|
26
|
+
nodeModulesPaths: [(0, path_1.join)(devkit_1.workspaceRoot, 'node_modules')],
|
|
26
27
|
},
|
|
27
28
|
watchFolders,
|
|
28
29
|
};
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateDependencies = exports.expoInitGeneratorInternal = exports.expoInitGenerator = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
|
|
6
6
|
const plugin_1 = require("../../../plugins/plugin");
|
|
7
7
|
const versions_1 = require("../../utils/versions");
|
|
8
|
-
const has_expo_plugin_1 = require("../../utils/has-expo-plugin");
|
|
9
8
|
const add_git_ignore_entry_1 = require("./lib/add-git-ignore-entry");
|
|
10
9
|
function expoInitGenerator(tree, schema) {
|
|
11
10
|
return expoInitGeneratorInternal(tree, { addPlugin: false, ...schema });
|
|
@@ -18,16 +17,27 @@ async function expoInitGeneratorInternal(host, schema) {
|
|
|
18
17
|
schema.addPlugin ??= addPluginDefault;
|
|
19
18
|
(0, add_git_ignore_entry_1.addGitIgnoreEntry)(host);
|
|
20
19
|
if (schema.addPlugin) {
|
|
21
|
-
addPlugin(host)
|
|
20
|
+
await (0, add_plugin_1.addPlugin)(host, await (0, devkit_1.createProjectGraphAsync)(), '@nx/expo/plugin', plugin_1.createNodes, {
|
|
21
|
+
startTargetName: ['start', 'expo:start', 'expo-start'],
|
|
22
|
+
buildTargetName: ['build', 'expo:build', 'expo-build'],
|
|
23
|
+
prebuildTargetName: ['prebuild', 'expo:prebuild', 'expo-prebuild'],
|
|
24
|
+
serveTargetName: ['serve', 'expo:serve', 'expo-serve'],
|
|
25
|
+
installTargetName: ['install', 'expo:install', 'expo-install'],
|
|
26
|
+
exportTargetName: ['export', 'expo:export', 'expo-export'],
|
|
27
|
+
submitTargetName: ['submit', 'expo:submit', 'expo-submit'],
|
|
28
|
+
runIosTargetName: ['run-ios', 'expo:run-ios', 'expo-run-ios'],
|
|
29
|
+
runAndroidTargetName: [
|
|
30
|
+
'run-android',
|
|
31
|
+
'expo:run-android',
|
|
32
|
+
'expo-run-android',
|
|
33
|
+
],
|
|
34
|
+
}, schema.updatePackageScripts);
|
|
22
35
|
}
|
|
23
36
|
const tasks = [];
|
|
24
37
|
if (!schema.skipPackageJson) {
|
|
25
38
|
tasks.push(moveDependency(host));
|
|
26
39
|
tasks.push(updateDependencies(host, schema));
|
|
27
40
|
}
|
|
28
|
-
if (schema.updatePackageScripts) {
|
|
29
|
-
await (0, update_package_scripts_1.updatePackageScripts)(host, plugin_1.createNodes);
|
|
30
|
-
}
|
|
31
41
|
if (!schema.skipFormat) {
|
|
32
42
|
await (0, devkit_1.formatFiles)(host);
|
|
33
43
|
}
|
|
@@ -49,26 +59,4 @@ exports.updateDependencies = updateDependencies;
|
|
|
49
59
|
function moveDependency(host) {
|
|
50
60
|
return (0, devkit_1.removeDependenciesFromPackageJson)(host, ['@nx/react-native'], []);
|
|
51
61
|
}
|
|
52
|
-
function addPlugin(host) {
|
|
53
|
-
const nxJson = (0, devkit_1.readNxJson)(host);
|
|
54
|
-
if ((0, has_expo_plugin_1.hasExpoPlugin)(host)) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
nxJson.plugins ??= [];
|
|
58
|
-
nxJson.plugins.push({
|
|
59
|
-
plugin: '@nx/expo/plugin',
|
|
60
|
-
options: {
|
|
61
|
-
startTargetName: 'start',
|
|
62
|
-
serveTargetName: 'serve',
|
|
63
|
-
runIosTargetName: 'run-ios',
|
|
64
|
-
runAndroidTargetName: 'run-android',
|
|
65
|
-
exportTargetName: 'export',
|
|
66
|
-
prebuildTargetName: 'prebuild',
|
|
67
|
-
installTargetName: 'install',
|
|
68
|
-
buildTargetName: 'build',
|
|
69
|
-
submitTargetName: 'submit',
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
(0, devkit_1.updateNxJson)(host, nxJson);
|
|
73
|
-
}
|
|
74
62
|
exports.default = expoInitGenerator;
|
|
@@ -4,6 +4,7 @@ exports.ensureDependencies = void 0;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const versions_1 = require("./versions");
|
|
6
6
|
function ensureDependencies(host) {
|
|
7
|
+
const isPnpm = (0, devkit_1.detectPackageManager)(host.root) === 'pnpm';
|
|
7
8
|
return (0, devkit_1.addDependenciesToPackageJson)(host, {
|
|
8
9
|
'expo-splash-screen': versions_1.expoSplashScreenVersion,
|
|
9
10
|
'expo-status-bar': versions_1.expoStatusBarVersion,
|
|
@@ -19,6 +20,11 @@ function ensureDependencies(host) {
|
|
|
19
20
|
'@testing-library/jest-native': versions_1.testingLibraryJestNativeVersion,
|
|
20
21
|
'jest-expo': versions_1.jestExpoVersion,
|
|
21
22
|
'babel-preset-expo': versions_1.babelPresetExpoVersion,
|
|
23
|
+
...(isPnpm
|
|
24
|
+
? {
|
|
25
|
+
'@babel/runtime': versions_1.babelRuntimeVersion, // @babel/runtime is used by react-native-svg
|
|
26
|
+
}
|
|
27
|
+
: {}),
|
|
22
28
|
});
|
|
23
29
|
}
|
|
24
30
|
exports.ensureDependencies = ensureDependencies;
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -17,3 +17,4 @@ export declare const reactNativeSvgVersion = "14.1.0";
|
|
|
17
17
|
export declare const testingLibraryReactNativeVersion = "~12.4.2";
|
|
18
18
|
export declare const testingLibraryJestNativeVersion = "~5.4.3";
|
|
19
19
|
export declare const jestExpoVersion = "~50.0.1";
|
|
20
|
+
export declare const babelRuntimeVersion = "7.22.6";
|
package/src/utils/versions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.jestExpoVersion = exports.testingLibraryJestNativeVersion = exports.testingLibraryReactNativeVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.expoMetroRuntimeVersion = exports.expoMetroConfigVersion = exports.reactNativeWebVersion = exports.reactNativeVersion = exports.typesReactVersion = exports.reactTestRendererVersion = exports.reactDomVersion = exports.reactVersion = exports.babelPresetExpoVersion = exports.expoCliVersion = exports.expoStatusBarVersion = exports.expoSplashScreenVersion = exports.expoVersion = exports.nxVersion = void 0;
|
|
3
|
+
exports.babelRuntimeVersion = exports.jestExpoVersion = exports.testingLibraryJestNativeVersion = exports.testingLibraryReactNativeVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.expoMetroRuntimeVersion = exports.expoMetroConfigVersion = exports.reactNativeWebVersion = exports.reactNativeVersion = exports.typesReactVersion = exports.reactTestRendererVersion = exports.reactDomVersion = exports.reactVersion = exports.babelPresetExpoVersion = exports.expoCliVersion = exports.expoStatusBarVersion = exports.expoSplashScreenVersion = exports.expoVersion = exports.nxVersion = void 0;
|
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
|
5
5
|
exports.expoVersion = '~50.0.3';
|
|
6
6
|
exports.expoSplashScreenVersion = '~0.26.1';
|
|
@@ -20,3 +20,4 @@ exports.reactNativeSvgVersion = '14.1.0';
|
|
|
20
20
|
exports.testingLibraryReactNativeVersion = '~12.4.2';
|
|
21
21
|
exports.testingLibraryJestNativeVersion = '~5.4.3';
|
|
22
22
|
exports.jestExpoVersion = '~50.0.1';
|
|
23
|
+
exports.babelRuntimeVersion = '7.22.6';
|