Skip to content

feat(codemod): improvements to s1-to-s2 codemod (agent mode, E2E tests, more)#9754

Open
reidbarber wants to merge 11 commits intomainfrom
codemod-fixes
Open

feat(codemod): improvements to s1-to-s2 codemod (agent mode, E2E tests, more)#9754
reidbarber wants to merge 11 commits intomainfrom
codemod-fixes

Conversation

@reidbarber
Copy link
Member

@reidbarber reidbarber commented Mar 6, 2026

Includes three main improvements to the npx @react-spectrum/codemods s1-to-s2 upgrade assistant:

  1. Adds --agent mode: this just transforms files, skipping the wizard steps.
  2. Adds E2E tests for CLI: Previously we just had snapshot tests for the transform functions. Now we have some tests for the CLI itself.
  3. Fixes --components handling for sub-components: Previously, if you wanted to upgrade just TableView and ran npx @react-spectrum/codemods s1-to-s2 --components TableView, it would not update Cell, Column, Row, etc. Now, it includes all related components in the changes.

Other minor fixes:

  • improved import cleanup
  • convert render-function Item nodes in TabList to Tab
  • remove dialog dividers after Dialog, Popover, and FullscreenDialog remaps
  • Updated some outdated links to old docs

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Check out the tests.

🧢 Your Project:

@rspbot
Copy link

rspbot commented Mar 6, 2026

@rspbot
Copy link

rspbot commented Mar 6, 2026

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.

2 participants