@nx/rsbuild 24.0.0-pr.37405.acdaf31 → 24.0.0-rc.0

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.
Files changed (26) hide show
  1. package/dist/ready-check.d.ts +1 -0
  2. package/dist/ready-check.js +9 -0
  3. package/dist/ready-signal.d.ts +1 -0
  4. package/dist/ready-signal.js +5 -0
  5. package/dist/src/generators/configuration/files/rsbuild.config.ts__tpl__ +3 -1
  6. package/dist/src/generators/init/init.js +19 -28
  7. package/dist/src/generators/init/schema.d.ts +0 -1
  8. package/dist/src/migrations/update-24-0-0/add-ready-signal-plugin.d.ts +2 -0
  9. package/dist/src/migrations/update-24-0-0/add-ready-signal-plugin.js +125 -0
  10. package/dist/src/migrations/update-24-0-0/add-ready-signal-plugin.md +38 -0
  11. package/dist/src/migrations/update-24-0-0/finish-ready-signal-plugin.md +45 -0
  12. package/dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck.d.ts +4 -0
  13. package/dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck.js +13 -0
  14. package/dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck.md +42 -0
  15. package/dist/src/plugins/plugin.d.ts +0 -1
  16. package/dist/src/plugins/plugin.js +29 -46
  17. package/dist/src/utils/add-build-plugin.d.ts +6 -0
  18. package/dist/src/utils/add-build-plugin.js +64 -15
  19. package/dist/src/utils/dev-server-ready-check.d.ts +29 -0
  20. package/dist/src/utils/dev-server-ready-check.js +104 -0
  21. package/dist/src/utils/e2e-web-server-info-utils.d.ts +1 -1
  22. package/dist/src/utils/e2e-web-server-info-utils.js +2 -2
  23. package/dist/src/utils/ready-signal-plugin.d.ts +6 -0
  24. package/dist/src/utils/ready-signal-plugin.js +34 -0
  25. package/migrations.json +13 -0
  26. package/package.json +20 -4
@@ -0,0 +1 @@
1
+ export declare function waitForDevServer(configPath: string, command: 'dev' | 'preview'): Promise<void>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.waitForDevServer = waitForDevServer;
4
+ const dev_server_ready_check_1 = require("./src/utils/dev-server-ready-check");
5
+ async function waitForDevServer(configPath, command) {
6
+ await (0, dev_server_ready_check_1.waitForRsbuildServer)(configPath, command);
7
+ // The config or its plugins can leave handles open
8
+ process.exit(0);
9
+ }
@@ -0,0 +1 @@
1
+ export { pluginNxReadySignal } from './src/utils/ready-signal-plugin';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pluginNxReadySignal = void 0;
4
+ var ready_signal_plugin_1 = require("./src/utils/ready-signal-plugin");
5
+ Object.defineProperty(exports, "pluginNxReadySignal", { enumerable: true, get: function () { return ready_signal_plugin_1.pluginNxReadySignal; } });
@@ -1,4 +1,5 @@
1
1
  import { defineConfig } from '@rsbuild/core';
2
+ import { pluginNxReadySignal } from '@nx/rsbuild/ready-signal';
2
3
 
3
4
  export default defineConfig({
4
5
  source: {
@@ -20,5 +21,6 @@ export default defineConfig({
20
21
  distPath: {
21
22
  root: 'dist',
22
23
  },
23
- }
24
+ },
25
+ plugins: [pluginNxReadySignal()],
24
26
  });
@@ -5,6 +5,7 @@ exports.initGenerator = initGenerator;
5
5
  exports.initGeneratorInternal = initGeneratorInternal;
6
6
  const internal_1 = require("@nx/devkit/internal");
7
7
  const devkit_1 = require("@nx/devkit");
8
+ const internal_2 = require("@nx/js/internal");
8
9
  const plugin_1 = require("../../plugins/plugin");
9
10
  const versions_1 = require("../../utils/versions");
10
11
  const version_utils_1 = require("../../utils/version-utils");
@@ -24,37 +25,27 @@ function updateDependencies(tree, schema) {
24
25
  }, undefined, schema.keepExistingVersions ?? true);
25
26
  }
26
27
  function initGenerator(tree, schema) {
27
- return initGeneratorInternal(tree, { addPlugin: false, ...schema });
28
+ return initGeneratorInternal(tree, schema);
28
29
  }
29
30
  async function initGeneratorInternal(tree, schema) {
30
31
  (0, assert_supported_rsbuild_version_1.assertSupportedRsbuildVersion)(tree);
31
- const nxJson = (0, devkit_1.readNxJson)(tree);
32
- const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
33
- nxJson.useInferencePlugins !== false;
34
- schema.addPlugin ??= addPluginDefault;
35
- if (schema.addPlugin) {
36
- await (0, internal_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/rsbuild', plugin_1.createNodes, {
37
- buildTargetName: ['build', 'rsbuild:build', 'rsbuild-build'],
38
- devTargetName: ['dev', 'rsbuild:dev', 'rsbuild-dev'],
39
- previewTargetName: ['preview', 'rsbuild:preview', 'rsbuild-preview'],
40
- inspectTargetName: ['inspect', 'rsbuild:inspect', 'rsbuild-inspect'],
41
- typecheckTargetName: [
42
- 'typecheck',
43
- 'rsbuild:typecheck',
44
- 'rsbuild-typecheck',
45
- ],
46
- buildDepsTargetName: [
47
- 'build-deps',
48
- 'rsbuild:build-deps',
49
- 'rsbuild-build-deps',
50
- ],
51
- watchDepsTargetName: [
52
- 'watch-deps',
53
- 'rsbuild:watch-deps',
54
- 'rsbuild-watch-deps',
55
- ],
56
- }, schema.updatePackageScripts);
57
- }
32
+ await (0, internal_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/rsbuild', plugin_1.createNodes, {
33
+ buildTargetName: ['build', 'rsbuild:build', 'rsbuild-build'],
34
+ devTargetName: ['dev', 'rsbuild:dev', 'rsbuild-dev'],
35
+ previewTargetName: ['preview', 'rsbuild:preview', 'rsbuild-preview'],
36
+ inspectTargetName: ['inspect', 'rsbuild:inspect', 'rsbuild-inspect'],
37
+ buildDepsTargetName: [
38
+ 'build-deps',
39
+ 'rsbuild:build-deps',
40
+ 'rsbuild-build-deps',
41
+ ],
42
+ watchDepsTargetName: [
43
+ 'watch-deps',
44
+ 'rsbuild:watch-deps',
45
+ 'rsbuild-watch-deps',
46
+ ],
47
+ }, schema.updatePackageScripts);
48
+ await (0, internal_2.ensureTypescriptPlugin)(tree, schema.updatePackageScripts);
58
49
  const tasks = [];
59
50
  if (!schema.skipPackageJson) {
60
51
  tasks.push(updateDependencies(tree, schema));
@@ -1,7 +1,6 @@
1
1
  export interface InitGeneratorSchema {
2
2
  keepExistingVersions?: boolean;
3
3
  updatePackageScripts?: boolean;
4
- addPlugin?: boolean;
5
4
  skipFormat?: boolean;
6
5
  skipPackageJson?: boolean;
7
6
  }
@@ -0,0 +1,2 @@
1
+ import { type MigrationReturnObject, type Tree } from '@nx/devkit';
2
+ export default function update(tree: Tree): Promise<MigrationReturnObject>;
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const internal_1 = require("@nx/js/internal");
6
+ const add_build_plugin_1 = require("../../utils/add-build-plugin");
7
+ const CONFIG_EXTENSIONS = ['ts', 'mts', 'cts', 'js', 'mjs', 'cjs'];
8
+ const IMPORT_PATH = '@nx/rsbuild/ready-signal';
9
+ const PLUGIN_NAME = 'pluginNxReadySignal';
10
+ let tsModule;
11
+ async function update(tree) {
12
+ const skipped = [];
13
+ let changed = false;
14
+ for (const [projectName, project] of (0, devkit_1.getProjects)(tree)) {
15
+ for (const extension of CONFIG_EXTENSIONS) {
16
+ const configPath = (0, devkit_1.joinPathFragments)(project.root, `rsbuild.config.${extension}`);
17
+ if (!tree.exists(configPath))
18
+ continue;
19
+ const content = tree.read(configPath, 'utf-8');
20
+ if (content.includes('ready-signal') || content.includes(PLUGIN_NAME)) {
21
+ continue;
22
+ }
23
+ const reason = findUnsupportedShape(content);
24
+ if (reason) {
25
+ skipped.push(`${configPath} (project ${projectName}): ${reason}`);
26
+ continue;
27
+ }
28
+ try {
29
+ (0, add_build_plugin_1.addBuildPlugin)(tree, configPath, IMPORT_PATH, PLUGIN_NAME);
30
+ changed = true;
31
+ }
32
+ catch (error) {
33
+ skipped.push(`${configPath} (project ${projectName}): ${error.message}`);
34
+ }
35
+ }
36
+ }
37
+ if (changed) {
38
+ await (0, devkit_1.formatFiles)(tree);
39
+ }
40
+ if (!skipped.length) {
41
+ return { skipAgentic: true };
42
+ }
43
+ const message = `Add ${PLUGIN_NAME}() from '${IMPORT_PATH}' to the plugins of these Rsbuild configs so Nx can tell when their dev and preview servers are ready:\n${skipped
44
+ .map((entry) => `- ${entry}`)
45
+ .join('\n')}`;
46
+ devkit_1.logger.warn(message);
47
+ return {
48
+ nextSteps: [message],
49
+ agentContext: [
50
+ `Rsbuild configs left unchanged because the generator could not extend their plugins safely. Add \`import { ${PLUGIN_NAME} } from '${IMPORT_PATH}'\` and \`${PLUGIN_NAME}()\` to the plugins each one loads:`,
51
+ ...skipped,
52
+ ],
53
+ };
54
+ }
55
+ // addBuildPlugin splices an ESM import and defineConfig's own literal plugins
56
+ // array by text; every other shape goes to the prompt.
57
+ function findUnsupportedShape(content) {
58
+ tsModule ??= (0, internal_1.ensureTypescript)();
59
+ const sourceFile = tsModule.createSourceFile('rsbuild.config.ts', content, tsModule.ScriptTarget.Latest, true, tsModule.ScriptKind.TS);
60
+ if (sourceFile.parseDiagnostics?.length) {
61
+ return 'it has syntax errors';
62
+ }
63
+ if (content.includes('mergeRsbuildConfig')) {
64
+ return 'it merges a shared base config, which may already load the plugin';
65
+ }
66
+ const calls = findDefineConfigCalls(sourceFile);
67
+ if (calls.length !== 1) {
68
+ return calls.length
69
+ ? 'it calls defineConfig more than once'
70
+ : 'it does not call defineConfig';
71
+ }
72
+ const config = (0, add_build_plugin_1.findConfigObject)(calls[0].arguments[0]);
73
+ if (!config) {
74
+ return 'defineConfig is not called with an object literal, or a function with a single return of one';
75
+ }
76
+ if (!sourceFile.statements.some(tsModule.isImportDeclaration)) {
77
+ return 'it is a CommonJS module';
78
+ }
79
+ for (const property of config.properties) {
80
+ if (tsModule.isSpreadAssignment(property)) {
81
+ return 'it spreads another config into defineConfig';
82
+ }
83
+ if (getPropertyName(property) !== 'plugins')
84
+ continue;
85
+ if (!tsModule.isPropertyAssignment(property) ||
86
+ !tsModule.isIdentifier(property.name)) {
87
+ return 'its plugins option is not a plain property assignment';
88
+ }
89
+ const plugins = property.initializer;
90
+ if (!tsModule.isArrayLiteralExpression(plugins)) {
91
+ return 'its plugins option is not an array literal';
92
+ }
93
+ if (plugins.elements.some(tsModule.isSpreadElement)) {
94
+ return 'its plugins array spreads another list, which may already load the plugin';
95
+ }
96
+ const last = plugins.elements[plugins.elements.length - 1];
97
+ if (last && /\/\/|\/\*/.test(content.slice(last.end, plugins.end - 1))) {
98
+ return 'its plugins array ends with a comment';
99
+ }
100
+ }
101
+ return undefined;
102
+ }
103
+ function findDefineConfigCalls(sourceFile) {
104
+ const calls = [];
105
+ const visit = (node) => {
106
+ if (tsModule.isCallExpression(node) &&
107
+ tsModule.isIdentifier(node.expression) &&
108
+ node.expression.text === 'defineConfig') {
109
+ calls.push(node);
110
+ }
111
+ tsModule.forEachChild(node, visit);
112
+ };
113
+ visit(sourceFile);
114
+ return calls;
115
+ }
116
+ function getPropertyName(property) {
117
+ const name = property.name;
118
+ if (name &&
119
+ (tsModule.isIdentifier(name) ||
120
+ tsModule.isStringLiteral(name) ||
121
+ tsModule.isNoSubstitutionTemplateLiteral(name))) {
122
+ return name.text;
123
+ }
124
+ return undefined;
125
+ }
@@ -0,0 +1,38 @@
1
+ #### Add the Nx ready-signal plugin to Rsbuild configs
2
+
3
+ The `dev` and `preview` targets that `@nx/rsbuild` infers carry a `readyWhen` check, so a dependent task can wait until the server accepts requests. With `pluginNxReadySignal()` in the Rsbuild config, the server reports its address to Nx as soon as it listens, and the targets are inferred with `readyWhen: { "signal": true }`. Without it, Nx loads the config when the task runs and waits for the configured port instead.
4
+
5
+ New configs include the plugin. This migration adds it to each project's existing `rsbuild.config.{ts,mts,cts,js,mjs,cjs}` when the file calls `defineConfig` once with an object literal, or a function with a single `return` of one, whose `plugins` option is missing or a literal array. Configs that already reference the plugin are left alone.
6
+
7
+ Configs the migration can't edit safely stay untouched and are listed with the reason. That includes CommonJS modules, `mergeRsbuildConfig`, a spread into the config or its `plugins` array, a `plugins` value that isn't an array literal, a config factory without a single top-level `return`, and files with syntax errors. In an agentic run, an AI step adds the plugin to those.
8
+
9
+ #### Sample code changes
10
+
11
+ ##### Before
12
+
13
+ ```ts title="apps/app1/rsbuild.config.ts"
14
+ import { defineConfig } from '@rsbuild/core';
15
+ import { pluginReact } from '@rsbuild/plugin-react';
16
+
17
+ export default defineConfig({
18
+ plugins: [pluginReact()],
19
+ server: {
20
+ port: 4200,
21
+ },
22
+ });
23
+ ```
24
+
25
+ ##### After
26
+
27
+ ```ts title="apps/app1/rsbuild.config.ts"
28
+ import { pluginNxReadySignal } from '@nx/rsbuild/ready-signal';
29
+ import { defineConfig } from '@rsbuild/core';
30
+ import { pluginReact } from '@rsbuild/plugin-react';
31
+
32
+ export default defineConfig({
33
+ plugins: [pluginReact(), pluginNxReadySignal()],
34
+ server: {
35
+ port: 4200,
36
+ },
37
+ });
38
+ ```
@@ -0,0 +1,45 @@
1
+ # Add the Nx ready-signal plugin to the remaining Rsbuild configs
2
+
3
+ `pluginNxReadySignal()` from `@nx/rsbuild/ready-signal` reports the dev or preview
4
+ server's address to Nx once it listens. When a project's Rsbuild config loads it,
5
+ `@nx/rsbuild` infers `readyWhen: { "signal": true }` for the `dev` and `preview`
6
+ targets. Without it, Nx loads the config when the task runs and waits for the
7
+ configured port, which is slower and can pass early when Rsbuild moves to another port.
8
+
9
+ A generator ran first and added the plugin to every `rsbuild.config.*` it could edit
10
+ safely. The advisory context lists the configs it skipped, one per line with the
11
+ reason. Those configs are the whole scope: do not re-inventory the workspace and do not
12
+ touch configs that are not listed or that already reference `pluginNxReadySignal`. If
13
+ the list is empty, make no changes and stop.
14
+
15
+ ## Add the plugin to each listed config
16
+
17
+ 1. Add `import { pluginNxReadySignal } from '@nx/rsbuild/ready-signal';` next to the
18
+ other imports. In a CommonJS config use
19
+ `const { pluginNxReadySignal } = require('@nx/rsbuild/ready-signal');` instead.
20
+ 2. Add `pluginNxReadySignal()` once to the `plugins` the exported config ends up with.
21
+ - For a config merged from a shared base with `mergeRsbuildConfig` or a spread, first
22
+ check whether the base already loads the plugin. If it does, nothing is missing.
23
+ Otherwise add it to the base when every consumer is an Nx project, else to the
24
+ project's own `plugins`.
25
+ - When `plugins` is a variable, a conditional, or a function result, append the
26
+ plugin to the value that is actually used, keeping every branch.
27
+ - When `defineConfig` receives a function, add the plugin to the returned object.
28
+ - For a file with syntax errors, fix the error only when the intent is obvious,
29
+ then add the plugin. Otherwise report the file instead of guessing.
30
+ 3. Keep every existing plugin, its options, and the plugin order. Change nothing else.
31
+
32
+ ## Verify
33
+
34
+ For each project whose config changed, run
35
+ `NX_DAEMON=false npx nx show project <project-name> --json` and check that the dev
36
+ target's `readyWhen` is `{ "signal": true }`. The preview target gets the same value.
37
+ The target names come from the `devTargetName` and `previewTargetName` options of the
38
+ `@nx/rsbuild` registration in `nx.json`, `dev` and `preview` by default.
39
+
40
+ If `readyWhen` still names `@nx/rsbuild/ready-check`, the config does not load the
41
+ plugin: check the import path and that the call sits in the `plugins` the exported
42
+ config uses. A `readyWhen` set in `targetDefaults` or in the project configuration
43
+ replaces the inferred one; leave those alone.
44
+
45
+ Report the configs you changed and any you could not complete.
@@ -0,0 +1,4 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ export default function update(tree: Tree): Promise<{
3
+ skipAgentic: boolean;
4
+ }>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const internal_1 = require("@nx/js/internal");
6
+ async function update(tree) {
7
+ if (!(0, internal_1.registerTypescriptPluginForTypecheck)(tree, '@nx/rsbuild', {
8
+ removeTypecheckTargetName: true,
9
+ })) {
10
+ return { skipAgentic: true };
11
+ }
12
+ await (0, devkit_1.formatFiles)(tree);
13
+ }
@@ -0,0 +1,42 @@
1
+ #### Register `@nx/js/typescript` for typecheck targets
2
+
3
+ `@nx/rsbuild` no longer infers a `typecheck` target in any setup, and `@nx/js/typescript` provides it instead. This migration registers `@nx/js/typescript` with only its typecheck target when the workspace uses `@nx/rsbuild` and doesn't register `@nx/js/typescript` yet, so your projects keep a `typecheck` target.
4
+
5
+ The new registration is added before the framework plugin and reuses its `typecheckTargetName`, and the migration removes that option from the `@nx/rsbuild` registration. Registrations with `typecheckTargetName: false` lose the option without registering `@nx/js/typescript`.
6
+
7
+ #### Sample code changes
8
+
9
+ ##### Before
10
+
11
+ ```json title="nx.json"
12
+ {
13
+ "plugins": [
14
+ {
15
+ "plugin": "@nx/rsbuild",
16
+ "options": {
17
+ "buildTargetName": "build",
18
+ "typecheckTargetName": "typecheck"
19
+ }
20
+ }
21
+ ]
22
+ }
23
+ ```
24
+
25
+ ##### After
26
+
27
+ ```json title="nx.json"
28
+ {
29
+ "plugins": [
30
+ {
31
+ "plugin": "@nx/js/typescript",
32
+ "options": { "typecheck": { "targetName": "typecheck" } }
33
+ },
34
+ {
35
+ "plugin": "@nx/rsbuild",
36
+ "options": {
37
+ "buildTargetName": "build"
38
+ }
39
+ }
40
+ ]
41
+ }
42
+ ```
@@ -4,7 +4,6 @@ export interface RsbuildPluginOptions {
4
4
  devTargetName?: string;
5
5
  previewTargetName?: string;
6
6
  inspectTargetName?: string;
7
- typecheckTargetName?: string;
8
7
  buildDepsTargetName?: string;
9
8
  watchDepsTargetName?: string;
10
9
  }
@@ -7,7 +7,6 @@ const internal_2 = require("@nx/js/internal");
7
7
  const js_1 = require("@nx/js");
8
8
  const fs_1 = require("fs");
9
9
  const path_1 = require("path");
10
- const minimatch_1 = require("minimatch");
11
10
  const rsbuildConfigGlob = '**/rsbuild.config.{js,ts,mjs,mts,cjs,cts}';
12
11
  exports.createNodes = [
13
12
  rsbuildConfigGlob,
@@ -15,18 +14,17 @@ exports.createNodes = [
15
14
  const optionsHash = (0, internal_1.hashObject)(options);
16
15
  const cachePath = (0, path_1.join)(internal_1.workspaceDataDirectory, `rsbuild-${optionsHash}.hash`);
17
16
  const targetsCache = new internal_1.PluginCache(cachePath);
18
- const isUsingTsSolutionSetup = (0, internal_2.isUsingTsSolutionSetup)();
19
17
  const packageManager = (0, devkit_1.detectPackageManager)(context.workspaceRoot);
20
18
  const pmc = (0, devkit_1.getPackageManagerCommand)(packageManager);
21
19
  const lockFileName = (0, js_1.getLockFileName)(packageManager);
22
20
  const normalizedOptions = normalizeOptions(options);
23
21
  try {
24
22
  const { entries, preErrors } = await filterRsbuildConfigs(configFilePaths, context);
25
- const projectHashes = await (0, internal_1.calculateHashesForCreateNodes)(entries.map((e) => e.projectRoot), { ...normalizedOptions, isUsingTsSolutionSetup }, context, entries.map(() => [lockFileName]));
23
+ const projectHashes = await (0, internal_1.calculateHashesForCreateNodes)(entries.map((e) => e.projectRoot), normalizedOptions, context, entries.map(() => [lockFileName]));
26
24
  let results = [];
27
25
  let nodeErrors = [];
28
26
  try {
29
- results = await (0, devkit_1.createNodesFromFiles)((configFile, _, ctx, idx) => createNodesInternal(configFile, normalizedOptions, ctx, targetsCache, isUsingTsSolutionSetup, pmc, entries[idx].tsConfigFiles, projectHashes[idx]), entries.map((e) => e.configFile), options, context);
27
+ results = await (0, devkit_1.createNodesFromFiles)((configFile, _, ctx, idx) => createNodesInternal(configFile, normalizedOptions, ctx, targetsCache, pmc, projectHashes[idx]), entries.map((e) => e.configFile), options, context);
30
28
  }
31
29
  catch (e) {
32
30
  if (e instanceof devkit_1.AggregateCreateNodesError) {
@@ -52,10 +50,10 @@ exports.createNodes = [
52
50
  * @deprecated Use {@link createNodes} instead. This will be removed in Nx 24.
53
51
  */
54
52
  exports.createNodesV2 = exports.createNodes;
55
- async function createNodesInternal(configFilePath, normalizedOptions, context, targetsCache, isUsingTsSolutionSetup, pmc, tsConfigFiles, hash) {
53
+ async function createNodesInternal(configFilePath, normalizedOptions, context, targetsCache, pmc, hash) {
56
54
  const projectRoot = (0, path_1.dirname)(configFilePath);
57
55
  if (!targetsCache.has(hash)) {
58
- targetsCache.set(hash, await createRsbuildTargets(configFilePath, projectRoot, normalizedOptions, tsConfigFiles, isUsingTsSolutionSetup, context, pmc));
56
+ targetsCache.set(hash, await createRsbuildTargets(configFilePath, projectRoot, normalizedOptions, context, pmc));
59
57
  }
60
58
  const { targets, metadata } = targetsCache.get(hash);
61
59
  return {
@@ -68,7 +66,7 @@ async function createNodesInternal(configFilePath, normalizedOptions, context, t
68
66
  },
69
67
  };
70
68
  }
71
- async function createRsbuildTargets(configFilePath, projectRoot, options, tsConfigFiles, isUsingTsSolutionSetup, context, pmc) {
69
+ async function createRsbuildTargets(configFilePath, projectRoot, options, context, pmc) {
72
70
  const absoluteConfigFilePath = (0, devkit_1.joinPathFragments)(context.workspaceRoot, configFilePath);
73
71
  // Required lazily: `@rsbuild/core` is an optional peer dependency, so it
74
72
  // may be absent when the plugin is loaded in a workspace that doesn't use
@@ -113,6 +111,7 @@ async function createRsbuildTargets(configFilePath, projectRoot, options, tsConf
113
111
  },
114
112
  },
115
113
  };
114
+ const signals = await loadsReadySignalPlugin(rsbuildConfig.content.plugins);
116
115
  targets[options.devTargetName] = {
117
116
  continuous: true,
118
117
  inputs: [...buildInputs],
@@ -121,6 +120,7 @@ async function createRsbuildTargets(configFilePath, projectRoot, options, tsConf
121
120
  cwd: projectRoot,
122
121
  args: ['--mode=development'],
123
122
  },
123
+ readyWhen: getServerReadyWhen(configFilePath, 'dev', signals),
124
124
  };
125
125
  targets[options.previewTargetName] = {
126
126
  continuous: true,
@@ -131,6 +131,7 @@ async function createRsbuildTargets(configFilePath, projectRoot, options, tsConf
131
131
  cwd: projectRoot,
132
132
  args: ['--mode=production'],
133
133
  },
134
+ readyWhen: getServerReadyWhen(configFilePath, 'preview', signals),
134
135
  };
135
136
  targets[options.inspectTargetName] = {
136
137
  command: `rsbuild inspect`,
@@ -138,42 +139,6 @@ async function createRsbuildTargets(configFilePath, projectRoot, options, tsConf
138
139
  cwd: projectRoot,
139
140
  },
140
141
  };
141
- if (tsConfigFiles.length) {
142
- const tsConfigToUse = ['tsconfig.app.json', 'tsconfig.lib.json', 'tsconfig.json'].find((t) => tsConfigFiles.includes(t)) ?? tsConfigFiles[0];
143
- targets[options.typecheckTargetName] = {
144
- cache: true,
145
- inputs: [
146
- ...('production' in namedInputs
147
- ? ['production', '^production']
148
- : ['default', '^default']),
149
- { externalDependencies: ['typescript'] },
150
- ],
151
- command: isUsingTsSolutionSetup
152
- ? `tsc --build --emitDeclarationOnly`
153
- : `tsc -p ${tsConfigToUse} --noEmit`,
154
- options: { cwd: (0, devkit_1.joinPathFragments)(projectRoot) },
155
- metadata: {
156
- description: `Runs type-checking for the project.`,
157
- technologies: ['typescript'],
158
- help: {
159
- command: isUsingTsSolutionSetup
160
- ? `${pmc.exec} tsc --build --help`
161
- : `${pmc.exec} tsc -p ${tsConfigToUse} --help`,
162
- example: isUsingTsSolutionSetup
163
- ? { args: ['--force'] }
164
- : { options: { noEmit: true } },
165
- },
166
- },
167
- };
168
- if (isUsingTsSolutionSetup) {
169
- targets[options.typecheckTargetName].dependsOn = [
170
- `^${options.typecheckTargetName}`,
171
- ];
172
- targets[options.typecheckTargetName].syncGenerators = [
173
- '@nx/js:typescript-sync',
174
- ];
175
- }
176
- }
177
142
  (0, internal_2.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmc);
178
143
  return { targets, metadata: {} };
179
144
  }
@@ -221,8 +186,7 @@ async function filterRsbuildConfigs(configFiles, context) {
221
186
  !siblingFiles.includes('project.json')) {
222
187
  return null;
223
188
  }
224
- const tsConfigFiles = siblingFiles.filter((p) => (0, minimatch_1.minimatch)(p, 'tsconfig*{.json,.*.json}')) ?? [];
225
- return { configFile, projectRoot, tsConfigFiles };
189
+ return { configFile, projectRoot };
226
190
  }
227
191
  catch (e) {
228
192
  preErrors.push([configFile, e]);
@@ -240,6 +204,25 @@ function normalizeOptions(options) {
240
204
  options.devTargetName ??= 'dev';
241
205
  options.previewTargetName ??= 'preview';
242
206
  options.inspectTargetName ??= 'inspect';
243
- options.typecheckTargetName ??= 'typecheck';
244
207
  return options;
245
208
  }
209
+ // A config that loads pluginNxReadySignal() reports when the server listens.
210
+ // Otherwise the check loads the config when the task runs, with the task's
211
+ // env and options, and waits for the server's port.
212
+ function getServerReadyWhen(configFilePath, command, signals) {
213
+ return signals
214
+ ? { signal: true }
215
+ : (0, internal_1.getReadyCheckReadyWhen)('@nx/rsbuild/ready-check', (0, path_1.basename)(configFilePath), command);
216
+ }
217
+ // Rsbuild's plugins option nests arrays and promises, and allows falsy entries
218
+ async function loadsReadySignalPlugin(plugins) {
219
+ const plugin = await plugins;
220
+ if (Array.isArray(plugin)) {
221
+ for (const entry of plugin) {
222
+ if (await loadsReadySignalPlugin(entry))
223
+ return true;
224
+ }
225
+ return false;
226
+ }
227
+ return plugin?.name === 'nx:ready-signal';
228
+ }
@@ -1,4 +1,5 @@
1
1
  import { type Tree } from '@nx/devkit';
2
+ import type * as ts from 'typescript';
2
3
  /**
3
4
  * Adds a plugin to the build configuration.
4
5
  * @param tree - Nx Devkit Tree
@@ -8,3 +9,8 @@ import { type Tree } from '@nx/devkit';
8
9
  * @param options - Optional but should be defined as a string such as `property: {foo: 'bar'}`
9
10
  */
10
11
  export declare function addBuildPlugin(tree: Tree, pathToConfigFile: string, importPath: string, pluginName: string, options?: string): void;
12
+ /**
13
+ * The object `defineConfig` receives: directly, from `() => ({ ... })`, or from
14
+ * a function body with a single `return { ... }`.
15
+ */
16
+ export declare function findConfigObject(argument: ts.Expression | undefined): ts.ObjectLiteralExpression | undefined;
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addBuildPlugin = addBuildPlugin;
4
+ exports.findConfigObject = findConfigObject;
5
+ const internal_1 = require("@nx/js/internal");
4
6
  const tsquery_1 = require("@phenomnomnominal/tsquery");
5
7
  const indent_by_1 = require("./indent-by");
6
- const DEFINE_CONFIG_SELECTOR = 'CallExpression:has(Identifier[name=defineConfig]) > ObjectLiteralExpression';
7
- const PLUGINS_ARRAY_SELECTOR = 'CallExpression:has(Identifier[name=defineConfig]) PropertyAssignment:has(Identifier[name=plugins]) > ArrayLiteralExpression';
8
+ const DEFINE_CONFIG_CALL = 'CallExpression:has(Identifier[name=defineConfig])';
9
+ const PLUGINS_ARRAY_SELECTOR = `${DEFINE_CONFIG_CALL} PropertyAssignment:has(Identifier[name=plugins]) > ArrayLiteralExpression`;
8
10
  /**
9
11
  * Adds a plugin to the build configuration.
10
12
  * @param tree - Nx Devkit Tree
@@ -18,22 +20,69 @@ function addBuildPlugin(tree, pathToConfigFile, importPath, pluginName, options)
18
20
  configContents = `import { ${pluginName} } from '${importPath}';
19
21
  ${configContents}`;
20
22
  const sourceFile = (0, tsquery_1.ast)(configContents);
21
- const pluginsArrayNodes = (0, tsquery_1.query)(sourceFile, PLUGINS_ARRAY_SELECTOR);
22
- if (pluginsArrayNodes.length === 0) {
23
- const defineConfigNodes = (0, tsquery_1.query)(sourceFile, DEFINE_CONFIG_SELECTOR);
24
- if (defineConfigNodes.length === 0) {
25
- throw new Error(`Could not find defineConfig in the config file at ${pathToConfigFile}.`);
26
- }
27
- const defineConfigNode = defineConfigNodes[0];
28
- configContents = `${configContents.slice(0, defineConfigNode.getStart() + 1)}\n${(0, indent_by_1.indentBy)(1)(`plugins: [${pluginName}(${options ?? ''})],`)}\n\t${configContents.slice(defineConfigNode.getStart() + 1)}`;
23
+ const configObject = (0, tsquery_1.query)(sourceFile, DEFINE_CONFIG_CALL)
24
+ .map((call) => findConfigObject(call.arguments[0]))
25
+ .find(Boolean);
26
+ if (!configObject) {
27
+ throw new Error(`Could not find defineConfig in the config file at ${pathToConfigFile}.`);
28
+ }
29
+ // The selector also matches nested arrays such as tools.rspack.plugins.
30
+ const pluginsArrayNode = (0, tsquery_1.query)(sourceFile, PLUGINS_ARRAY_SELECTOR).find((node) => node.parent.parent === configObject);
31
+ if (!pluginsArrayNode) {
32
+ configContents = `${configContents.slice(0, configObject.getStart() + 1)}\n${(0, indent_by_1.indentBy)(1)(`plugins: [${pluginName}(${options ?? ''})],`)}\n\t${configContents.slice(configObject.getStart() + 1)}`;
29
33
  }
30
34
  else {
31
- const pluginsArrayNode = pluginsArrayNodes[0];
32
- const pluginsArrayContents = pluginsArrayNode.getText();
33
- const newPluginsArrayContents = `[\n${(0, indent_by_1.indentBy)(2)(`${pluginsArrayContents.length > 2
34
- ? `${pluginsArrayContents.slice(1, pluginsArrayContents.length - 1)},\n${pluginName}`
35
- : pluginName}(${options ? `{\n${(0, indent_by_1.indentBy)(1)(`${options}`)}\n}` : ''})`)}\n\t]`;
35
+ // Without this, a prettier-style trailing comma leaves an array hole.
36
+ const existingPlugins = pluginsArrayNode
37
+ .getText()
38
+ .slice(1, -1)
39
+ .trim()
40
+ .replace(/,$/, '');
41
+ const newPluginsArrayContents = `[\n${(0, indent_by_1.indentBy)(2)(`${existingPlugins ? `${existingPlugins},\n${pluginName}` : pluginName}(${options ? `{\n${(0, indent_by_1.indentBy)(1)(`${options}`)}\n}` : ''})`)}\n\t]`;
36
42
  configContents = `${configContents.slice(0, pluginsArrayNode.getStart())}${newPluginsArrayContents}${configContents.slice(pluginsArrayNode.getEnd())}`;
37
43
  }
38
44
  tree.write(pathToConfigFile, configContents);
39
45
  }
46
+ /**
47
+ * The object `defineConfig` receives: directly, from `() => ({ ... })`, or from
48
+ * a function body with a single `return { ... }`.
49
+ */
50
+ function findConfigObject(argument) {
51
+ const tsModule = (0, internal_1.ensureTypescript)();
52
+ if (!argument)
53
+ return undefined;
54
+ if (tsModule.isObjectLiteralExpression(argument))
55
+ return argument;
56
+ if (!tsModule.isArrowFunction(argument) &&
57
+ !tsModule.isFunctionExpression(argument)) {
58
+ return undefined;
59
+ }
60
+ const body = argument.body;
61
+ if (tsModule.isParenthesizedExpression(body) &&
62
+ tsModule.isObjectLiteralExpression(body.expression)) {
63
+ return body.expression;
64
+ }
65
+ if (!tsModule.isBlock(body))
66
+ return undefined;
67
+ const returns = findReturns(tsModule, body);
68
+ const [only] = returns;
69
+ return returns.length === 1 &&
70
+ only.parent === body &&
71
+ only.expression &&
72
+ tsModule.isObjectLiteralExpression(only.expression)
73
+ ? only.expression
74
+ : undefined;
75
+ }
76
+ // Return statements of this function, not of functions nested in it
77
+ function findReturns(tsModule, node) {
78
+ const returns = [];
79
+ const visit = (child) => {
80
+ if (tsModule.isReturnStatement(child))
81
+ returns.push(child);
82
+ if (tsModule.isFunctionLike(child))
83
+ return;
84
+ tsModule.forEachChild(child, visit);
85
+ };
86
+ tsModule.forEachChild(node, visit);
87
+ return returns;
88
+ }
@@ -0,0 +1,29 @@
1
+ import { type ServerAddress } from '@nx/devkit/internal';
2
+ /** The options the Rsbuild CLI reads, typed as its parsers may set them. */
3
+ export interface RsbuildFlags {
4
+ port?: unknown;
5
+ host?: unknown;
6
+ envMode?: string;
7
+ envDir?: string;
8
+ config?: string;
9
+ configLoader?: string;
10
+ root?: string;
11
+ env?: boolean;
12
+ }
13
+ /**
14
+ * The flags `rsbuild dev` and `rsbuild preview` of Rsbuild `version` get from
15
+ * the task's options, as run-commands forwards them, read the way that CLI
16
+ * reads them.
17
+ */
18
+ export declare function parseRsbuildFlags(options: Record<string, unknown>, version: string): RsbuildFlags;
19
+ export declare function getRsbuildServerAddress(server: {
20
+ port?: unknown;
21
+ host?: unknown;
22
+ }): ServerAddress | null;
23
+ /**
24
+ * The readyWhen of the inferred dev and preview targets when the config doesn't
25
+ * load the signal plugin. Runs in the env and with the options of the task,
26
+ * resolves the config the way the Rsbuild CLI does, plugins included, and
27
+ * waits for the server's port.
28
+ */
29
+ export declare function waitForRsbuildServer(configPath: string, command: 'dev' | 'preview'): Promise<void>;
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseRsbuildFlags = parseRsbuildFlags;
4
+ exports.getRsbuildServerAddress = getRsbuildServerAddress;
5
+ exports.waitForRsbuildServer = waitForRsbuildServer;
6
+ const internal_1 = require("@nx/devkit/internal");
7
+ const path_1 = require("path");
8
+ const semver_1 = require("semver");
9
+ const COMMANDER_OPTIONS = [
10
+ '-c --config <config>',
11
+ '-r --root <root>',
12
+ '-m --mode <mode>',
13
+ '--env-mode <mode>',
14
+ '--environment <name>',
15
+ '--env-dir <dir>',
16
+ '-o --open [url]',
17
+ '--port <port>',
18
+ '--host <host>',
19
+ ];
20
+ /**
21
+ * The flags `rsbuild dev` and `rsbuild preview` of Rsbuild `version` get from
22
+ * the task's options, as run-commands forwards them, read the way that CLI
23
+ * reads them.
24
+ */
25
+ function parseRsbuildFlags(options, version) {
26
+ const args = (0, internal_1.getForwardedArgs)(options);
27
+ // cac replaced commander in 1.2.0-alpha.0
28
+ const parsed = (0, semver_1.lt)(version, '1.2.0-alpha.0')
29
+ ? (0, internal_1.parseCommanderArgs)(args, COMMANDER_OPTIONS)
30
+ : (0, internal_1.parseCacArgs)(args, {
31
+ aliases: { c: 'config', m: 'mode', o: 'open', r: 'root' },
32
+ booleans: ['env'],
33
+ });
34
+ const { port, host, envMode, envDir, config, configLoader, root, env } = parsed;
35
+ return {
36
+ port,
37
+ // 1.x applies the host only when it is truthy
38
+ host: (0, semver_1.major)(version) === 1 ? host || undefined : host,
39
+ envMode,
40
+ envDir,
41
+ config,
42
+ configLoader,
43
+ root,
44
+ // 1.3.3 added --no-env
45
+ env: (0, semver_1.lt)(version, '1.3.3') ? undefined : env,
46
+ };
47
+ }
48
+ function getRsbuildServerAddress(server) {
49
+ return (0, internal_1.getServerAddress)(server.port, server.host);
50
+ }
51
+ /**
52
+ * The readyWhen of the inferred dev and preview targets when the config doesn't
53
+ * load the signal plugin. Runs in the env and with the options of the task,
54
+ * resolves the config the way the Rsbuild CLI does, plugins included, and
55
+ * waits for the server's port.
56
+ */
57
+ async function waitForRsbuildServer(configPath, command) {
58
+ await (0, internal_1.runReadyCheck)(async ({ options, root: cwd }) => {
59
+ const { createRsbuild, loadConfig, loadEnv, version } = require('@rsbuild/core');
60
+ const flags = parseRsbuildFlags(options, version);
61
+ const root = flags.root ? (0, path_1.resolve)(cwd, flags.root) : cwd;
62
+ // The CLI sets NODE_ENV first, then loads the env files for that mode and
63
+ // the config, whose function form reads the command from argv
64
+ process.env.NODE_ENV ||= command === 'dev' ? 'development' : 'production';
65
+ const envs = flags.env === false
66
+ ? null
67
+ : loadEnv({
68
+ cwd: flags.envDir ? (0, path_1.resolve)(root, flags.envDir) : root,
69
+ mode: flags.envMode,
70
+ });
71
+ process.argv[2] = command;
72
+ const { content: config } = await loadConfig({
73
+ cwd: root,
74
+ // configPath is the config the CLI finds in the task's cwd, not in --root
75
+ path: flags.config ?? (flags.root ? undefined : configPath),
76
+ envMode: flags.envMode,
77
+ loader: flags.configLoader,
78
+ });
79
+ if (envs) {
80
+ config.source ??= {};
81
+ config.source.define = { ...envs.publicVars, ...config.source.define };
82
+ }
83
+ config.server ??= {};
84
+ if (flags.host !== undefined)
85
+ config.server.host = flags.host;
86
+ if (flags.port)
87
+ config.server.port = flags.port;
88
+ // Rsbuild 1.0 takes the config only as rsbuildConfig
89
+ const rsbuild = await createRsbuild({ cwd: root, rsbuildConfig: config });
90
+ let server = config.server;
91
+ try {
92
+ await rsbuild.initConfigs({ action: command });
93
+ server = rsbuild.getNormalizedConfig().server;
94
+ }
95
+ catch (e) {
96
+ // The preview CLI normalizes the config without generating bundler configs,
97
+ // so a plugin hook that throws there doesn't fail `rsbuild preview`
98
+ if (command === 'dev')
99
+ throw e;
100
+ }
101
+ const address = getRsbuildServerAddress(server);
102
+ return address ? [address] : null;
103
+ });
104
+ }
@@ -1,2 +1,2 @@
1
1
  import { type Tree } from '@nx/devkit';
2
- export declare function getRsbuildE2EWebServerInfo(tree: Tree, projectName: string, configFilePath: string, isPluginBeingAdded: boolean, e2ePortOverride?: number): Promise<import("@nx/devkit/internal").E2EWebServerDetails>;
2
+ export declare function getRsbuildE2EWebServerInfo(tree: Tree, projectName: string, configFilePath: string, e2ePortOverride?: number): Promise<import("@nx/devkit/internal").E2EWebServerDetails>;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRsbuildE2EWebServerInfo = getRsbuildE2EWebServerInfo;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const internal_1 = require("@nx/devkit/internal");
6
- async function getRsbuildE2EWebServerInfo(tree, projectName, configFilePath, isPluginBeingAdded, e2ePortOverride) {
6
+ async function getRsbuildE2EWebServerInfo(tree, projectName, configFilePath, e2ePortOverride) {
7
7
  const nxJson = (0, devkit_1.readNxJson)(tree);
8
8
  let e2ePort = e2ePortOverride ?? 4200;
9
9
  const devPort = (0, internal_1.readTargetDefaultsForTarget)('dev', nxJson.targetDefaults)
@@ -22,5 +22,5 @@ async function getRsbuildE2EWebServerInfo(tree, projectName, configFilePath, isP
22
22
  defaultE2EWebServerAddress: `http://localhost:${e2ePort}`,
23
23
  defaultE2ECiBaseUrl: `http://localhost:${e2ePort}`,
24
24
  defaultE2EPort: e2ePort,
25
- }, isPluginBeingAdded);
25
+ });
26
26
  }
@@ -0,0 +1,6 @@
1
+ import type { RsbuildPlugin } from '@rsbuild/core';
2
+ /**
3
+ * Reports the dev or preview server's address to an Nx task whose readyWhen
4
+ * is `signal`, once the server listens. Does nothing outside such a task.
5
+ */
6
+ export declare function pluginNxReadySignal(): RsbuildPlugin;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pluginNxReadySignal = pluginNxReadySignal;
4
+ const net_1 = require("net");
5
+ /**
6
+ * Reports the dev or preview server's address to an Nx task whose readyWhen
7
+ * is `signal`, once the server listens. Does nothing outside such a task.
8
+ */
9
+ function pluginNxReadySignal() {
10
+ return {
11
+ name: 'nx:ready-signal',
12
+ setup(api) {
13
+ if (!process.env.NX_READY_SIGNAL_SOCKET) {
14
+ return;
15
+ }
16
+ const { emitReadySignal } = require('@nx/devkit');
17
+ const report = ({ port }) => {
18
+ const { https, host } = api.getNormalizedConfig().server;
19
+ emitReadySignal(`${https ? 'https' : 'http'}://${getUrlHost(host)}:${port}/`);
20
+ };
21
+ api.onAfterStartDevServer(report);
22
+ // Rsbuild 1 names the preview hook onAfterStartProdServer
23
+ const onAfterStartPreviewServer = api.onAfterStartPreviewServer ??
24
+ api.onAfterStartProdServer;
25
+ onAfterStartPreviewServer(report);
26
+ },
27
+ };
28
+ }
29
+ function getUrlHost(host) {
30
+ if (!host || host === '0.0.0.0' || host === '::') {
31
+ return 'localhost';
32
+ }
33
+ return (0, net_1.isIPv6)(host) ? `[${host}]` : host;
34
+ }
package/migrations.json CHANGED
@@ -32,6 +32,19 @@
32
32
  "requires": {
33
33
  "@rsbuild/core": ">=2.0.0"
34
34
  }
35
+ },
36
+ "update-24-0-0-register-typescript-plugin-for-typecheck": {
37
+ "version": "24.0.0-beta.3",
38
+ "description": "Register @nx/js/typescript with its typecheck target in workspaces that use @nx/rsbuild without it, and remove the typecheckTargetName option from @nx/rsbuild, since @nx/rsbuild no longer infers typecheck targets.",
39
+ "implementation": "./dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck",
40
+ "documentation": "./dist/src/migrations/update-24-0-0/register-typescript-plugin-for-typecheck.md"
41
+ },
42
+ "update-24-0-0-add-ready-signal-plugin": {
43
+ "version": "24.0.0-beta.5",
44
+ "description": "Adds `pluginNxReadySignal()` from `@nx/rsbuild/ready-signal` to existing Rsbuild configs so the inferred dev and preview targets report readiness once the server listens. Configs the generator cannot edit safely are completed by an AI prompt.",
45
+ "implementation": "./dist/src/migrations/update-24-0-0/add-ready-signal-plugin",
46
+ "prompt": "./dist/src/migrations/update-24-0-0/finish-ready-signal-plugin.md",
47
+ "documentation": "./dist/src/migrations/update-24-0-0/add-ready-signal-plugin.md"
35
48
  }
36
49
  },
37
50
  "packageJsonUpdates": {
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": "24.0.0-pr.37405.acdaf31",
4
+ "version": "24.0.0-rc.0",
5
5
  "type": "commonjs",
6
6
  "files": [
7
7
  "dist",
@@ -47,6 +47,12 @@
47
47
  ],
48
48
  "src/*.js": [
49
49
  "dist/src/*.d.ts"
50
+ ],
51
+ "ready-check": [
52
+ "dist/ready-check.d.ts"
53
+ ],
54
+ "ready-signal": [
55
+ "dist/ready-signal.d.ts"
50
56
  ]
51
57
  }
52
58
  },
@@ -54,14 +60,14 @@
54
60
  "executors": "./executors.json",
55
61
  "dependencies": {
56
62
  "tslib": "^2.3.0",
57
- "@nx/devkit": "24.0.0-pr.37405.acdaf31",
58
- "@nx/js": "24.0.0-pr.37405.acdaf31",
63
+ "@nx/devkit": "24.0.0-rc.0",
64
+ "@nx/js": "24.0.0-rc.0",
59
65
  "minimatch": "10.2.5",
60
66
  "semver": "^7.6.3",
61
67
  "@phenomnomnominal/tsquery": "~6.2.0"
62
68
  },
63
69
  "devDependencies": {
64
- "nx": "24.0.0-pr.37405.acdaf31"
70
+ "nx": "24.0.0-rc.0"
65
71
  },
66
72
  "peerDependencies": {
67
73
  "@rsbuild/core": "^1.0.0 || ^2.0.0"
@@ -97,6 +103,16 @@
97
103
  "types": "./dist/config-utils.d.ts",
98
104
  "default": "./dist/config-utils.js"
99
105
  },
106
+ "./ready-check": {
107
+ "@nx/nx-source": "./ready-check.ts",
108
+ "types": "./dist/ready-check.d.ts",
109
+ "default": "./dist/ready-check.js"
110
+ },
111
+ "./ready-signal": {
112
+ "@nx/nx-source": "./ready-signal.ts",
113
+ "types": "./dist/ready-signal.d.ts",
114
+ "default": "./dist/ready-signal.js"
115
+ },
100
116
  "./src/*": {
101
117
  "@nx/nx-source": "./src/*.ts",
102
118
  "types": "./dist/src/*.d.ts",