@nx/rsbuild 23.0.0-rc.2 → 23.0.0-rc.4
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.
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#### Rename `createNodesV2` imports to `createNodes`
|
|
2
|
+
|
|
3
|
+
`@nx/rsbuild` 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/rsbuild` to `createNodes`.
|
|
6
|
+
|
|
7
|
+
#### Sample Code Changes
|
|
8
|
+
|
|
9
|
+
##### Before
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { createNodesV2 } from '@nx/rsbuild';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
##### After
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { createNodes } from '@nx/rsbuild';
|
|
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/rsbuild` 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.
|
|
@@ -6,10 +6,9 @@ const internal_1 = require("@nx/devkit/internal");
|
|
|
6
6
|
async function getRsbuildE2EWebServerInfo(tree, projectName, configFilePath, isPluginBeingAdded, e2ePortOverride) {
|
|
7
7
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
8
8
|
let e2ePort = e2ePortOverride ?? 4200;
|
|
9
|
-
|
|
10
|
-
?.options?.port
|
|
11
|
-
|
|
12
|
-
e2ePort = devPort;
|
|
9
|
+
if (nxJson.targetDefaults?.['dev'] &&
|
|
10
|
+
nxJson.targetDefaults?.['dev'].options?.port) {
|
|
11
|
+
e2ePort = nxJson.targetDefaults?.['dev'].options?.port;
|
|
13
12
|
}
|
|
14
13
|
return (0, internal_1.getE2EWebServerInfo)(tree, projectName, {
|
|
15
14
|
plugin: '@nx/rsbuild',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/rsbuild",
|
|
3
3
|
"description": "The Nx Plugin for Rsbuild contains an Nx plugin, executors and utilities that support building applications using Rsbuild.",
|
|
4
|
-
"version": "23.0.0-rc.
|
|
4
|
+
"version": "23.0.0-rc.4",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"minimatch": "10.2.5",
|
|
58
58
|
"semver": "^7.6.3",
|
|
59
59
|
"@phenomnomnominal/tsquery": "~6.2.0",
|
|
60
|
-
"@nx/devkit": "23.0.0-rc.
|
|
61
|
-
"@nx/js": "23.0.0-rc.
|
|
60
|
+
"@nx/devkit": "23.0.0-rc.4",
|
|
61
|
+
"@nx/js": "23.0.0-rc.4"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"nx": "23.0.0-rc.
|
|
64
|
+
"nx": "23.0.0-rc.4"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"@rsbuild/core": "^1.0.0"
|