@nx/rsbuild 22.6.4 → 22.6.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/rsbuild",
3
3
  "description": "The Nx Plugin for Rsbuild contains an Nx plugin, executors and utilities that support building applications using Rsbuild.",
4
- "version": "22.6.4",
4
+ "version": "22.6.5",
5
5
  "type": "commonjs",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -30,14 +30,14 @@
30
30
  "executors": "./executors.json",
31
31
  "dependencies": {
32
32
  "tslib": "^2.3.0",
33
- "@nx/devkit": "22.6.4",
34
- "@nx/js": "22.6.4",
33
+ "@nx/devkit": "22.6.5",
34
+ "@nx/js": "22.6.5",
35
35
  "@rsbuild/core": "1.1.8",
36
36
  "minimatch": "10.2.4",
37
37
  "@phenomnomnominal/tsquery": "~6.1.4"
38
38
  },
39
39
  "devDependencies": {
40
- "nx": "22.6.4"
40
+ "nx": "22.6.5"
41
41
  },
42
42
  "peerDependencies": {},
43
43
  "nx-migrations": {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/rsbuild/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EAMd,MAAM,YAAY,CAAC;AAepB,MAAM,WAAW,oBAAoB;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAiBD,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,oBAAoB,CA4B7D,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/rsbuild/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EAMd,MAAM,YAAY,CAAC;AAapB,MAAM,WAAW,oBAAoB;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAiBD,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,oBAAoB,CAgC7D,CAAC"}
@@ -13,7 +13,6 @@ const path_1 = require("path");
13
13
  const minimatch_1 = require("minimatch");
14
14
  const core_1 = require("@rsbuild/core");
15
15
  const util_1 = require("@nx/js/src/plugins/typescript/util");
16
- const pmc = (0, devkit_1.getPackageManagerCommand)();
17
16
  function readTargetsCache(cachePath) {
18
17
  return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
19
18
  }
@@ -28,15 +27,16 @@ exports.createNodesV2 = [
28
27
  const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `rsbuild-${optionsHash}.hash`);
29
28
  const targetsCache = readTargetsCache(cachePath);
30
29
  const isUsingTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)();
30
+ const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
31
31
  try {
32
- return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache, isUsingTsSolutionSetup), configFilePaths, options, context);
32
+ return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache, isUsingTsSolutionSetup, pmc), configFilePaths, options, context);
33
33
  }
34
34
  finally {
35
35
  writeTargetsCache(cachePath, targetsCache);
36
36
  }
37
37
  },
38
38
  ];
39
- async function createNodesInternal(configFilePath, options, context, targetsCache, isUsingTsSolutionSetup) {
39
+ async function createNodesInternal(configFilePath, options, context, targetsCache, isUsingTsSolutionSetup, pmc) {
40
40
  const projectRoot = (0, path_1.dirname)(configFilePath);
41
41
  // Do not create a project if package.json and project.json isn't there.
42
42
  const siblingFiles = (0, fs_1.readdirSync)((0, path_1.join)(context.workspaceRoot, projectRoot));
@@ -47,7 +47,7 @@ async function createNodesInternal(configFilePath, options, context, targetsCach
47
47
  const tsConfigFiles = siblingFiles.filter((p) => (0, minimatch_1.minimatch)(p, 'tsconfig*{.json,.*.json}')) ?? [];
48
48
  const normalizedOptions = normalizeOptions(options);
49
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
- targetsCache[hash] ??= await createRsbuildTargets(configFilePath, projectRoot, normalizedOptions, tsConfigFiles, isUsingTsSolutionSetup, context);
50
+ targetsCache[hash] ??= await createRsbuildTargets(configFilePath, projectRoot, normalizedOptions, tsConfigFiles, isUsingTsSolutionSetup, context, pmc);
51
51
  const { targets, metadata } = targetsCache[hash];
52
52
  return {
53
53
  projects: {
@@ -59,7 +59,7 @@ async function createNodesInternal(configFilePath, options, context, targetsCach
59
59
  },
60
60
  };
61
61
  }
62
- async function createRsbuildTargets(configFilePath, projectRoot, options, tsConfigFiles, isUsingTsSolutionSetup, context) {
62
+ async function createRsbuildTargets(configFilePath, projectRoot, options, tsConfigFiles, isUsingTsSolutionSetup, context, pmc) {
63
63
  const absoluteConfigFilePath = (0, devkit_1.joinPathFragments)(context.workspaceRoot, configFilePath);
64
64
  const rsbuildConfig = await (0, core_1.loadConfig)({
65
65
  path: absoluteConfigFilePath,