Skip to content

perf: externalize unused YAML parser#66

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-externalize-yaml
Jul 21, 2026
Merged

perf: externalize unused YAML parser#66
chenjiahan merged 1 commit into
mainfrom
chenjiahan/perf-externalize-yaml

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Summary

lint-staged is always invoked with an explicit config object, so its optional YAML config loader is unreachable in Rstack. This PR externalizes yaml, removing the generated YAML chunk and the related buffer/process CommonJS bridges without changing supported behavior.

Performance

Metric Before After Change
Top-level JS output 708,081 B 387,889 B -320,192 B (-45.2%)
Bundled yaml.js 317,427 B (49,983 B gzip) 0 B Removed

Measured from packages/rstack/dist after pnpm --filter rstack build.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8acfbb5
Status: ✅  Deploy successful!
Preview URL: https://f920fcfa.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-perf-externalize.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan merged commit 93b9555 into main Jul 21, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/perf-externalize-yaml branch July 21, 2026 11:02
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d2103636-4642-47e9-acb7-7b5020f6da65

📥 Commits

Reviewing files that changed from the base of the PR and between 051fd52 and 8acfbb5.

📒 Files selected for processing (1)
  • packages/rstack/rslib.config.ts

📝 Walkthrough

Walkthrough

The library build configuration now externalizes both jiti and yaml. Comments clarify that lint-staged always receives an explicit configuration object, so the optional YAML configuration loader is not used.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: externalizing an unused YAML parser for performance.
Description check ✅ Passed The description matches the changeset and explains the YAML externalization and performance impact.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chenjiahan/perf-externalize-yaml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant