Skip to content

fix(core): normalize numeric cli filters#1143

Merged
9aoy merged 1 commit intomainfrom
9aoy/fix-rstest-watch-workers
Apr 7, 2026
Merged

fix(core): normalize numeric cli filters#1143
9aoy merged 1 commit intomainfrom
9aoy/fix-rstest-watch-workers

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Apr 7, 2026

Summary

Background

rstest -w 1 could pass a numeric positional filter into path normalization and crash before CLI validation. The Jest migration guide also did not call out that -w changes meaning between Jest and Rstest.

image

Implementation

  • Normalize CLI filters by stringifying positional args before calling pathe.normalize, and widen the watch restart path to accept CAC's numeric args.
  • Add a regression test covering numeric filter normalization.
  • Add Jest migration docs for CLI flag mappings, including the -w to --pool.maxWorkers migration detail.

User Impact

rstest -w 1 no longer throws an internal TypeError, and Jest users can migrate worker-related CLI flags without confusing them with Rstest watch mode.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying rstest with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9469955
Status: ✅  Deploy successful!
Preview URL: https://b8f2d7bd.rstest.pages.dev
Branch Preview URL: https://9aoy-fix-rstest-watch-worker.rstest.pages.dev

View logs

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

Rsdoctor Bundle Diff Analysis

⚠️ Note: The latest commit (9e989afed8) does not have baseline artifacts. Using commit 774c24266e for baseline comparison instead. If this seems incorrect, please wait a few minutes and try rerunning the workflow.

Found 12 projects in monorepo, 1 project with changes.

📊 Quick Summary
Project Total Size Change
adapter-rsbuild 2.2 KB 0
adapter-rslib 23.2 KB 0
adapter-rspack 5.9 KB 0
browser 2.0 MB 0
browser-react 3.7 KB 0
browser-ui 804.4 KB 0
coverage-istanbul 8.9 KB 0
core/browser 970.4 KB 0
core/loaders 869.0 B 0
core/main 1.5 MB +101.0 B (0.0%)
vscode/extension 60.2 MB 0
vscode/worker 14.4 KB 0
📋 Detailed Reports (Click to expand)

📁 core/main

Path: packages/core/.rsdoctor/main/rsdoctor-data.json

📌 Baseline Commit: 774c24266e | PR: #1140

Metric Current Baseline Change
📊 Total Size 1.5 MB 1.5 MB +101.0 B (0.0%)
📄 JavaScript 1.5 MB 1.5 MB +101.0 B (0.0%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 79.2 KB 79.2 KB 0

📦 Download Diff Report: core/main Bundle Diff

Generated by Rsdoctor GitHub Action

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@9aoy 9aoy merged commit 9c64469 into main Apr 7, 2026
24 checks passed
@9aoy 9aoy deleted the 9aoy/fix-rstest-watch-workers branch April 7, 2026 03:55
@9aoy 9aoy mentioned this pull request Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants