@nx/rsbuild 20.4.0 → 20.4.2
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 +3 -3
- package/src/plugins/plugin.js +19 -10
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": "20.4.
|
|
4
|
+
"version": "20.4.2",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"executors": "./executors.json",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"tslib": "^2.3.0",
|
|
33
|
-
"@nx/devkit": "20.4.
|
|
34
|
-
"@nx/js": "20.4.
|
|
33
|
+
"@nx/devkit": "20.4.2",
|
|
34
|
+
"@nx/js": "20.4.2",
|
|
35
35
|
"@rsbuild/core": "1.1.8",
|
|
36
36
|
"minimatch": "9.0.3",
|
|
37
37
|
"@phenomnomnominal/tsquery": "~5.0.1"
|
package/src/plugins/plugin.js
CHANGED
|
@@ -46,7 +46,7 @@ async function createNodesInternal(configFilePath, options, context, targetsCach
|
|
|
46
46
|
}
|
|
47
47
|
const tsConfigFiles = siblingFiles.filter((p) => (0, minimatch_1.minimatch)(p, 'tsconfig*{.json,.*.json}')) ?? [];
|
|
48
48
|
const normalizedOptions = normalizeOptions(options);
|
|
49
|
-
const hash = await (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(projectRoot, normalizedOptions, context, [(0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot))]);
|
|
49
|
+
const hash = await (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(projectRoot, { ...normalizedOptions, isUsingTsSolutionSetup }, context, [(0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot))]);
|
|
50
50
|
targetsCache[hash] ??= await createRsbuildTargets(configFilePath, projectRoot, normalizedOptions, tsConfigFiles, isUsingTsSolutionSetup, context);
|
|
51
51
|
const { targets, metadata } = targetsCache[hash];
|
|
52
52
|
return {
|
|
@@ -129,21 +129,30 @@ async function createRsbuildTargets(configFilePath, projectRoot, options, tsConf
|
|
|
129
129
|
{ externalDependencies: ['typescript'] },
|
|
130
130
|
],
|
|
131
131
|
command: isUsingTsSolutionSetup
|
|
132
|
-
? `tsc --build --emitDeclarationOnly
|
|
133
|
-
: `tsc
|
|
132
|
+
? `tsc --build --emitDeclarationOnly`
|
|
133
|
+
: `tsc -p ${tsConfigToUse} --noEmit`,
|
|
134
134
|
options: { cwd: (0, devkit_1.joinPathFragments)(projectRoot) },
|
|
135
135
|
metadata: {
|
|
136
|
-
description: `
|
|
136
|
+
description: `Runs type-checking for the project.`,
|
|
137
|
+
technologies: ['typescript'],
|
|
137
138
|
help: {
|
|
138
|
-
command:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
|
|
139
|
+
command: isUsingTsSolutionSetup
|
|
140
|
+
? `${pmc.exec} tsc --build --help`
|
|
141
|
+
: `${pmc.exec} tsc -p ${tsConfigToUse} --help`,
|
|
142
|
+
example: isUsingTsSolutionSetup
|
|
143
|
+
? { args: ['--force'] }
|
|
144
|
+
: { options: { noEmit: true } },
|
|
144
145
|
},
|
|
145
146
|
},
|
|
146
147
|
};
|
|
148
|
+
if (isUsingTsSolutionSetup) {
|
|
149
|
+
targets[options.typecheckTargetName].dependsOn = [
|
|
150
|
+
`^${options.typecheckTargetName}`,
|
|
151
|
+
];
|
|
152
|
+
targets[options.typecheckTargetName].syncGenerators = [
|
|
153
|
+
'@nx/js:typescript-sync',
|
|
154
|
+
];
|
|
155
|
+
}
|
|
147
156
|
}
|
|
148
157
|
(0, util_1.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmc);
|
|
149
158
|
return { targets, metadata: {} };
|