Skip to content

fix(cli): remove dead @xds/theme-default collapse from the v0.1.0 upgrade codemods - #4702

Open
ejhammond wants to merge 2 commits into
mainfrom
fix/cli-remove-theme-default-neutral-rename
Open

fix(cli): remove dead @xds/theme-default collapse from the v0.1.0 upgrade codemods#4702
ejhammond wants to merge 2 commits into
mainfrom
fix/cli-remove-theme-default-neutral-rename

Conversation

@ejhammond

@ejhammond ejhammond commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

What

Removes the @xds/theme-default@astryxdesign/theme-neutral collapse from all three v0.1.0 upgrade codemods:

  • migrate-xds-module-specifiers.mjs — dropped the @xds/theme-default entry from PACKAGE_RENAMES and from the collapsed-theme export-remap set.
  • migrate-xds-css-surfaces.mjs — dropped the @xds/theme-default/*@astryxdesign/theme-neutral/* @import rewrite.
  • migrate-xds-declare-module.mjs — dropped the @xds/theme-default entry from its PACKAGE_RENAMES map.

Why

We have a different migration path for internal vs external "theme-default" usages (internal maps to an internal theme, external maps to the "neutral" theme) and these were fighting one another--the external codemod ran first with default->neutral, then the internal codemod would not find any "default" references to migrate.

Rather than solve the (harder) sequencing issue, we noticed that there are no external consumers using the default theme in the first place. It was never published in OSS. So we can "cheat" here and just remove the external facing codemod leaving "default" references alone for the internal codemod to migrate.

Changes

  • Three codemods: removed the theme-default collapse; comments / meta.description updated to say theme-daily -> theme-neutral only.
  • Tests: removed the theme-default-specific module-specifiers case; converted shared theme-default assertions in the module-specifiers and css-surfaces suites to @xds/theme-daily so the collapse + alias behavior stays covered. declare-module had no theme-default-specific test.

Testing

vitest run on the v0.1.0 codemod suite — 50 tests pass across all five files. ESLint clean on the changed files.

…ecifiers codemod

theme-default was dropped when the public scope moved from @xds/* to
@astryxdesign/* in v0.1.0, so no v0.1.x consumer imported it. The
@xds/theme-default -> @astryxdesign/theme-neutral rename in the
module-specifiers codemod was therefore dead, and could rewrite unrelated
source to a package the app never declared as a dependency.

Drop the rename and the theme-default entry in the collapsed-theme export
remap. The @xds/theme-daily -> theme-neutral collapse and its
defaultTheme -> neutralTheme export remap are unchanged.
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview Aug 4, 2026 12:12pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 4, 2026
…nd declare-module codemods

Extends the module-specifiers fix to the other two v0.1.0 upgrade codemods,
which still collapsed @xds/theme-default to @astryxdesign/theme-neutral:

- migrate-xds-css-surfaces: dropped the theme-default @import rewrite (the
  @xds/theme-default/theme.css -> theme-neutral/theme.css rewrite that pointed
  CSS imports at a package the app never declared). Kept the theme-daily
  collapse and the core xds.css -> astryx.css file rename.
- migrate-xds-declare-module: dropped the theme-default entry from its rename
  map. Kept theme-daily.

theme-default was dropped at the v0.1.0 scope move, so the collapse was dead
for every consumer. theme-daily -> theme-neutral is a real migration and is
unchanged.
@ejhammond ejhammond changed the title fix(cli): remove dead @xds/theme-default rename from v0.1.0 module-specifiers codemod fix(cli): remove dead @xds/theme-default collapse from the v0.1.0 upgrade codemods Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant