From 2f715f01c771e251d8f1394959ce8bc94f792c5d Mon Sep 17 00:00:00 2001 From: Jiahan Chen Date: Tue, 1 Sep 2026 10:56:23 +0800 Subject: [PATCH 01/13] feat(fmt): display millisecond durations (#439) --- packages/rstack/src/fmt/cli.ts | 51 +++++----------------- packages/rstack/src/fmt/duration.ts | 34 +++++++++++++++ packages/rstack/tests/cli/fmt/helpers.ts | 5 ++- packages/rstack/tests/fmt/duration.test.ts | 19 ++++++++ 4 files changed, 69 insertions(+), 40 deletions(-) create mode 100644 packages/rstack/src/fmt/duration.ts create mode 100644 packages/rstack/tests/fmt/duration.test.ts diff --git a/packages/rstack/src/fmt/cli.ts b/packages/rstack/src/fmt/cli.ts index ed61c36b..40518c0f 100644 --- a/packages/rstack/src/fmt/cli.ts +++ b/packages/rstack/src/fmt/cli.ts @@ -8,6 +8,7 @@ import { ensureProjectCacheDir } from '../projectCache.ts'; import { fmtCacheFileName } from './cacheStore.ts'; import { resolveFmtConfig } from './config.ts'; import { discoverFmtFiles } from './discovery.ts'; +import { formatDuration } from './duration.ts'; import { createRelativePathResolver, toPosixPath } from './pathHelpers.ts'; import { runFmtFiles } from './runner.ts'; import type { FmtMode, FmtRunResult, ResolvedFmtConfig } from './types.ts'; @@ -157,35 +158,6 @@ const createDisplayPathResolver = ( return (filePath) => toPosixPath(resolveRelativePath(filePath)); }; -const prettyTime = (seconds: number): string => { - const format = (time: string, unit: 'm' | 's') => - color.bold(`${time}${unit}`); - - if (seconds < 10) { - const digits = seconds >= 0.01 ? 2 : 3; - return format(seconds.toFixed(digits), 's'); - } - - if (seconds < 60) { - return format(seconds.toFixed(1), 's'); - } - - const minutes = Math.floor(seconds / 60); - const minutesLabel = format(minutes.toFixed(0), 'm'); - const remainingSeconds = seconds % 60; - - if (remainingSeconds === 0) { - return minutesLabel; - } - - const secondsLabel = format( - remainingSeconds.toFixed(remainingSeconds % 1 === 0 ? 0 : 1), - 's', - ); - - return `${minutesLabel} ${secondsLabel}`; -}; - const formatCount = (count: number): string => color.bold(count); const formatFileCount = (count: number, isError = false): string => { const formattedCount = formatCount(count); @@ -207,7 +179,7 @@ const logFmtResult = ( mode: FmtMode, cwd: string, processedFileCount: number, - durationSeconds: number, + durationMilliseconds: number, fixCommand?: string, ): void => { let writtenCount = 0; @@ -229,13 +201,18 @@ const logFmtResult = ( } } + if (mode === 'list-different') { + return; + } + + const time = color.bold(formatDuration(durationMilliseconds)); + if (mode === 'write') { if (writtenCount === 0 && result.exitCode !== 0) { return; } const processedFiles = formatFileCount(processedFileCount); - const time = prettyTime(durationSeconds); const message = writtenCount > 0 ? `Formatted ${formatCount(writtenCount)} of ${processedFiles} in ${time}.` @@ -244,10 +221,6 @@ const logFmtResult = ( return; } - if (mode !== 'check') { - return; - } - if (differentCount > 0) { const differentFiles = formatFileCount(differentCount, true); const processedFiles = formatFileCount(processedFileCount); @@ -255,10 +228,10 @@ const logFmtResult = ( ? `Run ${color.cyan(fixCommand)} to fix.` : `Rerun this command without ${color.cyan('--check')} to fix.`; logger.error(`Formatting issues found in ${differentFiles}. ${fixHint}`); - logger.info(`Checked ${processedFiles} in ${prettyTime(durationSeconds)}.`); + logger.info(`Checked ${processedFiles} in ${time}.`); } else if (result.exitCode === 0) { logger.success( - `Checked ${formatFileCount(processedFileCount)} in ${prettyTime(durationSeconds)}. No issues found.`, + `Checked ${formatFileCount(processedFileCount)} in ${time}. No issues found.`, ); } }; @@ -415,13 +388,13 @@ const runFmtCLI = async ( return; } - const durationSeconds = (performance.now() - startTime) / 1000; + const durationMilliseconds = performance.now() - startTime; logFmtResult( result, mode, cwd, result.processedFileCount, - durationSeconds, + durationMilliseconds, fixCommand, ); process.exitCode = result.exitCode; diff --git a/packages/rstack/src/fmt/duration.ts b/packages/rstack/src/fmt/duration.ts new file mode 100644 index 00000000..c093fab0 --- /dev/null +++ b/packages/rstack/src/fmt/duration.ts @@ -0,0 +1,34 @@ +/** Formats sub-second durations in milliseconds and preserves the existing longer-duration format. */ +const formatDuration = (milliseconds: number): string => { + if (milliseconds < 1) { + return '<1ms'; + } + + const roundedMilliseconds = Math.round(milliseconds); + if (roundedMilliseconds < 1000) { + return `${roundedMilliseconds}ms`; + } + + const seconds = milliseconds / 1000; + if (seconds < 10) { + return `${seconds.toFixed(2)}s`; + } + + if (seconds < 60) { + return `${seconds.toFixed(1)}s`; + } + + const minutes = Math.floor(seconds / 60); + const remainingSeconds = seconds % 60; + + if (remainingSeconds === 0) { + return `${minutes}m`; + } + + const secondsLabel = remainingSeconds.toFixed( + remainingSeconds % 1 === 0 ? 0 : 1, + ); + return `${minutes}m ${secondsLabel}s`; +}; + +export { formatDuration }; diff --git a/packages/rstack/tests/cli/fmt/helpers.ts b/packages/rstack/tests/cli/fmt/helpers.ts index d3b62229..5086ce5d 100644 --- a/packages/rstack/tests/cli/fmt/helpers.ts +++ b/packages/rstack/tests/cli/fmt/helpers.ts @@ -42,7 +42,10 @@ export const createCliEnv = (): NodeJS.ProcessEnv => { }; export const normalizeDuration = (output: string): string => - output.replace(/\d+m(?: \d+(?:\.\d+)?s)?|\d+(?:\.\d+)?s/g, ''); + output.replace( + /<1ms|\d+ms|\d+m(?: \d+(?:\.\d+)?s)?|\d+(?:\.\d+)?s/g, + '', + ); export const expectWriteSummary = ( output: string, diff --git a/packages/rstack/tests/fmt/duration.test.ts b/packages/rstack/tests/fmt/duration.test.ts new file mode 100644 index 00000000..ad208cbf --- /dev/null +++ b/packages/rstack/tests/fmt/duration.test.ts @@ -0,0 +1,19 @@ +import { expect, test } from 'rstack/test'; +import { formatDuration } from '../../src/fmt/duration.ts'; + +test.each([ + [0, '<1ms'], + [0.999, '<1ms'], + [1, '1ms'], + [29.6, '30ms'], + [999.4, '999ms'], + [999.6, '1.00s'], + [1_390, '1.39s'], + [1_234, '1.23s'], + [12_340, '12.3s'], + [60_000, '1m'], + [60_123, '1m 0.1s'], + [3_661_234, '61m 1.2s'], +] as const)('formats %sms as %s', (milliseconds, expected) => { + expect(formatDuration(milliseconds)).toBe(expected); +}); From 274662ac7fff9cfd2142acd3942befb773dbda0e Mon Sep 17 00:00:00 2001 From: Jiahan Chen Date: Tue, 1 Sep 2026 12:58:33 +0800 Subject: [PATCH 02/13] feat(fmt): align successful format check output (#440) --- packages/rstack/src/fmt/cli.ts | 7 +++---- packages/rstack/tests/cli/check.test.ts | 2 +- packages/rstack/tests/cli/fmt/files.test.ts | 2 +- packages/rstack/tests/cli/fmt/patterns.test.ts | 5 +++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/rstack/src/fmt/cli.ts b/packages/rstack/src/fmt/cli.ts index 40518c0f..a2c90160 100644 --- a/packages/rstack/src/fmt/cli.ts +++ b/packages/rstack/src/fmt/cli.ts @@ -205,7 +205,7 @@ const logFmtResult = ( return; } - const time = color.bold(formatDuration(durationMilliseconds)); + const time = formatDuration(durationMilliseconds); if (mode === 'write') { if (writtenCount === 0 && result.exitCode !== 0) { @@ -230,9 +230,8 @@ const logFmtResult = ( logger.error(`Formatting issues found in ${differentFiles}. ${fixHint}`); logger.info(`Checked ${processedFiles} in ${time}.`); } else if (result.exitCode === 0) { - logger.success( - `Checked ${formatFileCount(processedFileCount)} in ${time}. No issues found.`, - ); + const files = `${processedFileCount} ${processedFileCount === 1 ? 'file' : 'files'}`; + logger.success(`Format check passed in ${time} ${color.dim(`(${files})`)}`); } }; diff --git a/packages/rstack/tests/cli/check.test.ts b/packages/rstack/tests/cli/check.test.ts index 3d9fce78..f764457f 100644 --- a/packages/rstack/tests/cli/check.test.ts +++ b/packages/rstack/tests/cli/check.test.ts @@ -44,7 +44,7 @@ test('runs lint followed by a formatting check', () => { const formatted = runCheck(); expect(formatted.status).toBe(0); - expect(formatted.stdout).toContain('No issues found.'); + expect(formatted.stdout).toContain('Format check passed in'); expect(formatted.stderr).toBe(''); }); diff --git a/packages/rstack/tests/cli/fmt/files.test.ts b/packages/rstack/tests/cli/fmt/files.test.ts index 47208688..569a95c9 100644 --- a/packages/rstack/tests/cli/fmt/files.test.ts +++ b/packages/rstack/tests/cli/fmt/files.test.ts @@ -117,7 +117,7 @@ test('checks formatting without writing files', () => { expect(formattedResult.status).toBe(0); expect(normalizeDuration(formattedResult.stdout)).toBe( - 'start Checking formatting...\nsuccess Checked 1 file in . No issues found.\n', + 'start Checking formatting...\nsuccess Format check passed in (1 file)\n', ); expect(formattedResult.stderr).toBe(''); }); diff --git a/packages/rstack/tests/cli/fmt/patterns.test.ts b/packages/rstack/tests/cli/fmt/patterns.test.ts index b87eee16..106baf07 100644 --- a/packages/rstack/tests/cli/fmt/patterns.test.ts +++ b/packages/rstack/tests/cli/fmt/patterns.test.ts @@ -33,13 +33,14 @@ test('allows no files to match with --no-error-on-unmatched-pattern', () => { test('counts only supported files', () => { writeProjectFile('index.ts', 'const value = 1;\n'); + writeProjectFile('other.ts', 'const other = 2;\n'); writeProjectFile('notes.unknown', 'plain text'); - const result = runFmt(['--check', 'index.ts', 'notes.unknown']); + const result = runFmt(['--check', 'index.ts', 'other.ts', 'notes.unknown']); expect(result.status).toBe(0); expect(normalizeDuration(result.stdout)).toBe( - 'start Checking formatting...\nsuccess Checked 1 file in . No issues found.\n', + 'start Checking formatting...\nsuccess Format check passed in (2 files)\n', ); expect(result.stderr).toBe(''); }); From 7c8df06557f63c46352c32b7f32a52bdde6e7434 Mon Sep 17 00:00:00 2001 From: Jiahan Chen Date: Tue, 1 Sep 2026 13:20:38 +0800 Subject: [PATCH 03/13] feat(fmt): align successful format write output (#441) --- packages/rstack/src/fmt/cli.ts | 20 +++++++++++++++----- packages/rstack/tests/cli/fmt/helpers.ts | 8 ++++---- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/packages/rstack/src/fmt/cli.ts b/packages/rstack/src/fmt/cli.ts index a2c90160..62885ca3 100644 --- a/packages/rstack/src/fmt/cli.ts +++ b/packages/rstack/src/fmt/cli.ts @@ -212,12 +212,22 @@ const logFmtResult = ( return; } + if (result.exitCode === 0) { + const files = `${processedFileCount} ${processedFileCount === 1 ? 'file' : 'files'}`; + const details = + writtenCount > 0 + ? `${files}, ${writtenCount} formatted` + : `${files}, no changes`; + logger.success( + `Formatting completed in ${time} ${color.dim(`(${details})`)}`, + ); + return; + } + const processedFiles = formatFileCount(processedFileCount); - const message = - writtenCount > 0 - ? `Formatted ${formatCount(writtenCount)} of ${processedFiles} in ${time}.` - : `Checked ${processedFiles} in ${time}. No changes needed.`; - logger[result.exitCode === 0 ? 'success' : 'info'](message); + logger.info( + `Formatted ${formatCount(writtenCount)} of ${processedFiles} in ${time}.`, + ); return; } diff --git a/packages/rstack/tests/cli/fmt/helpers.ts b/packages/rstack/tests/cli/fmt/helpers.ts index 5086ce5d..f1163490 100644 --- a/packages/rstack/tests/cli/fmt/helpers.ts +++ b/packages/rstack/tests/cli/fmt/helpers.ts @@ -53,11 +53,11 @@ export const expectWriteSummary = ( writtenCount: number, ): void => { const files = matchedFileCount === 1 ? 'file' : 'files'; - const message = writtenCount - ? `Formatted ${writtenCount} of ${matchedFileCount} ${files} in .` - : `Checked ${matchedFileCount} ${files} in . No changes needed.`; + const details = writtenCount + ? `${matchedFileCount} ${files}, ${writtenCount} formatted` + : `${matchedFileCount} ${files}, no changes`; expect(normalizeDuration(output)).toBe( - `start Formatting...\nsuccess ${message}\n`, + `start Formatting...\nsuccess Formatting completed in (${details})\n`, ); }; From ea862b34357af3b279918b3f362808f13a07fa2f Mon Sep 17 00:00:00 2001 From: Jiahan Chen Date: Wed, 2 Sep 2026 10:43:11 +0800 Subject: [PATCH 04/13] docs: simplify Rstack CLI agent guidance (#443) --- packages/create-rstack/template-common/AGENTS.md | 8 ++++---- website/docs/en/guide/ai.mdx | 8 ++++---- website/docs/zh/guide/ai.mdx | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/create-rstack/template-common/AGENTS.md b/packages/create-rstack/template-common/AGENTS.md index 6f0dd873..65bddf7c 100644 --- a/packages/create-rstack/template-common/AGENTS.md +++ b/packages/create-rstack/template-common/AGENTS.md @@ -1,7 +1,7 @@ # AGENTS.md -This project uses Rstack CLI as its JavaScript toolchain. +This project uses Rstack CLI as its JS toolchain: -- Before working with `rs` commands, `rstack.config.*` files, or imports from `rstack`, start with `node_modules/rstack/docs/llms.txt`, then read only the linked pages relevant to the task. -- For command details, use `rs -h` or `rs -h`. -- If the local documentation is unavailable, use https://rstack.rs/llms.txt and `rs -h`. +- Read the docs linked from `node_modules/rstack/docs/llms.txt` when needed +- Online docs: https://rstack.rs/llms.txt +- Run `rs -h` for CLI help diff --git a/website/docs/en/guide/ai.mdx b/website/docs/en/guide/ai.mdx index fbcf160c..e155b3ab 100644 --- a/website/docs/en/guide/ai.mdx +++ b/website/docs/en/guide/ai.mdx @@ -20,11 +20,11 @@ Projects created with [create-rstack](https://www.npmjs.com/package/create-rstac You can also copy the following content into your own `AGENTS.md`: ```markdown wrapCode title="AGENTS.md" -This project uses Rstack CLI as its JavaScript toolchain. +This project uses Rstack CLI as its JS toolchain: -- Before working with `rs` commands, `rstack.config.*` files, or imports from `rstack`, start with `node_modules/rstack/docs/llms.txt`, then read only the linked pages relevant to the task. -- For command details, use `rs -h` or `rs -h`. -- If the local documentation is unavailable, use https://rstack.rs/llms.txt and `rs -h`. +- Read the docs linked from `node_modules/rstack/docs/llms.txt` when needed +- Online docs: https://rstack.rs/llms.txt +- Run `rs -h` for CLI help ``` This content serves a similar purpose to the [rstack-cli-docs](#rstack-cli-docs) Skill, helping coding agents use Rstack CLI and find relevant documentation. Add it to `AGENTS.md` or install the Skill; either is sufficient. diff --git a/website/docs/zh/guide/ai.mdx b/website/docs/zh/guide/ai.mdx index 4cb5d7ad..76f6d308 100644 --- a/website/docs/zh/guide/ai.mdx +++ b/website/docs/zh/guide/ai.mdx @@ -20,11 +20,11 @@ import { PackageManagerTabs } from '@rspress/core/theme'; 你也可以将以下内容复制到自己的 `AGENTS.md` 中: ```markdown wrapCode title="AGENTS.md" -This project uses Rstack CLI as its JavaScript toolchain. +This project uses Rstack CLI as its JS toolchain: -- Before working with `rs` commands, `rstack.config.*` files, or imports from `rstack`, start with `node_modules/rstack/docs/llms.txt`, then read only the linked pages relevant to the task. -- For command details, use `rs -h` or `rs -h`. -- If the local documentation is unavailable, use https://rstack.rs/llms.txt and `rs -h`. +- Read the docs linked from `node_modules/rstack/docs/llms.txt` when needed +- Online docs: https://rstack.rs/llms.txt +- Run `rs -h` for CLI help ``` 这段内容与 [rstack-cli-docs](#rstack-cli-docs) Skill 作用相似,都能指导 Coding Agent 使用 Rstack CLI 并查找相关文档。将其添加到 `AGENTS.md` 或安装该 Skill,任选其一即可。 From 45229db40a10df68c0db47a771a130d52abce98a Mon Sep 17 00:00:00 2001 From: Jiahan Chen Date: Wed, 2 Sep 2026 11:40:09 +0800 Subject: [PATCH 05/13] docs: prefer rs check in migration skill (#444) --- .agents/skills/migrate-to-rstack-cli/SKILL.md | 13 +++++++++++++ .../migrate-to-rstack-cli/references/rslint.md | 9 ++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.agents/skills/migrate-to-rstack-cli/SKILL.md b/.agents/skills/migrate-to-rstack-cli/SKILL.md index 3cce92bb..b2bc7dc7 100644 --- a/.agents/skills/migrate-to-rstack-cli/SKILL.md +++ b/.agents/skills/migrate-to-rstack-cli/SKILL.md @@ -34,6 +34,19 @@ Read every matching reference before editing. Load only the tools present in the Rsbuild, Rslib, Rstest, Rslint, and Prettier remain transitive `rstack` dependencies. Remove obsolete direct dependencies and imports from the migrated scope; do not expect their names to disappear from the lockfile. +### Combined checks + +After migrating lint and formatting commands, prefer the shorter combined command when behavior is equivalent: + +| Separate commands | Preferred command | +| ---------------------------------------- | ----------------------- | +| `rs lint && rs fmt --check` | `rs check` | +| `rs lint --type-check && rs fmt --check` | `rs check --type-check` | + +`rs check` preserves the order and short-circuit behavior of these `&&` chains. + +Combine only when both commands use the same working directory and Rstack config, with no positional inputs or command-specific options beyond those shown. Move a shared `-c` or `--config` to `rs check`. Keep the commands separate when their environment, wrappers, scope, execution order, concurrency, or output handling differs. + ## Configuration ### Config files diff --git a/.agents/skills/migrate-to-rstack-cli/references/rslint.md b/.agents/skills/migrate-to-rstack-cli/references/rslint.md index f51c37dd..8910d914 100644 --- a/.agents/skills/migrate-to-rstack-cli/references/rslint.md +++ b/.agents/skills/migrate-to-rstack-cli/references/rslint.md @@ -39,17 +39,20 @@ define.lint(({ globals }) => [ ## Script pattern -If a script also runs Prettier, migrate its formatting command as described in [prettier.md](prettier.md). +For example: ```json { "scripts": { - "lint": "rs lint && rs fmt --check", - "lint:write": "rs lint --fix && rs fmt" + "check": "rs check", + "format": "rs fmt", + "lint": "rs lint" } } ``` +Preserve existing script names unless renaming is requested. For scripts that also run Prettier, follow [prettier.md](prettier.md), then apply the [combined-check rules](../SKILL.md#combined-checks). + ## Validate Run lint without writes. If Rstack upgrades Rslint, preserve the pre-migration lint baseline: disable newly enabled rules instead of changing source code, unless code changes are requested. From e11dfc1cf2fda5cde58bb712a6dc39b9cb972226 Mon Sep 17 00:00:00 2001 From: Jiahan Chen Date: Wed, 2 Sep 2026 11:43:15 +0800 Subject: [PATCH 06/13] docs: simplify migration check guidance (#445) --- .agents/skills/migrate-to-rstack-cli/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.agents/skills/migrate-to-rstack-cli/SKILL.md b/.agents/skills/migrate-to-rstack-cli/SKILL.md index b2bc7dc7..9a9e25d1 100644 --- a/.agents/skills/migrate-to-rstack-cli/SKILL.md +++ b/.agents/skills/migrate-to-rstack-cli/SKILL.md @@ -45,7 +45,7 @@ After migrating lint and formatting commands, prefer the shorter combined comman `rs check` preserves the order and short-circuit behavior of these `&&` chains. -Combine only when both commands use the same working directory and Rstack config, with no positional inputs or command-specific options beyond those shown. Move a shared `-c` or `--config` to `rs check`. Keep the commands separate when their environment, wrappers, scope, execution order, concurrency, or output handling differs. +Combine only commands that share the same working directory, config, scope, and execution behavior and have no extra inputs or command-specific options. Pass a shared `-c` or `--config` to `rs check`. ## Configuration From 9325b44d8e22bbf9c15f82150688842780e33ab0 Mon Sep 17 00:00:00 2001 From: Jiahan Chen Date: Wed, 2 Sep 2026 11:54:33 +0800 Subject: [PATCH 07/13] docs: clarify migration import guidance (#446) --- .agents/skills/migrate-to-rstack-cli/SKILL.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.agents/skills/migrate-to-rstack-cli/SKILL.md b/.agents/skills/migrate-to-rstack-cli/SKILL.md index 9a9e25d1..0bb19579 100644 --- a/.agents/skills/migrate-to-rstack-cli/SKILL.md +++ b/.agents/skills/migrate-to-rstack-cli/SKILL.md @@ -72,13 +72,15 @@ define.test({ ### Modules and imports -Use dynamic imports in async config functions only for external plugins, presets, and other dependencies: +Keep type-only and Node.js built-in imports at the top level. In async config functions, use a separate `await import(...)` for each tool-specific runtime dependency. ```ts define.app(async () => { const { pluginReact } = await import('@rsbuild/plugin-react'); + const { pluginSass } = await import('@rsbuild/plugin-sass'); + return { - plugins: [pluginReact()], + plugins: [pluginReact(), pluginSass()], }; }); ``` From 05b662f5364207b9bf98dbd10eef62ea40c77379 Mon Sep 17 00:00:00 2001 From: Jiahan Chen Date: Wed, 2 Sep 2026 13:12:36 +0800 Subject: [PATCH 08/13] chore: avoid unnecessary config dynamic imports (#447) --- .../test-inline-projects/rstack.config.ts | 8 +- packages/rstack/rstack.config.ts | 5 +- website/rstack.config.ts | 193 +++++++++--------- 3 files changed, 100 insertions(+), 106 deletions(-) diff --git a/examples/test-inline-projects/rstack.config.ts b/examples/test-inline-projects/rstack.config.ts index 55383b03..b4dda41e 100644 --- a/examples/test-inline-projects/rstack.config.ts +++ b/examples/test-inline-projects/rstack.config.ts @@ -1,11 +1,9 @@ // Configuration guide: https://rstack.rs/config +import { pluginReact } from '@rsbuild/plugin-react'; import { define } from 'rstack'; -define.app(async () => { - const { pluginReact } = await import('@rsbuild/plugin-react'); - return { - plugins: [pluginReact()], - }; +define.app({ + plugins: [pluginReact()], }); define.test(async () => { diff --git a/packages/rstack/rstack.config.ts b/packages/rstack/rstack.config.ts index 8abe863e..dfe58bd5 100644 --- a/packages/rstack/rstack.config.ts +++ b/packages/rstack/rstack.config.ts @@ -1,9 +1,8 @@ // Configuration guide: https://rstack.rs/config +import { withRslibConfig } from '@rstest/adapter-rslib'; import { define } from 'rstack'; -define.test(async () => { - const { withRslibConfig } = await import('@rstest/adapter-rslib'); - +define.test(() => { // Disable color in test process.env.NO_COLOR = '1'; diff --git a/website/rstack.config.ts b/website/rstack.config.ts index c978dd7f..ddeb5639 100644 --- a/website/rstack.config.ts +++ b/website/rstack.config.ts @@ -1,6 +1,16 @@ // Configuration guide: https://rstack.rs/config +import { pluginSass } from '@rsbuild/plugin-sass'; +import { pluginClientRedirects } from '@rspress/plugin-client-redirects'; +import { pluginSitemap } from '@rspress/plugin-sitemap'; +import { + transformerNotationDiff, + transformerNotationFocus, + transformerNotationHighlight, +} from '@shikijs/transformers'; import path from 'node:path'; import { define } from 'rstack'; +import { pluginOpenGraph } from 'rsbuild-plugin-open-graph'; +import { pluginFontOpenSans } from 'rspress-plugin-font-open-sans'; const title = 'Rstack CLI'; const description = @@ -9,115 +19,102 @@ const descriptionZh = 'Rstack CLI 通过统一的命令行、配置和工作流整合 Rstack 工具链。'; const injectLlmsHint = process.env.RSPRESS_INJECT_LLMS_HINT !== 'false'; -define.doc(async () => { - const { pluginSass } = await import('@rsbuild/plugin-sass'); - const { - transformerNotationDiff, - transformerNotationFocus, - transformerNotationHighlight, - } = await import('@shikijs/transformers'); - const { pluginClientRedirects } = - await import('@rspress/plugin-client-redirects'); - const { pluginSitemap } = await import('@rspress/plugin-sitemap'); - const { pluginOpenGraph } = await import('rsbuild-plugin-open-graph'); - const { pluginFontOpenSans } = await import('rspress-plugin-font-open-sans'); - const siteUrl = 'https://rstack.rs'; +const siteUrl = 'https://rstack.rs'; - return { - root: path.join(import.meta.dirname, 'docs'), - title, - icon: 'https://assets.rspack.rs/rspack/rspack-claw-logo.svg', - logo: '/horizontal-logo.svg', - description, - lang: 'en', - llms: true, - search: { - codeBlocks: true, +define.doc({ + root: path.join(import.meta.dirname, 'docs'), + title, + icon: 'https://assets.rspack.rs/rspack/rspack-claw-logo.svg', + logo: '/horizontal-logo.svg', + description, + lang: 'en', + llms: true, + search: { + codeBlocks: true, + }, + markdown: { + link: { + checkAnchors: true, + checkDeadLinks: true, }, - markdown: { - link: { - checkAnchors: true, - checkDeadLinks: true, - }, - shiki: { - transformers: [ - transformerNotationDiff(), - transformerNotationHighlight(), - transformerNotationFocus(), - ], - }, + shiki: { + transformers: [ + transformerNotationDiff(), + transformerNotationHighlight(), + transformerNotationFocus(), + ], }, - route: { - cleanUrls: true, + }, + route: { + cleanUrls: true, + }, + plugins: [ + pluginClientRedirects({ + redirects: [ + { + from: '^/config/?$', + to: '/guide/configuration', + }, + ], + }), + pluginFontOpenSans(), + pluginSitemap({ siteUrl }), + ], + locales: [ + { + lang: 'en', + label: 'English', + title, + description, }, - plugins: [ - pluginClientRedirects({ - redirects: [ - { - from: '^/config/?$', - to: '/guide/configuration', - }, - ], - }), - pluginFontOpenSans(), - pluginSitemap({ siteUrl }), - ], - locales: [ + { + lang: 'zh', + label: '简体中文', + title, + description: descriptionZh, + }, + ], + themeConfig: { + llmsUI: { + placement: 'outline', + injectLlmsHint, + }, + socialLinks: [ { - lang: 'en', - label: 'English', - title, - description, + icon: 'github', + mode: 'link', + content: 'https://github.com/rstackjs/rstack-cli', }, { - lang: 'zh', - label: '简体中文', - title, - description: descriptionZh, + icon: 'discord', + mode: 'link', + content: 'https://discord.gg/XsaKEEk4mW', }, ], - themeConfig: { - llmsUI: { - placement: 'outline', - injectLlmsHint, - }, - socialLinks: [ - { - icon: 'github', - mode: 'link', - content: 'https://github.com/rstackjs/rstack-cli', - }, - { - icon: 'discord', - mode: 'link', - content: 'https://discord.gg/XsaKEEk4mW', - }, - ], - editLink: { - docRepoBaseUrl: - 'https://github.com/rstackjs/rstack-cli/tree/main/website/docs', - }, + editLink: { + docRepoBaseUrl: + 'https://github.com/rstackjs/rstack-cli/tree/main/website/docs', }, - builderConfig: { - plugins: [ - pluginSass(), - pluginOpenGraph({ - title, - type: 'website', - url: siteUrl, - description, - }), - ], - server: { - open: true, - }, - tools: { - rspack: { - experiments: { - nativeWatcher: true, - }, + }, + builderConfig: { + plugins: [ + pluginSass(), + pluginOpenGraph({ + title, + type: 'website', + url: siteUrl, + description, + }), + ], + server: { + open: true, + }, + tools: { + rspack: { + experiments: { + nativeWatcher: true, }, }, }, - }; + }, }); From 1fd1fbce60e1b50cd61e2278c06c357327286a8a Mon Sep 17 00:00:00 2001 From: Jiahan Chen Date: Wed, 2 Sep 2026 13:29:21 +0800 Subject: [PATCH 09/13] docs: improve testing configuration inheritance (#448) --- website/docs/en/guide/testing.mdx | 91 ++++++++++++++++++++++--------- website/docs/zh/guide/testing.mdx | 91 ++++++++++++++++++++++--------- 2 files changed, 130 insertions(+), 52 deletions(-) diff --git a/website/docs/en/guide/testing.mdx b/website/docs/en/guide/testing.mdx index 5fcb5494..db90404c 100644 --- a/website/docs/en/guide/testing.mdx +++ b/website/docs/en/guide/testing.mdx @@ -1,3 +1,7 @@ +--- +description: 'Run tests with Rstack CLI, inherit application or library settings through Rstest adapters, and configure multiple test projects.' +--- + # Testing Rstack CLI uses [Rstest](https://rstest.rs/) to run tests. @@ -28,23 +32,80 @@ Import test APIs and configuration helpers from [`rstack/test`](./api-reference# import { defineInlineProject, expect, test } from 'rstack/test'; ``` -## Single project +## Configuration inheritance + +When `define.test()` does not set Rstest's [`extends`](https://rstest.rs/config/test/extends), Rstack CLI automatically converts the configuration registered by `define.app()` or `define.lib()` into an Rstest configuration. The inherited configuration is merged with the options passed directly to `define.test()`. + +### Inherit the application configuration -For a single test project, pass the Rstest options directly to `define.test()`: +When `define.app()` is registered, Rstack CLI converts it with [`@rstest/adapter-rsbuild`](https://rstest.rs/guide/integration/rsbuild) and uses the result as the test configuration's `extends` value: ```ts title="rstack.config.ts" import { define } from 'rstack'; define.app({ - // Shared application configuration + resolve: { + alias: { + '@': './src', + }, + }, }); define.test({ + // Inherits `resolve.alias` from `define.app()`. testEnvironment: 'happy-dom', }); ``` -When `extends` is omitted, Rstack CLI uses the Rsbuild adapter to extend the test configuration from `define.app()`. If no application configuration is defined, it uses the Rslib adapter with `define.lib()` instead. `define.app()` takes precedence when both are defined. +### Inherit the library configuration + +When `define.lib()` is registered, Rstack CLI converts it with [`@rstest/adapter-rslib`](https://rstest.rs/guide/integration/rslib): + +```ts title="rstack.config.ts" +import { define } from 'rstack'; + +define.lib({ + resolve: { + alias: { + '@': './src', + }, + }, +}); + +define.test({ + // Inherits `resolve.alias` from `define.lib()`. + testEnvironment: 'node', +}); +``` + +:::tip + +When both configurations are registered, Rstack CLI gives `define.app()` precedence. + +::: + +### Disable automatic inheritance + +To keep the test configuration independent, set `extends` explicitly. An empty object disables automatic inheritance without extending another configuration: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; + +define.app({ + resolve: { + alias: { + '@': './src', + }, + }, +}); + +define.test({ + extends: {}, + testEnvironment: 'node', +}); +``` + +For multiple projects, setting `extends` on the root `define.test()` configuration disables automatic inheritance for every project. Setting it on an inline project disables inheritance only for that project. ## Multiple projects @@ -101,25 +162,3 @@ define.test({ ``` Rstack CLI passes string entries to Rstest unchanged. External projects load their own configuration and do not inherit the current `define.app()` or `define.lib()` configuration. Use external projects when each project manages its configuration independently. - -## Customize inheritance - -Set Rstest's [`extends`](https://rstest.rs/config/test/extends) option explicitly when a project should not inherit the current application or library configuration: - -```ts title="rstack.config.ts" -import { define } from 'rstack'; -import { defineInlineProject } from 'rstack/test'; - -define.test({ - projects: [ - defineInlineProject({ - name: 'standalone', - extends: { - testEnvironment: 'node', - }, - }), - ], -}); -``` - -Setting `extends` on an inline project disables automatic inheritance only for that project. Setting it on the root `define.test()` configuration disables automatic inheritance for the entire test configuration. diff --git a/website/docs/zh/guide/testing.mdx b/website/docs/zh/guide/testing.mdx index fd969ad2..43474a71 100644 --- a/website/docs/zh/guide/testing.mdx +++ b/website/docs/zh/guide/testing.mdx @@ -1,3 +1,7 @@ +--- +description: '使用 Rstack CLI 运行测试,通过 Rstest 适配器继承应用或库配置,并配置多个测试项目。' +--- + # 测试 \{#testing} Rstack CLI 使用 [Rstest](https://rstest.rs/zh/) 运行测试。 @@ -28,23 +32,80 @@ define.test({ import { defineInlineProject, expect, test } from 'rstack/test'; ``` -## 单项目 \{#single-project} +## 配置继承 \{#configuration-inheritance} + +当 `define.test()` 未设置 Rstest 的 [`extends`](https://rstest.rs/zh/config/test/extends) 时,Rstack CLI 会自动将 `define.app()` 或 `define.lib()` 注册的配置转换为 Rstest 配置,再与直接传给 `define.test()` 的选项合并。 + +### 继承应用配置 \{#inherit-the-application-configuration} -对于单个测试项目,直接将 Rstest 选项传给 `define.test()`: +注册 `define.app()` 后,Rstack CLI 会通过 [`@rstest/adapter-rsbuild`](https://rstest.rs/zh/guide/integration/rsbuild) 转换该配置,并将结果作为测试配置的 `extends`: ```ts title="rstack.config.ts" import { define } from 'rstack'; define.app({ - // 共享的应用配置 + resolve: { + alias: { + '@': './src', + }, + }, }); define.test({ + // 继承 `define.app()` 中的 `resolve.alias` testEnvironment: 'happy-dom', }); ``` -未设置 `extends` 时,Rstack CLI 会通过 Rsbuild 适配器让测试配置继承 `define.app()`。如果没有应用配置,则通过 Rslib 适配器回退到 `define.lib()`。同时定义两者时,`define.app()` 的优先级更高。 +### 继承库配置 \{#inherit-the-library-configuration} + +注册 `define.lib()` 后,Rstack CLI 会通过 [`@rstest/adapter-rslib`](https://rstest.rs/zh/guide/integration/rslib) 转换该配置: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; + +define.lib({ + resolve: { + alias: { + '@': './src', + }, + }, +}); + +define.test({ + // 继承 `define.lib()` 中的 `resolve.alias` + testEnvironment: 'node', +}); +``` + +:::tip + +同时注册两种配置时,Rstack CLI 会优先使用 `define.app()`。 + +::: + +### 关闭自动继承 \{#disable-automatic-inheritance} + +如果测试配置需要保持独立,请显式设置 `extends`。将它设置为空对象可以关闭自动继承,且不会继承其他配置: + +```ts title="rstack.config.ts" +import { define } from 'rstack'; + +define.app({ + resolve: { + alias: { + '@': './src', + }, + }, +}); + +define.test({ + extends: {}, + testEnvironment: 'node', +}); +``` + +使用多项目配置时,在 `define.test()` 根配置中设置 `extends` 会关闭所有项目的自动继承;在某个内联项目中设置 `extends` 则只会关闭该项目的自动继承。 ## 多项目 \{#multiple-projects} @@ -101,25 +162,3 @@ define.test({ ``` Rstack CLI 会将字符串形式的项目原样传给 Rstest。外部项目会加载自己的配置,不会继承当前的 `define.app()` 或 `define.lib()` 配置。每个项目需要独立管理配置时,请使用外部项目。 - -## 自定义继承 \{#customize-inheritance} - -项目不应继承当前应用或库配置时,请显式设置 Rstest 的 [`extends`](https://rstest.rs/zh/config/test/extends) 选项: - -```ts title="rstack.config.ts" -import { define } from 'rstack'; -import { defineInlineProject } from 'rstack/test'; - -define.test({ - projects: [ - defineInlineProject({ - name: 'standalone', - extends: { - testEnvironment: 'node', - }, - }), - ], -}); -``` - -在内联项目中设置 `extends`,只会关闭当前项目的自动继承。在 `define.test()` 的根配置中设置该选项,则会关闭整个测试配置的自动继承。 From 1c88e0fd0c2febee2e9b3ed5bdb75a1d8205cde8 Mon Sep 17 00:00:00 2001 From: Jiahan Chen Date: Wed, 2 Sep 2026 16:11:23 +0800 Subject: [PATCH 10/13] docs: clarify config import guidance (#449) --- website/docs/en/guide/configuration.mdx | 15 ++++++++++++--- website/docs/en/guide/monorepo.mdx | 8 +++----- website/docs/zh/guide/configuration.mdx | 15 ++++++++++++--- website/docs/zh/guide/monorepo.mdx | 8 +++----- 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/website/docs/en/guide/configuration.mdx b/website/docs/en/guide/configuration.mdx index d1aaa0aa..e50bb635 100644 --- a/website/docs/en/guide/configuration.mdx +++ b/website/docs/en/guide/configuration.mdx @@ -44,11 +44,14 @@ All `rs` commands accept the global `-c, --config` option for loading a file wit rs build --config ./configs/rstack.config.ts ``` -## Loading dependencies on demand +## Importing dependencies \{#loading-dependencies-on-demand} -Every `rs` command loads and executes the Rstack configuration file, then resolves only the configuration functions needed by that command. +Rstack keeps a project's build, test, lint, formatting, and other settings in one `rstack.config.*` file. When a command loads the config file, it also loads every top-level import, even if it does not use the related configuration. Importing every tool and plugin at the top level can therefore add startup overhead to commands such as `rs lint` and `rs fmt`. -When a configuration needs to import plugins or other tool-specific dependencies, use an async configuration function and load those dependencies with dynamic `import()` inside it. This ensures that they are loaded only when the configuration is resolved. +Choose the import style based on the config contents: + +- Prefer simpler static imports when the config is only for an application and its tests, a library and its tests, or a documentation site. +- If the same config also includes lint, formatting, or staged-file checks, consider dynamically importing dependencies inside the relevant async configuration function. This lets checks skip those dependencies. ```ts title="rstack.config.ts" import { define } from 'rstack'; @@ -59,6 +62,12 @@ define.app(async () => { plugins: [pluginReact()], }; }); + +define.lint(({ js }) => [js.configs.recommended]); + +define.fmt({ + singleQuote: true, +}); ``` ## Configuration APIs diff --git a/website/docs/en/guide/monorepo.mdx b/website/docs/en/guide/monorepo.mdx index 1e949e2b..c8f80f57 100644 --- a/website/docs/en/guide/monorepo.mdx +++ b/website/docs/en/guide/monorepo.mdx @@ -117,13 +117,11 @@ Rstack CLI loads the configuration from the current working directory. It does n A web application usually needs application build configuration and optional test configuration: ```ts title="apps/web/rstack.config.ts" +import { pluginReact } from '@rsbuild/plugin-react'; import { define } from 'rstack'; -define.app(async () => { - const { pluginReact } = await import('@rsbuild/plugin-react'); - return { - plugins: [pluginReact()], - }; +define.app({ + plugins: [pluginReact()], }); define.test({ diff --git a/website/docs/zh/guide/configuration.mdx b/website/docs/zh/guide/configuration.mdx index 06939f84..cd9558e4 100644 --- a/website/docs/zh/guide/configuration.mdx +++ b/website/docs/zh/guide/configuration.mdx @@ -44,11 +44,14 @@ Rstack CLI 默认会查找使用以下任一文件名的配置文件: rs build --config ./configs/rstack.config.ts ``` -## 按需加载依赖 \{#loading-dependencies-on-demand} +## 导入依赖 \{#loading-dependencies-on-demand} -每次执行 `rs` 命令时,Rstack CLI 都会加载并执行配置文件,然后只解析当前命令需要的配置函数。 +Rstack 将项目的构建、测试、代码检查、格式化等配置集中在一个 `rstack.config.*` 文件中。命令加载配置文件时,会同时加载所有顶层 `import`,即使当前命令用不到对应的配置。因此,在顶层导入所有工具和插件可能会增加 `rs lint`、`rs fmt` 等命令的启动开销。 -如果配置需要导入插件或其他工具专属依赖,请使用异步配置函数,并在函数内通过动态 `import()` 加载这些依赖。这样只有解析该配置时才会加载相关依赖。 +请根据配置内容选择导入方式: + +- 如果配置只用于一个应用及其测试、一个库及其测试或一个文档站点,优先使用更简洁的静态导入。 +- 如果同一配置还包含 lint、格式化或暂存文件检查,可在相应的异步配置函数中动态导入依赖,让检查命令跳过这些依赖。 ```ts title="rstack.config.ts" import { define } from 'rstack'; @@ -59,6 +62,12 @@ define.app(async () => { plugins: [pluginReact()], }; }); + +define.lint(({ js }) => [js.configs.recommended]); + +define.fmt({ + singleQuote: true, +}); ``` ## 配置 API \{#configuration-apis} diff --git a/website/docs/zh/guide/monorepo.mdx b/website/docs/zh/guide/monorepo.mdx index f83c7a6d..b953bbb1 100644 --- a/website/docs/zh/guide/monorepo.mdx +++ b/website/docs/zh/guide/monorepo.mdx @@ -117,13 +117,11 @@ Rstack CLI 会加载当前工作目录中的配置,不会将子项目配置与 Web 应用通常需要应用构建配置和可选的测试配置: ```ts title="apps/web/rstack.config.ts" +import { pluginReact } from '@rsbuild/plugin-react'; import { define } from 'rstack'; -define.app(async () => { - const { pluginReact } = await import('@rsbuild/plugin-react'); - return { - plugins: [pluginReact()], - }; +define.app({ + plugins: [pluginReact()], }); define.test({ From e35e4a7d639bc2d25319bf2b1adb40e077a55f06 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 08:16:10 +0000 Subject: [PATCH 11/13] chore(deps): update all non-major dependencies (#450) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 244 ++++++++++++++++++++++++++++++++++++++------ pnpm-workspace.yaml | 4 +- 3 files changed, 214 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index ca0874d6..dd57bcdb 100644 --- a/package.json +++ b/package.json @@ -24,5 +24,5 @@ "rstack": "workspace:*", "typescript": "catalog:" }, - "packageManager": "pnpm@11.24.0" + "packageManager": "pnpm@11.25.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8b62db8a..d124a08e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,8 +11,8 @@ catalogs: specifier: ^3.8.6 version: 3.8.6 '@rsbuild/core': - specifier: ~2.2.1 - version: 2.2.1 + specifier: ~2.2.2 + version: 2.2.2 '@rsbuild/plugin-react': specifier: ^2.1.0 version: 2.1.0 @@ -89,8 +89,8 @@ catalogs: specifier: ^20.12.0 version: 20.12.0 heading-case: - specifier: ^2.0.0 - version: 2.0.0 + specifier: ^2.0.1 + version: 2.0.1 import-meta-resolve: specifier: 4.2.0 version: 4.2.0 @@ -164,7 +164,7 @@ importers: version: 0.0.4 heading-case: specifier: 'catalog:' - version: 2.0.0(prettier@3.9.6) + version: 2.0.1(prettier@3.9.6) prettier: specifier: 'catalog:' version: 3.9.6 @@ -186,7 +186,7 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: 'catalog:' - version: 2.1.0(@rsbuild/core@2.2.1)(@rspack/core@2.2.1) + version: 2.1.0(@rsbuild/core@2.2.2)(@rspack/core@2.2.2) '@testing-library/dom': specifier: 'catalog:' version: 10.4.1 @@ -274,7 +274,7 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: 'catalog:' - version: 2.1.0(@rsbuild/core@2.2.1)(@rspack/core@2.2.1) + version: 2.1.0(@rsbuild/core@2.2.2)(@rspack/core@2.2.2) '@testing-library/dom': specifier: 'catalog:' version: 10.4.1 @@ -317,7 +317,7 @@ importers: devDependencies: '@rsbuild/plugin-react': specifier: 'catalog:' - version: 2.1.0(@rsbuild/core@2.2.1)(@rspack/core@2.2.1) + version: 2.1.0(@rsbuild/core@2.2.2)(@rspack/core@2.2.2) '@testing-library/dom': specifier: 'catalog:' version: 10.4.1 @@ -363,7 +363,7 @@ importers: dependencies: '@rsbuild/core': specifier: 'catalog:' - version: 2.2.1 + version: 2.2.2 '@rslib/core': specifier: 'catalog:' version: 1.0.0-rc.2(typescript@7.0.2) @@ -397,7 +397,7 @@ importers: version: 0.2.0 '@rstest/adapter-rsbuild': specifier: 'catalog:' - version: 0.11.11(@rsbuild/core@2.2.1)(@rstest/core@0.11.11) + version: 0.11.11(@rsbuild/core@2.2.2)(@rstest/core@0.11.11) '@rstest/adapter-rslib': specifier: 'catalog:' version: 0.11.11(@rslib/core@1.0.0-rc.2)(@rstest/core@0.11.11)(typescript@7.0.2) @@ -454,7 +454,7 @@ importers: devDependencies: '@rsbuild/plugin-sass': specifier: 'catalog:' - version: 2.0.1(@rsbuild/core@2.2.1) + version: 2.0.1(@rsbuild/core@2.2.2) '@rspress/core': specifier: 'catalog:' version: 2.0.21(micromark-util-types@2.0.2)(micromark@4.0.2)(supports-color@8.1.1) @@ -487,7 +487,7 @@ importers: version: 19.2.8(react@19.2.8) rsbuild-plugin-open-graph: specifier: 'catalog:' - version: 1.1.3(@rsbuild/core@2.2.1) + version: 1.1.3(@rsbuild/core@2.2.2) rspress-plugin-font-open-sans: specifier: 'catalog:' version: 1.0.4(@rspress/core@2.0.21) @@ -1291,6 +1291,16 @@ packages: core-js: optional: true + '@rsbuild/core@2.2.2': + resolution: {integrity: sha512-T82jUaeMUFhcBqpmKvRiNAcWMp6abxkvMEwiZi4x+gf7NAbyiF5jrbLnQLm1y4909eANsTSHenp99HlRPIByLw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + core-js: '>= 3.0.0' + peerDependenciesMeta: + core-js: + optional: true + '@rsbuild/plugin-react@2.1.0': resolution: {integrity: sha512-RQTIAWB/CwPjoWt9iAl+8HixeQVgZ7kEIBrWPCixfITyHdiD84h0YpUTpEUuz6kGHw1KXT9mHZ3Rwy6WG7aRDA==} peerDependencies: @@ -1383,6 +1393,11 @@ packages: cpu: [arm64] os: [darwin] + '@rspack/binding-darwin-arm64@2.2.2': + resolution: {integrity: sha512-/le/AvV4HSinXTPs2Lqpujxt189Z5T10Ggt96QzckLRPvIchzqoavVDDjltzC7XcaZ87XCH/X06jNKgzkcBBNA==} + cpu: [arm64] + os: [darwin] + '@rspack/binding-darwin-x64@2.2.0': resolution: {integrity: sha512-rzyJCX99aFwl540trsVMNZOgK4+IFm2d5+YeP+RdNo9Uprxloz8vHz0J4dYtaq6MRiCAyM60dAwEa3wJMwqWAQ==} cpu: [x64] @@ -1393,6 +1408,11 @@ packages: cpu: [x64] os: [darwin] + '@rspack/binding-darwin-x64@2.2.2': + resolution: {integrity: sha512-uFIcUPUXiPxM6ljenLafp5TemT8eLZm1riRn8fJYmpqNCK+aCcTaud18XHZpI5SjzzcY+xUHfVShgvNzKXuf2g==} + cpu: [x64] + os: [darwin] + '@rspack/binding-linux-arm64-gnu@2.2.0': resolution: {integrity: sha512-0t8QOiOMcBV7RvPSsTJ5DQ4QCK6FIyUZy77qbxnS6asGTOXPZZn7V5cL26IxEv/wuHdQ6tQOXheau1fi+gGyBQ==} cpu: [arm64] @@ -1405,6 +1425,12 @@ packages: os: [linux] libc: [glibc] + '@rspack/binding-linux-arm64-gnu@2.2.2': + resolution: {integrity: sha512-Pjby4pDSMNJQK2VBzpgCj6lb+DGuenS1fEDb6xi5/apbJb9v5WE+e43Mz7i+XqgXS8e846pjaONV3KM5WKB1LQ==} + cpu: [arm64] + os: [linux] + libc: [glibc] + '@rspack/binding-linux-arm64-musl@2.2.0': resolution: {integrity: sha512-BAvCukqcuHxUdE294ITCohvhVkEklW8RbkKkR36Uo0WyIiMPGrnvPjARPn0/4Q4xMAz7lUmC60sZrvJHlAOKMw==} cpu: [arm64] @@ -1417,6 +1443,12 @@ packages: os: [linux] libc: [musl] + '@rspack/binding-linux-arm64-musl@2.2.2': + resolution: {integrity: sha512-0u9O7tTVT2z+F6o/eEY6f6+My8Jn9U56QiBwkfy90ZaoAfZyQSSTxqaK/zA7W43oFxQefeCpiPas27VUzrSakw==} + cpu: [arm64] + os: [linux] + libc: [musl] + '@rspack/binding-linux-ppc64-gnu@2.2.0': resolution: {integrity: sha512-nCHqZLv/E8nm2ccGkb00F5DQtXxzGy3W3X73ArA+N0+zXJUnzRcSRSwr7AE8pVgP/FYfX4yMFgUXy0g0YxYGRA==} cpu: [ppc64] @@ -1429,6 +1461,12 @@ packages: os: [linux] libc: [glibc] + '@rspack/binding-linux-ppc64-gnu@2.2.2': + resolution: {integrity: sha512-N3lVnhq5qOvpmP5n386JzR1GcE8HzAqq4/r440Z6yle9m7PhVFJ6oXVWxgaDTYV0mtv9YLJmaG+YrjYfUa1vuA==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + '@rspack/binding-linux-riscv64-gnu@2.2.0': resolution: {integrity: sha512-CA3WEqKFDI6FAZTnCho2n9pmdPWZYAW/S8mqgxd0cx2Jix43at3VyLxhCC7ED5A9WBSFn/AdHaIbVtgoQHVhWA==} cpu: [riscv64] @@ -1441,6 +1479,12 @@ packages: os: [linux] libc: [glibc] + '@rspack/binding-linux-riscv64-gnu@2.2.2': + resolution: {integrity: sha512-ReClZyp32/rJkUDV/oGDU0X6BCFyEkTR6r4stFwm/qOOaG6mUMRzZe4gur8Yh979p4Hiz9EdkmfEHY02GBXcaQ==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + '@rspack/binding-linux-riscv64-musl@2.2.0': resolution: {integrity: sha512-kHB960oClkoPRPZ6sdkhRvqbdRIlbpIMYd/Tbxfmn3DWQahiCk1pkUFJbOtFq3EgESxZISV4THl442W2Y57HvQ==} cpu: [riscv64] @@ -1453,6 +1497,12 @@ packages: os: [linux] libc: [musl] + '@rspack/binding-linux-riscv64-musl@2.2.2': + resolution: {integrity: sha512-mqsorvTNerr3r8zI35NFTPYATPDlhepdiUhZjKT6ylqpHlP7vLU9fp4aEMK/CuTv2f+IVsa0+iZqtMxHs2tSjw==} + cpu: [riscv64] + os: [linux] + libc: [musl] + '@rspack/binding-linux-s390x-gnu@2.2.0': resolution: {integrity: sha512-lVBdiffVo1jq0P0jT36jNou2suLB4ueQI4aWUs+HM+h67YPBtVKWu/mo5Wh59+8nowgcZmYaFM5hdH69963I9w==} cpu: [s390x] @@ -1465,6 +1515,12 @@ packages: os: [linux] libc: [glibc] + '@rspack/binding-linux-s390x-gnu@2.2.2': + resolution: {integrity: sha512-ql2Jub8QYWSugBppmj2u0SjcIj6fOQuAaLCYQOqU7zbvz/uuWTfoqmdWKExwrxeCU9Tzt7emVM0ETuVEpoca+A==} + cpu: [s390x] + os: [linux] + libc: [glibc] + '@rspack/binding-linux-x64-gnu@2.2.0': resolution: {integrity: sha512-M49UaWspE0YJ3268DsquD8idEQTfjBDMvO/I8qccV/Z5T+Q98FJ+kIs5liUaTWb48OIbDEK+8ZKx5QzLbfVN6g==} cpu: [x64] @@ -1477,6 +1533,12 @@ packages: os: [linux] libc: [glibc] + '@rspack/binding-linux-x64-gnu@2.2.2': + resolution: {integrity: sha512-MNYKYEHrtIVEno2q5rgpou/JVffRwn109xPK3kxct95EojHsniNa8jwy6eEHeOazP4EN60Si7NElE3aQ6JssHw==} + cpu: [x64] + os: [linux] + libc: [glibc] + '@rspack/binding-linux-x64-musl@2.2.0': resolution: {integrity: sha512-YYbs0wmey+5blhEQDE4Dax3TwJtqfGwe2QBm3OLphlBHo/fcZVvimzKkMV0/pVrZTLy2z5ZAwNhGMY64bNr77w==} cpu: [x64] @@ -1489,6 +1551,12 @@ packages: os: [linux] libc: [musl] + '@rspack/binding-linux-x64-musl@2.2.2': + resolution: {integrity: sha512-y9/9CmE8lrECaF17GAhacibTL+SvlEPEotQnUuBFC/WFtXh8hU2E7a7bAkpYGSLH6kM0nrJZHO3hTvM1wdWOJw==} + cpu: [x64] + os: [linux] + libc: [musl] + '@rspack/binding-wasm32-wasi@2.2.0': resolution: {integrity: sha512-rerLPTN/HD4EvLNWs3O2N+Eb37eGvLRIP3dXXc3n+UzTebOepAsahNn44vXeRBsE4m/pHkpDJjwgWTytgQ2gBw==} cpu: [wasm32] @@ -1497,6 +1565,10 @@ packages: resolution: {integrity: sha512-/d2ImKDS+lT+FJ07MxKBeUkTat84tr2Nm2+nIRt8HmZK7/N8odkQml9vb4MHr8E7oYOp4B+jm6W5frdRzKrkJQ==} cpu: [wasm32] + '@rspack/binding-wasm32-wasi@2.2.2': + resolution: {integrity: sha512-VbDIjjeFwZvMSKAOGY5IbU6lLzt6AHHHncTdMMkZ94Xk7O2BOHe9BXDV32Ln29TIW2C8m1fdxfPZWDiecVghUQ==} + cpu: [wasm32] + '@rspack/binding-win32-arm64-msvc@2.2.0': resolution: {integrity: sha512-JUAmnbOQYGTRyX28vls/MOMonZWcmcCi5YtEq6YMc8Xqh3Qx0HUwaLM/I1xr/N9BX3b8CV0dQDOpNuBc2ei+CA==} cpu: [arm64] @@ -1507,6 +1579,11 @@ packages: cpu: [arm64] os: [win32] + '@rspack/binding-win32-arm64-msvc@2.2.2': + resolution: {integrity: sha512-rfcNg0W3ZPZvXma1gTyEt9/Z8FxASIaQr+sMWTSaTPPaeU3xY1+0hYcrD0kUFNs3/5L4u63myI4R8qRXiuW3pA==} + cpu: [arm64] + os: [win32] + '@rspack/binding-win32-ia32-msvc@2.2.0': resolution: {integrity: sha512-wOmQRUaOG0eWH/fnfslA9yK9xKfaq9X+3Xa1TdTJnTqlo0ARJYs6A+Lzjbs7cxdY/o1f12Xe00BG3nQozReUOg==} cpu: [ia32] @@ -1517,6 +1594,11 @@ packages: cpu: [ia32] os: [win32] + '@rspack/binding-win32-ia32-msvc@2.2.2': + resolution: {integrity: sha512-TFPvr9RZw9oHIhooDhXHzWjKcHpGPTxkznSeM2poIWU0CdEuua2rVUfsrriTF1Dmx+9kMly61DQmyOHCbb+b2g==} + cpu: [ia32] + os: [win32] + '@rspack/binding-win32-x64-msvc@2.2.0': resolution: {integrity: sha512-v6/3bFr9+i7hRpgulL9b5qCvZL0VgR4vQGQNqOWezUzZmPUj9LYpvB0L9xZIVwDQ2ug/xBiA58bfg5IbESgoyw==} cpu: [x64] @@ -1527,12 +1609,20 @@ packages: cpu: [x64] os: [win32] + '@rspack/binding-win32-x64-msvc@2.2.2': + resolution: {integrity: sha512-GvEGyL594dtWN9SoVnKWh0exrM8WLInaUjwcuA2JKbCi1ak/9iHxip/U1dY3DuVqBYBhmvYq96JPbl91xnzFjg==} + cpu: [x64] + os: [win32] + '@rspack/binding@2.2.0': resolution: {integrity: sha512-nxZzJqqB0EmEKp6qjzFNkBb/SgGt0k0DSENrLvAJgvVvrm3waVsubD0cfxtPlZY/rd5SzadzxWGEHRyFcds5nA==} '@rspack/binding@2.2.1': resolution: {integrity: sha512-56TqztuEMd+aHGv1jDXnkJQGSLTb4NoO146flFxJqPG8931UdXPO2pNR9M0Q2Pz+GvmO0fLHGPLYBHoRVrRlHw==} + '@rspack/binding@2.2.2': + resolution: {integrity: sha512-gWjKDQfVQJSBh/I+y9WTlyERsiShSJ7eI6Yl0SJs/6gjx8t4ixuwWCsaEFFjwSL4nSn6ML5hNQ7UFY3gj72BWA==} + '@rspack/core@2.2.0': resolution: {integrity: sha512-3W7oX0BAHbK4VlknH3lfyfRvupzxdZtyEa+DfKmdjzmIAcqYtHnFd0nLqp5dzitDPyDI1TIKkDhpB0AZJn0pVg==} engines: {node: ^20.19.0 || >=22.12.0} @@ -1557,6 +1647,18 @@ packages: '@swc/helpers': optional: true + '@rspack/core@2.2.2': + resolution: {integrity: sha512-/yztfDZR5syIPBrUpzBpL+6fhhl0IHBPcXlNr4tOMBULbocFIz7Z4/cqvf1ix0DBbKpIGx99v6N1IDbk2gi8hw==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 + '@swc/helpers': ^0.5.23 + peerDependenciesMeta: + '@module-federation/runtime-tools': + optional: true + '@swc/helpers': + optional: true + '@rspack/plugin-react-refresh@2.0.2': resolution: {integrity: sha512-dGNZiCxQxgAUI9sah7gd8u+O7OJZRCmqtEJNDOd8xW5RqcieC86F7p5qcShyw6onH5pKf57evpr2VjGbaFGkZg==} peerDependencies: @@ -2307,8 +2409,8 @@ packages: hastscript@9.0.1: resolution: {integrity: sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==} - heading-case@2.0.0: - resolution: {integrity: sha512-yznMB5NlBOlCqGL68oRa9gvA8vINQB56D1rTQwCRNoh2aLjtEAK4UKYD5mZ4rXJ0GCuyRmzGCgP1/3To1Mj/vA==} + heading-case@2.0.1: + resolution: {integrity: sha512-vt+RLPiDTw0BHXX/7pfChw8sFh17PjfJP72mHJ8tCEi4Dy30ASuWNx9px9VtRWzvmGtnAjfQDp/bz3ODQ2YpwA==} hasBin: true peerDependencies: prettier: ^3.0.0 @@ -3948,25 +4050,32 @@ snapshots: transitivePeerDependencies: - '@module-federation/runtime-tools' + '@rsbuild/core@2.2.2': + dependencies: + '@rspack/core': 2.2.2(@swc/helpers@0.5.23) + '@swc/helpers': 0.5.23 + transitivePeerDependencies: + - '@module-federation/runtime-tools' + '@rsbuild/plugin-react@2.1.0(@rsbuild/core@2.2.0)': dependencies: - '@rspack/plugin-react-refresh': 2.0.2(@rspack/core@2.2.1)(react-refresh@0.18.0) + '@rspack/plugin-react-refresh': 2.0.2(@rspack/core@2.2.2)(react-refresh@0.18.0) react-refresh: 0.18.0 optionalDependencies: '@rsbuild/core': 2.2.0 transitivePeerDependencies: - '@rspack/core' - '@rsbuild/plugin-react@2.1.0(@rsbuild/core@2.2.1)(@rspack/core@2.2.1)': + '@rsbuild/plugin-react@2.1.0(@rsbuild/core@2.2.2)(@rspack/core@2.2.2)': dependencies: - '@rspack/plugin-react-refresh': 2.0.2(@rspack/core@2.2.1)(react-refresh@0.18.0) + '@rspack/plugin-react-refresh': 2.0.2(@rspack/core@2.2.2)(react-refresh@0.18.0) react-refresh: 0.18.0 optionalDependencies: - '@rsbuild/core': 2.2.1 + '@rsbuild/core': 2.2.2 transitivePeerDependencies: - '@rspack/core' - '@rsbuild/plugin-sass@2.0.1(@rsbuild/core@2.2.1)': + '@rsbuild/plugin-sass@2.0.1(@rsbuild/core@2.2.2)': dependencies: deepmerge: 4.3.1 loader-utils: 2.0.4 @@ -3974,12 +4083,12 @@ snapshots: reduce-configs: 2.0.1 sass-embedded: 1.100.0 optionalDependencies: - '@rsbuild/core': 2.2.1 + '@rsbuild/core': 2.2.2 '@rslib/core@1.0.0-rc.2(typescript@7.0.2)': dependencies: - '@rsbuild/core': 2.2.1 - rsbuild-plugin-dts: 1.0.0-rc.2(@rsbuild/core@2.2.1)(typescript@7.0.2) + '@rsbuild/core': 2.2.2 + rsbuild-plugin-dts: 1.0.0-rc.2(@rsbuild/core@2.2.2)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 transitivePeerDependencies: @@ -4029,60 +4138,90 @@ snapshots: '@rspack/binding-darwin-arm64@2.2.1': optional: true + '@rspack/binding-darwin-arm64@2.2.2': + optional: true + '@rspack/binding-darwin-x64@2.2.0': optional: true '@rspack/binding-darwin-x64@2.2.1': optional: true + '@rspack/binding-darwin-x64@2.2.2': + optional: true + '@rspack/binding-linux-arm64-gnu@2.2.0': optional: true '@rspack/binding-linux-arm64-gnu@2.2.1': optional: true + '@rspack/binding-linux-arm64-gnu@2.2.2': + optional: true + '@rspack/binding-linux-arm64-musl@2.2.0': optional: true '@rspack/binding-linux-arm64-musl@2.2.1': optional: true + '@rspack/binding-linux-arm64-musl@2.2.2': + optional: true + '@rspack/binding-linux-ppc64-gnu@2.2.0': optional: true '@rspack/binding-linux-ppc64-gnu@2.2.1': optional: true + '@rspack/binding-linux-ppc64-gnu@2.2.2': + optional: true + '@rspack/binding-linux-riscv64-gnu@2.2.0': optional: true '@rspack/binding-linux-riscv64-gnu@2.2.1': optional: true + '@rspack/binding-linux-riscv64-gnu@2.2.2': + optional: true + '@rspack/binding-linux-riscv64-musl@2.2.0': optional: true '@rspack/binding-linux-riscv64-musl@2.2.1': optional: true + '@rspack/binding-linux-riscv64-musl@2.2.2': + optional: true + '@rspack/binding-linux-s390x-gnu@2.2.0': optional: true '@rspack/binding-linux-s390x-gnu@2.2.1': optional: true + '@rspack/binding-linux-s390x-gnu@2.2.2': + optional: true + '@rspack/binding-linux-x64-gnu@2.2.0': optional: true '@rspack/binding-linux-x64-gnu@2.2.1': optional: true + '@rspack/binding-linux-x64-gnu@2.2.2': + optional: true + '@rspack/binding-linux-x64-musl@2.2.0': optional: true '@rspack/binding-linux-x64-musl@2.2.1': optional: true + '@rspack/binding-linux-x64-musl@2.2.2': + optional: true + '@rspack/binding-wasm32-wasi@2.2.0': dependencies: '@emnapi/core': 1.11.3 @@ -4097,24 +4236,40 @@ snapshots: '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) optional: true + '@rspack/binding-wasm32-wasi@2.2.2': + dependencies: + '@emnapi/core': 1.11.3 + '@emnapi/runtime': 1.11.3 + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) + optional: true + '@rspack/binding-win32-arm64-msvc@2.2.0': optional: true '@rspack/binding-win32-arm64-msvc@2.2.1': optional: true + '@rspack/binding-win32-arm64-msvc@2.2.2': + optional: true + '@rspack/binding-win32-ia32-msvc@2.2.0': optional: true '@rspack/binding-win32-ia32-msvc@2.2.1': optional: true + '@rspack/binding-win32-ia32-msvc@2.2.2': + optional: true + '@rspack/binding-win32-x64-msvc@2.2.0': optional: true '@rspack/binding-win32-x64-msvc@2.2.1': optional: true + '@rspack/binding-win32-x64-msvc@2.2.2': + optional: true + '@rspack/binding@2.2.0': optionalDependencies: '@rspack/binding-darwin-arm64': 2.2.0 @@ -4149,6 +4304,23 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 2.2.1 '@rspack/binding-win32-x64-msvc': 2.2.1 + '@rspack/binding@2.2.2': + optionalDependencies: + '@rspack/binding-darwin-arm64': 2.2.2 + '@rspack/binding-darwin-x64': 2.2.2 + '@rspack/binding-linux-arm64-gnu': 2.2.2 + '@rspack/binding-linux-arm64-musl': 2.2.2 + '@rspack/binding-linux-ppc64-gnu': 2.2.2 + '@rspack/binding-linux-riscv64-gnu': 2.2.2 + '@rspack/binding-linux-riscv64-musl': 2.2.2 + '@rspack/binding-linux-s390x-gnu': 2.2.2 + '@rspack/binding-linux-x64-gnu': 2.2.2 + '@rspack/binding-linux-x64-musl': 2.2.2 + '@rspack/binding-wasm32-wasi': 2.2.2 + '@rspack/binding-win32-arm64-msvc': 2.2.2 + '@rspack/binding-win32-ia32-msvc': 2.2.2 + '@rspack/binding-win32-x64-msvc': 2.2.2 + '@rspack/core@2.2.0(@swc/helpers@0.5.23)': dependencies: '@rspack/binding': 2.2.0 @@ -4161,11 +4333,17 @@ snapshots: optionalDependencies: '@swc/helpers': 0.5.23 - '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.2.1)(react-refresh@0.18.0)': + '@rspack/core@2.2.2(@swc/helpers@0.5.23)': + dependencies: + '@rspack/binding': 2.2.2 + optionalDependencies: + '@swc/helpers': 0.5.23 + + '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.2.2)(react-refresh@0.18.0)': dependencies: react-refresh: 0.18.0 optionalDependencies: - '@rspack/core': 2.2.1(@swc/helpers@0.5.23) + '@rspack/core': 2.2.2(@swc/helpers@0.5.23) '@rspress/core@2.0.21(micromark-util-types@2.0.2)(micromark@4.0.2)(supports-color@8.1.1)': dependencies: @@ -4225,7 +4403,7 @@ snapshots: '@rspress/shared@2.0.21(supports-color@8.1.1)': dependencies: - '@rsbuild/core': 2.2.0 + '@rsbuild/core': 2.2.1 '@shikijs/rehype': 4.3.1 '@types/react': 19.2.18 mdast-util-mdx-jsx: 3.2.0(supports-color@8.1.1) @@ -4245,9 +4423,9 @@ snapshots: '@rstackjs/test-utils@0.2.0': {} - '@rstest/adapter-rsbuild@0.11.11(@rsbuild/core@2.2.1)(@rstest/core@0.11.11)': + '@rstest/adapter-rsbuild@0.11.11(@rsbuild/core@2.2.2)(@rstest/core@0.11.11)': dependencies: - '@rsbuild/core': 2.2.1 + '@rsbuild/core': 2.2.2 '@rstest/core': 0.11.11(happy-dom@20.12.0) '@rstest/adapter-rslib@0.11.11(@rslib/core@1.0.0-rc.2)(@rstest/core@0.11.11)(typescript@7.0.2)': @@ -4259,7 +4437,7 @@ snapshots: '@rstest/core@0.11.11(happy-dom@20.12.0)': dependencies: - '@rsbuild/core': 2.2.0 + '@rsbuild/core': 2.2.2 '@types/chai': 5.2.3 optionalDependencies: happy-dom: 20.12.0 @@ -4902,7 +5080,7 @@ snapshots: property-information: 7.2.0 space-separated-tokens: 2.0.2 - heading-case@2.0.0(prettier@3.9.6): + heading-case@2.0.1(prettier@3.9.6): dependencies: prettier: 3.9.6 @@ -5732,16 +5910,16 @@ snapshots: mdast-util-to-markdown: 2.1.2 unified: 11.0.5 - rsbuild-plugin-dts@1.0.0-rc.2(@rsbuild/core@2.2.1)(typescript@7.0.2): + rsbuild-plugin-dts@1.0.0-rc.2(@rsbuild/core@2.2.2)(typescript@7.0.2): dependencies: '@ast-grep/napi': 0.45.1 - '@rsbuild/core': 2.2.1 + '@rsbuild/core': 2.2.2 optionalDependencies: typescript: 7.0.2 - rsbuild-plugin-open-graph@1.1.3(@rsbuild/core@2.2.1): + rsbuild-plugin-open-graph@1.1.3(@rsbuild/core@2.2.2): optionalDependencies: - '@rsbuild/core': 2.2.1 + '@rsbuild/core': 2.2.2 rslog@2.3.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 57e0dbbc..2eb4caeb 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -13,7 +13,7 @@ cleanupUnusedCatalogs: true catalog: '@napi-rs/cli': '^3.8.6' - '@rsbuild/core': '~2.2.1' + '@rsbuild/core': '~2.2.2' '@rsbuild/plugin-react': '^2.1.0' '@rsbuild/plugin-sass': '^2.0.1' '@rslib/core': '~1.0.0-rc.2' @@ -39,7 +39,7 @@ catalog: 'cspell-ban-words': '^0.0.4' 'fast-json-stable-stringify': '2.1.0' 'happy-dom': '^20.12.0' - 'heading-case': '^2.0.0' + 'heading-case': '^2.0.1' 'import-meta-resolve': '4.2.0' is-binary-path: 3.0.0 'lint-staged': '^17.4.1' From 6f692bb24de18c0fae095513b9cd03e507136787 Mon Sep 17 00:00:00 2001 From: Jiahan Chen Date: Wed, 2 Sep 2026 16:19:16 +0800 Subject: [PATCH 12/13] docs: clarify config imports in migration skill (#451) --- .agents/skills/migrate-to-rstack-cli/SKILL.md | 13 ++++++------- .../migrate-to-rstack-cli/references/rsbuild.md | 10 +++++----- .../migrate-to-rstack-cli/references/rspress.md | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.agents/skills/migrate-to-rstack-cli/SKILL.md b/.agents/skills/migrate-to-rstack-cli/SKILL.md index 0bb19579..770e99f6 100644 --- a/.agents/skills/migrate-to-rstack-cli/SKILL.md +++ b/.agents/skills/migrate-to-rstack-cli/SKILL.md @@ -72,23 +72,22 @@ define.test({ ### Modules and imports -Keep type-only and Node.js built-in imports at the top level. In async config functions, use a separate `await import(...)` for each tool-specific runtime dependency. +Rstack loads every top-level import when it reads `rstack.config.*`. Prefer static imports when a config is only for an application and its tests, a library and its tests, or a documentation site. + +If the same config also includes lint, formatting, or staged-file checks, dynamically import dependencies inside the relevant async config function to avoid loading them during checks. Keep type-only and Node.js built-in imports at the top level. ```ts define.app(async () => { const { pluginReact } = await import('@rsbuild/plugin-react'); - const { pluginSass } = await import('@rsbuild/plugin-sass'); return { - plugins: [pluginReact(), pluginSass()], + plugins: [pluginReact()], }; }); -``` - -`define.lint` provides `@rslint/core` APIs to its config factory, so no manual import is needed: -```ts define.lint(({ js }) => [js.configs.recommended]); ``` +`define.lint` provides `@rslint/core` APIs to its config factory, so no manual import is needed. + Rstack loads TypeScript configs as native ESM. Preserve runtime-resolvable file extensions, replace CommonJS globals such as `__dirname`. diff --git a/.agents/skills/migrate-to-rstack-cli/references/rsbuild.md b/.agents/skills/migrate-to-rstack-cli/references/rsbuild.md index 9abb19ee..21e0be9c 100644 --- a/.agents/skills/migrate-to-rstack-cli/references/rsbuild.md +++ b/.agents/skills/migrate-to-rstack-cli/references/rsbuild.md @@ -18,18 +18,18 @@ Read this reference when the project uses `@rsbuild/core`, `rsbuild.config.*`, ` ## Config pattern ```ts +import { pluginReact } from '@rsbuild/plugin-react'; import { define } from 'rstack'; -define.app(async () => { - const { pluginReact } = await import('@rsbuild/plugin-react'); - return { - plugins: [pluginReact()], - }; +define.app({ + plugins: [pluginReact()], }); ``` If tests also use Rstest, read [rstest.md](rstest.md). `rs test` derives an Rsbuild test extension from `define.app` unless `define.test` sets `extends`. +Follow [Modules and imports](../SKILL.md#modules-and-imports) when the config imports plugins or themes. + ## Validate Run the migrated app build script. Smoke-test dev or preview when those scripts changed or their behavior is material. diff --git a/.agents/skills/migrate-to-rstack-cli/references/rspress.md b/.agents/skills/migrate-to-rstack-cli/references/rspress.md index 9b7b79b4..e008fb3b 100644 --- a/.agents/skills/migrate-to-rstack-cli/references/rspress.md +++ b/.agents/skills/migrate-to-rstack-cli/references/rspress.md @@ -22,7 +22,7 @@ define.doc({ }); ``` -Use an async config and dynamic imports when plugins or themes require runtime imports. +Follow [Modules and imports](../SKILL.md#modules-and-imports) when the config imports plugins or themes. ## Validate From 7475a74e6b0eb29173ff305f3978d5ef0d442e01 Mon Sep 17 00:00:00 2001 From: Jiahan Chen Date: Wed, 2 Sep 2026 16:34:17 +0800 Subject: [PATCH 13/13] release: v0.7.2 (#452) --- packages/create-rstack/package.json | 2 +- .../template-app-lit-ts/package.json | 2 +- .../template-app-lit/package.json | 2 +- .../template-app-preact-ts/package.json | 2 +- .../template-app-preact/package.json | 2 +- .../template-app-react-ts/package.json | 2 +- .../template-app-react/package.json | 2 +- .../template-app-solid-ts/package.json | 2 +- .../template-app-solid/package.json | 2 +- .../template-app-svelte-ts/package.json | 2 +- .../template-app-svelte/package.json | 2 +- .../template-app-vanilla-ts/package.json | 2 +- .../template-app-vanilla/package.json | 2 +- .../template-app-vue-ts/package.json | 2 +- .../template-app-vue/package.json | 2 +- .../template-doc-i18n/package.json | 2 +- .../create-rstack/template-doc/package.json | 2 +- .../template-lib-node-ts/package.json | 2 +- .../template-lib-node/package.json | 2 +- .../template-lib-react-ts/package.json | 2 +- .../template-lib-react/package.json | 2 +- .../template-lib-solid-ts/package.json | 2 +- .../template-lib-solid/package.json | 2 +- .../template-lib-svelte-ts/package.json | 2 +- .../template-lib-svelte/package.json | 2 +- .../template-lib-vue-ts/package.json | 2 +- .../template-lib-vue/package.json | 2 +- packages/rstack/binding.cjs | 108 +++++++++--------- packages/rstack/package.json | 2 +- 29 files changed, 82 insertions(+), 82 deletions(-) diff --git a/packages/create-rstack/package.json b/packages/create-rstack/package.json index c4659f2c..7e88e66c 100644 --- a/packages/create-rstack/package.json +++ b/packages/create-rstack/package.json @@ -1,6 +1,6 @@ { "name": "create-rstack", - "version": "3.3.1", + "version": "3.3.2", "description": "Create a new Rstack project", "homepage": "https://rstack.rs", "bugs": { diff --git a/packages/create-rstack/template-app-lit-ts/package.json b/packages/create-rstack/template-app-lit-ts/package.json index 51b2914f..64469abf 100644 --- a/packages/create-rstack/template-app-lit-ts/package.json +++ b/packages/create-rstack/template-app-lit-ts/package.json @@ -19,7 +19,7 @@ "devDependencies": { "@types/node": "^26.4.0", "happy-dom": "^20.12.0", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "typescript": "^7.0.2" } } diff --git a/packages/create-rstack/template-app-lit/package.json b/packages/create-rstack/template-app-lit/package.json index 585e4dbf..233b74a5 100644 --- a/packages/create-rstack/template-app-lit/package.json +++ b/packages/create-rstack/template-app-lit/package.json @@ -18,6 +18,6 @@ }, "devDependencies": { "happy-dom": "^20.12.0", - "rstack": "^0.7.1" + "rstack": "^0.7.2" } } diff --git a/packages/create-rstack/template-app-preact-ts/package.json b/packages/create-rstack/template-app-preact-ts/package.json index 5236d8de..09f5a310 100644 --- a/packages/create-rstack/template-app-preact-ts/package.json +++ b/packages/create-rstack/template-app-preact-ts/package.json @@ -22,7 +22,7 @@ "@testing-library/preact": "^3.2.4", "@types/node": "^26.4.0", "happy-dom": "^20.12.0", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "typescript": "^7.0.2" } } diff --git a/packages/create-rstack/template-app-preact/package.json b/packages/create-rstack/template-app-preact/package.json index 5f8723d0..a24dc1b7 100644 --- a/packages/create-rstack/template-app-preact/package.json +++ b/packages/create-rstack/template-app-preact/package.json @@ -21,6 +21,6 @@ "@testing-library/jest-dom": "^7.0.1", "@testing-library/preact": "^3.2.4", "happy-dom": "^20.12.0", - "rstack": "^0.7.1" + "rstack": "^0.7.2" } } diff --git a/packages/create-rstack/template-app-react-ts/package.json b/packages/create-rstack/template-app-react-ts/package.json index dee6f040..809df38a 100644 --- a/packages/create-rstack/template-app-react-ts/package.json +++ b/packages/create-rstack/template-app-react-ts/package.json @@ -26,7 +26,7 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.5", "happy-dom": "^20.12.0", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "typescript": "^7.0.2" } } diff --git a/packages/create-rstack/template-app-react/package.json b/packages/create-rstack/template-app-react/package.json index 1803679a..72d74db5 100644 --- a/packages/create-rstack/template-app-react/package.json +++ b/packages/create-rstack/template-app-react/package.json @@ -23,6 +23,6 @@ "@testing-library/jest-dom": "^7.0.1", "@testing-library/react": "^16.3.3", "happy-dom": "^20.12.0", - "rstack": "^0.7.1" + "rstack": "^0.7.2" } } diff --git a/packages/create-rstack/template-app-solid-ts/package.json b/packages/create-rstack/template-app-solid-ts/package.json index d6c3bfc5..87d61893 100644 --- a/packages/create-rstack/template-app-solid-ts/package.json +++ b/packages/create-rstack/template-app-solid-ts/package.json @@ -23,7 +23,7 @@ "@testing-library/jest-dom": "^7.0.1", "@types/node": "^26.4.0", "happy-dom": "^20.12.0", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "typescript": "^7.0.2" } } diff --git a/packages/create-rstack/template-app-solid/package.json b/packages/create-rstack/template-app-solid/package.json index 4658a727..bfe81b8f 100644 --- a/packages/create-rstack/template-app-solid/package.json +++ b/packages/create-rstack/template-app-solid/package.json @@ -22,6 +22,6 @@ "@solidjs/testing-library": "^0.8.10", "@testing-library/jest-dom": "^7.0.1", "happy-dom": "^20.12.0", - "rstack": "^0.7.1" + "rstack": "^0.7.2" } } diff --git a/packages/create-rstack/template-app-svelte-ts/package.json b/packages/create-rstack/template-app-svelte-ts/package.json index 59e6159e..ea2cdf7e 100644 --- a/packages/create-rstack/template-app-svelte-ts/package.json +++ b/packages/create-rstack/template-app-svelte-ts/package.json @@ -23,7 +23,7 @@ "@types/node": "^26.4.0", "happy-dom": "^20.12.0", "prettier-plugin-svelte": "^4.1.1", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "svelte-check": "^4.7.6", "typescript": "^6.0.3" } diff --git a/packages/create-rstack/template-app-svelte/package.json b/packages/create-rstack/template-app-svelte/package.json index ea8bcf32..c135cc26 100644 --- a/packages/create-rstack/template-app-svelte/package.json +++ b/packages/create-rstack/template-app-svelte/package.json @@ -22,6 +22,6 @@ "@testing-library/svelte": "^5.4.2", "happy-dom": "^20.12.0", "prettier-plugin-svelte": "^4.1.1", - "rstack": "^0.7.1" + "rstack": "^0.7.2" } } diff --git a/packages/create-rstack/template-app-vanilla-ts/package.json b/packages/create-rstack/template-app-vanilla-ts/package.json index 14824c0a..49991bb9 100644 --- a/packages/create-rstack/template-app-vanilla-ts/package.json +++ b/packages/create-rstack/template-app-vanilla-ts/package.json @@ -18,7 +18,7 @@ "@testing-library/jest-dom": "^7.0.1", "@types/node": "^26.4.0", "happy-dom": "^20.12.0", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "typescript": "^7.0.2" } } diff --git a/packages/create-rstack/template-app-vanilla/package.json b/packages/create-rstack/template-app-vanilla/package.json index 13f715d9..08ed94ad 100644 --- a/packages/create-rstack/template-app-vanilla/package.json +++ b/packages/create-rstack/template-app-vanilla/package.json @@ -17,6 +17,6 @@ "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^7.0.1", "happy-dom": "^20.12.0", - "rstack": "^0.7.1" + "rstack": "^0.7.2" } } diff --git a/packages/create-rstack/template-app-vue-ts/package.json b/packages/create-rstack/template-app-vue-ts/package.json index 58b46f4c..62262ae6 100644 --- a/packages/create-rstack/template-app-vue-ts/package.json +++ b/packages/create-rstack/template-app-vue-ts/package.json @@ -22,7 +22,7 @@ "@types/node": "^26.4.0", "@vue/test-utils": "^2.5.0", "happy-dom": "^20.12.0", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "typescript": "^6.0.3", "vue-tsc": "^3.3.11" } diff --git a/packages/create-rstack/template-app-vue/package.json b/packages/create-rstack/template-app-vue/package.json index 85af4f52..65e3cead 100644 --- a/packages/create-rstack/template-app-vue/package.json +++ b/packages/create-rstack/template-app-vue/package.json @@ -21,6 +21,6 @@ "@testing-library/jest-dom": "^7.0.1", "@vue/test-utils": "^2.5.0", "happy-dom": "^20.12.0", - "rstack": "^0.7.1" + "rstack": "^0.7.2" } } diff --git a/packages/create-rstack/template-doc-i18n/package.json b/packages/create-rstack/template-doc-i18n/package.json index 53b8c934..a92a368b 100644 --- a/packages/create-rstack/template-doc-i18n/package.json +++ b/packages/create-rstack/template-doc-i18n/package.json @@ -18,7 +18,7 @@ "@types/react-dom": "^19.2.5", "react": "^19.2.8", "react-dom": "^19.2.8", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "typescript": "^7.0.2" } } diff --git a/packages/create-rstack/template-doc/package.json b/packages/create-rstack/template-doc/package.json index 9bf7406a..5f903907 100644 --- a/packages/create-rstack/template-doc/package.json +++ b/packages/create-rstack/template-doc/package.json @@ -18,7 +18,7 @@ "@types/react-dom": "^19.2.5", "react": "^19.2.8", "react-dom": "^19.2.8", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "typescript": "^7.0.2" } } diff --git a/packages/create-rstack/template-lib-node-ts/package.json b/packages/create-rstack/template-lib-node-ts/package.json index 62824ed9..8425e260 100644 --- a/packages/create-rstack/template-lib-node-ts/package.json +++ b/packages/create-rstack/template-lib-node-ts/package.json @@ -25,7 +25,7 @@ }, "devDependencies": { "@types/node": "^26.4.0", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "typescript": "^7.0.2" }, "engines": { diff --git a/packages/create-rstack/template-lib-node/package.json b/packages/create-rstack/template-lib-node/package.json index 505ad57b..32d99009 100644 --- a/packages/create-rstack/template-lib-node/package.json +++ b/packages/create-rstack/template-lib-node/package.json @@ -18,7 +18,7 @@ "test:watch": "rs test --watch" }, "devDependencies": { - "rstack": "^0.7.1" + "rstack": "^0.7.2" }, "engines": { "node": ">=22.12.0" diff --git a/packages/create-rstack/template-lib-react-ts/package.json b/packages/create-rstack/template-lib-react-ts/package.json index 941eb09a..98b3807f 100644 --- a/packages/create-rstack/template-lib-react-ts/package.json +++ b/packages/create-rstack/template-lib-react-ts/package.json @@ -33,7 +33,7 @@ "happy-dom": "^20.12.0", "react": "^19.2.8", "react-dom": "^19.2.8", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "typescript": "^7.0.2" }, "peerDependencies": { diff --git a/packages/create-rstack/template-lib-react/package.json b/packages/create-rstack/template-lib-react/package.json index 3180194f..9cafa3f4 100644 --- a/packages/create-rstack/template-lib-react/package.json +++ b/packages/create-rstack/template-lib-react/package.json @@ -25,7 +25,7 @@ "happy-dom": "^20.12.0", "react": "^19.2.8", "react-dom": "^19.2.8", - "rstack": "^0.7.1" + "rstack": "^0.7.2" }, "peerDependencies": { "react": ">=18.0.0", diff --git a/packages/create-rstack/template-lib-solid-ts/package.json b/packages/create-rstack/template-lib-solid-ts/package.json index 52229046..16a44674 100644 --- a/packages/create-rstack/template-lib-solid-ts/package.json +++ b/packages/create-rstack/template-lib-solid-ts/package.json @@ -30,7 +30,7 @@ "@testing-library/jest-dom": "^7.0.1", "@types/node": "^26.4.0", "happy-dom": "^20.12.0", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "solid-js": "^1.9.15", "typescript": "^7.0.2" }, diff --git a/packages/create-rstack/template-lib-solid/package.json b/packages/create-rstack/template-lib-solid/package.json index c26c5af1..d086fea2 100644 --- a/packages/create-rstack/template-lib-solid/package.json +++ b/packages/create-rstack/template-lib-solid/package.json @@ -27,7 +27,7 @@ "@solidjs/testing-library": "^0.8.10", "@testing-library/jest-dom": "^7.0.1", "happy-dom": "^20.12.0", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "solid-js": "^1.9.15" }, "peerDependencies": { diff --git a/packages/create-rstack/template-lib-svelte-ts/package.json b/packages/create-rstack/template-lib-svelte-ts/package.json index f98e438d..bb644b13 100644 --- a/packages/create-rstack/template-lib-svelte-ts/package.json +++ b/packages/create-rstack/template-lib-svelte-ts/package.json @@ -27,7 +27,7 @@ "@types/node": "^26.4.0", "happy-dom": "^20.12.0", "prettier-plugin-svelte": "^4.1.1", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "svelte": "^5.57.0", "svelte-check": "^4.7.6", "svelte2tsx": "^0.7.61", diff --git a/packages/create-rstack/template-lib-svelte/package.json b/packages/create-rstack/template-lib-svelte/package.json index 5e77a478..e2a8bcb0 100644 --- a/packages/create-rstack/template-lib-svelte/package.json +++ b/packages/create-rstack/template-lib-svelte/package.json @@ -20,7 +20,7 @@ "@rsbuild/plugin-svelte": "^2.0.1", "happy-dom": "^20.12.0", "prettier-plugin-svelte": "^4.1.1", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "svelte": "^5.57.0" }, "peerDependencies": { diff --git a/packages/create-rstack/template-lib-vue-ts/package.json b/packages/create-rstack/template-lib-vue-ts/package.json index 1a512ecf..35649759 100644 --- a/packages/create-rstack/template-lib-vue-ts/package.json +++ b/packages/create-rstack/template-lib-vue-ts/package.json @@ -28,7 +28,7 @@ "@types/node": "^26.4.0", "@vue/test-utils": "^2.5.0", "happy-dom": "^20.12.0", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "typescript": "^6.0.3", "vue": "^3.5.42", "vue-tsc": "^3.3.11" diff --git a/packages/create-rstack/template-lib-vue/package.json b/packages/create-rstack/template-lib-vue/package.json index 85842d19..67a997af 100644 --- a/packages/create-rstack/template-lib-vue/package.json +++ b/packages/create-rstack/template-lib-vue/package.json @@ -21,7 +21,7 @@ "@testing-library/jest-dom": "^7.0.1", "@vue/test-utils": "^2.5.0", "happy-dom": "^20.12.0", - "rstack": "^0.7.1", + "rstack": "^0.7.2", "vue": "^3.5.42" }, "peerDependencies": { diff --git a/packages/rstack/binding.cjs b/packages/rstack/binding.cjs index 7cb464f2..8e864704 100644 --- a/packages/rstack/binding.cjs +++ b/packages/rstack/binding.cjs @@ -77,8 +77,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-android-arm64') const bindingPackageVersion = require('@rstackjs/cli-android-arm64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -93,8 +93,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-android-arm-eabi') const bindingPackageVersion = require('@rstackjs/cli-android-arm-eabi/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -114,8 +114,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-win32-x64-gnu') const bindingPackageVersion = require('@rstackjs/cli-win32-x64-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -130,8 +130,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-win32-x64-msvc') const bindingPackageVersion = require('@rstackjs/cli-win32-x64-msvc/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -147,8 +147,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-win32-ia32-msvc') const bindingPackageVersion = require('@rstackjs/cli-win32-ia32-msvc/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -163,8 +163,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-win32-arm64-msvc') const bindingPackageVersion = require('@rstackjs/cli-win32-arm64-msvc/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -182,8 +182,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-darwin-universal') const bindingPackageVersion = require('@rstackjs/cli-darwin-universal/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -198,8 +198,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-darwin-x64') const bindingPackageVersion = require('@rstackjs/cli-darwin-x64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -214,8 +214,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-darwin-arm64') const bindingPackageVersion = require('@rstackjs/cli-darwin-arm64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -234,8 +234,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-freebsd-x64') const bindingPackageVersion = require('@rstackjs/cli-freebsd-x64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -250,8 +250,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-freebsd-arm64') const bindingPackageVersion = require('@rstackjs/cli-freebsd-arm64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -271,8 +271,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-linux-x64-musl') const bindingPackageVersion = require('@rstackjs/cli-linux-x64-musl/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -287,8 +287,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-linux-x64-gnu') const bindingPackageVersion = require('@rstackjs/cli-linux-x64-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -305,8 +305,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-linux-arm64-musl') const bindingPackageVersion = require('@rstackjs/cli-linux-arm64-musl/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -321,8 +321,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-linux-arm64-gnu') const bindingPackageVersion = require('@rstackjs/cli-linux-arm64-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -339,8 +339,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-linux-arm-musleabihf') const bindingPackageVersion = require('@rstackjs/cli-linux-arm-musleabihf/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -355,8 +355,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-linux-arm-gnueabihf') const bindingPackageVersion = require('@rstackjs/cli-linux-arm-gnueabihf/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -373,8 +373,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-linux-loong64-musl') const bindingPackageVersion = require('@rstackjs/cli-linux-loong64-musl/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -389,8 +389,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-linux-loong64-gnu') const bindingPackageVersion = require('@rstackjs/cli-linux-loong64-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -407,8 +407,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-linux-riscv64-musl') const bindingPackageVersion = require('@rstackjs/cli-linux-riscv64-musl/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -423,8 +423,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-linux-riscv64-gnu') const bindingPackageVersion = require('@rstackjs/cli-linux-riscv64-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -440,8 +440,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-linux-ppc64-gnu') const bindingPackageVersion = require('@rstackjs/cli-linux-ppc64-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -456,8 +456,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-linux-s390x-gnu') const bindingPackageVersion = require('@rstackjs/cli-linux-s390x-gnu/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -476,8 +476,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-openharmony-arm64') const bindingPackageVersion = require('@rstackjs/cli-openharmony-arm64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -492,8 +492,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-openharmony-x64') const bindingPackageVersion = require('@rstackjs/cli-openharmony-x64/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -508,8 +508,8 @@ function requireNative() { try { const binding = require('@rstackjs/cli-openharmony-arm') const bindingPackageVersion = require('@rstackjs/cli-openharmony-arm/package.json').version - if (bindingPackageVersion !== '0.7.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -648,8 +648,8 @@ if (!nativeBinding || forceWasi) { if (!candidateFailed) { if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { const bindingPackageVersion = require('@rstackjs/cli-wasm32-wasi/package.json').version - if (bindingPackageVersion !== '0.7.1') { - throw new Error(`WASI binding package version mismatch, expected 0.7.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.7.2') { + throw new Error(`WASI binding package version mismatch, expected 0.7.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } } wasiBinding = require('@rstackjs/cli-wasm32-wasi') diff --git a/packages/rstack/package.json b/packages/rstack/package.json index e253b036..d800a05b 100644 --- a/packages/rstack/package.json +++ b/packages/rstack/package.json @@ -1,6 +1,6 @@ { "name": "rstack", - "version": "0.7.1", + "version": "0.7.2", "description": "One CLI for JavaScript development, powered by Rstack.", "homepage": "https://rstack.rs", "bugs": {