Skip to content

fix(cli): keep config valid when migrating extras - #7036

Merged
johnjenkins merged 1 commit into
stenciljs:v5from
Arul1998:fix/v5-migrate-empty-extras
Nov 25, 2026
Merged

johnjenkins merged 1 commit into
stenciljs:v5from
Arul1998:fix/v5-migrate-empty-extras

Conversation

@Arul1998

Copy link
Copy Markdown
Contributor

What is the current behavior?

stencil migrate leaves stencil.config.ts unparseable when extras becomes empty, because the cleanup removes the commas on both sides. Three rules have a copy of that cleanup. light-dom-patches also drops a comma when replacing a slot fix flag.

GitHub Issue Number: #7035

What is the new behavior?

fixes: #7035

  • The three rules share removeEmptyExtras, which keeps the comma when another option follows.
  • light-dom-patches replaces only the property, so its commas stay.

Documentation

N/A

Does this introduce a breaking change?

  • Yes
  • No

Testing

  • Added cases to the enable-import-injection-default and global-style-inject specs, and new specs for light-dom-patches and the helper. The new rule tests fail without the fix.
  • Ran all the migration rules over 10,896 generated configs: 4,008 were invalid before, none after.
  • Migrated the config from the issue with the fixed rules, and it builds with 5.0.0-rc.9.
  • Ran the migration tests only, not the full suite.

Other information

N/A

@Arul1998
Arul1998 requested a review from a team as a code owner November 24, 2026 23:58

@johnjenkins johnjenkins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

❤️

@Arul1998

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review, @johnjenkins! The one CI failure is the extism-js download in the Node 24 SSR WASM job, before its tests ran. Node 22 passed. Could you re-run that job when you get a chance?

@johnjenkins
johnjenkins merged commit 2a75886 into stenciljs:v5 Nov 25, 2026
30 of 31 checks passed
@johnjenkins

Copy link
Copy Markdown
Contributor

was just a flaky workflow - have fixed it upstream. Thanks so much for looking at this!

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