From 7936f6867bb905cd92ab729dad6fe694bb25fc74 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 3 Sep 2026 19:16:13 +0800 Subject: [PATCH 1/2] chore: migrate to Rstack CLI --- .agents/skills/migrate-to-rstack-cli/SKILL.md | 99 ++ .../references/git-hooks.md | 87 ++ .../references/lint-staged.md | 32 + .../references/prettier.md | 39 + .../references/rsbuild.md | 35 + .../migrate-to-rstack-cli/references/rslib.md | 29 + .../references/rslint.md | 58 ++ .../references/rspress.md | 29 + .../references/rstest.md | 32 + .agents/skills/rstack-cli-docs/SKILL.md | 25 + .github/workflows/test.yml | 6 +- .prettierignore | 5 - .prettierrc | 3 - .rstack/hooks/pre-commit | 1 + .vscode/extensions.json | 2 +- .vscode/settings.json | 10 +- docs/migrate-v1-to-v2.md | 3 +- package.json | 36 +- pnpm-lock.yaml | 944 ++++++++---------- pnpm-workspace.yaml | 1 - rslib.config.ts | 53 - rslint.config.ts | 18 - rstack.config.ts | 104 ++ rstest.config.ts | 24 - skills-lock.json | 17 + tests/rstest-env.d.ts | 2 +- 26 files changed, 1048 insertions(+), 646 deletions(-) create mode 100644 .agents/skills/migrate-to-rstack-cli/SKILL.md create mode 100644 .agents/skills/migrate-to-rstack-cli/references/git-hooks.md create mode 100644 .agents/skills/migrate-to-rstack-cli/references/lint-staged.md create mode 100644 .agents/skills/migrate-to-rstack-cli/references/prettier.md create mode 100644 .agents/skills/migrate-to-rstack-cli/references/rsbuild.md create mode 100644 .agents/skills/migrate-to-rstack-cli/references/rslib.md create mode 100644 .agents/skills/migrate-to-rstack-cli/references/rslint.md create mode 100644 .agents/skills/migrate-to-rstack-cli/references/rspress.md create mode 100644 .agents/skills/migrate-to-rstack-cli/references/rstest.md create mode 100644 .agents/skills/rstack-cli-docs/SKILL.md delete mode 100644 .prettierignore delete mode 100644 .prettierrc create mode 100644 .rstack/hooks/pre-commit delete mode 100644 rslib.config.ts delete mode 100644 rslint.config.ts create mode 100644 rstack.config.ts delete mode 100644 rstest.config.ts create mode 100644 skills-lock.json diff --git a/.agents/skills/migrate-to-rstack-cli/SKILL.md b/.agents/skills/migrate-to-rstack-cli/SKILL.md new file mode 100644 index 0000000..1656aa4 --- /dev/null +++ b/.agents/skills/migrate-to-rstack-cli/SKILL.md @@ -0,0 +1,99 @@ +--- +name: migrate-to-rstack-cli +description: Use when migrating projects from standalone Rsbuild, Rslib, Rstest, Rslint, Rspress, Prettier, sort-package-json, lint-staged, husky, lefthook, or simple-git-hooks tooling to the unified `rstack` package, `rs` commands, and `rstack.config.*`. +--- + +# Migrate to Rstack CLI + +Rstack CLI is the `rstack` package, exposed through the `rs` binaries. It provides one CLI, one config file, and a consistent workflow for the Rstack JavaScript toolchain. + +## Tool references + +Read every matching reference before editing. Load only the tools present in the project. + +- `@rsbuild/core`, `rsbuild.config.*`, `rsbuild` commands, or Rsbuild types: [rsbuild.md](references/rsbuild.md) +- `@rslib/core`, `rslib.config.*`, `rslib` commands, or Rslib types: [rslib.md](references/rslib.md) +- `@rstest/core`, `@rstest/adapter-*`, `rstest.config.*`, `rstest` commands, or test imports: [rstest.md](references/rstest.md) +- `@rslint/core`, `rslint.config.*`, `rslint` commands, or lint imports: [rslint.md](references/rslint.md) +- `prettier`, `package.json#prettier`, `.prettierrc*`, `prettier.config.*`, `.prettierignore`, `.editorconfig`, `sort-package-json`, Prettier plugins, or formatting scripts: [prettier.md](references/prettier.md) +- `@rspress/core`, `rspress.config.*`, `rspress` commands, themes, or plugins: [rspress.md](references/rspress.md) +- `lint-staged`, `nano-staged`, their configs: [lint-staged.md](references/lint-staged.md) +- `husky`, `.husky/`, `package.json#husky`, `lefthook`, `simple-git-hooks`, `.simple-git-hooks.*`, or Git hook installer scripts: [git-hooks.md](references/git-hooks.md) + +## Workflow + +1. Inspect manifests, workspace catalogs, lock files, scripts, standalone configs, ignore files, Git hooks, TypeScript `types`, and source imports. +2. Read the matching references and inventory behavior that must survive: config functions, CLI arguments, plugins, presets, adapters, custom config paths, and chained commands. +3. Check the latest `rstack` release, Node.js engine, underlying tool versions, and relevant peer ranges. Upgrade incompatible plugins or adapters; stop if no compatible version exists. Ensure development and CI use supported Node.js versions, but do not narrow a published package's runtime `engines` solely to satisfy Rstack. Add `rstack` as a development dependency with the existing package manager. +4. If a matching reference uses a `define.*` registration, create `rstack.config.ts` and move the standalone configuration into it. +5. Rewrite commands and imports as directed by the references. +6. Search again for old imports, binaries, config paths, manifest entries, package-manager metadata, and type references. Remove an item only after ruling out direct or runtime use and unresolved peer constraints. +7. Delete a standalone config only after its behavior is represented in `rstack.config.*`. +8. Refresh the lockfile with the repository's package manager. Confirm the expected tool version changes and resolve peer dependency warnings. +9. Run migrated scripts and required repository checks. Compare generated artifacts or runtime behavior where relevant. After any follow-up changes, rerun the relevant checks against the final code. + +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. + +### Ignore cleanup + +After migrating lint or formatting, remove exclusions from lint `ignores` and fmt `ignorePatterns` when the same paths are already covered by effective `.gitignore` rules; both commands read `.gitignore` automatically. For fmt, also remove `package-lock.json` and `pnpm-lock.yaml` from `ignorePatterns`; `rs fmt` ignores them by default. + +Keep negations and fmt exclusions that must apply to explicitly passed files, which bypass `.gitignore`. + +### 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 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 + +### Config files + +Treat each workspace or config root independently. A monorepo may need multiple Rstack config files when commands run from different package directories; validate config discovery from each directory. + +Use one of the default names: `rstack.config.ts`, `.js`, `.mts`, or `.mjs`. + +Use `rs -c ` or `rs --config ` only for a custom path. + +```ts +// Configuration guide: https://rstack.rs/config +import { define } from 'rstack'; + +define.app({ + // Rsbuild config +}); + +define.test({ + // Rstest config +}); +``` + +### Modules and imports + +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'); + + return { + plugins: [pluginReact()], + }; +}); + +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/git-hooks.md b/.agents/skills/migrate-to-rstack-cli/references/git-hooks.md new file mode 100644 index 0000000..f51d63f --- /dev/null +++ b/.agents/skills/migrate-to-rstack-cli/references/git-hooks.md @@ -0,0 +1,87 @@ +# Git hook migration + +Migrate [Husky](https://typicode.github.io/husky/), [Lefthook](https://lefthook.dev/), or [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks#readme) to [`rs hooks`](https://rstack.rs/guide/cli/hooks). If a hook works with staged files, also read [lint-staged.md](lint-staged.md). + +## Shared steps + +1. Inspect the hook manager configuration, hook scripts, lifecycle scripts, custom paths, environment overrides, and `git config --show-scope --get core.hooksPath`. +2. Inventory every active hook before editing. Confirm each hook is [supported by `rs hooks`](https://rstack.rs/guide/cli/hooks#supported-hooks); stop or design an explicit alternative for unsupported hooks. +3. Create each migrated hook in the selected hooks directory, `.rstack/hooks` by default, before running `rs hooks`, because the command changes the repository's `core.hooksPath`. Preserve commands and any explicit directory changes. +4. Ensure the `prepare` script in the root `package.json` runs `rs hooks`, adding it if necessary. Remove the old installer invocation from any lifecycle script while preserving other commands. Use `--hooks-dir` consistently when choosing a custom directory. +5. If the previous manager's hooks or `core.hooksPath` block installation, run `rs hooks --force` once after migrating every required hook. The command preserves the previous files but makes them inactive. Do not add `--force` to the lifecycle script. +6. Exercise the migrated hooks, then remove the old dependency, configuration, and generated hook files only after behavior matches and their ownership and paths are confirmed. + +`rs hooks` creates `.rstack/hooks/_/.gitignore`. Do not list `.rstack/hooks/_` in the root `.gitignore`. + +## Husky + +1. Locate the source hooks: + - Husky v5 and newer: files such as `.husky/pre-commit`; exclude the generated `.husky/_` directory. + - Husky v4: `package.json#husky.hooks` or `.huskyrc*` configuration. +2. Move each hook body to the corresponding file in the selected hooks directory. Remove lines that source `.husky/_/husky.sh`; keep the reusable POSIX shell commands. +3. Replace Husky lifecycle invocations such as `husky`, `husky install`, or a custom Husky directory command with `rs hooks` or `rs hooks --hooks-dir `. +4. Replace `HUSKY=0`, `HUSKY_SKIP_HOOKS`, and `HUSKY_SKIP_INSTALL` usage with `RSTACK_HOOKS=0`. Replace `HUSKY_GIT_PARAMS` with the positional arguments expected by each hook. For example, change `commitlint -E HUSKY_GIT_PARAMS` to `commitlint --edit "$1"`. +5. Tell users who rely on `$XDG_CONFIG_HOME/husky/init.sh`, `~/.config/husky/init.sh`, or the deprecated `~/.huskyrc` to move the required shell setup to `$XDG_CONFIG_HOME/rstack/hooks-init.sh` or `~/.config/rstack/hooks-init.sh`. Do not edit user-level files without permission. +6. After validation, remove the Husky dependency and old hook directory. + +For example, migrate: + +```sh title=".husky/pre-commit" +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" +pnpm test +``` + +to: + +```sh title=".rstack/hooks/pre-commit" +pnpm test +``` + +## Lefthook + +1. Resolve the merged configuration, including main and local files, `LEFTHOOK_CONFIG`, `extends` or remote configs, lifecycle scripts, and direct `lefthook run` calls. Treat ignored local configs as user-owned. +2. Create one Rstack file per Git hook. Rstack runs it with POSIX `sh -e` and forwards arguments and standard input. Replace templates such as `{1}` with `"$1"`; move custom Lefthook groups to project scripts. +3. Move `pre-commit` tasks using `{staged_files}`, `stage_fixed`, `glob`, or `exclude` to `define.staged`, and run `rs staged` from `.rstack/hooks/pre-commit`; it passes matched files and stages successful fixes. Recreate the intended file set instead of copying globs: Lefthook's default `**` semantics differ from lint-staged. Preserve exclusions such as unsupported symlinks. +4. For `{push_files}`, `{all_files}`, custom `{files}`, or orchestration such as `parallel` and `piped`, call a project helper from the hook. It should consume all `pre-push` ref updates, apply the original conditions, preserve concurrency or ordering, and aggregate failures. For a configuration like Rstest's, run the format/spell check always, skip type checking only for Markdown-only pushes, and run the dependency check only for pushed package manifests. Do not substitute a fixed `HEAD^` diff. +5. Replace `lefthook install` with `rs hooks` and `LEFTHOOK=0` with `RSTACK_HOOKS=0`. After validation, remove Lefthook configs, dependencies, generated hooks, and its entries from pnpm build metadata such as `allowBuilds`, `onlyBuiltDependencies`, or `ignoredBuiltDependencies`. Preserve unrelated entries, and remove a setting only if it becomes empty. Remove local-config ignore rules only when no longer needed. + +## simple-git-hooks + +1. Load the active configuration from `package.json#simple-git-hooks`, a `.simple-git-hooks.{js,cjs,mjs,json}` or `simple-git-hooks.{js,cjs,mjs,json}` file, or the custom path passed to its CLI. Use the configuration values instead of copying generated files from the Git hooks directory. +2. Create one file in the selected hooks directory for each configured command, using the hook name as the file name. Ignore `preserveUnused` as a command, but inspect and migrate any existing hooks that it preserves. +3. Replace the simple-git-hooks lifecycle command with `rs hooks`, preserving other chained commands. +4. Replace `SKIP_INSTALL_SIMPLE_GIT_HOOKS=1` and `SKIP_SIMPLE_GIT_HOOKS=1` usage with `RSTACK_HOOKS=0`. Move required commands from the file referenced by `SIMPLE_GIT_HOOKS_RC` to the Rstack user initialization file, with user permission. +5. Do not run the simple-git-hooks uninstall script after `rs hooks`; it follows the current `core.hooksPath` and can delete Rstack's generated hook shims. +6. After validation, remove the simple-git-hooks dependency, config, installer, old generated hook files, and stale package-manager metadata such as pnpm `allowBuilds`. Confirm the generated files' ownership and paths before removing them. + +For example, migrate: + +```json title="package.json" +{ + "scripts": { + "prepare": "existing-command && simple-git-hooks" + }, + "simple-git-hooks": { + "pre-commit": "pnpm lint", + "pre-push": "pnpm test" + } +} +``` + +to `"prepare": "existing-command && rs hooks"` and these hook files: + +```sh title=".rstack/hooks/pre-commit" +pnpm lint +``` + +```sh title=".rstack/hooks/pre-push" +pnpm test +``` + +## Validate + +- Confirm `git config --show-scope --get core.hooksPath` reports the expected Rstack-generated directory and whether it is configured in the local or worktree scope. +- Test each migrated hook and confirm that its commands run as expected. +- Remove previous generated hooks after validation so they cannot become active again if `core.hooksPath` is later unset or changed. +- Search for old manager commands, configuration, environment variables, and user instructions before removing dependencies. diff --git a/.agents/skills/migrate-to-rstack-cli/references/lint-staged.md b/.agents/skills/migrate-to-rstack-cli/references/lint-staged.md new file mode 100644 index 0000000..87bddde --- /dev/null +++ b/.agents/skills/migrate-to-rstack-cli/references/lint-staged.md @@ -0,0 +1,32 @@ +# Staged-File Migration + +`rs staged` is powered by lint-staged and configured through `define.staged`, which supports lint-staged configuration options. + +Read this reference when the project uses `lint-staged`, `nano-staged`, a staged-file config, or a staged-file Git hook. + +If staged tasks invoke Prettier, also read [prettier.md](prettier.md). + +## Steps + +1. Replace staged-file script invocations with `rs staged`. +2. Move the staged-file config into `define.staged` in `rstack.config.*`. +3. Preserve previous behavior. Separate code tasks that lint and format from format-only tasks. +4. Remove the old manifest key or config file. +5. Remove the direct staged-file dependency only when no script, config, or programmatic API still uses it. + +## Config pattern + +```ts +import { define } from 'rstack'; + +define.staged({ + '*.{js,jsx,ts,tsx,mjs,cjs}': ['rs lint', 'rs fmt'], + '*.{json,jsonc,md,mdx,css,html,yml,yaml}': 'rs fmt', +}); +``` + +Function configs are supported. + +## CLI options + +Run `rs staged -h` for supported options. diff --git a/.agents/skills/migrate-to-rstack-cli/references/prettier.md b/.agents/skills/migrate-to-rstack-cli/references/prettier.md new file mode 100644 index 0000000..2c6dc1a --- /dev/null +++ b/.agents/skills/migrate-to-rstack-cli/references/prettier.md @@ -0,0 +1,39 @@ +# Prettier migration + +`rs fmt` is Rstack's faster, Prettier-based formatter. See the [formatting guide](https://rstack.rs/guide/formatting) for supported options, file discovery, overrides, plugins, and Rstack-specific capabilities. + +Read this reference when the project uses the `prettier` CLI or API, `package.json#prettier`, Prettier configuration files, `.prettierignore`, `.editorconfig`, `sort-package-json`, Prettier plugins, or formatting scripts. + +## Steps + +1. Inventory formatting commands and inputs, Prettier options and overrides, ignore rules, `.editorconfig`, plugins, package.json sorting, programmatic API calls, and tracked VS Code settings. +2. Move Prettier options and overrides into `define.fmt` in `rstack.config.*`. +3. Move `.prettierignore` or custom `--ignore-path` rules into `ignorePatterns`. Rebase patterns from each ignore file's directory to the Rstack configuration directory when they differ, preserving rule order and negations. Translate relevant `.editorconfig` values into explicit formatting options. +4. Replace Prettier CLI commands with the matching `rs fmt` commands and preserve their file or glob arguments. +5. Reference plugins by package name, file path, or URL. Do not pass imported plugin objects, and keep each plugin package as a direct dependency. +6. When replacing `prettier-plugin-packagejson`, enable `sortPackageJson` and preserve the original manifest paths. +7. If tracked VS Code configuration recommends `esbenp.prettier-vscode` or selects it with `editor.defaultFormatter`, replace it with `rstack.rstack` for scopes migrated to `rs fmt`, and move supported `prettier.*` formatting options into `define.fmt`. Preserve `editor.formatOnSave`, remove `source.fixAll.prettier` when no remaining scope uses it, and keep the Prettier extension for any scope that still does. +8. Delete old config and ignore files only after their behavior is represented in `define.fmt`. +9. Remove direct dependencies only when no script, config, API call, plugin peer requirement, or other tool still needs them. + +Rstack creates `.rstack/cache/.gitignore` by default. Do not list `.rstack/cache` in the root `.gitignore`; add explicit rules only for custom cache paths. + +`rs fmt` does not read Prettier configuration files, `.prettierignore`, or `.editorconfig`. + +Keep `.editorconfig` when editors or other tools use it. Keep Prettier when application code uses APIs such as `prettier.format()`; `rs fmt` is not a drop-in replacement for the programmatic API. + +## Command mapping + +| Prettier | Rstack CLI | +| ----------------------------- | ------------------------- | +| `prettier --write .` | `rs fmt` | +| `prettier --check .` | `rs fmt --check` | +| `prettier --list-different .` | `rs fmt --list-different` | + +`rs fmt` writes by default. Move formatting flags such as `--single-quote` into `define.fmt` instead of passing them to `rs fmt`. Keep Prettier or redesign commands that rely on stdin or other unsupported CLI behavior. + +## Validate + +1. Run the migrated write command and review the changed files, especially files handled by plugins or `sortPackageJson`. +2. Run `rs fmt --check` and confirm it exits successfully. +3. Compare the selected file set with the old command. Directory and glob discovery follows `.gitignore`, while explicitly named files do not; use `ignorePatterns` for unconditional exclusions. diff --git a/.agents/skills/migrate-to-rstack-cli/references/rsbuild.md b/.agents/skills/migrate-to-rstack-cli/references/rsbuild.md new file mode 100644 index 0000000..21e0be9 --- /dev/null +++ b/.agents/skills/migrate-to-rstack-cli/references/rsbuild.md @@ -0,0 +1,35 @@ +# Rsbuild migration + +Read this reference when the project uses `@rsbuild/core`, `rsbuild.config.*`, `rsbuild` commands, Rsbuild client types, or `@rsbuild/core/types`. + +## Steps + +1. Replace `rsbuild dev`, `rsbuild build`, and `rsbuild preview` with `rs dev`, `rs build`, and `rs preview`. Preserve supported arguments after the new command. +2. Move the old config export into `define.app`, replacing Rsbuild's `defineConfig()` wrapper and import. Preserve async functions, config parameters, plugins, and all options. +3. Replace custom `--config` paths with the migrated `rstack.config.*` path. +4. Replace Rsbuild client and type references: + - `/// ` to `/// ` + - `"types": ["@rsbuild/core/types"]` to `"types": ["rstack/types"]` + - Type-only imports from `@rsbuild/core/types` to `rstack/types` +5. Keep Rsbuild plugins such as `@rsbuild/plugin-react` and `@rsbuild/plugin-vue`, but verify that their peer ranges support the `@rsbuild/core` version installed through `rstack`. Upgrade incompatible plugins before migrating; retaining an older direct core does not make Rstack use it. +6. Search for remaining direct `@rsbuild/core` imports. Remove the direct dependency when no source or runtime API still needs it. +7. Delete `rsbuild.config.*` after the migrated app commands load equivalent config. + +## Config pattern + +```ts +import { pluginReact } from '@rsbuild/plugin-react'; +import { define } from 'rstack'; + +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/rslib.md b/.agents/skills/migrate-to-rstack-cli/references/rslib.md new file mode 100644 index 0000000..ddc34de --- /dev/null +++ b/.agents/skills/migrate-to-rstack-cli/references/rslib.md @@ -0,0 +1,29 @@ +# Rslib migration + +Read this reference when the project uses `@rslib/core`, `rslib.config.*`, `rslib` commands, library build config, or Rslib type imports. + +## Steps + +1. Replace the `rslib` executable prefix with `rs lib`. Preserve supported arguments after `rs lib`. +2. Rename or replace the `rslib.config.*` with `rstack.config.*`, then move its export into `define.lib`, replacing Rslib's `defineConfig()` wrapper and import. Preserve async functions, config parameters, plugins, and all options. +3. Keep build plugins, but verify that Rsbuild plugin peer ranges support the core version installed through `rstack`. Upgrade incompatible plugins before migrating. +4. Replace `@rslib/core/types` references with `rstack/types` where applicable. +5. Replace custom `--config` paths with the migrated `rstack.config.*` path. +6. Search for remaining direct `@rslib/core` imports. Remove the direct dependency only when no source or runtime API still needs it. +7. Delete `rslib.config.*` after the migrated library commands load equivalent config. + +## Config pattern + +```ts +import { define } from 'rstack'; + +define.lib({ + dts: true, +}); +``` + +If tests also use Rstest, read [rstest.md](rstest.md). `rs test` derives an Rslib test extension from `define.lib` unless `define.test` sets `extends`. + +## Validate + +Run every migrated library build from its directory and compare its outputs. diff --git a/.agents/skills/migrate-to-rstack-cli/references/rslint.md b/.agents/skills/migrate-to-rstack-cli/references/rslint.md new file mode 100644 index 0000000..8910d91 --- /dev/null +++ b/.agents/skills/migrate-to-rstack-cli/references/rslint.md @@ -0,0 +1,58 @@ +# Rslint migration + +Read this reference when the project uses `@rslint/core`, `rslint.config.*`, `rslint` commands, or Rslint config imports. + +## Steps + +1. Replace the `rslint` executable prefix with `rs lint`. For example, replace `rslint --fix` with `rs lint --fix`. +2. Move the old config into `define.lint`, replacing Rslint's `defineConfig()` wrapper and import. Receive `@rslint/core` exports from the factory parameter. +3. If the old config imports the `globals` package for environment maps such as `globals.browser`, receive `globals` from the factory parameter instead. Remove the direct `globals` dependency after confirming that no other file uses it. +4. Replace custom `--config` paths with the migrated `rstack.config.*` path. +5. Remove `@rslint/core` only when no uncovered direct runtime API remains. Delete `rslint.config.*`. +6. If tracked VS Code configuration recommends `rstack.rslint`, replace it with the unified `rstack.rstack` extension. Move relevant `rslint.*` settings to their current `rstack.rslint.*` equivalents according to the [Rstack extension documentation](https://github.com/rstackjs/rstack-editor/blob/main/packages/vscode/README.md). Keep `source.fixAll.rslint` unchanged. + +## Config pattern + +```ts +import { define } from 'rstack'; + +define.lint(({ js, ts }) => [ + js.configs.recommended, + ts.configs.recommendedTypeChecked, +]); +``` + +Preserve existing presets and rules during migration. + +The factory also provides Rslint's built-in globals catalog, so an external `globals` import is unnecessary: + +```ts +define.lint(({ globals }) => [ + { + files: ['**/*.{js,cjs,mjs}'], + languageOptions: { + globals: globals.browser, + }, + }, +]); +``` + +## Script pattern + +For example: + +```json +{ + "scripts": { + "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. diff --git a/.agents/skills/migrate-to-rstack-cli/references/rspress.md b/.agents/skills/migrate-to-rstack-cli/references/rspress.md new file mode 100644 index 0000000..e008fb3 --- /dev/null +++ b/.agents/skills/migrate-to-rstack-cli/references/rspress.md @@ -0,0 +1,29 @@ +# Rspress migration + +Read this reference when the project uses `@rspress/core`, `rspress.config.*`, `rspress` commands, docs config, themes, or plugins. + +## Steps + +1. Keep `@rspress/core` installed as a direct dependency. `rs doc` requires this optional Rstack peer dependency. +2. Replace the `rspress` executable prefix with `rs doc`: `rspress dev` to `rs doc`, `rspress build` to `rs doc build`, and `rspress preview` to `rs doc preview`. Preserve supported arguments. +3. Rename or replace the `rspress.config.*` with `rstack.config.*`, then move its export into `define.doc`, replacing Rspress's `defineConfig()` wrapper and import. Preserve async functions, themes, plugins, and all options. +4. Replace custom `--config` paths with the migrated `rstack.config.*` path. +5. Keep Rspress-specific type imports from `@rspress/core`; Rstack does not re-export them. +6. Keep themes, plugins, and docs UI packages. Delete `rspress.config.*` only after the migrated docs commands load equivalent config. + +## Config pattern + +```ts +import { define } from 'rstack'; + +define.doc({ + root: 'docs', + title: 'Project docs', +}); +``` + +Follow [Modules and imports](../SKILL.md#modules-and-imports) when the config imports plugins or themes. + +## Validate + +Run the migrated docs build script. Smoke-test dev or preview when those workflows changed. diff --git a/.agents/skills/migrate-to-rstack-cli/references/rstest.md b/.agents/skills/migrate-to-rstack-cli/references/rstest.md new file mode 100644 index 0000000..be5d1b8 --- /dev/null +++ b/.agents/skills/migrate-to-rstack-cli/references/rstest.md @@ -0,0 +1,32 @@ +# Rstest migration + +Read this reference when the project uses `@rstest/core`, `@rstest/adapter-rsbuild`, `@rstest/adapter-rslib`, `rstest.config.*`, `rstest` commands, or Rstest imports and types. + +## Steps + +1. Replace the `rstest` executable prefix with `rs test`. Preserve supported arguments, such as `-w`, after `rs test`. +2. Move test options into `define.test`, replacing Rstest's `defineConfig()` wrapper and import. +3. Remove standard `withRsbuildConfig()` or `withRslibConfig()` wiring only when `define.app` or `define.lib` is registered by the same `rstack.config.*` loaded by `rs test`. Rstack derives that extension unless `define.test` sets `extends`. +4. Preserve explicit custom `extends` values. Keep any adapter or package still imported by that custom extension. +5. Replace imports and TypeScript `types` entries: + - `@rstest/core` to `rstack/test` + - `@rstest/core/globals` to `rstack/test/globals` + - `@rstest/core/importMeta` to `rstack/test/importMeta` +6. Search for remaining direct core or adapter imports. Remove `@rstest/core` and adapter dependencies only when no direct use remains. +7. Delete `rstest.config.*` after all behavior is represented or intentionally supplied by automatic app/library extension. +8. If tracked VS Code configuration recommends `rstack.rstest`, replace it with the unified `rstack.rstack` extension. Move supported `rstest.*` settings to `rstack.rstest.*` according to the [Rstack extension documentation](https://github.com/rstackjs/rstack-editor/blob/main/packages/vscode/README.md); `rstest.nodeExecutable` instead becomes the shared `rstack.nodeExecutable` setting. + +## Config pattern + +```ts +import { define } from 'rstack'; + +define.test({ + setupFiles: ['./tests/setup.ts'], + testEnvironment: 'happy-dom', +}); +``` + +## Validate + +Run the migrated test script. Follow repository requirements such as building before tests. diff --git a/.agents/skills/rstack-cli-docs/SKILL.md b/.agents/skills/rstack-cli-docs/SKILL.md new file mode 100644 index 0000000..811b1ae --- /dev/null +++ b/.agents/skills/rstack-cli-docs/SKILL.md @@ -0,0 +1,25 @@ +--- +name: rstack-cli-docs +description: Consult installed, version-matched Rstack docs only for user-facing `rs` command behavior, `rstack.config.*` semantics, or public `rstack` APIs. Do not use for purely internal implementation, tests, performance, or repository maintenance. +--- + +# Rstack CLI docs + +Rstack CLI is the `rstack` package, exposed through the `rs` binaries. It provides one CLI, one +config file, and a consistent workflow for the Rstack JavaScript toolchain. + +It covers web app, library, docs, test, lint, formatting, Git hook, and staged-file workflows. + +## Read installed docs when this skill applies + +When this skill applies, find and read the relevant Markdown documentation shipped with the installed `rstack` package. + +Model knowledge can be outdated; the installed documentation is the source of truth for the project's Rstack version. + +1. Start with `node_modules/rstack/docs/llms.txt`, then read only the linked pages relevant to the task before proposing or making changes. + +2. For exact CLI flags and behavior, also run `rs -h` or `rs -h` when supported. + +If the bundled docs are not available at that path, locate the installed `rstack` package. + +If they are still unavailable, verify that `rstack` is installed, and use CLI help plus the online [Rstack documentation](https://rstack.rs/) as a fallback. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39723e1..2bbf0a7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,7 +78,5 @@ jobs: with: run_install: true - - name: Lint - run: | - pnpm run prettier:ci - pnpm run lint + - name: Check + run: pnpm run check diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index b704893..0000000 --- a/.prettierignore +++ /dev/null @@ -1,5 +0,0 @@ -dist -node_modules -client -*.tsbuildinfo -pnpm-lock.yaml diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 544138b..0000000 --- a/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "singleQuote": true -} diff --git a/.rstack/hooks/pre-commit b/.rstack/hooks/pre-commit new file mode 100644 index 0000000..8890b96 --- /dev/null +++ b/.rstack/hooks/pre-commit @@ -0,0 +1 @@ +rs staged diff --git a/.vscode/extensions.json b/.vscode/extensions.json index f172f18..72d54ca 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["rstack.rslint", "esbenp.prettier-vscode"] + "recommendations": ["rstack.rstack"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 38b7e0b..0157396 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,18 +1,18 @@ { "search.useIgnoreFiles": true, "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "rstack.rstack" }, "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "rstack.rstack" }, "[javascript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "rstack.rstack" }, "[javascriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "rstack.rstack" }, "[css]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "rstack.rstack" } } diff --git a/docs/migrate-v1-to-v2.md b/docs/migrate-v1-to-v2.md index 24247ef..5acbc1b 100644 --- a/docs/migrate-v1-to-v2.md +++ b/docs/migrate-v1-to-v2.md @@ -99,8 +99,7 @@ export default { watchFiles: { paths: '.', options: { - ignored: (path, stats) => - stats?.isFile() && !path.endsWith('.js'), + ignored: (path, stats) => stats?.isFile() && !path.endsWith('.js'), }, }, }, diff --git a/package.json b/package.json index f8d7b51..6302c33 100644 --- a/package.json +++ b/package.json @@ -22,39 +22,24 @@ "client" ], "scripts": { - "build": "rslib", - "bump": "npx bumpp", - "dev": "rslib -w", - "format": "prettier --write .", - "lint": "rslint", - "lint:write": "rslint --fix", - "prettier:ci": "prettier --check .", - "test": "pnpm run test:type && rstest", + "build": "rs lib", + "bump": "pnpx bumpp", + "check": "rs check", + "dev": "rs lib -w", + "format": "rs fmt", + "lint": "rs lint", + "prepare": "rs hooks", + "test": "pnpm run test:type && rs test", "test:type": "pnpm run build && pnpm --dir tests run type-check" }, - "simple-git-hooks": { - "pre-commit": "npx nano-staged" - }, - "nano-staged": { - "*.{yaml,yml,json,md,json5}": [ - "npm run format" - ], - "*.{js,jsx,ts,tsx,mjs,cjs}": [ - "npm run format", - "rslint --fix" - ] - }, "dependencies": { "@rspack/dev-middleware": "^2.0.3" }, "devDependencies": { "@hono/node-server": "^2.1.1", "@microsoft/api-extractor": "^7.59.0", - "@rslib/core": "^0.23.2", - "@rslint/core": "^0.9.0", - "@rspack/core": "2.0.0-rc.0", + "@rspack/core": "2.2.2", "@rspack/plugin-react-refresh": "2.0.2", - "@rstest/core": "^0.11.11", "@types/connect-history-api-fallback": "^1.5.4", "@types/mime-types": "3.0.1", "@types/node": "^24.13.3", @@ -72,16 +57,15 @@ "http-proxy-middleware": "4.2.0", "ipaddr.js": "^2.5.0", "launch-editor": "^2.14.1", - "nano-staged": "^1.0.2", "open": "^11.0.2", "p-retry": "^7.1.1", "prettier": "3.9.6", "puppeteer": "^24.43.1", "react-refresh": "0.18.0", "require-from-string": "^2.0.2", + "rstack": "^0.7.2", "selfsigned": "^5.5.0", "serve-static": "^2.2.1", - "simple-git-hooks": "^2.14.0", "typescript": "^7.0.2", "ws": "^8.21.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 98dee8c..5a2a50a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: dependencies: '@rspack/dev-middleware': specifier: ^2.0.3 - version: 2.0.3(@rspack/core@2.0.0-rc.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23)) + version: 2.0.3(@rspack/core@2.2.2(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23)) devDependencies: '@hono/node-server': specifier: ^2.1.1 @@ -18,21 +18,12 @@ importers: '@microsoft/api-extractor': specifier: ^7.59.0 version: 7.59.0(@types/node@24.13.3) - '@rslib/core': - specifier: ^0.23.2 - version: 0.23.2(@microsoft/api-extractor@7.59.0(@types/node@24.13.3))(@module-federation/runtime-tools@2.9.0)(typescript@7.0.2) - '@rslint/core': - specifier: ^0.9.0 - version: 0.9.0 '@rspack/core': - specifier: 2.0.0-rc.0 - version: 2.0.0-rc.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23) + specifier: 2.2.2 + version: 2.2.2(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23) '@rspack/plugin-react-refresh': specifier: 2.0.2 - version: 2.0.2(@rspack/core@2.0.0-rc.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23))(react-refresh@0.18.0) - '@rstest/core': - specifier: ^0.11.11 - version: 0.11.11(@module-federation/runtime-tools@2.9.0) + version: 2.0.2(@rspack/core@2.2.2(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23))(react-refresh@0.18.0) '@types/connect-history-api-fallback': specifier: ^1.5.4 version: 1.5.4 @@ -84,9 +75,6 @@ importers: launch-editor: specifier: ^2.14.1 version: 2.14.1 - nano-staged: - specifier: ^1.0.2 - version: 1.0.2 open: specifier: ^11.0.2 version: 11.0.2 @@ -105,15 +93,15 @@ importers: require-from-string: specifier: ^2.0.2 version: 2.0.2 + rstack: + specifier: ^0.7.2 + version: 0.7.2(@microsoft/api-extractor@7.59.0(@types/node@24.13.3))(@module-federation/runtime-tools@2.9.0)(typescript@7.0.2) selfsigned: specifier: ^5.5.0 version: 5.5.0 serve-static: specifier: ^2.2.1 version: 2.2.1(supports-color@8.1.1) - simple-git-hooks: - specifier: ^2.14.0 - version: 2.14.0 typescript: specifier: ^7.0.2 version: 7.0.2 @@ -144,66 +132,66 @@ importers: packages: - '@ast-grep/napi-darwin-arm64@0.37.0': - resolution: {integrity: sha512-QAiIiaAbLvMEg/yBbyKn+p1gX2/FuaC0SMf7D7capm/oG4xGMzdeaQIcSosF4TCxxV+hIH4Bz9e4/u7w6Bnk3Q==} + '@ast-grep/napi-darwin-arm64@0.45.2': + resolution: {integrity: sha512-29+sfXTJ7xxqgTuWAHA89gDAQIiJyAZ1ZiHoupjKIqyn0mhXrktO1WOghlDzyYs++hITEPOeXftxy48Y0tDGDQ==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@ast-grep/napi-darwin-x64@0.37.0': - resolution: {integrity: sha512-zvcvdgekd4ySV3zUbUp8HF5nk5zqwiMXTuVzTUdl/w08O7JjM6XPOIVT+d2o/MqwM9rsXdzdergY5oY2RdhSPA==} + '@ast-grep/napi-darwin-x64@0.45.2': + resolution: {integrity: sha512-PUjh7Zf4dKNzYLOYhX5wU6O4BgRPdJnD9zkS1n+/5SeK0U1L5YL486RjNgFt9Xyff0PGtP/wDeoHMF5PhKEwsw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@ast-grep/napi-linux-arm64-gnu@0.37.0': - resolution: {integrity: sha512-L7Sj0lXy8X+BqSMgr1LB8cCoWk0rericdeu+dC8/c8zpsav5Oo2IQKY1PmiZ7H8IHoFBbURLf8iklY9wsD+cyA==} + '@ast-grep/napi-linux-arm64-gnu@0.45.2': + resolution: {integrity: sha512-bnGKLLHWO13pjPChOFq7Ifqj3HJdOAxMQAGDCUC2JSJhO2YL8/xBZrpN0cHIWNuoUNSAXjCtr5AsCnPz/3jlFg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] libc: [glibc] - '@ast-grep/napi-linux-arm64-musl@0.37.0': - resolution: {integrity: sha512-LF9sAvYy6es/OdyJDO3RwkX3I82Vkfsng1sqUBcoWC1jVb1wX5YVzHtpQox9JrEhGl+bNp7FYxB4Qba9OdA5GA==} + '@ast-grep/napi-linux-arm64-musl@0.45.2': + resolution: {integrity: sha512-FXVb4/V55THjhKxi5zWVrAO8JQj+/DiYP7JLsqenkm5V3UNuC8p2opGOyQpUvNpvcqJiZA9Hl+Onj/yfwSVr/A==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] libc: [musl] - '@ast-grep/napi-linux-x64-gnu@0.37.0': - resolution: {integrity: sha512-TViz5/klqre6aSmJzswEIjApnGjJzstG/SE8VDWsrftMBMYt2PTu3MeluZVwzSqDao8doT/P+6U11dU05UOgxw==} + '@ast-grep/napi-linux-x64-gnu@0.45.2': + resolution: {integrity: sha512-mtEIPLV9MW2PBswFcp3ydM4T5Ub73s89SRd0QMT2+DfA9XBLCLhnC+r/Yt4eRgnf8FyNx49bFTPxXvFKscr9hw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] libc: [glibc] - '@ast-grep/napi-linux-x64-musl@0.37.0': - resolution: {integrity: sha512-/BcCH33S9E3ovOAEoxYngUNXgb+JLg991sdyiNP2bSoYd30a9RHrG7CYwW6fMgua3ijQ474eV6cq9yZO1bCpXg==} + '@ast-grep/napi-linux-x64-musl@0.45.2': + resolution: {integrity: sha512-WLLHxDmuXkb/e3mz/xDCrB2dZPzv1ntsepuRTtpaIGczxnQTgFSzX/CXPD0e1MfsU/QL1AiXxxni8w+NGy/ZpQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] libc: [musl] - '@ast-grep/napi-win32-arm64-msvc@0.37.0': - resolution: {integrity: sha512-TjQA4cFoIEW2bgjLkaL9yqT4XWuuLa5MCNd0VCDhGRDMNQ9+rhwi9eLOWRaap3xzT7g+nlbcEHL3AkVCD2+b3A==} + '@ast-grep/napi-win32-arm64-msvc@0.45.2': + resolution: {integrity: sha512-04iOFaMzD2nf8CKw3nURWN42900wqPtUTQaMo1I2KRk3qbgtHSJjJoVJGAWUXkCq4LhPg3Xlk1s+ssWf4rNm2A==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@ast-grep/napi-win32-ia32-msvc@0.37.0': - resolution: {integrity: sha512-uNmVka8fJCdYsyOlF9aZqQMLTatEYBynjChVTzUfFMDfmZ0bihs/YTqJVbkSm8TZM7CUX82apvn50z/dX5iWRA==} + '@ast-grep/napi-win32-ia32-msvc@0.45.2': + resolution: {integrity: sha512-tE3y0RQcajocKwpYLbgHKd4lzGGAx1wGMA0bGPsWdoFK8VSob6ZDuYdSlSdnaRs8jAc4F3axToNRKn15p+0/Dg==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@ast-grep/napi-win32-x64-msvc@0.37.0': - resolution: {integrity: sha512-vCiFOT3hSCQuHHfZ933GAwnPzmL0G04JxQEsBRfqONywyT8bSdDc/ECpAfr3S9VcS4JZ9/F6tkePKW/Om2Dq2g==} + '@ast-grep/napi-win32-x64-msvc@0.45.2': + resolution: {integrity: sha512-o8Z5Z42TAJe0fPnb11rrjtte58wlw/MuR4KpVMHl8IhJLBBR7gHR0E8wfMz88TxzsQz0U2KYev0k0a2fV4i0sQ==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@ast-grep/napi@0.37.0': - resolution: {integrity: sha512-Hb4o6h1Pf6yRUAX07DR4JVY7dmQw+RVQMW5/m55GoiAT/VRoKCWBtIUPPOnqDVhbx1Cjfil9b6EDrgJsUAujEQ==} + '@ast-grep/napi@0.45.2': + resolution: {integrity: sha512-hBA5c7JV6OM7zFWoLjUNZhsDpxEIEIeew5S3z1giwK5tPQqobuFfM2OhS45bN3E0+yQtgCX/o8/AEHKbGD3ykg==} engines: {node: '>= 10'} '@babel/code-frame@7.29.0': @@ -218,30 +206,12 @@ packages: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} - '@emnapi/core@1.11.1': - resolution: {integrity: sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==} - '@emnapi/core@1.11.3': resolution: {integrity: sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==} - '@emnapi/core@1.9.1': - resolution: {integrity: sha512-mukuNALVsoix/w1BJwFzwXBN/dHeejQtuVzcDsfOEsdpCumXb/E9j8w11h5S54tT1xhifGfbbSm/ICrObRb3KA==} - - '@emnapi/runtime@1.11.1': - resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==} - '@emnapi/runtime@1.11.3': resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==} - '@emnapi/runtime@1.9.1': - resolution: {integrity: sha512-VYi5+ZVLhpgK4hQ0TAjiQiZ6ol0oe4mBx7mVv7IflsiEp0OWoVsp/+f9Vc1hOhE0TtkORVrI1GvzyreqpgWtkA==} - - '@emnapi/wasi-threads@1.2.0': - resolution: {integrity: sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==} - - '@emnapi/wasi-threads@1.2.2': - resolution: {integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==} - '@emnapi/wasi-threads@1.2.3': resolution: {integrity: sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==} @@ -290,12 +260,6 @@ packages: '@napi-rs/wasm-runtime@1.0.7': resolution: {integrity: sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==} - '@napi-rs/wasm-runtime@1.1.2': - resolution: {integrity: sha512-sNXv5oLJ7ob93xkZ1XnxisYhGYXfaG9f65/ZgYuAu3qt7b3NadcOEhLvx28hv31PgX8SZJRYrAIPQilQmFpLVw==} - peerDependencies: - '@emnapi/core': ^1.7.1 - '@emnapi/runtime': ^1.7.1 - '@napi-rs/wasm-runtime@1.1.6': resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==} peerDependencies: @@ -345,8 +309,8 @@ packages: engines: {node: '>=18'} hasBin: true - '@rsbuild/core@2.1.5': - resolution: {integrity: sha512-7TW4U1SH7VxQZzSTIOzvwj5lo9uNTmGpsmTXFr4axQAE4giLDKP3kVUA1ZW4P3/Mz4QQJJyvZP29mVcb8kZCfg==} + '@rsbuild/core@2.2.1': + resolution: {integrity: sha512-JcGtG4bo7PBihj6fBL6gaxaJihqLf7nGWW/t4zEmXpMJkV6XNdr1jAo9B0xI4mLAOmtFeva8cUbn9SE2ZEmAIw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -355,8 +319,8 @@ packages: core-js: optional: true - '@rsbuild/core@2.2.1': - resolution: {integrity: sha512-JcGtG4bo7PBihj6fBL6gaxaJihqLf7nGWW/t4zEmXpMJkV6XNdr1jAo9B0xI4mLAOmtFeva8cUbn9SE2ZEmAIw==} + '@rsbuild/core@2.2.3': + resolution: {integrity: sha512-oJrYtYDhb7AMwY8HIda2hgMuuxHkYPYar4svdS5uTq0fXY0M1wLfllkTQz0d729pNJ4S//6GUM1WX5LsW2mFLw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -365,13 +329,13 @@ packages: core-js: optional: true - '@rslib/core@0.23.2': - resolution: {integrity: sha512-KxSp+/y0BJ1O4oKwxX4ydBY7/ZVeJCUpWAmQniCIct8mTxIQFPGO/ibKbKq2IxZYqRuRpM8g+Dtyq0VbEQf9HQ==} + '@rslib/core@1.0.0': + resolution: {integrity: sha512-eZNXCWU1v5oti4+DKCunc76DkNnYqMgRtks9UyZRRFlmaK4pKAxhejeCUS+XkbMurGIAa+aDyVynQD7DXEgK1w==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: '@microsoft/api-extractor': ^7 - typescript: ^5 || ^6 || ^7.0.1-0 + typescript: ^5 || ^6 || ^7 peerDependenciesMeta: '@microsoft/api-extractor': optional: true @@ -436,18 +400,8 @@ packages: cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-arm64@2.0.0-rc.0': - resolution: {integrity: sha512-F1phoByw5bMZ44TVJevn7Yw1mn1dWQ6Z3dxMQrkXoFsxwUPSNOHBX1TSkQ3rmhw2CZpFinbLL6aYjDWM6aHO5A==} - cpu: [arm64] - os: [darwin] - - '@rspack/binding-darwin-arm64@2.1.3': - resolution: {integrity: sha512-oOGI0RSL89Ehu9T22rugmfUY9OC2eBqLMeWRYsu7bhlUrjoXeVfGBBSEXCse666BQ1sAiM8hD/k7nqVria/okQ==} - cpu: [arm64] - os: [darwin] - - '@rspack/binding-darwin-arm64@2.2.1': - resolution: {integrity: sha512-Y/Naw/7V76QiUYdYRuBzBZtzRjt/3fjDUuF8GK0+/BO7BP1RrpY4tk1ln+iiqegRUD8u9uGn08fi8No1rwfyUg==} + '@rspack/binding-darwin-arm64@2.2.2': + resolution: {integrity: sha512-/le/AvV4HSinXTPs2Lqpujxt189Z5T10Ggt96QzckLRPvIchzqoavVDDjltzC7XcaZ87XCH/X06jNKgzkcBBNA==} cpu: [arm64] os: [darwin] @@ -456,18 +410,8 @@ packages: cpu: [x64] os: [darwin] - '@rspack/binding-darwin-x64@2.0.0-rc.0': - resolution: {integrity: sha512-oVzDuXwtn1uM9ovV12gTwkTHCwN1q0U0oxfclJjEjb1EhE/a/UGGABUsLl84wSbIW1fvcd9UwAr7vBqPWsjB4Q==} - cpu: [x64] - os: [darwin] - - '@rspack/binding-darwin-x64@2.1.3': - resolution: {integrity: sha512-sVqWXNiFTMXAyN362y6IA+eJc8LXZKfHdhEJ/zDuMmRp+u2IvhgaF8tk3vX/OmeB9jydVjySijuiqk8No/FoCA==} - cpu: [x64] - os: [darwin] - - '@rspack/binding-darwin-x64@2.2.1': - resolution: {integrity: sha512-rTIG/xZIW7RbEEuMR9hnNn5dv3fDBpX0N4FAQUwfhUYy3tN2+3vibTTq/Nj1Sd9Vn4yWydbWIEwBX6m/aGejig==} + '@rspack/binding-darwin-x64@2.2.2': + resolution: {integrity: sha512-uFIcUPUXiPxM6ljenLafp5TemT8eLZm1riRn8fJYmpqNCK+aCcTaud18XHZpI5SjzzcY+xUHfVShgvNzKXuf2g==} cpu: [x64] os: [darwin] @@ -477,20 +421,8 @@ packages: os: [linux] libc: [glibc] - '@rspack/binding-linux-arm64-gnu@2.0.0-rc.0': - resolution: {integrity: sha512-f0EQ0uBWXmknhZ7HR8ud+AhEtLSKbMK9IFHNkhMH3rN4J6wMI+uCPAs+ZlIrNk076bv8YB/z2Amx1ByDLjOBRA==} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@rspack/binding-linux-arm64-gnu@2.1.3': - resolution: {integrity: sha512-aCy9Zli/2Qf+Ee5otXfFQ6mhv5fEyn0wIoBVmouqtJoqOO21et6UTtJ+LHLsMDolwGLyHERAljeSFSmYX3/O5A==} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@rspack/binding-linux-arm64-gnu@2.2.1': - resolution: {integrity: sha512-53rAMU6Hqiat21IMU1hTt4Si2F33h+ZbXOt+Y18W39AFjcwmleIBId2u7beqJeGXLJuBgIAm31jcbJj/PN7mWQ==} + '@rspack/binding-linux-arm64-gnu@2.2.2': + resolution: {integrity: sha512-Pjby4pDSMNJQK2VBzpgCj6lb+DGuenS1fEDb6xi5/apbJb9v5WE+e43Mz7i+XqgXS8e846pjaONV3KM5WKB1LQ==} cpu: [arm64] os: [linux] libc: [glibc] @@ -501,56 +433,32 @@ packages: os: [linux] libc: [musl] - '@rspack/binding-linux-arm64-musl@2.0.0-rc.0': - resolution: {integrity: sha512-+OiO3x6biWU+z/H/rBzgCJuhvZj7YkGz4w7zQk2ZEHnL8nB5pzPqFiEZesbRp+WIseAONzitn7R0qk102hBi5g==} + '@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-arm64-musl@2.1.3': - resolution: {integrity: sha512-flIE7eluz0d21Fn28EVm3vPwoJooOSqtmjLFVSuOMcoCbwV9clfor195oIrAppp/W7dL/3XquFuVfrsa01Jy8Q==} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@rspack/binding-linux-arm64-musl@2.2.1': - resolution: {integrity: sha512-o7zFiWkt4MqSfSdTbxUdF27fcrWKpRizcuVB8H3yd2G6xW9V2OfYbhVGQnOlbKi+GK74RkCmoJtANB+QboIqKQ==} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@rspack/binding-linux-ppc64-gnu@2.2.1': - resolution: {integrity: sha512-pvx1oeg1z7cr8OcNt7PAt1SJTHzdsN/pvu7HkGnfks2fWE7GDs9DLL2KvN7tUkzQvJm6bGgUwqSCOrqV4uSwAg==} + '@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.1.3': - resolution: {integrity: sha512-yojg8elye1nhsNeGncw0NrZ4pMGF7NVebR80CLg72TXyzfYwFJlFTdU5yUYb1Gy+JXIvrSCwzQt2QkyiEvmkfg==} + '@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-gnu@2.2.1': - resolution: {integrity: sha512-WQ6P94Wz2tgwOsgifTWP2/bV63iZH5+rkxngQwF22FC8KmIXXy/Yug7lyMH1ld8Hzg4p1qXjBBr4i1cCyJTR+w==} - cpu: [riscv64] - os: [linux] - libc: [glibc] - - '@rspack/binding-linux-riscv64-musl@2.1.3': - resolution: {integrity: sha512-6PvbXb3FOK4X3S5QGvoSW/sqExmsvAoPnQ/YSFrXvTphkXFezA7wnobmGBHT8JQP31hcFRzJHIZSIOKktzSzzg==} + '@rspack/binding-linux-riscv64-musl@2.2.2': + resolution: {integrity: sha512-mqsorvTNerr3r8zI35NFTPYATPDlhepdiUhZjKT6ylqpHlP7vLU9fp4aEMK/CuTv2f+IVsa0+iZqtMxHs2tSjw==} cpu: [riscv64] os: [linux] libc: [musl] - '@rspack/binding-linux-riscv64-musl@2.2.1': - resolution: {integrity: sha512-GEFUFHQkjKU7OYyHXnrIo8wWcUHM7jeKov5z6Lxd3i+3hKo11yBOgb7b+uD94Rx2tPuWF4jyFdWmcNu46Njb/A==} - cpu: [riscv64] - os: [linux] - libc: [musl] - - '@rspack/binding-linux-s390x-gnu@2.2.1': - resolution: {integrity: sha512-Cqw2UjSmFGZaw1EjQXClKDud86ThynGEEIazy2PZfPzZG4WjICK1WjdeFCJd7xWsSbUQ3jGyzb7/EHiDVa+sKA==} + '@rspack/binding-linux-s390x-gnu@2.2.2': + resolution: {integrity: sha512-ql2Jub8QYWSugBppmj2u0SjcIj6fOQuAaLCYQOqU7zbvz/uuWTfoqmdWKExwrxeCU9Tzt7emVM0ETuVEpoca+A==} cpu: [s390x] os: [linux] libc: [glibc] @@ -561,20 +469,8 @@ packages: os: [linux] libc: [glibc] - '@rspack/binding-linux-x64-gnu@2.0.0-rc.0': - resolution: {integrity: sha512-n1XXXjTcPyCUoV+t3BPfBoF16CgsBxXI7WQuajIgQ33ifm7AEkRi8OVC2ci6908/MnYJSBFHlZvuDE42EwEstQ==} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@rspack/binding-linux-x64-gnu@2.1.3': - resolution: {integrity: sha512-lMXjoGKf0SnviH596fmTszgtnXLHmWOoE90G8grG9MvKVa3pelRmfps5ewZL9s8ENf3NXRfOxIhIf/M9as6MqA==} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@rspack/binding-linux-x64-gnu@2.2.1': - resolution: {integrity: sha512-QX+gRxg2CS9ri2fUG5eNurdsrOCWoJ56SsD2O7kcVGiRm+S2+muNb/QhkdkAdt/u/m++7Ve5TMIpHTnaKYCpCw==} + '@rspack/binding-linux-x64-gnu@2.2.2': + resolution: {integrity: sha512-MNYKYEHrtIVEno2q5rgpou/JVffRwn109xPK3kxct95EojHsniNa8jwy6eEHeOazP4EN60Si7NElE3aQ6JssHw==} cpu: [x64] os: [linux] libc: [glibc] @@ -585,20 +481,8 @@ packages: os: [linux] libc: [musl] - '@rspack/binding-linux-x64-musl@2.0.0-rc.0': - resolution: {integrity: sha512-EQK7SGu7FWFf1HPPvcahsk2pNL326GQY+jIg3FxGdiAWl1DtSCPrTo/eBKT3nSnXItWta1N80pN5wWVlfs/Liw==} - cpu: [x64] - os: [linux] - libc: [musl] - - '@rspack/binding-linux-x64-musl@2.1.3': - resolution: {integrity: sha512-0esT35v7pW2ZsJTMc/zDUHwpNXlPqyUCyuiLJvrAAUcdENrgOVe4DmFrgVJ2hwqI4GjeN1VBnGRJ8c+edAHH5w==} - cpu: [x64] - os: [linux] - libc: [musl] - - '@rspack/binding-linux-x64-musl@2.2.1': - resolution: {integrity: sha512-mBZQl1NdGbEB3y5M9d0tkuF7RL1GLz3Hb3gqFa3QRZBymP9PCV83Jiji8s2PJimNUJIVcdZRIw8+VGYs/35c2A==} + '@rspack/binding-linux-x64-musl@2.2.2': + resolution: {integrity: sha512-y9/9CmE8lrECaF17GAhacibTL+SvlEPEotQnUuBFC/WFtXh8hU2E7a7bAkpYGSLH6kM0nrJZHO3hTvM1wdWOJw==} cpu: [x64] os: [linux] libc: [musl] @@ -607,16 +491,8 @@ packages: resolution: {integrity: sha512-wnH4qGb8pH+LFmgIdef8EOQVc5QMMaay5+D7Dp6IfiBGmY/242Imy+e16Qcwxnr1QCwvfrgxcCkus40vM1ujMw==} cpu: [wasm32] - '@rspack/binding-wasm32-wasi@2.0.0-rc.0': - resolution: {integrity: sha512-zu+iW0kEYJd2AEEqYMSU64f98RMOXVwevnQuPtMg3WhVL79FOfkfXOlf16ZYzB8di8hpMRss7m4traGEUEyjZA==} - cpu: [wasm32] - - '@rspack/binding-wasm32-wasi@2.1.3': - resolution: {integrity: sha512-UsrDjD59UEP0mhfN/Z+uTc3vLgiUvIr+mn92WC1sbQi9gtZohTYvaQYFhWuMkBqsACGcmZp704JAbbSrVrVYCA==} - cpu: [wasm32] - - '@rspack/binding-wasm32-wasi@2.2.1': - resolution: {integrity: sha512-/d2ImKDS+lT+FJ07MxKBeUkTat84tr2Nm2+nIRt8HmZK7/N8odkQml9vb4MHr8E7oYOp4B+jm6W5frdRzKrkJQ==} + '@rspack/binding-wasm32-wasi@2.2.2': + resolution: {integrity: sha512-VbDIjjeFwZvMSKAOGY5IbU6lLzt6AHHHncTdMMkZ94Xk7O2BOHe9BXDV32Ln29TIW2C8m1fdxfPZWDiecVghUQ==} cpu: [wasm32] '@rspack/binding-win32-arm64-msvc@2.0.0-beta.7': @@ -624,18 +500,8 @@ packages: cpu: [arm64] os: [win32] - '@rspack/binding-win32-arm64-msvc@2.0.0-rc.0': - resolution: {integrity: sha512-QDOVpN0SdjrW4OicHmkuj8T7PWSqEbUs20FX2pTRBw4ReU7BABAp7wwGdtQzZIaPKDv3CTNz/1DygmInbiNgJg==} - cpu: [arm64] - os: [win32] - - '@rspack/binding-win32-arm64-msvc@2.1.3': - resolution: {integrity: sha512-42RS/SwKBTkNvXIPZXqTn0yEFN8zwGRfRe/ly0GDvPp/KxpLMFWxJmLxgtoLompU+0UCGvV4KpcBENt3oWs6BA==} - cpu: [arm64] - os: [win32] - - '@rspack/binding-win32-arm64-msvc@2.2.1': - resolution: {integrity: sha512-TfmaKPF3KC7uoZb6A+8ZUbLS8g8P5EdeXFGLCaJ+UgdkJ20TsapcfJXZXWNnKzFEkV8dUO/t5oNxNLYy2URusw==} + '@rspack/binding-win32-arm64-msvc@2.2.2': + resolution: {integrity: sha512-rfcNg0W3ZPZvXma1gTyEt9/Z8FxASIaQr+sMWTSaTPPaeU3xY1+0hYcrD0kUFNs3/5L4u63myI4R8qRXiuW3pA==} cpu: [arm64] os: [win32] @@ -644,18 +510,8 @@ packages: cpu: [ia32] os: [win32] - '@rspack/binding-win32-ia32-msvc@2.0.0-rc.0': - resolution: {integrity: sha512-89CNtgzs67FRHB+lBQoNZmjVqrrd3i+cNCqn0MzCH6Xe12XrO/2eC41gbl69mfYWIYWHpKuySkSTgOOGp0PqNQ==} - cpu: [ia32] - os: [win32] - - '@rspack/binding-win32-ia32-msvc@2.1.3': - resolution: {integrity: sha512-thk43H1JHHbetNF3txcsGXeOwZi2m6Luf/uVUqNORXjxr5VV8woHAgaAx4QXVZRg70z1VDjd8mBWnHBnKI0FGA==} - cpu: [ia32] - os: [win32] - - '@rspack/binding-win32-ia32-msvc@2.2.1': - resolution: {integrity: sha512-rdBXayngvpQFMSUIC4b71FDZrSBJszSHNEkln/Nis3a17DMAE7IkgJcqe7SqLWbk2OPF/N920AOWmBEDQQCaMg==} + '@rspack/binding-win32-ia32-msvc@2.2.2': + resolution: {integrity: sha512-TFPvr9RZw9oHIhooDhXHzWjKcHpGPTxkznSeM2poIWU0CdEuua2rVUfsrriTF1Dmx+9kMly61DQmyOHCbb+b2g==} cpu: [ia32] os: [win32] @@ -664,32 +520,16 @@ packages: cpu: [x64] os: [win32] - '@rspack/binding-win32-x64-msvc@2.0.0-rc.0': - resolution: {integrity: sha512-OaxuI+WHzSNoCtv0FfIw41yjCFvwt/aCoEodBSObzm8PH5YbmiYL/FfTeAOVAJbDoEmkA8qYH+gws7vOzgQzSw==} - cpu: [x64] - os: [win32] - - '@rspack/binding-win32-x64-msvc@2.1.3': - resolution: {integrity: sha512-ObaUcj+BHo/aBL1weyM3orApaHyAR5Phr3YNEpQEifxjZbNKM1iO5X5prN4OqEv3H+7o5e/Wh9Fy3N7Vvd+psA==} - cpu: [x64] - os: [win32] - - '@rspack/binding-win32-x64-msvc@2.2.1': - resolution: {integrity: sha512-l3K4s7nrQJc+3LacPFjZGjX8Jk1sf8Q4TK6IXAsdSucOjTqYSpD8PMl2NUXCBDXOl8T2V4v323z1LfxwW8BPmA==} + '@rspack/binding-win32-x64-msvc@2.2.2': + resolution: {integrity: sha512-GvEGyL594dtWN9SoVnKWh0exrM8WLInaUjwcuA2JKbCi1ak/9iHxip/U1dY3DuVqBYBhmvYq96JPbl91xnzFjg==} cpu: [x64] os: [win32] '@rspack/binding@2.0.0-beta.7': resolution: {integrity: sha512-D5ycNB5gpYpsM7SwFohcbg0LooB1bmYEeTYRLPRuwXeN0Tp/Alq4iq4/32iaF1I9NcxgQddx2NERXzlxguvYeQ==} - '@rspack/binding@2.0.0-rc.0': - resolution: {integrity: sha512-zWjMryvt8J8H/Z/sa0MHWfblUTHNCwXhw2x13Yz9Nw2P8JjZ/k/h3ni0xBBl/QubIVoA1IfN2OaiNCtFlVmDrQ==} - - '@rspack/binding@2.1.3': - resolution: {integrity: sha512-4UGXJqUHmm36tWG1GgFZz3p8sQ5JuSgWI+gq1xPPoihS41uYJL3cXuJnirTeWsmVrusmYZTQhgU3tl3VYGcJYg==} - - '@rspack/binding@2.2.1': - resolution: {integrity: sha512-56TqztuEMd+aHGv1jDXnkJQGSLTb4NoO146flFxJqPG8931UdXPO2pNR9M0Q2Pz+GvmO0fLHGPLYBHoRVrRlHw==} + '@rspack/binding@2.2.2': + resolution: {integrity: sha512-gWjKDQfVQJSBh/I+y9WTlyERsiShSJ7eI6Yl0SJs/6gjx8t4ixuwWCsaEFFjwSL4nSn6ML5hNQ7UFY3gj72BWA==} '@rspack/cli@2.0.0-beta.7': resolution: {integrity: sha512-nW4iET5qYTNcX7TL5f2EBGddm5GfcN38LM5HDhhh2F991sIN2KF8u6s3yG1Y7ztAkWS0mApPbGB1mnVo2JfpDw==} @@ -713,32 +553,8 @@ packages: '@swc/helpers': optional: true - '@rspack/core@2.0.0-rc.0': - resolution: {integrity: sha512-hFc2284m/075etKLLNsECAwOcyNQ8NHUaBhwJCQJQ3J9iqjDoZisefGC8I457u2iieoc1KNSANB9hxZ0ZOHuJg==} - engines: {node: ^20.19.0 || >=22.12.0} - peerDependencies: - '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 - '@swc/helpers': '>=0.5.1' - peerDependenciesMeta: - '@module-federation/runtime-tools': - optional: true - '@swc/helpers': - optional: true - - '@rspack/core@2.1.3': - resolution: {integrity: sha512-1iGnxLrP+iyY0ZSjLZeQTaxrISpQz4yLyqJPmaF/l4uw27/dBcrloszAeLOJQ9jiv7EJtU0T5zB+LOFPpivIxA==} - 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/core@2.2.1': - resolution: {integrity: sha512-EHFX2oWCY1HkHJkG/Ev8HXCcl4gQzgETyairdIlBkKaypuW8i7kowBxUFzpHHg/ObF70vB3focToel9Wwg4MRA==} + '@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 @@ -767,6 +583,92 @@ packages: '@rspack/core': optional: true + '@rstackjs/cli-darwin-arm64@0.7.2': + resolution: {integrity: sha512-po/JUgHx7DZ+Kmrbyy3L0/xr3rlZfVEk0Oy4D2xsjmAa3bHhP63B5XCOCyArLAZeMOqYPze9VaOcgWmGN5qWwQ==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [arm64] + os: [darwin] + + '@rstackjs/cli-darwin-x64@0.7.2': + resolution: {integrity: sha512-RFgUgUUXC3ZLF2iKJplsK2Ty49VkVw+rR8y5Hgf+3BAUn9ffRCUAqscWQGPCrJZENVbTEUWDyEVCMNnUpM6+Ww==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [x64] + os: [darwin] + + '@rstackjs/cli-linux-arm64-gnu@0.7.2': + resolution: {integrity: sha512-pNUbP/Bd962FznXLiJHnCcxpP/l1L9wmLsdIh43T8MQkY4m0Rv/s5tpA1rRcoqYHymhnVqWFcBAWxAPTSnOFFQ==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rstackjs/cli-linux-arm64-musl@0.7.2': + resolution: {integrity: sha512-cOC1WNNAZEeUxA0Lvbkk0ZBGMQIhKcjlZZinwGkg6zHJ7jxW42/SvwjNdnXv1xEpQd59OGJ1aSR1/Gt7PpItzw==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rstackjs/cli-linux-ppc64-gnu@0.7.2': + resolution: {integrity: sha512-jOk/KA3gpNapZO8y0Pc99XG7kjtgz6ndOGqKczgYD7VWBZcnMvD2KKI1GmeLxLf+9v0NiLtefj1CCtFEbqwXKg==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rstackjs/cli-linux-riscv64-gnu@0.7.2': + resolution: {integrity: sha512-8fukS3qf1nrvYDQ4886gWphHsg9gyktSkUUudSEFkamKKKOCmdZn+tDUvEebxYiqQCUEC/mqkUc/jg7EQKvP7Q==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rstackjs/cli-linux-riscv64-musl@0.7.2': + resolution: {integrity: sha512-AciMUbdFgC/bDP05iuC13x4uPDISkyx2S9KiWDnjhs7bCjHv19bhPeOGLnpUWjAL86LxbHNuk+rM8wdt1da4gg==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@rstackjs/cli-linux-s390x-gnu@0.7.2': + resolution: {integrity: sha512-pj5V7Thbdc0FfK7Ngl3wLish7S0Yyy/ZmlH0Qd9UEMrNwMyMoyR+ZAJaWRjv7LFJQegPZNKBEgXfDc6Yeg7KjA==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rstackjs/cli-linux-x64-gnu@0.7.2': + resolution: {integrity: sha512-25Xzm2SXyDA1WkXrcHQym1ZI71ZK4n9AD32+0UT8IhVF+FGDBw0WG2UeOIr5XcaCCxgjGw1qec4aZ4GEd0/6vg==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rstackjs/cli-linux-x64-musl@0.7.2': + resolution: {integrity: sha512-77E3zZ5nrIP86nh40mMOvAu547a8qPDfTcKUQU/4fVjcE7g7zX17gQGGOHubzoqWRxv5abTABkG/ovhxqZ8bwQ==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rstackjs/cli-win32-arm64-msvc@0.7.2': + resolution: {integrity: sha512-fg8vRphmnXZQIC0lo757rwbFJS1s7Ft9RT9BzaJrqEcMWinxHx9HtKCddJ1scEpgu5Al8Vws74KYu2XNcUFUbA==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [arm64] + os: [win32] + + '@rstackjs/cli-win32-ia32-msvc@0.7.2': + resolution: {integrity: sha512-veUcxZ+ZqGzkkRYfkKj0GHlIKxR3NKm/Va4taifZLFXcqDFrSAmoueXTfhIzsLrNII+g85gizyaMdjytWhw8Lw==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [ia32] + os: [win32] + + '@rstackjs/cli-win32-x64-msvc@0.7.2': + resolution: {integrity: sha512-E/+K2W+GtezTLaOZ87erMyWOEbivKZiN/m/Iqeg8UJrfp9Zkqm7yIhQnYwG+KxN0gp3qjB/zxlcYdN5fnnhOWQ==} + engines: {node: ^22.18.0 || >=24.3.0} + cpu: [x64] + os: [win32] + '@rstest/core@0.11.11': resolution: {integrity: sha512-7Ii2/2/ex1Oa0Kg5Qk5RKx2+e0I83BHLwH0/gn1B7IDwXCh5msFCF7yTyVGFuMltlm3E8Cf4QD7jadOEaBfXfw==} engines: {node: ^20.19.0 || >=22.12.0} @@ -990,6 +892,75 @@ packages: cpu: [x64] os: [win32] + '@yuku-parser/binding-android-arm64@0.9.3': + resolution: {integrity: sha512-z3tDGTaUXD5Q4IuebFOY/QHxhR/SqujMhkMv9C5bh25upyFEXdafp0MsXQIIheWhVZzn5VMOniyxFni/7s9LgQ==} + cpu: [arm64] + os: [android] + + '@yuku-parser/binding-darwin-arm64@0.9.3': + resolution: {integrity: sha512-hzKvKSKS7z3ufnu1VkQYEoxmS6A5uNnkwukKnc2atxpWdq648nLVOqut4h1jUXjbM2WcoTfuZLF6AHAGFf8cmg==} + cpu: [arm64] + os: [darwin] + + '@yuku-parser/binding-darwin-x64@0.9.3': + resolution: {integrity: sha512-OM2PiVlPATvzlj/KGHNlu+t8FC3YzM5joVNjhsz/EaigQ8x2UUQ1Q0agQLiv5GZ2L8TSzrLUwBCZ7YOvP8q+tw==} + cpu: [x64] + os: [darwin] + + '@yuku-parser/binding-freebsd-x64@0.9.3': + resolution: {integrity: sha512-WMn9M4LHNVysGNwsAJ9gpRPqQIW2lcPrDNGcyk0agx3IYqCJq1MQugh6Be8Otc5U08eGdE39o8Kx9YWJmXz7GA==} + cpu: [x64] + os: [freebsd] + + '@yuku-parser/binding-linux-arm-gnu@0.9.3': + resolution: {integrity: sha512-vqKjwiyW1FWvbykYMEQIcAJwA17WxK3rxxqDuyCvQwcNVaLEUxI4BXiUdlF3kHucc7MnoFQhoRPkySgOzlLM+Q==} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@yuku-parser/binding-linux-arm-musl@0.9.3': + resolution: {integrity: sha512-qohilhYOT+zkt2gYzym4F1T6BzRdvPqS9/sFB03pmnVV8LrvjOXVsGwEBAa3CEvzJKhAZjdTmVz7zsVdjyHWLg==} + cpu: [arm] + os: [linux] + libc: [musl] + + '@yuku-parser/binding-linux-arm64-gnu@0.9.3': + resolution: {integrity: sha512-tvTIyUvTGkeee68i4JIo9o27As+Ug6LXOZvElGgFbTs6+KBdb5LGhvugaIQljdfIsm2XnIbOLG6OnQSXHMLB9w==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@yuku-parser/binding-linux-arm64-musl@0.9.3': + resolution: {integrity: sha512-OWZBHW1wuChBpFlrF+On1yiBcFPMRrj2g0VKsM/PCBGffu1OM0ORkS+vLS3Snu6wYwndM5Dd9Ctvux6eUlrQjA==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@yuku-parser/binding-linux-x64-gnu@0.9.3': + resolution: {integrity: sha512-/tbk1h0dlADOCngbiQO9V3SHwBIJkoGBq8BDEraSw2CC3nGxPEPTCCYUDp5738Ij2FxVwy1FWVuhFkHvpMrPbQ==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@yuku-parser/binding-linux-x64-musl@0.9.3': + resolution: {integrity: sha512-u3+0sCso/mcjDvtc3866D2giV7l34PDyDVBkMesAWa3DWbIWPlybehi2SSnmScgArV22ctqSSgUzdBBVJ6zYAg==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@yuku-parser/binding-win32-arm64@0.9.3': + resolution: {integrity: sha512-xnGEvdhyjRkXozHtpXVpEEkyGZWAxJ3RoILv7XRV5SvTEztaTCk5GQyfcOzI9An/EJtcL4ERCI8QmS0TpDPJiA==} + cpu: [arm64] + os: [win32] + + '@yuku-parser/binding-win32-x64@0.9.3': + resolution: {integrity: sha512-N5eShGcuwnrXEprePFmEjtng6acZmtnC4zgazK9xxkavcx1q1uX8Nz8lU5RS973EMlNr902cIc6Cd2D4tqZDBg==} + cpu: [x64] + os: [win32] + + '@yuku-toolchain/types@0.9.3': + resolution: {integrity: sha512-rFE+5P4g2wxko5C85MugJOlVjBHEQq87dIkhLkniLXLp63PEtgaFjD954i5HXlfnyzLxPcZHsSOVDVgmo1HToA==} + accepts@2.0.0: resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} engines: {node: '>= 0.6'} @@ -1588,11 +1559,6 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - nano-staged@1.0.2: - resolution: {integrity: sha512-Fytar3zHLY99nlMfqPPbraxZodqQAHPpdPRyYaplL+lB9DCR6pUrafxbG+Btz4+7fO5Rm/+DO4ZeDO/nLSUMhw==} - engines: {node: ^22 || >= 24} - hasBin: true - negotiator@1.0.0: resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} engines: {node: '>= 0.6'} @@ -1762,22 +1728,29 @@ packages: resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} engines: {node: '>= 18'} - rsbuild-plugin-dts@0.23.2: - resolution: {integrity: sha512-Ve8WOSPyTBjxH40O/6fChJtflL7yqcUtt5zbF0eHDM4hIt35jqLocRlSdCxFJdQm0blTjl6+hkmPa/vNI06ArA==} + rsbuild-plugin-dts@1.0.0: + resolution: {integrity: sha512-FVoTsiTfSc0LPeSjrVhpvFOBRig0YXJq3Hp+bVxzh9/bzFvODzLRWOEux8q1Phe1oVCIIVSc2+Nb7kDcxIhosw==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: '@microsoft/api-extractor': ^7 - '@rsbuild/core': ^1.0.0 || ^2.0.0-0 - '@typescript/native-preview': ^7.0.0-0 - typescript: ^5 || ^6 || ^7.0.1-0 + '@rsbuild/core': ^2.0.0 + typescript: ^5 || ^6 || ^7 peerDependenciesMeta: '@microsoft/api-extractor': optional: true - '@typescript/native-preview': - optional: true typescript: optional: true + rstack@0.7.2: + resolution: {integrity: sha512-A0nL89XfrcA1tqhX7WmA+6p7ogMr4oWSYaPH1h+Kybl/e4+mEQAO/GCVA2BPsoUsSx8KltC3wUkmuhkKtoQojQ==} + engines: {node: ^22.18.0 || >=24.3.0} + hasBin: true + peerDependencies: + '@rspress/core': ^2.0.17 + peerDependenciesMeta: + '@rspress/core': + optional: true + run-applescript@7.1.0: resolution: {integrity: sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==} engines: {node: '>=18'} @@ -1833,10 +1806,6 @@ packages: resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} engines: {node: '>= 0.4'} - simple-git-hooks@2.14.0: - resolution: {integrity: sha512-kkTORPAuxQz2g1QUuN0J8yGWT28tjGBfPOdJ4xT7Vbeu30veKUZQIoID2qGgCDAakaQn59UeZJJ4cFGB8PVP2A==} - hasBin: true - smart-buffer@4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} @@ -1895,6 +1864,10 @@ packages: text-decoder@1.2.7: resolution: {integrity: sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==} + tinypool@2.1.2: + resolution: {integrity: sha512-9YodfrxS9g9IbFr/KOjE5bAeJ0p61n3bW6mqvy0jtoeKd1kTW1Cxm0oulm6KX2lyM9Gl6WIe8nEbY7LWv5ZJww==} + engines: {node: ^20.0.0 || >=22.0.0} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -1991,49 +1964,55 @@ packages: yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + yuku-ast@0.9.3: + resolution: {integrity: sha512-Kt0PXlPCXdKF1fWFTl7N3DaxsVk6DHF8VAXHJMkwPtJnWYgbx20pYgGSweuC/86mIM7k1NUITQ4JffgOLUWTCw==} + + yuku-parser@0.9.3: + resolution: {integrity: sha512-96wPoHnwaXfkZv7UIOUkDb+s7ZH8lv8Qtg+MxdvHUV1LFa5jV9iKOaams1942YQt+krFQrWiD6lSg2ermv5kHA==} + zod@3.25.76: resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} snapshots: - '@ast-grep/napi-darwin-arm64@0.37.0': + '@ast-grep/napi-darwin-arm64@0.45.2': optional: true - '@ast-grep/napi-darwin-x64@0.37.0': + '@ast-grep/napi-darwin-x64@0.45.2': optional: true - '@ast-grep/napi-linux-arm64-gnu@0.37.0': + '@ast-grep/napi-linux-arm64-gnu@0.45.2': optional: true - '@ast-grep/napi-linux-arm64-musl@0.37.0': + '@ast-grep/napi-linux-arm64-musl@0.45.2': optional: true - '@ast-grep/napi-linux-x64-gnu@0.37.0': + '@ast-grep/napi-linux-x64-gnu@0.45.2': optional: true - '@ast-grep/napi-linux-x64-musl@0.37.0': + '@ast-grep/napi-linux-x64-musl@0.45.2': optional: true - '@ast-grep/napi-win32-arm64-msvc@0.37.0': + '@ast-grep/napi-win32-arm64-msvc@0.45.2': optional: true - '@ast-grep/napi-win32-ia32-msvc@0.37.0': + '@ast-grep/napi-win32-ia32-msvc@0.45.2': optional: true - '@ast-grep/napi-win32-x64-msvc@0.37.0': + '@ast-grep/napi-win32-x64-msvc@0.45.2': optional: true - '@ast-grep/napi@0.37.0': + '@ast-grep/napi@0.45.2': optionalDependencies: - '@ast-grep/napi-darwin-arm64': 0.37.0 - '@ast-grep/napi-darwin-x64': 0.37.0 - '@ast-grep/napi-linux-arm64-gnu': 0.37.0 - '@ast-grep/napi-linux-arm64-musl': 0.37.0 - '@ast-grep/napi-linux-x64-gnu': 0.37.0 - '@ast-grep/napi-linux-x64-musl': 0.37.0 - '@ast-grep/napi-win32-arm64-msvc': 0.37.0 - '@ast-grep/napi-win32-ia32-msvc': 0.37.0 - '@ast-grep/napi-win32-x64-msvc': 0.37.0 + '@ast-grep/napi-darwin-arm64': 0.45.2 + '@ast-grep/napi-darwin-x64': 0.45.2 + '@ast-grep/napi-linux-arm64-gnu': 0.45.2 + '@ast-grep/napi-linux-arm64-musl': 0.45.2 + '@ast-grep/napi-linux-x64-gnu': 0.45.2 + '@ast-grep/napi-linux-x64-musl': 0.45.2 + '@ast-grep/napi-win32-arm64-msvc': 0.45.2 + '@ast-grep/napi-win32-ia32-msvc': 0.45.2 + '@ast-grep/napi-win32-x64-msvc': 0.45.2 '@babel/code-frame@7.29.0': dependencies: @@ -2045,49 +2024,17 @@ snapshots: '@discoveryjs/json-ext@0.5.7': {} - '@emnapi/core@1.11.1': - dependencies: - '@emnapi/wasi-threads': 1.2.2 - tslib: 2.8.1 - optional: true - '@emnapi/core@1.11.3': dependencies: '@emnapi/wasi-threads': 1.2.3 tslib: 2.8.1 optional: true - '@emnapi/core@1.9.1': - dependencies: - '@emnapi/wasi-threads': 1.2.0 - tslib: 2.8.1 - optional: true - - '@emnapi/runtime@1.11.1': - dependencies: - tslib: 2.8.1 - optional: true - '@emnapi/runtime@1.11.3': dependencies: tslib: 2.8.1 optional: true - '@emnapi/runtime@1.9.1': - dependencies: - tslib: 2.8.1 - optional: true - - '@emnapi/wasi-threads@1.2.0': - dependencies: - tslib: 2.8.1 - optional: true - - '@emnapi/wasi-threads@1.2.2': - dependencies: - tslib: 2.8.1 - optional: true - '@emnapi/wasi-threads@1.2.3': dependencies: tslib: 2.8.1 @@ -2161,26 +2108,12 @@ snapshots: '@module-federation/sdk': 2.9.0 '@napi-rs/wasm-runtime@1.0.7': - dependencies: - '@emnapi/core': 1.9.1 - '@emnapi/runtime': 1.9.1 - '@tybys/wasm-util': 0.10.1 - optional: true - - '@napi-rs/wasm-runtime@1.1.2(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': dependencies: '@emnapi/core': 1.11.3 '@emnapi/runtime': 1.11.3 '@tybys/wasm-util': 0.10.1 optional: true - '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': - dependencies: - '@emnapi/core': 1.11.1 - '@emnapi/runtime': 1.11.1 - '@tybys/wasm-util': 0.10.3 - optional: true - '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': dependencies: '@emnapi/core': 1.11.3 @@ -2295,30 +2228,29 @@ snapshots: - react-native-b4a - supports-color - '@rsbuild/core@2.1.5(@module-federation/runtime-tools@2.9.0)': + '@rsbuild/core@2.2.1(@module-federation/runtime-tools@2.9.0)': dependencies: - '@rspack/core': 2.1.3(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23) + '@rspack/core': 2.2.2(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23) '@swc/helpers': 0.5.23 transitivePeerDependencies: - '@module-federation/runtime-tools' - '@rsbuild/core@2.2.1(@module-federation/runtime-tools@2.9.0)': + '@rsbuild/core@2.2.3(@module-federation/runtime-tools@2.9.0)': dependencies: - '@rspack/core': 2.2.1(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23) + '@rspack/core': 2.2.2(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23) '@swc/helpers': 0.5.23 transitivePeerDependencies: - '@module-federation/runtime-tools' - '@rslib/core@0.23.2(@microsoft/api-extractor@7.59.0(@types/node@24.13.3))(@module-federation/runtime-tools@2.9.0)(typescript@7.0.2)': + '@rslib/core@1.0.0(@microsoft/api-extractor@7.59.0(@types/node@24.13.3))(@module-federation/runtime-tools@2.9.0)(typescript@7.0.2)': dependencies: - '@rsbuild/core': 2.1.5(@module-federation/runtime-tools@2.9.0) - rsbuild-plugin-dts: 0.23.2(@microsoft/api-extractor@7.59.0(@types/node@24.13.3))(@rsbuild/core@2.1.5(@module-federation/runtime-tools@2.9.0))(typescript@7.0.2) + '@rsbuild/core': 2.2.3(@module-federation/runtime-tools@2.9.0) + rsbuild-plugin-dts: 1.0.0(@microsoft/api-extractor@7.59.0(@types/node@24.13.3))(@rsbuild/core@2.2.3(@module-federation/runtime-tools@2.9.0))(typescript@7.0.2) optionalDependencies: '@microsoft/api-extractor': 7.59.0(@types/node@24.13.3) typescript: 7.0.2 transitivePeerDependencies: - '@module-federation/runtime-tools' - - '@typescript/native-preview' - core-js '@rslint/core@0.9.0': @@ -2361,91 +2293,49 @@ snapshots: '@rspack/binding-darwin-arm64@2.0.0-beta.7': optional: true - '@rspack/binding-darwin-arm64@2.0.0-rc.0': - optional: true - - '@rspack/binding-darwin-arm64@2.1.3': - optional: true - - '@rspack/binding-darwin-arm64@2.2.1': + '@rspack/binding-darwin-arm64@2.2.2': optional: true '@rspack/binding-darwin-x64@2.0.0-beta.7': optional: true - '@rspack/binding-darwin-x64@2.0.0-rc.0': - optional: true - - '@rspack/binding-darwin-x64@2.1.3': - optional: true - - '@rspack/binding-darwin-x64@2.2.1': + '@rspack/binding-darwin-x64@2.2.2': optional: true '@rspack/binding-linux-arm64-gnu@2.0.0-beta.7': optional: true - '@rspack/binding-linux-arm64-gnu@2.0.0-rc.0': - optional: true - - '@rspack/binding-linux-arm64-gnu@2.1.3': - optional: true - - '@rspack/binding-linux-arm64-gnu@2.2.1': + '@rspack/binding-linux-arm64-gnu@2.2.2': optional: true '@rspack/binding-linux-arm64-musl@2.0.0-beta.7': optional: true - '@rspack/binding-linux-arm64-musl@2.0.0-rc.0': - optional: true - - '@rspack/binding-linux-arm64-musl@2.1.3': - optional: true - - '@rspack/binding-linux-arm64-musl@2.2.1': + '@rspack/binding-linux-arm64-musl@2.2.2': optional: true - '@rspack/binding-linux-ppc64-gnu@2.2.1': + '@rspack/binding-linux-ppc64-gnu@2.2.2': optional: true - '@rspack/binding-linux-riscv64-gnu@2.1.3': + '@rspack/binding-linux-riscv64-gnu@2.2.2': optional: true - '@rspack/binding-linux-riscv64-gnu@2.2.1': + '@rspack/binding-linux-riscv64-musl@2.2.2': optional: true - '@rspack/binding-linux-riscv64-musl@2.1.3': - optional: true - - '@rspack/binding-linux-riscv64-musl@2.2.1': - optional: true - - '@rspack/binding-linux-s390x-gnu@2.2.1': + '@rspack/binding-linux-s390x-gnu@2.2.2': optional: true '@rspack/binding-linux-x64-gnu@2.0.0-beta.7': optional: true - '@rspack/binding-linux-x64-gnu@2.0.0-rc.0': - optional: true - - '@rspack/binding-linux-x64-gnu@2.1.3': - optional: true - - '@rspack/binding-linux-x64-gnu@2.2.1': + '@rspack/binding-linux-x64-gnu@2.2.2': optional: true '@rspack/binding-linux-x64-musl@2.0.0-beta.7': optional: true - '@rspack/binding-linux-x64-musl@2.0.0-rc.0': - optional: true - - '@rspack/binding-linux-x64-musl@2.1.3': - optional: true - - '@rspack/binding-linux-x64-musl@2.2.1': + '@rspack/binding-linux-x64-musl@2.2.2': optional: true '@rspack/binding-wasm32-wasi@2.0.0-beta.7': @@ -2453,22 +2343,7 @@ snapshots: '@napi-rs/wasm-runtime': 1.0.7 optional: true - '@rspack/binding-wasm32-wasi@2.0.0-rc.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': - dependencies: - '@napi-rs/wasm-runtime': 1.1.2(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) - transitivePeerDependencies: - - '@emnapi/core' - - '@emnapi/runtime' - optional: true - - '@rspack/binding-wasm32-wasi@2.1.3': - dependencies: - '@emnapi/core': 1.11.1 - '@emnapi/runtime': 1.11.1 - '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) - optional: true - - '@rspack/binding-wasm32-wasi@2.2.1': + '@rspack/binding-wasm32-wasi@2.2.2': dependencies: '@emnapi/core': 1.11.3 '@emnapi/runtime': 1.11.3 @@ -2478,37 +2353,19 @@ snapshots: '@rspack/binding-win32-arm64-msvc@2.0.0-beta.7': optional: true - '@rspack/binding-win32-arm64-msvc@2.0.0-rc.0': - optional: true - - '@rspack/binding-win32-arm64-msvc@2.1.3': - optional: true - - '@rspack/binding-win32-arm64-msvc@2.2.1': + '@rspack/binding-win32-arm64-msvc@2.2.2': optional: true '@rspack/binding-win32-ia32-msvc@2.0.0-beta.7': optional: true - '@rspack/binding-win32-ia32-msvc@2.0.0-rc.0': - optional: true - - '@rspack/binding-win32-ia32-msvc@2.1.3': - optional: true - - '@rspack/binding-win32-ia32-msvc@2.2.1': + '@rspack/binding-win32-ia32-msvc@2.2.2': optional: true '@rspack/binding-win32-x64-msvc@2.0.0-beta.7': optional: true - '@rspack/binding-win32-x64-msvc@2.0.0-rc.0': - optional: true - - '@rspack/binding-win32-x64-msvc@2.1.3': - optional: true - - '@rspack/binding-win32-x64-msvc@2.2.1': + '@rspack/binding-win32-x64-msvc@2.2.2': optional: true '@rspack/binding@2.0.0-beta.7': @@ -2524,53 +2381,22 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 2.0.0-beta.7 '@rspack/binding-win32-x64-msvc': 2.0.0-beta.7 - '@rspack/binding@2.0.0-rc.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': - optionalDependencies: - '@rspack/binding-darwin-arm64': 2.0.0-rc.0 - '@rspack/binding-darwin-x64': 2.0.0-rc.0 - '@rspack/binding-linux-arm64-gnu': 2.0.0-rc.0 - '@rspack/binding-linux-arm64-musl': 2.0.0-rc.0 - '@rspack/binding-linux-x64-gnu': 2.0.0-rc.0 - '@rspack/binding-linux-x64-musl': 2.0.0-rc.0 - '@rspack/binding-wasm32-wasi': 2.0.0-rc.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) - '@rspack/binding-win32-arm64-msvc': 2.0.0-rc.0 - '@rspack/binding-win32-ia32-msvc': 2.0.0-rc.0 - '@rspack/binding-win32-x64-msvc': 2.0.0-rc.0 - transitivePeerDependencies: - - '@emnapi/core' - - '@emnapi/runtime' - - '@rspack/binding@2.1.3': - optionalDependencies: - '@rspack/binding-darwin-arm64': 2.1.3 - '@rspack/binding-darwin-x64': 2.1.3 - '@rspack/binding-linux-arm64-gnu': 2.1.3 - '@rspack/binding-linux-arm64-musl': 2.1.3 - '@rspack/binding-linux-riscv64-gnu': 2.1.3 - '@rspack/binding-linux-riscv64-musl': 2.1.3 - '@rspack/binding-linux-x64-gnu': 2.1.3 - '@rspack/binding-linux-x64-musl': 2.1.3 - '@rspack/binding-wasm32-wasi': 2.1.3 - '@rspack/binding-win32-arm64-msvc': 2.1.3 - '@rspack/binding-win32-ia32-msvc': 2.1.3 - '@rspack/binding-win32-x64-msvc': 2.1.3 - - '@rspack/binding@2.2.1': + '@rspack/binding@2.2.2': optionalDependencies: - '@rspack/binding-darwin-arm64': 2.2.1 - '@rspack/binding-darwin-x64': 2.2.1 - '@rspack/binding-linux-arm64-gnu': 2.2.1 - '@rspack/binding-linux-arm64-musl': 2.2.1 - '@rspack/binding-linux-ppc64-gnu': 2.2.1 - '@rspack/binding-linux-riscv64-gnu': 2.2.1 - '@rspack/binding-linux-riscv64-musl': 2.2.1 - '@rspack/binding-linux-s390x-gnu': 2.2.1 - '@rspack/binding-linux-x64-gnu': 2.2.1 - '@rspack/binding-linux-x64-musl': 2.2.1 - '@rspack/binding-wasm32-wasi': 2.2.1 - '@rspack/binding-win32-arm64-msvc': 2.2.1 - '@rspack/binding-win32-ia32-msvc': 2.2.1 - '@rspack/binding-win32-x64-msvc': 2.2.1 + '@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/cli@2.0.0-beta.7(@rspack/core@2.0.0-beta.7(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23))(@rspack/dev-server@)': dependencies: @@ -2587,39 +2413,61 @@ snapshots: '@module-federation/runtime-tools': 2.9.0 '@swc/helpers': 0.5.23 - '@rspack/core@2.0.0-rc.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23)': + '@rspack/core@2.2.2(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23)': dependencies: - '@rspack/binding': 2.0.0-rc.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) + '@rspack/binding': 2.2.2 optionalDependencies: '@module-federation/runtime-tools': 2.9.0 '@swc/helpers': 0.5.23 - transitivePeerDependencies: - - '@emnapi/core' - - '@emnapi/runtime' - '@rspack/core@2.1.3(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23)': - dependencies: - '@rspack/binding': 2.1.3 + '@rspack/dev-middleware@2.0.3(@rspack/core@2.2.2(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23))': optionalDependencies: - '@module-federation/runtime-tools': 2.9.0 - '@swc/helpers': 0.5.23 + '@rspack/core': 2.2.2(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23) - '@rspack/core@2.2.1(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23)': + '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.2.2(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23))(react-refresh@0.18.0)': dependencies: - '@rspack/binding': 2.2.1 + react-refresh: 0.18.0 optionalDependencies: - '@module-federation/runtime-tools': 2.9.0 - '@swc/helpers': 0.5.23 + '@rspack/core': 2.2.2(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23) - '@rspack/dev-middleware@2.0.3(@rspack/core@2.0.0-rc.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23))': - optionalDependencies: - '@rspack/core': 2.0.0-rc.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23) + '@rstackjs/cli-darwin-arm64@0.7.2': + optional: true - '@rspack/plugin-react-refresh@2.0.2(@rspack/core@2.0.0-rc.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23))(react-refresh@0.18.0)': - dependencies: - react-refresh: 0.18.0 - optionalDependencies: - '@rspack/core': 2.0.0-rc.0(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)(@module-federation/runtime-tools@2.9.0)(@swc/helpers@0.5.23) + '@rstackjs/cli-darwin-x64@0.7.2': + optional: true + + '@rstackjs/cli-linux-arm64-gnu@0.7.2': + optional: true + + '@rstackjs/cli-linux-arm64-musl@0.7.2': + optional: true + + '@rstackjs/cli-linux-ppc64-gnu@0.7.2': + optional: true + + '@rstackjs/cli-linux-riscv64-gnu@0.7.2': + optional: true + + '@rstackjs/cli-linux-riscv64-musl@0.7.2': + optional: true + + '@rstackjs/cli-linux-s390x-gnu@0.7.2': + optional: true + + '@rstackjs/cli-linux-x64-gnu@0.7.2': + optional: true + + '@rstackjs/cli-linux-x64-musl@0.7.2': + optional: true + + '@rstackjs/cli-win32-arm64-msvc@0.7.2': + optional: true + + '@rstackjs/cli-win32-ia32-msvc@0.7.2': + optional: true + + '@rstackjs/cli-win32-x64-msvc@0.7.2': + optional: true '@rstest/core@0.11.11(@module-federation/runtime-tools@2.9.0)': dependencies: @@ -2797,6 +2645,44 @@ snapshots: '@typescript/typescript-win32-x64@7.0.2': optional: true + '@yuku-parser/binding-android-arm64@0.9.3': + optional: true + + '@yuku-parser/binding-darwin-arm64@0.9.3': + optional: true + + '@yuku-parser/binding-darwin-x64@0.9.3': + optional: true + + '@yuku-parser/binding-freebsd-x64@0.9.3': + optional: true + + '@yuku-parser/binding-linux-arm-gnu@0.9.3': + optional: true + + '@yuku-parser/binding-linux-arm-musl@0.9.3': + optional: true + + '@yuku-parser/binding-linux-arm64-gnu@0.9.3': + optional: true + + '@yuku-parser/binding-linux-arm64-musl@0.9.3': + optional: true + + '@yuku-parser/binding-linux-x64-gnu@0.9.3': + optional: true + + '@yuku-parser/binding-linux-x64-musl@0.9.3': + optional: true + + '@yuku-parser/binding-win32-arm64@0.9.3': + optional: true + + '@yuku-parser/binding-win32-x64@0.9.3': + optional: true + + '@yuku-toolchain/types@0.9.3': {} + accepts@2.0.0: dependencies: mime-types: 3.0.2 @@ -3356,8 +3242,6 @@ snapshots: ms@2.1.3: {} - nano-staged@1.0.2: {} - negotiator@1.0.0: {} netmask@2.0.2: {} @@ -3555,14 +3439,46 @@ snapshots: transitivePeerDependencies: - supports-color - rsbuild-plugin-dts@0.23.2(@microsoft/api-extractor@7.59.0(@types/node@24.13.3))(@rsbuild/core@2.1.5(@module-federation/runtime-tools@2.9.0))(typescript@7.0.2): + rsbuild-plugin-dts@1.0.0(@microsoft/api-extractor@7.59.0(@types/node@24.13.3))(@rsbuild/core@2.2.3(@module-federation/runtime-tools@2.9.0))(typescript@7.0.2): dependencies: - '@ast-grep/napi': 0.37.0 - '@rsbuild/core': 2.1.5(@module-federation/runtime-tools@2.9.0) + '@ast-grep/napi': 0.45.2 + '@rsbuild/core': 2.2.3(@module-federation/runtime-tools@2.9.0) optionalDependencies: '@microsoft/api-extractor': 7.59.0(@types/node@24.13.3) typescript: 7.0.2 + rstack@0.7.2(@microsoft/api-extractor@7.59.0(@types/node@24.13.3))(@module-federation/runtime-tools@2.9.0)(typescript@7.0.2): + dependencies: + '@rsbuild/core': 2.2.3(@module-federation/runtime-tools@2.9.0) + '@rslib/core': 1.0.0(@microsoft/api-extractor@7.59.0(@types/node@24.13.3))(@module-federation/runtime-tools@2.9.0)(typescript@7.0.2) + '@rslint/core': 0.9.0 + '@rstest/core': 0.11.11(@module-federation/runtime-tools@2.9.0) + prettier: 3.9.6 + tinypool: 2.1.2 + yuku-parser: 0.9.3 + optionalDependencies: + '@rstackjs/cli-darwin-arm64': 0.7.2 + '@rstackjs/cli-darwin-x64': 0.7.2 + '@rstackjs/cli-linux-arm64-gnu': 0.7.2 + '@rstackjs/cli-linux-arm64-musl': 0.7.2 + '@rstackjs/cli-linux-ppc64-gnu': 0.7.2 + '@rstackjs/cli-linux-riscv64-gnu': 0.7.2 + '@rstackjs/cli-linux-riscv64-musl': 0.7.2 + '@rstackjs/cli-linux-s390x-gnu': 0.7.2 + '@rstackjs/cli-linux-x64-gnu': 0.7.2 + '@rstackjs/cli-linux-x64-musl': 0.7.2 + '@rstackjs/cli-win32-arm64-msvc': 0.7.2 + '@rstackjs/cli-win32-ia32-msvc': 0.7.2 + '@rstackjs/cli-win32-x64-msvc': 0.7.2 + transitivePeerDependencies: + - '@microsoft/api-extractor' + - '@module-federation/runtime-tools' + - core-js + - happy-dom + - jiti + - jsdom + - typescript + run-applescript@7.1.0: {} safer-buffer@2.1.2: {} @@ -3637,8 +3553,6 @@ snapshots: side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 - simple-git-hooks@2.14.0: {} - smart-buffer@4.2.0: {} socks-proxy-agent@8.0.5(supports-color@8.1.1): @@ -3723,6 +3637,8 @@ snapshots: transitivePeerDependencies: - react-native-b4a + tinypool@2.1.2: {} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -3818,4 +3734,26 @@ snapshots: buffer-crc32: 0.2.13 fd-slicer: 1.1.0 + yuku-ast@0.9.3: + dependencies: + '@yuku-toolchain/types': 0.9.3 + + yuku-parser@0.9.3: + dependencies: + '@yuku-toolchain/types': 0.9.3 + yuku-ast: 0.9.3 + optionalDependencies: + '@yuku-parser/binding-android-arm64': 0.9.3 + '@yuku-parser/binding-darwin-arm64': 0.9.3 + '@yuku-parser/binding-darwin-x64': 0.9.3 + '@yuku-parser/binding-freebsd-x64': 0.9.3 + '@yuku-parser/binding-linux-arm-gnu': 0.9.3 + '@yuku-parser/binding-linux-arm-musl': 0.9.3 + '@yuku-parser/binding-linux-arm64-gnu': 0.9.3 + '@yuku-parser/binding-linux-arm64-musl': 0.9.3 + '@yuku-parser/binding-linux-x64-gnu': 0.9.3 + '@yuku-parser/binding-linux-x64-musl': 0.9.3 + '@yuku-parser/binding-win32-arm64': 0.9.3 + '@yuku-parser/binding-win32-x64': 0.9.3 + zod@3.25.76: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 0350280..bddbeec 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -5,7 +5,6 @@ packages: allowBuilds: puppeteer: true - simple-git-hooks: false minimumReleaseAgeExclude: - '@rsbuild/*' diff --git a/rslib.config.ts b/rslib.config.ts deleted file mode 100644 index 280948b..0000000 --- a/rslib.config.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { defineConfig } from '@rslib/core'; - -export default defineConfig({ - lib: [ - { - id: 'server', - syntax: 'es2023', - dts: { - bundle: { - bundledPackages: [ - 'chokidar', - 'readdirp', - 'connect-next', - 'ws', - '@types/ws', - ], - }, - }, - source: { - define: { - // `ws` internal env vars - 'process.env.WS_NO_BUFFER_UTIL': true, - 'process.env.WS_NO_UTF_8_VALIDATE': true, - }, - }, - output: { - externals: { - selfsigned: 'commonjs selfsigned', - }, - }, - }, - { - id: 'client', - syntax: 'es2015', - bundle: false, - source: { - entry: { - index: './client-src/**', - }, - define: { - // use define to avoid compile time evaluation of __webpack_hash__ - BUILD_HASH: '__webpack_hash__', - RESOURCE_QUERY: '__resourceQuery', - }, - tsconfigPath: './tsconfig.client.json', - }, - dts: true, - output: { - distPath: './client', - }, - }, - ], -}); diff --git a/rslint.config.ts b/rslint.config.ts deleted file mode 100644 index 52db4fd..0000000 --- a/rslint.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { defineConfig, js, ts } from '@rslint/core'; - -export default defineConfig([ - js.configs.recommended, - ts.configs.recommended, - { - rules: { - '@typescript-eslint/no-explicit-any': 'off', - }, - }, - { - files: ['tests/**/*'], - rules: { - '@typescript-eslint/no-require-imports': 'off', - '@typescript-eslint/no-unused-expressions': 'off', - }, - }, -]); diff --git a/rstack.config.ts b/rstack.config.ts new file mode 100644 index 0000000..da78c40 --- /dev/null +++ b/rstack.config.ts @@ -0,0 +1,104 @@ +// Configuration guide: https://rstack.rs/config +import { define } from 'rstack'; + +define.lib({ + lib: [ + { + id: 'server', + syntax: 'es2023', + dts: { + bundle: { + bundledPackages: [ + 'chokidar', + 'readdirp', + 'connect-next', + 'ws', + '@types/ws', + ], + }, + }, + source: { + define: { + // `ws` internal env vars + 'process.env.WS_NO_BUFFER_UTIL': true, + 'process.env.WS_NO_UTF_8_VALIDATE': true, + }, + }, + output: { + externals: { + selfsigned: 'commonjs selfsigned', + }, + }, + }, + { + id: 'client', + syntax: 'es2015', + bundle: false, + source: { + entry: { + index: './client-src/**', + }, + define: { + // use define to avoid compile time evaluation of __webpack_hash__ + BUILD_HASH: '__webpack_hash__', + RESOURCE_QUERY: '__resourceQuery', + }, + tsconfigPath: './tsconfig.client.json', + }, + dts: true, + output: { + distPath: './client', + }, + }, + ], +}); + +define.test({ + extends: {}, + globals: true, + include: ['tests/*.test.ts', 'tests/e2e/*.test.js'], + exclude: [ + // TODO: check why this test timeout + '/tests/e2e/host.test.js', + // TODO: check why this test throw error when run with other tests + '/tests/e2e/watch-files.test.js', + // TODO: check why this test timeout + '/tests/e2e/web-socket-server-url.test.js', + ], + pool: { + maxWorkers: '80%', + }, + env: { + FORCE_COLOR: 'true', + }, + testTimeout: process.env.CI ? 120000 : 60000, + hookTimeout: 60000, + setupFiles: ['./tests/helpers/setup-test.js'], + reporters: ['default'], +}); + +define.fmt({ + singleQuote: true, +}); + +define.staged({ + '*.{js,jsx,ts,tsx,mjs,cjs}': ['rs lint --fix', 'rs fmt'], + '*.{json,json5,md,yaml,yml}': 'rs fmt', +}); + +define.lint(({ js, ts }) => [ + js.configs.recommended, + ts.configs.recommended, + { + rules: { + '@typescript-eslint/no-explicit-any': 'off', + }, + }, + { + files: ['tests/**/*'], + rules: { + '@typescript-eslint/no-require-imports': 'off', + '@typescript-eslint/no-unused-expressions': 'off', + }, + }, +]); diff --git a/rstest.config.ts b/rstest.config.ts deleted file mode 100644 index c0e1e66..0000000 --- a/rstest.config.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { defineConfig } from '@rstest/core'; - -export default defineConfig({ - globals: true, - include: ['tests/*.test.ts', 'tests/e2e/*.test.js'], - exclude: [ - // TODO: check why this test timeout - '/tests/e2e/host.test.js', - // TODO: check why this test throw error when run with other tests - '/tests/e2e/watch-files.test.js', - // TODO: check why this test timeout - '/tests/e2e/web-socket-server-url.test.js', - ], - pool: { - maxWorkers: '80%', - }, - env: { - FORCE_COLOR: 'true', - }, - testTimeout: process.env.CI ? 120000 : 60000, - hookTimeout: 60000, - setupFiles: ['./tests/helpers/setup-test.js'], - reporters: ['default'], -}); diff --git a/skills-lock.json b/skills-lock.json new file mode 100644 index 0000000..634d3e8 --- /dev/null +++ b/skills-lock.json @@ -0,0 +1,17 @@ +{ + "version": 1, + "skills": { + "migrate-to-rstack-cli": { + "source": "rstackjs/rstack-cli", + "sourceType": "github", + "skillPath": ".agents/skills/migrate-to-rstack-cli/SKILL.md", + "computedHash": "6473095b585fa3b40d476847705ab721a191fc77e5e1f8a33401c5daab40d05b" + }, + "rstack-cli-docs": { + "source": "rstackjs/rstack-cli", + "sourceType": "github", + "skillPath": ".agents/skills/rstack-cli-docs/SKILL.md", + "computedHash": "8b5451af88d29195dc2f257543013ad66aa14a7791e401ab4cffdb11941cf27a" + } + } +} diff --git a/tests/rstest-env.d.ts b/tests/rstest-env.d.ts index 115fb16..72f583b 100644 --- a/tests/rstest-env.d.ts +++ b/tests/rstest-env.d.ts @@ -1 +1 @@ -/// +/// From 1f3ed8add0869210feef31d58c841ee5c768a797 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 3 Sep 2026 20:39:21 +0800 Subject: [PATCH 2/2] chore: remove migration skill --- .agents/skills/migrate-to-rstack-cli/SKILL.md | 99 ------------------- .../references/git-hooks.md | 87 ---------------- .../references/lint-staged.md | 32 ------ .../references/prettier.md | 39 -------- .../references/rsbuild.md | 35 ------- .../migrate-to-rstack-cli/references/rslib.md | 29 ------ .../references/rslint.md | 58 ----------- .../references/rspress.md | 29 ------ .../references/rstest.md | 32 ------ skills-lock.json | 6 -- 10 files changed, 446 deletions(-) delete mode 100644 .agents/skills/migrate-to-rstack-cli/SKILL.md delete mode 100644 .agents/skills/migrate-to-rstack-cli/references/git-hooks.md delete mode 100644 .agents/skills/migrate-to-rstack-cli/references/lint-staged.md delete mode 100644 .agents/skills/migrate-to-rstack-cli/references/prettier.md delete mode 100644 .agents/skills/migrate-to-rstack-cli/references/rsbuild.md delete mode 100644 .agents/skills/migrate-to-rstack-cli/references/rslib.md delete mode 100644 .agents/skills/migrate-to-rstack-cli/references/rslint.md delete mode 100644 .agents/skills/migrate-to-rstack-cli/references/rspress.md delete mode 100644 .agents/skills/migrate-to-rstack-cli/references/rstest.md diff --git a/.agents/skills/migrate-to-rstack-cli/SKILL.md b/.agents/skills/migrate-to-rstack-cli/SKILL.md deleted file mode 100644 index 1656aa4..0000000 --- a/.agents/skills/migrate-to-rstack-cli/SKILL.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -name: migrate-to-rstack-cli -description: Use when migrating projects from standalone Rsbuild, Rslib, Rstest, Rslint, Rspress, Prettier, sort-package-json, lint-staged, husky, lefthook, or simple-git-hooks tooling to the unified `rstack` package, `rs` commands, and `rstack.config.*`. ---- - -# Migrate to Rstack CLI - -Rstack CLI is the `rstack` package, exposed through the `rs` binaries. It provides one CLI, one config file, and a consistent workflow for the Rstack JavaScript toolchain. - -## Tool references - -Read every matching reference before editing. Load only the tools present in the project. - -- `@rsbuild/core`, `rsbuild.config.*`, `rsbuild` commands, or Rsbuild types: [rsbuild.md](references/rsbuild.md) -- `@rslib/core`, `rslib.config.*`, `rslib` commands, or Rslib types: [rslib.md](references/rslib.md) -- `@rstest/core`, `@rstest/adapter-*`, `rstest.config.*`, `rstest` commands, or test imports: [rstest.md](references/rstest.md) -- `@rslint/core`, `rslint.config.*`, `rslint` commands, or lint imports: [rslint.md](references/rslint.md) -- `prettier`, `package.json#prettier`, `.prettierrc*`, `prettier.config.*`, `.prettierignore`, `.editorconfig`, `sort-package-json`, Prettier plugins, or formatting scripts: [prettier.md](references/prettier.md) -- `@rspress/core`, `rspress.config.*`, `rspress` commands, themes, or plugins: [rspress.md](references/rspress.md) -- `lint-staged`, `nano-staged`, their configs: [lint-staged.md](references/lint-staged.md) -- `husky`, `.husky/`, `package.json#husky`, `lefthook`, `simple-git-hooks`, `.simple-git-hooks.*`, or Git hook installer scripts: [git-hooks.md](references/git-hooks.md) - -## Workflow - -1. Inspect manifests, workspace catalogs, lock files, scripts, standalone configs, ignore files, Git hooks, TypeScript `types`, and source imports. -2. Read the matching references and inventory behavior that must survive: config functions, CLI arguments, plugins, presets, adapters, custom config paths, and chained commands. -3. Check the latest `rstack` release, Node.js engine, underlying tool versions, and relevant peer ranges. Upgrade incompatible plugins or adapters; stop if no compatible version exists. Ensure development and CI use supported Node.js versions, but do not narrow a published package's runtime `engines` solely to satisfy Rstack. Add `rstack` as a development dependency with the existing package manager. -4. If a matching reference uses a `define.*` registration, create `rstack.config.ts` and move the standalone configuration into it. -5. Rewrite commands and imports as directed by the references. -6. Search again for old imports, binaries, config paths, manifest entries, package-manager metadata, and type references. Remove an item only after ruling out direct or runtime use and unresolved peer constraints. -7. Delete a standalone config only after its behavior is represented in `rstack.config.*`. -8. Refresh the lockfile with the repository's package manager. Confirm the expected tool version changes and resolve peer dependency warnings. -9. Run migrated scripts and required repository checks. Compare generated artifacts or runtime behavior where relevant. After any follow-up changes, rerun the relevant checks against the final code. - -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. - -### Ignore cleanup - -After migrating lint or formatting, remove exclusions from lint `ignores` and fmt `ignorePatterns` when the same paths are already covered by effective `.gitignore` rules; both commands read `.gitignore` automatically. For fmt, also remove `package-lock.json` and `pnpm-lock.yaml` from `ignorePatterns`; `rs fmt` ignores them by default. - -Keep negations and fmt exclusions that must apply to explicitly passed files, which bypass `.gitignore`. - -### 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 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 - -### Config files - -Treat each workspace or config root independently. A monorepo may need multiple Rstack config files when commands run from different package directories; validate config discovery from each directory. - -Use one of the default names: `rstack.config.ts`, `.js`, `.mts`, or `.mjs`. - -Use `rs -c ` or `rs --config ` only for a custom path. - -```ts -// Configuration guide: https://rstack.rs/config -import { define } from 'rstack'; - -define.app({ - // Rsbuild config -}); - -define.test({ - // Rstest config -}); -``` - -### Modules and imports - -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'); - - return { - plugins: [pluginReact()], - }; -}); - -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/git-hooks.md b/.agents/skills/migrate-to-rstack-cli/references/git-hooks.md deleted file mode 100644 index f51d63f..0000000 --- a/.agents/skills/migrate-to-rstack-cli/references/git-hooks.md +++ /dev/null @@ -1,87 +0,0 @@ -# Git hook migration - -Migrate [Husky](https://typicode.github.io/husky/), [Lefthook](https://lefthook.dev/), or [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks#readme) to [`rs hooks`](https://rstack.rs/guide/cli/hooks). If a hook works with staged files, also read [lint-staged.md](lint-staged.md). - -## Shared steps - -1. Inspect the hook manager configuration, hook scripts, lifecycle scripts, custom paths, environment overrides, and `git config --show-scope --get core.hooksPath`. -2. Inventory every active hook before editing. Confirm each hook is [supported by `rs hooks`](https://rstack.rs/guide/cli/hooks#supported-hooks); stop or design an explicit alternative for unsupported hooks. -3. Create each migrated hook in the selected hooks directory, `.rstack/hooks` by default, before running `rs hooks`, because the command changes the repository's `core.hooksPath`. Preserve commands and any explicit directory changes. -4. Ensure the `prepare` script in the root `package.json` runs `rs hooks`, adding it if necessary. Remove the old installer invocation from any lifecycle script while preserving other commands. Use `--hooks-dir` consistently when choosing a custom directory. -5. If the previous manager's hooks or `core.hooksPath` block installation, run `rs hooks --force` once after migrating every required hook. The command preserves the previous files but makes them inactive. Do not add `--force` to the lifecycle script. -6. Exercise the migrated hooks, then remove the old dependency, configuration, and generated hook files only after behavior matches and their ownership and paths are confirmed. - -`rs hooks` creates `.rstack/hooks/_/.gitignore`. Do not list `.rstack/hooks/_` in the root `.gitignore`. - -## Husky - -1. Locate the source hooks: - - Husky v5 and newer: files such as `.husky/pre-commit`; exclude the generated `.husky/_` directory. - - Husky v4: `package.json#husky.hooks` or `.huskyrc*` configuration. -2. Move each hook body to the corresponding file in the selected hooks directory. Remove lines that source `.husky/_/husky.sh`; keep the reusable POSIX shell commands. -3. Replace Husky lifecycle invocations such as `husky`, `husky install`, or a custom Husky directory command with `rs hooks` or `rs hooks --hooks-dir `. -4. Replace `HUSKY=0`, `HUSKY_SKIP_HOOKS`, and `HUSKY_SKIP_INSTALL` usage with `RSTACK_HOOKS=0`. Replace `HUSKY_GIT_PARAMS` with the positional arguments expected by each hook. For example, change `commitlint -E HUSKY_GIT_PARAMS` to `commitlint --edit "$1"`. -5. Tell users who rely on `$XDG_CONFIG_HOME/husky/init.sh`, `~/.config/husky/init.sh`, or the deprecated `~/.huskyrc` to move the required shell setup to `$XDG_CONFIG_HOME/rstack/hooks-init.sh` or `~/.config/rstack/hooks-init.sh`. Do not edit user-level files without permission. -6. After validation, remove the Husky dependency and old hook directory. - -For example, migrate: - -```sh title=".husky/pre-commit" -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" -pnpm test -``` - -to: - -```sh title=".rstack/hooks/pre-commit" -pnpm test -``` - -## Lefthook - -1. Resolve the merged configuration, including main and local files, `LEFTHOOK_CONFIG`, `extends` or remote configs, lifecycle scripts, and direct `lefthook run` calls. Treat ignored local configs as user-owned. -2. Create one Rstack file per Git hook. Rstack runs it with POSIX `sh -e` and forwards arguments and standard input. Replace templates such as `{1}` with `"$1"`; move custom Lefthook groups to project scripts. -3. Move `pre-commit` tasks using `{staged_files}`, `stage_fixed`, `glob`, or `exclude` to `define.staged`, and run `rs staged` from `.rstack/hooks/pre-commit`; it passes matched files and stages successful fixes. Recreate the intended file set instead of copying globs: Lefthook's default `**` semantics differ from lint-staged. Preserve exclusions such as unsupported symlinks. -4. For `{push_files}`, `{all_files}`, custom `{files}`, or orchestration such as `parallel` and `piped`, call a project helper from the hook. It should consume all `pre-push` ref updates, apply the original conditions, preserve concurrency or ordering, and aggregate failures. For a configuration like Rstest's, run the format/spell check always, skip type checking only for Markdown-only pushes, and run the dependency check only for pushed package manifests. Do not substitute a fixed `HEAD^` diff. -5. Replace `lefthook install` with `rs hooks` and `LEFTHOOK=0` with `RSTACK_HOOKS=0`. After validation, remove Lefthook configs, dependencies, generated hooks, and its entries from pnpm build metadata such as `allowBuilds`, `onlyBuiltDependencies`, or `ignoredBuiltDependencies`. Preserve unrelated entries, and remove a setting only if it becomes empty. Remove local-config ignore rules only when no longer needed. - -## simple-git-hooks - -1. Load the active configuration from `package.json#simple-git-hooks`, a `.simple-git-hooks.{js,cjs,mjs,json}` or `simple-git-hooks.{js,cjs,mjs,json}` file, or the custom path passed to its CLI. Use the configuration values instead of copying generated files from the Git hooks directory. -2. Create one file in the selected hooks directory for each configured command, using the hook name as the file name. Ignore `preserveUnused` as a command, but inspect and migrate any existing hooks that it preserves. -3. Replace the simple-git-hooks lifecycle command with `rs hooks`, preserving other chained commands. -4. Replace `SKIP_INSTALL_SIMPLE_GIT_HOOKS=1` and `SKIP_SIMPLE_GIT_HOOKS=1` usage with `RSTACK_HOOKS=0`. Move required commands from the file referenced by `SIMPLE_GIT_HOOKS_RC` to the Rstack user initialization file, with user permission. -5. Do not run the simple-git-hooks uninstall script after `rs hooks`; it follows the current `core.hooksPath` and can delete Rstack's generated hook shims. -6. After validation, remove the simple-git-hooks dependency, config, installer, old generated hook files, and stale package-manager metadata such as pnpm `allowBuilds`. Confirm the generated files' ownership and paths before removing them. - -For example, migrate: - -```json title="package.json" -{ - "scripts": { - "prepare": "existing-command && simple-git-hooks" - }, - "simple-git-hooks": { - "pre-commit": "pnpm lint", - "pre-push": "pnpm test" - } -} -``` - -to `"prepare": "existing-command && rs hooks"` and these hook files: - -```sh title=".rstack/hooks/pre-commit" -pnpm lint -``` - -```sh title=".rstack/hooks/pre-push" -pnpm test -``` - -## Validate - -- Confirm `git config --show-scope --get core.hooksPath` reports the expected Rstack-generated directory and whether it is configured in the local or worktree scope. -- Test each migrated hook and confirm that its commands run as expected. -- Remove previous generated hooks after validation so they cannot become active again if `core.hooksPath` is later unset or changed. -- Search for old manager commands, configuration, environment variables, and user instructions before removing dependencies. diff --git a/.agents/skills/migrate-to-rstack-cli/references/lint-staged.md b/.agents/skills/migrate-to-rstack-cli/references/lint-staged.md deleted file mode 100644 index 87bddde..0000000 --- a/.agents/skills/migrate-to-rstack-cli/references/lint-staged.md +++ /dev/null @@ -1,32 +0,0 @@ -# Staged-File Migration - -`rs staged` is powered by lint-staged and configured through `define.staged`, which supports lint-staged configuration options. - -Read this reference when the project uses `lint-staged`, `nano-staged`, a staged-file config, or a staged-file Git hook. - -If staged tasks invoke Prettier, also read [prettier.md](prettier.md). - -## Steps - -1. Replace staged-file script invocations with `rs staged`. -2. Move the staged-file config into `define.staged` in `rstack.config.*`. -3. Preserve previous behavior. Separate code tasks that lint and format from format-only tasks. -4. Remove the old manifest key or config file. -5. Remove the direct staged-file dependency only when no script, config, or programmatic API still uses it. - -## Config pattern - -```ts -import { define } from 'rstack'; - -define.staged({ - '*.{js,jsx,ts,tsx,mjs,cjs}': ['rs lint', 'rs fmt'], - '*.{json,jsonc,md,mdx,css,html,yml,yaml}': 'rs fmt', -}); -``` - -Function configs are supported. - -## CLI options - -Run `rs staged -h` for supported options. diff --git a/.agents/skills/migrate-to-rstack-cli/references/prettier.md b/.agents/skills/migrate-to-rstack-cli/references/prettier.md deleted file mode 100644 index 2c6dc1a..0000000 --- a/.agents/skills/migrate-to-rstack-cli/references/prettier.md +++ /dev/null @@ -1,39 +0,0 @@ -# Prettier migration - -`rs fmt` is Rstack's faster, Prettier-based formatter. See the [formatting guide](https://rstack.rs/guide/formatting) for supported options, file discovery, overrides, plugins, and Rstack-specific capabilities. - -Read this reference when the project uses the `prettier` CLI or API, `package.json#prettier`, Prettier configuration files, `.prettierignore`, `.editorconfig`, `sort-package-json`, Prettier plugins, or formatting scripts. - -## Steps - -1. Inventory formatting commands and inputs, Prettier options and overrides, ignore rules, `.editorconfig`, plugins, package.json sorting, programmatic API calls, and tracked VS Code settings. -2. Move Prettier options and overrides into `define.fmt` in `rstack.config.*`. -3. Move `.prettierignore` or custom `--ignore-path` rules into `ignorePatterns`. Rebase patterns from each ignore file's directory to the Rstack configuration directory when they differ, preserving rule order and negations. Translate relevant `.editorconfig` values into explicit formatting options. -4. Replace Prettier CLI commands with the matching `rs fmt` commands and preserve their file or glob arguments. -5. Reference plugins by package name, file path, or URL. Do not pass imported plugin objects, and keep each plugin package as a direct dependency. -6. When replacing `prettier-plugin-packagejson`, enable `sortPackageJson` and preserve the original manifest paths. -7. If tracked VS Code configuration recommends `esbenp.prettier-vscode` or selects it with `editor.defaultFormatter`, replace it with `rstack.rstack` for scopes migrated to `rs fmt`, and move supported `prettier.*` formatting options into `define.fmt`. Preserve `editor.formatOnSave`, remove `source.fixAll.prettier` when no remaining scope uses it, and keep the Prettier extension for any scope that still does. -8. Delete old config and ignore files only after their behavior is represented in `define.fmt`. -9. Remove direct dependencies only when no script, config, API call, plugin peer requirement, or other tool still needs them. - -Rstack creates `.rstack/cache/.gitignore` by default. Do not list `.rstack/cache` in the root `.gitignore`; add explicit rules only for custom cache paths. - -`rs fmt` does not read Prettier configuration files, `.prettierignore`, or `.editorconfig`. - -Keep `.editorconfig` when editors or other tools use it. Keep Prettier when application code uses APIs such as `prettier.format()`; `rs fmt` is not a drop-in replacement for the programmatic API. - -## Command mapping - -| Prettier | Rstack CLI | -| ----------------------------- | ------------------------- | -| `prettier --write .` | `rs fmt` | -| `prettier --check .` | `rs fmt --check` | -| `prettier --list-different .` | `rs fmt --list-different` | - -`rs fmt` writes by default. Move formatting flags such as `--single-quote` into `define.fmt` instead of passing them to `rs fmt`. Keep Prettier or redesign commands that rely on stdin or other unsupported CLI behavior. - -## Validate - -1. Run the migrated write command and review the changed files, especially files handled by plugins or `sortPackageJson`. -2. Run `rs fmt --check` and confirm it exits successfully. -3. Compare the selected file set with the old command. Directory and glob discovery follows `.gitignore`, while explicitly named files do not; use `ignorePatterns` for unconditional exclusions. diff --git a/.agents/skills/migrate-to-rstack-cli/references/rsbuild.md b/.agents/skills/migrate-to-rstack-cli/references/rsbuild.md deleted file mode 100644 index 21e0be9..0000000 --- a/.agents/skills/migrate-to-rstack-cli/references/rsbuild.md +++ /dev/null @@ -1,35 +0,0 @@ -# Rsbuild migration - -Read this reference when the project uses `@rsbuild/core`, `rsbuild.config.*`, `rsbuild` commands, Rsbuild client types, or `@rsbuild/core/types`. - -## Steps - -1. Replace `rsbuild dev`, `rsbuild build`, and `rsbuild preview` with `rs dev`, `rs build`, and `rs preview`. Preserve supported arguments after the new command. -2. Move the old config export into `define.app`, replacing Rsbuild's `defineConfig()` wrapper and import. Preserve async functions, config parameters, plugins, and all options. -3. Replace custom `--config` paths with the migrated `rstack.config.*` path. -4. Replace Rsbuild client and type references: - - `/// ` to `/// ` - - `"types": ["@rsbuild/core/types"]` to `"types": ["rstack/types"]` - - Type-only imports from `@rsbuild/core/types` to `rstack/types` -5. Keep Rsbuild plugins such as `@rsbuild/plugin-react` and `@rsbuild/plugin-vue`, but verify that their peer ranges support the `@rsbuild/core` version installed through `rstack`. Upgrade incompatible plugins before migrating; retaining an older direct core does not make Rstack use it. -6. Search for remaining direct `@rsbuild/core` imports. Remove the direct dependency when no source or runtime API still needs it. -7. Delete `rsbuild.config.*` after the migrated app commands load equivalent config. - -## Config pattern - -```ts -import { pluginReact } from '@rsbuild/plugin-react'; -import { define } from 'rstack'; - -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/rslib.md b/.agents/skills/migrate-to-rstack-cli/references/rslib.md deleted file mode 100644 index ddc34de..0000000 --- a/.agents/skills/migrate-to-rstack-cli/references/rslib.md +++ /dev/null @@ -1,29 +0,0 @@ -# Rslib migration - -Read this reference when the project uses `@rslib/core`, `rslib.config.*`, `rslib` commands, library build config, or Rslib type imports. - -## Steps - -1. Replace the `rslib` executable prefix with `rs lib`. Preserve supported arguments after `rs lib`. -2. Rename or replace the `rslib.config.*` with `rstack.config.*`, then move its export into `define.lib`, replacing Rslib's `defineConfig()` wrapper and import. Preserve async functions, config parameters, plugins, and all options. -3. Keep build plugins, but verify that Rsbuild plugin peer ranges support the core version installed through `rstack`. Upgrade incompatible plugins before migrating. -4. Replace `@rslib/core/types` references with `rstack/types` where applicable. -5. Replace custom `--config` paths with the migrated `rstack.config.*` path. -6. Search for remaining direct `@rslib/core` imports. Remove the direct dependency only when no source or runtime API still needs it. -7. Delete `rslib.config.*` after the migrated library commands load equivalent config. - -## Config pattern - -```ts -import { define } from 'rstack'; - -define.lib({ - dts: true, -}); -``` - -If tests also use Rstest, read [rstest.md](rstest.md). `rs test` derives an Rslib test extension from `define.lib` unless `define.test` sets `extends`. - -## Validate - -Run every migrated library build from its directory and compare its outputs. diff --git a/.agents/skills/migrate-to-rstack-cli/references/rslint.md b/.agents/skills/migrate-to-rstack-cli/references/rslint.md deleted file mode 100644 index 8910d91..0000000 --- a/.agents/skills/migrate-to-rstack-cli/references/rslint.md +++ /dev/null @@ -1,58 +0,0 @@ -# Rslint migration - -Read this reference when the project uses `@rslint/core`, `rslint.config.*`, `rslint` commands, or Rslint config imports. - -## Steps - -1. Replace the `rslint` executable prefix with `rs lint`. For example, replace `rslint --fix` with `rs lint --fix`. -2. Move the old config into `define.lint`, replacing Rslint's `defineConfig()` wrapper and import. Receive `@rslint/core` exports from the factory parameter. -3. If the old config imports the `globals` package for environment maps such as `globals.browser`, receive `globals` from the factory parameter instead. Remove the direct `globals` dependency after confirming that no other file uses it. -4. Replace custom `--config` paths with the migrated `rstack.config.*` path. -5. Remove `@rslint/core` only when no uncovered direct runtime API remains. Delete `rslint.config.*`. -6. If tracked VS Code configuration recommends `rstack.rslint`, replace it with the unified `rstack.rstack` extension. Move relevant `rslint.*` settings to their current `rstack.rslint.*` equivalents according to the [Rstack extension documentation](https://github.com/rstackjs/rstack-editor/blob/main/packages/vscode/README.md). Keep `source.fixAll.rslint` unchanged. - -## Config pattern - -```ts -import { define } from 'rstack'; - -define.lint(({ js, ts }) => [ - js.configs.recommended, - ts.configs.recommendedTypeChecked, -]); -``` - -Preserve existing presets and rules during migration. - -The factory also provides Rslint's built-in globals catalog, so an external `globals` import is unnecessary: - -```ts -define.lint(({ globals }) => [ - { - files: ['**/*.{js,cjs,mjs}'], - languageOptions: { - globals: globals.browser, - }, - }, -]); -``` - -## Script pattern - -For example: - -```json -{ - "scripts": { - "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. diff --git a/.agents/skills/migrate-to-rstack-cli/references/rspress.md b/.agents/skills/migrate-to-rstack-cli/references/rspress.md deleted file mode 100644 index e008fb3..0000000 --- a/.agents/skills/migrate-to-rstack-cli/references/rspress.md +++ /dev/null @@ -1,29 +0,0 @@ -# Rspress migration - -Read this reference when the project uses `@rspress/core`, `rspress.config.*`, `rspress` commands, docs config, themes, or plugins. - -## Steps - -1. Keep `@rspress/core` installed as a direct dependency. `rs doc` requires this optional Rstack peer dependency. -2. Replace the `rspress` executable prefix with `rs doc`: `rspress dev` to `rs doc`, `rspress build` to `rs doc build`, and `rspress preview` to `rs doc preview`. Preserve supported arguments. -3. Rename or replace the `rspress.config.*` with `rstack.config.*`, then move its export into `define.doc`, replacing Rspress's `defineConfig()` wrapper and import. Preserve async functions, themes, plugins, and all options. -4. Replace custom `--config` paths with the migrated `rstack.config.*` path. -5. Keep Rspress-specific type imports from `@rspress/core`; Rstack does not re-export them. -6. Keep themes, plugins, and docs UI packages. Delete `rspress.config.*` only after the migrated docs commands load equivalent config. - -## Config pattern - -```ts -import { define } from 'rstack'; - -define.doc({ - root: 'docs', - title: 'Project docs', -}); -``` - -Follow [Modules and imports](../SKILL.md#modules-and-imports) when the config imports plugins or themes. - -## Validate - -Run the migrated docs build script. Smoke-test dev or preview when those workflows changed. diff --git a/.agents/skills/migrate-to-rstack-cli/references/rstest.md b/.agents/skills/migrate-to-rstack-cli/references/rstest.md deleted file mode 100644 index be5d1b8..0000000 --- a/.agents/skills/migrate-to-rstack-cli/references/rstest.md +++ /dev/null @@ -1,32 +0,0 @@ -# Rstest migration - -Read this reference when the project uses `@rstest/core`, `@rstest/adapter-rsbuild`, `@rstest/adapter-rslib`, `rstest.config.*`, `rstest` commands, or Rstest imports and types. - -## Steps - -1. Replace the `rstest` executable prefix with `rs test`. Preserve supported arguments, such as `-w`, after `rs test`. -2. Move test options into `define.test`, replacing Rstest's `defineConfig()` wrapper and import. -3. Remove standard `withRsbuildConfig()` or `withRslibConfig()` wiring only when `define.app` or `define.lib` is registered by the same `rstack.config.*` loaded by `rs test`. Rstack derives that extension unless `define.test` sets `extends`. -4. Preserve explicit custom `extends` values. Keep any adapter or package still imported by that custom extension. -5. Replace imports and TypeScript `types` entries: - - `@rstest/core` to `rstack/test` - - `@rstest/core/globals` to `rstack/test/globals` - - `@rstest/core/importMeta` to `rstack/test/importMeta` -6. Search for remaining direct core or adapter imports. Remove `@rstest/core` and adapter dependencies only when no direct use remains. -7. Delete `rstest.config.*` after all behavior is represented or intentionally supplied by automatic app/library extension. -8. If tracked VS Code configuration recommends `rstack.rstest`, replace it with the unified `rstack.rstack` extension. Move supported `rstest.*` settings to `rstack.rstest.*` according to the [Rstack extension documentation](https://github.com/rstackjs/rstack-editor/blob/main/packages/vscode/README.md); `rstest.nodeExecutable` instead becomes the shared `rstack.nodeExecutable` setting. - -## Config pattern - -```ts -import { define } from 'rstack'; - -define.test({ - setupFiles: ['./tests/setup.ts'], - testEnvironment: 'happy-dom', -}); -``` - -## Validate - -Run the migrated test script. Follow repository requirements such as building before tests. diff --git a/skills-lock.json b/skills-lock.json index 634d3e8..8687fc7 100644 --- a/skills-lock.json +++ b/skills-lock.json @@ -1,12 +1,6 @@ { "version": 1, "skills": { - "migrate-to-rstack-cli": { - "source": "rstackjs/rstack-cli", - "sourceType": "github", - "skillPath": ".agents/skills/migrate-to-rstack-cli/SKILL.md", - "computedHash": "6473095b585fa3b40d476847705ab721a191fc77e5e1f8a33401c5daab40d05b" - }, "rstack-cli-docs": { "source": "rstackjs/rstack-cli", "sourceType": "github",