@nx/react-native 20.3.0-canary.20241214-4cd640a → 20.3.0-canary.20241218-fb40366
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 +7 -7
- package/src/generators/application/files/app/tsconfig.json.template +2 -0
- package/src/generators/application/lib/normalize-options.d.ts +1 -0
- package/src/generators/application/lib/normalize-options.js +2 -0
- package/src/generators/library/files/lib/tsconfig.json.template +2 -0
- package/src/generators/library/library.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react-native",
|
|
3
|
-
"version": "20.3.0-canary.
|
|
3
|
+
"version": "20.3.0-canary.20241218-fb40366",
|
|
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,12 +36,12 @@
|
|
|
36
36
|
"node-fetch": "^2.6.7",
|
|
37
37
|
"tsconfig-paths": "^4.1.2",
|
|
38
38
|
"tslib": "^2.3.0",
|
|
39
|
-
"@nx/devkit": "20.3.0-canary.
|
|
40
|
-
"@nx/jest": "20.3.0-canary.
|
|
41
|
-
"@nx/js": "20.3.0-canary.
|
|
42
|
-
"@nx/eslint": "20.3.0-canary.
|
|
43
|
-
"@nx/react": "20.3.0-canary.
|
|
44
|
-
"@nx/workspace": "20.3.0-canary.
|
|
39
|
+
"@nx/devkit": "20.3.0-canary.20241218-fb40366",
|
|
40
|
+
"@nx/jest": "20.3.0-canary.20241218-fb40366",
|
|
41
|
+
"@nx/js": "20.3.0-canary.20241218-fb40366",
|
|
42
|
+
"@nx/eslint": "20.3.0-canary.20241218-fb40366",
|
|
43
|
+
"@nx/react": "20.3.0-canary.20241218-fb40366",
|
|
44
|
+
"@nx/workspace": "20.3.0-canary.20241218-fb40366"
|
|
45
45
|
},
|
|
46
46
|
"executors": "./executors.json",
|
|
47
47
|
"ng-update": {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "<%= rootTsConfigPath %>",
|
|
3
|
+
<%_ if (!isTsSolutionSetup) { _%>
|
|
3
4
|
"compilerOptions": {
|
|
4
5
|
"allowSyntheticDefaultImports": true,
|
|
5
6
|
"jsx": "react-native",
|
|
@@ -9,6 +10,7 @@
|
|
|
9
10
|
"resolveJsonModule": true,
|
|
10
11
|
"declaration": true
|
|
11
12
|
},
|
|
13
|
+
<%_ } _%>
|
|
12
14
|
"files": [],
|
|
13
15
|
"include": [],
|
|
14
16
|
"references": [
|
|
@@ -13,5 +13,6 @@ export interface NormalizedSchema extends Schema {
|
|
|
13
13
|
rootProject: boolean;
|
|
14
14
|
e2eProjectName: string;
|
|
15
15
|
e2eProjectRoot: string;
|
|
16
|
+
isTsSolutionSetup: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare function normalizeOptions(host: Tree, options: Schema): Promise<NormalizedSchema>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
|
+
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
6
7
|
async function normalizeOptions(host, options) {
|
|
7
8
|
await (0, project_name_and_root_utils_1.ensureProjectName)(host, options, 'application');
|
|
8
9
|
const { projectName: appProjectName, names: projectNames, projectRoot: appProjectRoot, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
|
|
@@ -40,5 +41,6 @@ async function normalizeOptions(host, options) {
|
|
|
40
41
|
rootProject,
|
|
41
42
|
e2eProjectName,
|
|
42
43
|
e2eProjectRoot,
|
|
44
|
+
isTsSolutionSetup: (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host),
|
|
43
45
|
};
|
|
44
46
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "<%= rootTsConfigPath %>",
|
|
3
|
+
<%_ if (!isUsingTsSolutionConfig) { _%>
|
|
3
4
|
"compilerOptions": {
|
|
4
5
|
"jsx": "react-jsx",
|
|
5
6
|
"allowJs": true,
|
|
6
7
|
"esModuleInterop": true,
|
|
7
8
|
"allowSyntheticDefaultImports": true
|
|
8
9
|
},
|
|
10
|
+
<%_ } _%>
|
|
9
11
|
"files": [],
|
|
10
12
|
"include": [],
|
|
11
13
|
"references": [
|
|
@@ -53,7 +53,7 @@ async function reactNativeLibraryGeneratorInternal(host, schema) {
|
|
|
53
53
|
if (options.publishable || options.buildable) {
|
|
54
54
|
updateLibPackageNpmScope(host, options);
|
|
55
55
|
}
|
|
56
|
-
if (!options.skipTsConfig) {
|
|
56
|
+
if (!options.skipTsConfig && !options.isUsingTsSolutionConfig) {
|
|
57
57
|
(0, js_1.addTsConfigPath)(host, options.importPath, [
|
|
58
58
|
(0, devkit_1.joinPathFragments)(options.projectRoot, './src', 'index.' + (options.js ? 'js' : 'ts')),
|
|
59
59
|
]);
|
|
@@ -140,6 +140,9 @@ async function addProject(host, options) {
|
|
|
140
140
|
return rollupConfigTask;
|
|
141
141
|
}
|
|
142
142
|
function updateTsConfig(tree, options) {
|
|
143
|
+
if (options.isUsingTsSolutionConfig) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
143
146
|
(0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(options.projectRoot, 'tsconfig.json'), (json) => {
|
|
144
147
|
if (options.strict) {
|
|
145
148
|
json.compilerOptions = {
|