@nx/react-native 23.2.0-beta.1 → 23.2.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/dist/src/generators/application/lib/add-e2e.js +2 -1
- package/dist/src/generators/application/schema.d.ts +4 -0
- package/dist/src/generators/application/schema.json +8 -2
- package/dist/src/generators/library/schema.d.ts +4 -0
- package/dist/src/generators/library/schema.json +8 -2
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md +25 -0
- package/dist/src/utils/add-linting.d.ts +4 -0
- package/dist/src/utils/add-linting.js +1 -1
- package/package.json +9 -9
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addE2e = addE2e;
|
|
4
4
|
const internal_1 = require("@nx/react/internal");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const internal_2 = require("@nx/eslint/internal");
|
|
6
7
|
const versions_1 = require("../../../utils/versions");
|
|
7
8
|
async function addE2e(host, options) {
|
|
8
9
|
switch (options.e2eTestRunner) {
|
|
@@ -34,7 +35,7 @@ async function addE2e(host, options) {
|
|
|
34
35
|
appDisplayName: options.displayName,
|
|
35
36
|
appName: options.name,
|
|
36
37
|
framework: 'react-native',
|
|
37
|
-
|
|
38
|
+
enableTypedLinting: (0, internal_2.isTypedLintingEnabled)(options),
|
|
38
39
|
skipFormat: true,
|
|
39
40
|
});
|
|
40
41
|
case 'none':
|
|
@@ -11,6 +11,10 @@ export interface Schema {
|
|
|
11
11
|
classComponent?: boolean;
|
|
12
12
|
js?: boolean;
|
|
13
13
|
linter: Linter | LinterType;
|
|
14
|
+
enableTypedLinting?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
|
|
17
|
+
*/
|
|
14
18
|
setParserOptionsProject?: boolean;
|
|
15
19
|
e2eTestRunner: 'cypress' | 'playwright' | 'detox' | 'none'; // default is cypress
|
|
16
20
|
bundler: 'webpack' | 'vite'; // default is webpack
|
|
@@ -64,11 +64,17 @@
|
|
|
64
64
|
"description": "Generate JavaScript files rather than TypeScript files",
|
|
65
65
|
"default": false
|
|
66
66
|
},
|
|
67
|
-
"
|
|
67
|
+
"enableTypedLinting": {
|
|
68
68
|
"type": "boolean",
|
|
69
|
-
"description": "Whether
|
|
69
|
+
"description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
|
|
70
70
|
"default": false
|
|
71
71
|
},
|
|
72
|
+
"setParserOptionsProject": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"description": "Deprecated alias for `enableTypedLinting`.",
|
|
75
|
+
"default": false,
|
|
76
|
+
"x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
|
|
77
|
+
},
|
|
72
78
|
"e2eTestRunner": {
|
|
73
79
|
"description": "Adds the specified e2e test runner.",
|
|
74
80
|
"type": "string",
|
|
@@ -16,6 +16,10 @@ export interface Schema {
|
|
|
16
16
|
importPath?: string;
|
|
17
17
|
js?: boolean;
|
|
18
18
|
strict?: boolean;
|
|
19
|
+
enableTypedLinting?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
|
|
22
|
+
*/
|
|
19
23
|
setParserOptionsProject?: boolean;
|
|
20
24
|
skipPackageJson?: boolean; //default is false
|
|
21
25
|
addPlugin?: boolean;
|
|
@@ -84,11 +84,17 @@
|
|
|
84
84
|
"description": "Whether to enable tsconfig strict mode or not.",
|
|
85
85
|
"default": true
|
|
86
86
|
},
|
|
87
|
-
"
|
|
87
|
+
"enableTypedLinting": {
|
|
88
88
|
"type": "boolean",
|
|
89
|
-
"description": "Whether
|
|
89
|
+
"description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
|
|
90
90
|
"default": false
|
|
91
91
|
},
|
|
92
|
+
"setParserOptionsProject": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"description": "Deprecated alias for `enableTypedLinting`.",
|
|
95
|
+
"default": false,
|
|
96
|
+
"x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
|
|
97
|
+
},
|
|
92
98
|
"skipPackageJson": {
|
|
93
99
|
"description": "Do not add dependencies to `package.json`.",
|
|
94
100
|
"type": "boolean",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#### Rename `createNodesV2` imports to `createNodes`
|
|
2
|
+
|
|
3
|
+
`@nx/react-native` renamed its primary inferred-plugin export from `createNodesV2` to `createNodes`. The `createNodesV2` name is preserved as a deprecated alias for now, but new code should use `createNodes`.
|
|
4
|
+
|
|
5
|
+
This migration scans every `.ts`, `.tsx`, `.cts`, and `.mts` file in your workspace and rewrites named imports and re-exports of `createNodesV2` from `@nx/react-native/plugin` to `createNodes`.
|
|
6
|
+
|
|
7
|
+
#### Sample Code Changes
|
|
8
|
+
|
|
9
|
+
##### Before
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { createNodesV2 } from '@nx/react-native/plugin';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
##### After
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { createNodes } from '@nx/react-native/plugin';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Aliases are preserved (`createNodesV2 as cn` becomes `createNodes as cn`), and if a file already imports both names (`{ createNodes, createNodesV2 }`) the redundant binding is dropped.
|
|
22
|
+
|
|
23
|
+
#### What is not rewritten
|
|
24
|
+
|
|
25
|
+
Only static `import`/`export` named bindings from `@nx/react-native/plugin` are rewritten. Namespace imports, dynamic `import(...)`, `require(...)` destructuring, and property access such as `plugin.createNodesV2` are left untouched — they keep working through the `createNodesV2` runtime alias. Update those by hand if you want to drop the deprecated name everywhere.
|
|
@@ -4,6 +4,10 @@ interface NormalizedSchema {
|
|
|
4
4
|
linter?: Linter | LinterType;
|
|
5
5
|
projectName: string;
|
|
6
6
|
projectRoot: string;
|
|
7
|
+
enableTypedLinting?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
|
|
10
|
+
*/
|
|
7
11
|
setParserOptionsProject?: boolean;
|
|
8
12
|
tsConfigPaths: string[];
|
|
9
13
|
skipPackageJson?: boolean;
|
|
@@ -16,7 +16,7 @@ async function addLinting(host, options) {
|
|
|
16
16
|
tsConfigPaths: options.tsConfigPaths,
|
|
17
17
|
skipFormat: true,
|
|
18
18
|
skipPackageJson: options.skipPackageJson,
|
|
19
|
-
|
|
19
|
+
enableTypedLinting: (0, internal_1.isTypedLintingEnabled)(options),
|
|
20
20
|
addPlugin: options.addPlugin,
|
|
21
21
|
addPackageJsonDependencyChecks: options.buildable,
|
|
22
22
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react-native",
|
|
3
|
-
"version": "23.2.0-beta.
|
|
3
|
+
"version": "23.2.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": [
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"tinyglobby": "^0.2.12",
|
|
63
63
|
"tsconfig-paths": "^4.1.2",
|
|
64
64
|
"tslib": "^2.3.0",
|
|
65
|
-
"@nx/devkit": "23.2.0-beta.
|
|
66
|
-
"@nx/eslint": "23.2.0-beta.
|
|
67
|
-
"@nx/
|
|
68
|
-
"@nx/
|
|
69
|
-
"@nx/
|
|
65
|
+
"@nx/devkit": "23.2.0-beta.3",
|
|
66
|
+
"@nx/eslint": "23.2.0-beta.3",
|
|
67
|
+
"@nx/react": "23.2.0-beta.3",
|
|
68
|
+
"@nx/webpack": "23.2.0-beta.3",
|
|
69
|
+
"@nx/js": "23.2.0-beta.3"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react-native": ">=0.83.0 <0.85.0",
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"nx": "23.2.0-beta.
|
|
82
|
+
"nx": "23.2.0-beta.3"
|
|
83
83
|
},
|
|
84
84
|
"optionalDependencies": {
|
|
85
|
-
"@nx/rollup": "23.2.0-beta.
|
|
86
|
-
"@nx/detox": "23.2.0-beta.
|
|
85
|
+
"@nx/rollup": "23.2.0-beta.3",
|
|
86
|
+
"@nx/detox": "23.2.0-beta.3"
|
|
87
87
|
},
|
|
88
88
|
"executors": "./executors.json",
|
|
89
89
|
"ng-update": {
|