@nx/rspack 20.5.0-beta.2 → 20.5.0-beta.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.
package/migrations.json CHANGED
@@ -94,6 +94,15 @@
94
94
  "alwaysAddToPackageJson": false
95
95
  }
96
96
  }
97
+ },
98
+ "20.5.0": {
99
+ "version": "20.5.0-beta.3",
100
+ "packages": {
101
+ "@rspack/core": {
102
+ "version": "^1.2.2",
103
+ "alwaysAddToPackageJson": false
104
+ }
105
+ }
97
106
  }
98
107
  },
99
108
  "version": "0.1"
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": "20.5.0-beta.2",
4
+ "version": "20.5.0-beta.4",
5
5
  "type": "commonjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -24,10 +24,10 @@
24
24
  "generators": "./generators.json",
25
25
  "executors": "./executors.json",
26
26
  "dependencies": {
27
- "@nx/js": "20.5.0-beta.2",
28
- "@nx/devkit": "20.5.0-beta.2",
29
- "@nx/web": "20.5.0-beta.2",
30
- "@nx/module-federation": "20.5.0-beta.2",
27
+ "@nx/js": "20.5.0-beta.4",
28
+ "@nx/devkit": "20.5.0-beta.4",
29
+ "@nx/web": "20.5.0-beta.4",
30
+ "@nx/module-federation": "20.5.0-beta.4",
31
31
  "@phenomnomnominal/tsquery": "~5.0.1",
32
32
  "@rspack/core": "^1.1.5",
33
33
  "@rspack/dev-server": "^1.0.9",
@@ -37,7 +37,7 @@
37
37
  "css-loader": "^6.4.0",
38
38
  "enquirer": "~2.3.6",
39
39
  "express": "^4.21.2",
40
- "fork-ts-checker-webpack-plugin": "7.2.13",
40
+ "ts-checker-rspack-plugin": "^1.1.1",
41
41
  "http-proxy-middleware": "^3.0.3",
42
42
  "less-loader": "11.1.0",
43
43
  "license-webpack-plugin": "^4.0.2",
@@ -11,9 +11,6 @@ async function default_1(tree, _options) {
11
11
  const tasks = [];
12
12
  const initTask = await (0, init_1.default)(tree, {
13
13
  ..._options,
14
- // TODO: Crystalize the default rspack.config.js file.
15
- // The default setup isn't crystalized so don't add plugin.
16
- addPlugin: false,
17
14
  });
18
15
  tasks.push(initTask);
19
16
  const options = await (0, normalize_options_1.normalizeOptions)(tree, _options);
@@ -10,9 +10,6 @@ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-set
10
10
  async function configurationGenerator(tree, options) {
11
11
  const task = await (0, init_1.default)(tree, {
12
12
  ...options,
13
- // TODO: Crystalize the default rspack.config.js file.
14
- // The default setup isn't crystalized so don't add plugin.
15
- addPlugin: false,
16
13
  });
17
14
  const { targets, root, projectType } = (0, devkit_1.readProjectConfiguration)(tree, options.project);
18
15
  const { target, framework } = (0, generator_utils_1.determineFrameworkAndTarget)(tree, options, root, targets);
@@ -52,16 +52,15 @@ async function createNodesInternal(configFilePath, options, context, targetsCach
52
52
  packageJson = (0, devkit_1.readJsonFile)((0, path_1.join)(context.workspaceRoot, projectRoot, 'package.json'));
53
53
  }
54
54
  const normalizedOptions = normalizeOptions(options);
55
- // We do not want to alter how the hash is calculated, so appending the config file path to the hash
56
- // to prevent vite/vitest files overwriting the target cache created by the other
55
+ const lockFileHash = (0, file_hasher_1.hashFile)((0, path_1.join)(context.workspaceRoot, (0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot)))) ?? '';
57
56
  const nodeHash = (0, file_hasher_1.hashArray)([
58
- ...[
59
- (0, path_1.join)(context.workspaceRoot, configFilePath),
60
- (0, path_1.join)(context.workspaceRoot, (0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot))),
61
- ].map(file_hasher_1.hashFile),
62
- (0, file_hasher_1.hashObject)(options),
57
+ (0, file_hasher_1.hashFile)((0, path_1.join)(context.workspaceRoot, configFilePath)),
58
+ lockFileHash,
59
+ (0, file_hasher_1.hashObject)({ ...options, isTsSolutionSetup }),
63
60
  (0, file_hasher_1.hashObject)(packageJson),
64
61
  ]);
62
+ // We do not want to alter how the hash is calculated, so appending the config file path to the hash
63
+ // to prevent vite/vitest files overwriting the target cache created by the other
65
64
  const hash = `${nodeHash}_${configFilePath}`;
66
65
  targetsCache[hash] ??= await createRspackTargets(configFilePath, projectRoot, normalizedOptions, context, isTsSolutionSetup);
67
66
  const { targets, metadata } = targetsCache[hash];
@@ -179,13 +179,13 @@ function applyNxDependentConfig(options, config, { useNormalizedEntry } = {}) {
179
179
  }
180
180
  // New TS Solution already has a typecheck target
181
181
  if (!options?.skipTypeChecking && !isUsingTsSolution) {
182
- const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
183
- plugins.push(new ForkTsCheckerWebpackPlugin({
182
+ const { TsCheckerRspackPlugin } = require('ts-checker-rspack-plugin');
183
+ plugins.push(new TsCheckerRspackPlugin({
184
184
  typescript: {
185
185
  configFile: path.isAbsolute(tsConfig)
186
186
  ? tsConfig
187
187
  : path.join(options.root, tsConfig),
188
- memoryLimit: options.memoryLimit || 2018,
188
+ memoryLimit: options.memoryLimit || 8192, // default memory limit is 8192
189
189
  },
190
190
  }));
191
191
  }
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RspackNxBuildCoordinationPlugin = void 0;
4
4
  const child_process_1 = require("child_process");
5
5
  const client_1 = require("nx/src/daemon/client/client");
6
+ const enabled_1 = require("nx/src/daemon/client/enabled");
6
7
  const watch_1 = require("nx/src/command-line/watch/watch");
7
8
  const output_1 = require("nx/src/utils/output");
8
9
  class RspackNxBuildCoordinationPlugin {
@@ -13,7 +14,7 @@ class RspackNxBuildCoordinationPlugin {
13
14
  if (!skipInitialBuild) {
14
15
  this.buildChangedProjects();
15
16
  }
16
- if ((0, client_1.isDaemonEnabled)()) {
17
+ if ((0, enabled_1.isDaemonEnabled)()) {
17
18
  this.startWatchingBuildableLibs();
18
19
  }
19
20
  else {
@@ -1,5 +1,5 @@
1
1
  export declare const nxVersion: any;
2
- export declare const rspackCoreVersion = "^1.1.5";
2
+ export declare const rspackCoreVersion = "1.2.2";
3
3
  export declare const rspackDevServerVersion = "1.0.9";
4
4
  export declare const rspackPluginMinifyVersion = "^0.7.5";
5
5
  export declare const rspackPluginReactRefreshVersion = "^1.0.0";
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.eslintPluginReactHooksVersion = exports.eslintPluginReactVersion = exports.eslintPluginJsxA11yVersion = exports.eslintPluginImportVersion = exports.stylusVersion = exports.sassVersion = exports.lessVersion = exports.nestjsMicroservicesVersion = exports.nestjsPlatformExpressVersion = exports.nestjsCoreVersion = exports.nestjsCommonVersion = exports.reactRefreshVersion = exports.lessLoaderVersion = exports.rspackPluginReactRefreshVersion = exports.rspackPluginMinifyVersion = exports.rspackDevServerVersion = exports.rspackCoreVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
- exports.rspackCoreVersion = '^1.1.5';
5
+ exports.rspackCoreVersion = '1.2.2';
6
6
  exports.rspackDevServerVersion = '1.0.9';
7
7
  exports.rspackPluginMinifyVersion = '^0.7.5';
8
8
  exports.rspackPluginReactRefreshVersion = '^1.0.0';