@nx/expo 18.3.2 → 18.3.4
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 +9 -9
- package/plugins/plugin.js +4 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/expo",
|
|
3
|
-
"version": "18.3.
|
|
3
|
+
"version": "18.3.4",
|
|
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.
|
|
29
|
+
"@nx/devkit": "18.3.4",
|
|
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.
|
|
40
|
-
"@nx/js": "18.3.
|
|
41
|
-
"@nx/eslint": "18.3.
|
|
42
|
-
"@nx/react": "18.3.
|
|
43
|
-
"@nx/web": "18.3.
|
|
44
|
-
"@nx/webpack": "18.3.
|
|
45
|
-
"@nrwl/expo": "18.3.
|
|
39
|
+
"@nx/jest": "18.3.4",
|
|
40
|
+
"@nx/js": "18.3.4",
|
|
41
|
+
"@nx/eslint": "18.3.4",
|
|
42
|
+
"@nx/react": "18.3.4",
|
|
43
|
+
"@nx/web": "18.3.4",
|
|
44
|
+
"@nx/webpack": "18.3.4",
|
|
45
|
+
"@nrwl/expo": "18.3.4"
|
|
46
46
|
},
|
|
47
47
|
"executors": "./executors.json",
|
|
48
48
|
"ng-update": {
|
package/plugins/plugin.js
CHANGED
|
@@ -8,6 +8,7 @@ const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
|
|
|
8
8
|
const fs_1 = require("fs");
|
|
9
9
|
const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
|
|
10
10
|
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
11
|
+
const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
11
12
|
const cachePath = (0, path_1.join)(cache_directory_1.projectGraphCacheDirectory, 'expo.hash');
|
|
12
13
|
const targetsCache = (0, fs_1.existsSync)(cachePath) ? readTargetsCache() : {};
|
|
13
14
|
const calculatedTargets = {};
|
|
@@ -24,7 +25,7 @@ const createDependencies = () => {
|
|
|
24
25
|
exports.createDependencies = createDependencies;
|
|
25
26
|
exports.createNodes = [
|
|
26
27
|
'**/app.{json,config.js}',
|
|
27
|
-
(configFilePath, options, context) => {
|
|
28
|
+
async (configFilePath, options, context) => {
|
|
28
29
|
options = normalizeOptions(options);
|
|
29
30
|
const projectRoot = (0, path_1.dirname)(configFilePath);
|
|
30
31
|
// Do not create a project if package.json or project.json or metro.config.js isn't there.
|
|
@@ -33,7 +34,7 @@ exports.createNodes = [
|
|
|
33
34
|
!siblingFiles.includes('metro.config.js')) {
|
|
34
35
|
return {};
|
|
35
36
|
}
|
|
36
|
-
const appConfig = getAppConfig(configFilePath, context);
|
|
37
|
+
const appConfig = await getAppConfig(configFilePath, context);
|
|
37
38
|
// if appConfig.expo is not defined
|
|
38
39
|
if (!appConfig.expo) {
|
|
39
40
|
return {};
|
|
@@ -101,8 +102,7 @@ function buildExpoTargets(projectRoot, options, context) {
|
|
|
101
102
|
}
|
|
102
103
|
function getAppConfig(configFilePath, context) {
|
|
103
104
|
const resolvedPath = (0, path_1.join)(context.workspaceRoot, configFilePath);
|
|
104
|
-
|
|
105
|
-
return module.default ?? module;
|
|
105
|
+
return (0, config_utils_1.loadConfigFile)(resolvedPath);
|
|
106
106
|
}
|
|
107
107
|
function getInputs(namedInputs) {
|
|
108
108
|
return [
|
|
@@ -122,19 +122,6 @@ function getOutputs(projectRoot, dir) {
|
|
|
122
122
|
return `{workspaceRoot}/${projectRoot}/${dir}`;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
/**
|
|
126
|
-
* Load the module after ensuring that the require cache is cleared.
|
|
127
|
-
*/
|
|
128
|
-
function load(path) {
|
|
129
|
-
// Clear cache if the path is in the cache
|
|
130
|
-
if (require.cache[path]) {
|
|
131
|
-
for (const k of Object.keys(require.cache)) {
|
|
132
|
-
delete require.cache[k];
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
// Then require
|
|
136
|
-
return require(path);
|
|
137
|
-
}
|
|
138
125
|
function normalizeOptions(options) {
|
|
139
126
|
options ??= {};
|
|
140
127
|
options.startTargetName ??= 'start';
|