@nx/rspack 23.1.0-beta.5 → 23.1.0-beta.7

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.
@@ -4,3 +4,4 @@ export default function runExecutor(options: RspackExecutorSchema, context: Exec
4
4
  success: boolean;
5
5
  outfile?: string;
6
6
  }, void, any>;
7
+ export declare function executeTypeCheck(options: RspackExecutorSchema, context: ExecutorContext): Promise<void>;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = runExecutor;
4
+ exports.executeTypeCheck = executeTypeCheck;
4
5
  const devkit_1 = require("@nx/devkit");
5
6
  const internal_1 = require("@nx/devkit/internal");
6
7
  const js_1 = require("@nx/js");
@@ -105,6 +106,10 @@ async function executeTypeCheck(options, context) {
105
106
  workspaceRoot: (0, path_1.resolve)(projectConfiguration.root),
106
107
  tsConfigPath: options.tsConfig,
107
108
  mode: 'noEmit',
109
+ // TS 6 defaults rootDir to the tsconfig dir, so from-source workspace
110
+ // libs (outside the project) trip TS6059. rootDir is emit-only and this
111
+ // is noEmit, so widen it to the workspace root to clear the false error.
112
+ rootDir: context.root,
108
113
  });
109
114
  await (0, js_1.printDiagnostics)(result.errors, result.warnings);
110
115
  if (result.errors.length > 0) {
@@ -277,6 +277,14 @@ function applyNxDependentConfig(options, config, { useNormalizedEntry } = {}, rs
277
277
  pluginConfig.typescript.build = true;
278
278
  pluginConfig.typescript.mode = 'readonly';
279
279
  }
280
+ else {
281
+ // TS 6 defaults rootDir to the tsconfig dir, so from-source workspace
282
+ // libs (outside a narrow rootDir) trip TS6059. The checker runs read-only
283
+ // here, so widen rootDir to the workspace root to clear the false error.
284
+ pluginConfig.typescript.configOverwrite = {
285
+ compilerOptions: { rootDir: options.root },
286
+ };
287
+ }
280
288
  plugins.push(new TsCheckerRspackPlugin(pluginConfig));
281
289
  }
282
290
  const entries = [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/rspack",
3
3
  "description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
4
- "version": "23.1.0-beta.5",
4
+ "version": "23.1.0-beta.7",
5
5
  "type": "commonjs",
6
6
  "files": [
7
7
  "dist",
@@ -152,14 +152,14 @@
152
152
  "tslib": "^2.3.0",
153
153
  "webpack": "5.105.2",
154
154
  "webpack-node-externals": "^3.0.0",
155
- "@nx/module-federation": "23.1.0-beta.5",
156
- "@nx/web": "23.1.0-beta.5",
157
- "@nx/devkit": "23.1.0-beta.5",
158
- "@nx/js": "23.1.0-beta.5"
155
+ "@nx/devkit": "23.1.0-beta.7",
156
+ "@nx/js": "23.1.0-beta.7",
157
+ "@nx/module-federation": "23.1.0-beta.7",
158
+ "@nx/web": "23.1.0-beta.7"
159
159
  },
160
160
  "devDependencies": {
161
- "nx": "23.1.0-beta.5",
162
- "@nx/nest": "23.1.0-beta.5"
161
+ "nx": "23.1.0-beta.7",
162
+ "@nx/nest": "23.1.0-beta.7"
163
163
  },
164
164
  "peerDependencies": {
165
165
  "@rspack/cli": "^1.0.0 || ^2.0.0",