@nx/react-native 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 +8 -8
- package/plugins/plugin.js +4 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react-native",
|
|
3
|
-
"version": "18.3.
|
|
3
|
+
"version": "18.3.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.",
|
|
6
6
|
"keywords": [
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"node-fetch": "^2.6.7",
|
|
37
37
|
"tsconfig-paths": "^4.1.2",
|
|
38
38
|
"tslib": "^2.3.0",
|
|
39
|
-
"@nx/devkit": "18.3.
|
|
40
|
-
"@nx/jest": "18.3.
|
|
41
|
-
"@nx/js": "18.3.
|
|
42
|
-
"@nx/eslint": "18.3.
|
|
43
|
-
"@nx/react": "18.3.
|
|
44
|
-
"@nx/workspace": "18.3.
|
|
45
|
-
"@nrwl/react-native": "18.3.
|
|
39
|
+
"@nx/devkit": "18.3.4",
|
|
40
|
+
"@nx/jest": "18.3.4",
|
|
41
|
+
"@nx/js": "18.3.4",
|
|
42
|
+
"@nx/eslint": "18.3.4",
|
|
43
|
+
"@nx/react": "18.3.4",
|
|
44
|
+
"@nx/workspace": "18.3.4",
|
|
45
|
+
"@nrwl/react-native": "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, 'react-native.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) {
|
|
38
39
|
return {};
|
|
39
40
|
}
|
|
@@ -113,8 +114,7 @@ function buildReactNativeTargets(projectRoot, options, context) {
|
|
|
113
114
|
}
|
|
114
115
|
function getAppConfig(configFilePath, context) {
|
|
115
116
|
const resolvedPath = (0, path_1.join)(context.workspaceRoot, configFilePath);
|
|
116
|
-
|
|
117
|
-
return module.default ?? module;
|
|
117
|
+
return (0, config_utils_1.loadConfigFile)(resolvedPath);
|
|
118
118
|
}
|
|
119
119
|
function getInputs(namedInputs) {
|
|
120
120
|
return [
|
|
@@ -134,19 +134,6 @@ function getOutputs(projectRoot, dir) {
|
|
|
134
134
|
return `{workspaceRoot}/${projectRoot}/${dir}`;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
/**
|
|
138
|
-
* Load the module after ensuring that the require cache is cleared.
|
|
139
|
-
*/
|
|
140
|
-
function load(path) {
|
|
141
|
-
// Clear cache if the path is in the cache
|
|
142
|
-
if (require.cache[path]) {
|
|
143
|
-
for (const k of Object.keys(require.cache)) {
|
|
144
|
-
delete require.cache[k];
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
// Then require
|
|
148
|
-
return require(path);
|
|
149
|
-
}
|
|
150
137
|
function normalizeOptions(options) {
|
|
151
138
|
options ??= {};
|
|
152
139
|
options.startTargetName ??= 'start';
|