@nx/react-native 24.1.0-canary.20261113-51292c7 → 24.1.0-rc.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/dist/src/generators/application/files/nx-welcome/claimed/src/app/App.tsx.template +2 -2
- package/dist/src/generators/application/files/nx-welcome/not-configured/src/app/App.tsx.template +2 -2
- package/dist/src/generators/application/files/nx-welcome/unclaimed/src/app/App.tsx.template +2 -2
- package/dist/src/generators/application/lib/create-application-files.js +8 -3
- package/dist/src/generators/web-configuration/files/base-vite/public/favicon.ico +0 -0
- package/dist/src/generators/web-configuration/files/base-webpack/src/favicon.ico +0 -0
- package/dist/src/utils/add-linting.js +13 -14
- package/package.json +9 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import React, { useRef, useState } from 'react';
|
|
1
|
+
<% if (usesJsxA11y) { %>/* eslint-disable jsx-a11y/accessible-emoji */
|
|
2
|
+
<% } %>import React, { useRef, useState } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
SafeAreaView,
|
|
5
5
|
StyleSheet,
|
package/dist/src/generators/application/files/nx-welcome/not-configured/src/app/App.tsx.template
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import React, { useRef, useState } from 'react';
|
|
1
|
+
<% if (usesJsxA11y) { %>/* eslint-disable jsx-a11y/accessible-emoji */
|
|
2
|
+
<% } %>import React, { useRef, useState } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
SafeAreaView,
|
|
5
5
|
StyleSheet,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import React, { useRef, useState } from 'react';
|
|
1
|
+
<% if (usesJsxA11y) { %>/* eslint-disable jsx-a11y/accessible-emoji */
|
|
2
|
+
<% } %>import React, { useRef, useState } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
SafeAreaView,
|
|
5
5
|
StyleSheet,
|
|
@@ -3,12 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createApplicationFiles = createApplicationFiles;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const js_1 = require("@nx/js");
|
|
6
|
+
const internal_1 = require("@nx/react/internal");
|
|
6
7
|
const path_1 = require("path");
|
|
7
|
-
const
|
|
8
|
+
const internal_2 = require("@nx/devkit/internal");
|
|
8
9
|
async function createApplicationFiles(host, options) {
|
|
9
|
-
const onBoardingStatus = await (0,
|
|
10
|
+
const onBoardingStatus = await (0, internal_2.createNxCloudOnboardingURLForWelcomeApp)(host, options.nxCloudToken);
|
|
10
11
|
const connectCloudUrl = onBoardingStatus === 'unclaimed' &&
|
|
11
|
-
(await (0,
|
|
12
|
+
(await (0, internal_2.getNxCloudAppOnBoardingUrl)(options.nxCloudToken));
|
|
13
|
+
const usesJsxA11y = options.linter === 'eslint' &&
|
|
14
|
+
'eslint-plugin-jsx-a11y' in
|
|
15
|
+
(0, internal_1.getExtraEslintDependencies)(host).devDependencies;
|
|
12
16
|
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../files/app'), options.appProjectRoot, {
|
|
13
17
|
...options,
|
|
14
18
|
entryFileIos: 'src/main',
|
|
@@ -18,6 +22,7 @@ async function createApplicationFiles(host, options) {
|
|
|
18
22
|
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, `../files/nx-welcome/${onBoardingStatus}`), options.appProjectRoot, {
|
|
19
23
|
...options,
|
|
20
24
|
connectCloudUrl,
|
|
25
|
+
usesJsxA11y,
|
|
21
26
|
entryFileIos: 'src/main',
|
|
22
27
|
offsetFromRoot: (0, devkit_1.offsetFromRoot)(options.appProjectRoot),
|
|
23
28
|
rootTsConfigPath: (0, js_1.getRelativePathToRootTsConfig)(host, options.appProjectRoot),
|
|
Binary file
|
|
Binary file
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addLinting = addLinting;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const internal_1 = require("@nx/react/internal");
|
|
6
|
+
const internal_2 = require("@nx/eslint/internal");
|
|
7
|
+
const internal_3 = require("@nx/js/internal");
|
|
8
8
|
async function addLinting(host, options) {
|
|
9
9
|
const tasks = [];
|
|
10
|
-
tasks.push(await (0,
|
|
10
|
+
tasks.push(await (0, internal_3.addLintingToProject)(host, {
|
|
11
11
|
oxlintPlugins: ['react', 'react-perf'],
|
|
12
12
|
linter: options.linter,
|
|
13
13
|
project: options.projectName,
|
|
@@ -23,8 +23,8 @@ async function addLinting(host, options) {
|
|
|
23
23
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
24
24
|
}
|
|
25
25
|
// Add ignored dependencies and files to dependency-checks rule
|
|
26
|
-
if ((0,
|
|
27
|
-
(0,
|
|
26
|
+
if ((0, internal_2.isEslintConfigSupported)(host)) {
|
|
27
|
+
(0, internal_2.updateOverrideInLintConfig)(host, options.projectRoot, (override) => Boolean(override.rules?.['@nx/dependency-checks']), (override) => {
|
|
28
28
|
const rule = override.rules['@nx/dependency-checks'];
|
|
29
29
|
if (Array.isArray(rule) && rule.length > 1) {
|
|
30
30
|
// Ensure ignoredDependencies array exists
|
|
@@ -47,23 +47,23 @@ async function addLinting(host, options) {
|
|
|
47
47
|
return override;
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
if ((0,
|
|
51
|
-
if ((0,
|
|
52
|
-
(0,
|
|
50
|
+
if ((0, internal_2.isEslintConfigSupported)(host)) {
|
|
51
|
+
if ((0, internal_2.useFlatConfig)(host)) {
|
|
52
|
+
(0, internal_2.addPredefinedConfigToFlatLintConfig)(host, options.projectRoot, 'flat/react', { checkBaseConfig: true });
|
|
53
53
|
// Add an empty rules object to users know how to add/override rules
|
|
54
|
-
(0,
|
|
54
|
+
(0, internal_2.addOverrideToLintConfig)(host, options.projectRoot, {
|
|
55
55
|
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
|
|
56
56
|
rules: {},
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
|
-
const addExtendsTask = (0,
|
|
60
|
+
const addExtendsTask = (0, internal_2.addExtendsToLintConfig)(host, options.projectRoot, {
|
|
61
61
|
name: 'plugin:@nx/react',
|
|
62
62
|
needCompatFixup: true,
|
|
63
63
|
});
|
|
64
64
|
tasks.push(addExtendsTask);
|
|
65
65
|
}
|
|
66
|
-
(0,
|
|
66
|
+
(0, internal_2.addIgnoresToLintConfig)(host, options.projectRoot, [
|
|
67
67
|
'public',
|
|
68
68
|
'.cache',
|
|
69
69
|
'node_modules',
|
|
@@ -71,8 +71,7 @@ async function addLinting(host, options) {
|
|
|
71
71
|
]);
|
|
72
72
|
}
|
|
73
73
|
if (!options.skipPackageJson) {
|
|
74
|
-
|
|
75
|
-
tasks.push(installTask);
|
|
74
|
+
tasks.push((0, internal_1.addExtraEslintDependencies)(host));
|
|
76
75
|
}
|
|
77
76
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
78
77
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react-native",
|
|
3
|
-
"version": "24.1.0-
|
|
3
|
+
"version": "24.1.0-rc.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": [
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@nx/devkit": "24.1.0-
|
|
58
|
-
"@nx/js": "24.1.0-
|
|
59
|
-
"@nx/eslint": "24.1.0-
|
|
60
|
-
"@nx/react": "24.1.0-
|
|
57
|
+
"@nx/devkit": "24.1.0-rc.0",
|
|
58
|
+
"@nx/js": "24.1.0-rc.0",
|
|
59
|
+
"@nx/eslint": "24.1.0-rc.0",
|
|
60
|
+
"@nx/react": "24.1.0-rc.0",
|
|
61
61
|
"ajv": "^8.0.0",
|
|
62
62
|
"enhanced-resolve": "^5.8.3",
|
|
63
63
|
"ignore": "^7.0.5",
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@nx/webpack": "24.1.0-
|
|
82
|
-
"nx": "24.1.0-
|
|
81
|
+
"@nx/webpack": "24.1.0-rc.0",
|
|
82
|
+
"nx": "24.1.0-rc.0"
|
|
83
83
|
},
|
|
84
84
|
"optionalDependencies": {
|
|
85
|
-
"@nx/detox": "24.1.0-
|
|
86
|
-
"@nx/rollup": "24.1.0-
|
|
85
|
+
"@nx/detox": "24.1.0-rc.0",
|
|
86
|
+
"@nx/rollup": "24.1.0-rc.0"
|
|
87
87
|
},
|
|
88
88
|
"executors": "./executors.json",
|
|
89
89
|
"ng-update": {
|