chore: migrate to Rstack CLI - #84
Merged
Merged
Conversation
Migrate the toolchain to the unified `rstack` package and `rs` commands. - Consolidate rslib/rslint/rstest/prettier/staged config into `rstack.config.ts` - Replace `@rslib/core`, `@rslint/core`, `@rstest/core`, `prettier` and `simple-git-hooks` with a single `rstack` dev dependency - Migrate scripts to `rs lib`, `rs test`, `rs lint`, `rs check` and `rs fmt`, and switch Git hooks to `rs hooks` with `rs staged` in `.rstack/hooks/pre-commit` - Port the playground to `define.app` in `playground/rstack.config.ts` - Recommend the unified `rstack.rstack` VS Code extension Build output is byte-identical to before the migration, and lint and tests keep their pre-migration baseline.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the toolchain to Rstack CLI — the unified
rstackpackage andrscommands. Four standalone configs collapse into onerstack.config.ts, and five dev dependencies collapse into one.Follows the same approach already used in
rsbuild-plugin-type-check, with scripts matchingrsbuild-plugin-template.Changes
rstack.config.tsviadefine.lib/define.test/define.fmt/define.staged/define.lint, replacingrslib.config.ts,rslint.config.ts,rstest.config.ts,.prettierrcand.prettierignore. Existing behavior is preserved, includingoutput.target: 'node'and theglobals.browser/globals.rstestlint overrides (now provided by thedefine.lintfactory, so theglobalsimport is gone).@rslib/core,@rslint/core,@rstest/core,prettierandsimple-git-hooksreplaced by a singlerstackdev dependency. They remain available as transitiverstackdependencies.rs lib,rs lib -w,rs test,rs lint,rs fmt, plus a newcheckscript (rs check=rs lint && rs fmt --check).simple-git-hooksreplaced byrs hooks, withrs stagedin.rstack/hooks/pre-commit. The corresponding pnpmallowBuildsentry is dropped.define.appinplayground/rstack.config.ts, withrs build/rs devscripts.rstack.rstackextension instead ofrstack.rslint+esbenp.prettier-vscode.Verification
pnpm build(rs lib)pnpm run checkpnpm run test(rs test)pnpm dev(rs lib -w)rs build/rs devpre-commithookrs stagedran lint + fmt, exit 0pnpm install --frozen-lockfileBuild output is byte-identical to before the migration —
dist/index.js,dist/index.cjs,dist/index.d.tsanddist/util.d.tsall match the pre-migration baseline exactly, so published consumers see no change. Lint and tests hold their pre-migration baseline (0 errors, 4/4).Notes for reviewers
package.jsonfield order changed slightly (repositorynow afterbugs) becausedefine.fmtenablessortPackageJson. Cosmetic only.../dist/index.jsrather than../src. Rstack loads configs as native ESM, which cannot resolve this package's TypeScript./util.jsimport convention from source. Switching source to./util.tsfixed loading but broke declaration generation, and would have required loosening the publishedtsconfig.json, so the playground uses the built output instead — which also exercises the real published entry point.src/is unchanged.preparemay warnGit hooks setup skippedfor anyone with an existingcore.hooksPath(e.g. a global hook manager). Hooks still run through that path; making Rstack the owner needs a one-timers hooks --force, intentionally not done here..agents/skills/rstack-cli-docs/is added as a version-matched docs Skill for coding agents, mirroringrsbuild-plugin-type-check.