@nx/react-native 18.3.0-canary.20240413-134cbbc → 18.3.0
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/src/generators/application/application.spec.ts +2 -0
- package/src/generators/component/component.spec.ts +2 -0
- package/src/generators/init/init.js +44 -31
- package/src/generators/init/init.spec.ts +2 -0
- package/src/generators/library/library.spec.ts +2 -0
- package/src/utils/add-linting.spec.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react-native",
|
|
3
|
-
"version": "18.3.0
|
|
3
|
+
"version": "18.3.0",
|
|
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.0
|
|
40
|
-
"@nx/jest": "18.3.0
|
|
41
|
-
"@nx/js": "18.3.0
|
|
42
|
-
"@nx/eslint": "18.3.0
|
|
43
|
-
"@nx/react": "18.3.0
|
|
44
|
-
"@nx/workspace": "18.3.0
|
|
45
|
-
"@nrwl/react-native": "18.3.0
|
|
39
|
+
"@nx/devkit": "18.3.0",
|
|
40
|
+
"@nx/jest": "18.3.0",
|
|
41
|
+
"@nx/js": "18.3.0",
|
|
42
|
+
"@nx/eslint": "18.3.0",
|
|
43
|
+
"@nx/react": "18.3.0",
|
|
44
|
+
"@nx/workspace": "18.3.0",
|
|
45
|
+
"@nrwl/react-native": "18.3.0"
|
|
46
46
|
},
|
|
47
47
|
"executors": "./executors.json",
|
|
48
48
|
"ng-update": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateDependencies = exports.reactNativeInitGeneratorInternal = exports.reactNativeInitGenerator = 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
8
|
const add_git_ignore_entry_1 = require("./lib/add-git-ignore-entry");
|
|
@@ -20,16 +20,55 @@ async function reactNativeInitGeneratorInternal(host, schema) {
|
|
|
20
20
|
nxJson.useInferencePlugins !== false;
|
|
21
21
|
schema.addPlugin ??= addPluginDefault;
|
|
22
22
|
if (schema.addPlugin) {
|
|
23
|
-
addPlugin(host)
|
|
23
|
+
await (0, add_plugin_1.addPlugin)(host, await (0, devkit_1.createProjectGraphAsync)(), '@nx/react-native/plugin', plugin_1.createNodes, {
|
|
24
|
+
startTargetName: ['start', 'react-native:start', 'react-native-start'],
|
|
25
|
+
upgradeTargetname: [
|
|
26
|
+
'update',
|
|
27
|
+
'react-native:update',
|
|
28
|
+
'react-native-update',
|
|
29
|
+
],
|
|
30
|
+
bundleTargetName: [
|
|
31
|
+
'bundle',
|
|
32
|
+
'react-native:bundle',
|
|
33
|
+
'react-native-bundle',
|
|
34
|
+
],
|
|
35
|
+
podInstallTargetName: [
|
|
36
|
+
'pod-install',
|
|
37
|
+
'react-native:pod-install',
|
|
38
|
+
'react-native-pod-install',
|
|
39
|
+
],
|
|
40
|
+
runIosTargetName: [
|
|
41
|
+
'run-ios',
|
|
42
|
+
'react-native:run-ios',
|
|
43
|
+
'react-native-run-ios',
|
|
44
|
+
],
|
|
45
|
+
runAndroidTargetName: [
|
|
46
|
+
'run-android',
|
|
47
|
+
'react-native:run-android',
|
|
48
|
+
'react-native-run-android',
|
|
49
|
+
],
|
|
50
|
+
buildIosTargetName: [
|
|
51
|
+
'build-ios',
|
|
52
|
+
'react-native:build-ios',
|
|
53
|
+
'react-native-build-ios',
|
|
54
|
+
],
|
|
55
|
+
buildAndroidTargetName: [
|
|
56
|
+
'build-android',
|
|
57
|
+
'react-native:build-android',
|
|
58
|
+
'react-native-build-android',
|
|
59
|
+
],
|
|
60
|
+
syncDepsTargetName: [
|
|
61
|
+
'sync-deps',
|
|
62
|
+
'react-native:sync-deps',
|
|
63
|
+
'react-native-sync-deps',
|
|
64
|
+
],
|
|
65
|
+
}, schema.updatePackageScripts);
|
|
24
66
|
}
|
|
25
67
|
const tasks = [];
|
|
26
68
|
if (!schema.skipPackageJson) {
|
|
27
69
|
tasks.push(moveDependency(host));
|
|
28
70
|
tasks.push(updateDependencies(host, schema));
|
|
29
71
|
}
|
|
30
|
-
if (schema.updatePackageScripts) {
|
|
31
|
-
await (0, update_package_scripts_1.updatePackageScripts)(host, plugin_1.createNodes);
|
|
32
|
-
}
|
|
33
72
|
if (!schema.skipFormat) {
|
|
34
73
|
await (0, devkit_1.formatFiles)(host);
|
|
35
74
|
}
|
|
@@ -49,30 +88,4 @@ exports.updateDependencies = updateDependencies;
|
|
|
49
88
|
function moveDependency(host) {
|
|
50
89
|
return (0, devkit_1.removeDependenciesFromPackageJson)(host, ['@nx/react-native'], []);
|
|
51
90
|
}
|
|
52
|
-
function addPlugin(host) {
|
|
53
|
-
const nxJson = (0, devkit_1.readNxJson)(host);
|
|
54
|
-
nxJson.plugins ??= [];
|
|
55
|
-
for (const plugin of nxJson.plugins) {
|
|
56
|
-
if (typeof plugin === 'string'
|
|
57
|
-
? plugin === '@nx/react-native/plugin'
|
|
58
|
-
: plugin.plugin === '@nx/react-native/plugin') {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
nxJson.plugins.push({
|
|
63
|
-
plugin: '@nx/react-native/plugin',
|
|
64
|
-
options: {
|
|
65
|
-
startTargetName: 'start',
|
|
66
|
-
podInstallTargetName: 'pod-install',
|
|
67
|
-
bundleTargetName: 'bundle',
|
|
68
|
-
runIosTargetName: 'run-ios',
|
|
69
|
-
runAndroidTargetName: 'run-android',
|
|
70
|
-
buildIosTargetName: 'build-ios',
|
|
71
|
-
buildAndroidTargetName: 'build-android',
|
|
72
|
-
syncDepsTargetName: 'sync-deps',
|
|
73
|
-
upgradeTargetname: 'upgrade',
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
(0, devkit_1.updateNxJson)(host, nxJson);
|
|
77
|
-
}
|
|
78
91
|
exports.default = reactNativeInitGenerator;
|