@nx/rspack 20.4.3 → 20.4.5

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 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.4.3",
4
+ "version": "20.4.5",
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.4.3",
28
- "@nx/devkit": "20.4.3",
29
- "@nx/web": "20.4.3",
30
- "@nx/module-federation": "20.4.3",
27
+ "@nx/js": "20.4.5",
28
+ "@nx/devkit": "20.4.5",
29
+ "@nx/web": "20.4.5",
30
+ "@nx/module-federation": "20.4.5",
31
31
  "@phenomnomnominal/tsquery": "~5.0.1",
32
32
  "@rspack/core": "^1.1.5",
33
33
  "@rspack/dev-server": "^1.0.9",
@@ -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];