@nx/react-native 21.4.0-beta.2 → 21.4.0-beta.3
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/react-native",
|
|
3
|
-
"version": "21.4.0-beta.
|
|
3
|
+
"version": "21.4.0-beta.3",
|
|
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": [
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"main": "./index.js",
|
|
27
27
|
"types": "index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@nx/detox": "21.4.0-beta.
|
|
30
|
-
"@nx/devkit": "21.4.0-beta.
|
|
31
|
-
"@nx/eslint": "21.4.0-beta.
|
|
32
|
-
"@nx/jest": "21.4.0-beta.
|
|
33
|
-
"@nx/js": "21.4.0-beta.
|
|
34
|
-
"@nx/react": "21.4.0-beta.
|
|
35
|
-
"@nx/rollup": "21.4.0-beta.
|
|
36
|
-
"@nx/workspace": "21.4.0-beta.
|
|
29
|
+
"@nx/detox": "21.4.0-beta.3",
|
|
30
|
+
"@nx/devkit": "21.4.0-beta.3",
|
|
31
|
+
"@nx/eslint": "21.4.0-beta.3",
|
|
32
|
+
"@nx/jest": "21.4.0-beta.3",
|
|
33
|
+
"@nx/js": "21.4.0-beta.3",
|
|
34
|
+
"@nx/react": "21.4.0-beta.3",
|
|
35
|
+
"@nx/rollup": "21.4.0-beta.3",
|
|
36
|
+
"@nx/workspace": "21.4.0-beta.3",
|
|
37
37
|
"ajv": "^8.12.0",
|
|
38
38
|
"enhanced-resolve": "^5.8.3",
|
|
39
39
|
"glob": "7.1.4",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"tslib": "^2.3.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"nx": "21.4.0-beta.
|
|
48
|
+
"nx": "21.4.0-beta.3"
|
|
49
49
|
},
|
|
50
50
|
"executors": "./executors.json",
|
|
51
51
|
"ng-update": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/library/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/library/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EASjB,IAAI,EAIL,MAAM,YAAY,CAAC;AAYpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAoBlC,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAM5B;AAED,wBAAsB,mCAAmC,CACvD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAiH5B;AA8KD,eAAe,2BAA2B,CAAC"}
|
|
@@ -17,6 +17,8 @@ const add_rollup_build_target_1 = require("@nx/react/src/generators/library/lib/
|
|
|
17
17
|
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
18
18
|
const path_1 = require("path");
|
|
19
19
|
const versions_1 = require("../../utils/versions");
|
|
20
|
+
const add_release_config_1 = require("@nx/js/src/generators/library/utils/add-release-config");
|
|
21
|
+
const use_legacy_versioning_1 = require("nx/src/command-line/release/config/use-legacy-versioning");
|
|
20
22
|
async function reactNativeLibraryGenerator(host, schema) {
|
|
21
23
|
return await reactNativeLibraryGeneratorInternal(host, {
|
|
22
24
|
addPlugin: false,
|
|
@@ -68,6 +70,9 @@ async function reactNativeLibraryGeneratorInternal(host, schema) {
|
|
|
68
70
|
js: options.js,
|
|
69
71
|
});
|
|
70
72
|
tasks.push(() => componentTask);
|
|
73
|
+
if (options.publishable) {
|
|
74
|
+
tasks.push(await (0, add_release_config_1.releaseTasks)(host));
|
|
75
|
+
}
|
|
71
76
|
if (!options.skipTsConfig && !options.isUsingTsSolutionConfig) {
|
|
72
77
|
(0, js_1.addTsConfigPath)(host, options.importPath, [
|
|
73
78
|
(0, devkit_1.joinPathFragments)(options.projectRoot, './src', 'index.' + (options.js ? 'js' : 'ts')),
|
|
@@ -108,7 +113,9 @@ async function addProject(host, options) {
|
|
|
108
113
|
if (!options.useProjectJson) {
|
|
109
114
|
packageJson = {
|
|
110
115
|
...packageJson,
|
|
111
|
-
...
|
|
116
|
+
...(options.buildable || options.publishable
|
|
117
|
+
? {}
|
|
118
|
+
: determineEntryFields(options)),
|
|
112
119
|
files: options.publishable ? ['dist', '!**/*.tsbuildinfo'] : undefined,
|
|
113
120
|
peerDependencies: {
|
|
114
121
|
react: versions_1.reactVersion,
|
|
@@ -124,6 +131,10 @@ async function addProject(host, options) {
|
|
|
124
131
|
}
|
|
125
132
|
}
|
|
126
133
|
else {
|
|
134
|
+
if (options.publishable) {
|
|
135
|
+
const nxJson = (0, devkit_1.readJson)(host, 'nx.json');
|
|
136
|
+
await (0, add_release_config_1.addReleaseConfigForNonTsSolution)((0, use_legacy_versioning_1.shouldUseLegacyVersioning)(nxJson.release), host, options.name, project);
|
|
137
|
+
}
|
|
127
138
|
(0, devkit_1.addProjectConfiguration)(host, options.name, project);
|
|
128
139
|
}
|
|
129
140
|
if (!options.useProjectJson ||
|
|
@@ -131,6 +142,10 @@ async function addProject(host, options) {
|
|
|
131
142
|
options.publishable ||
|
|
132
143
|
options.buildable) {
|
|
133
144
|
(0, devkit_1.writeJson)(host, (0, devkit_1.joinPathFragments)(options.projectRoot, 'package.json'), packageJson);
|
|
145
|
+
if (options.publishable) {
|
|
146
|
+
await (0, add_release_config_1.addReleaseConfigForTsSolution)(host, options.name, project);
|
|
147
|
+
(0, devkit_1.updateProjectConfiguration)(host, options.name, project);
|
|
148
|
+
}
|
|
134
149
|
}
|
|
135
150
|
if (options.publishable || options.buildable) {
|
|
136
151
|
const external = new Set([
|