Skip to content

fix(transform): check all console.error args in Fragment warning suppression#5

Merged
Narrator merged 1 commit intomainfrom
fix/fragment-warning-suppression
Mar 19, 2026
Merged

fix(transform): check all console.error args in Fragment warning suppression#5
Narrator merged 1 commit intomainfrom
fix/fragment-warning-suppression

Conversation

@Narrator
Copy link
Member

Summary

  • React 18 calls console.error with a format string and separate arguments: console.error('Invalid prop \%s` supplied to `%s`', 'data-ds', 'React.Fragment'). The previous suppression only checked arguments[0](the format string), which contains%s` placeholders — not the actual prop name or component name — so the filter never matched.
  • Fixed by joining all arguments into a single string before checking for data-ds and React.Fragment. Works for both React 18 (format string + args) and React 19 (pre-formatted string).
  • Applied to all three plugin entry points: turbopack loader, vite plugin, webpack plugin.

Test plan

  • Build domscribe, install in a Next.js app using React 18 (e.g. cal.com), verify Fragment data-ds warnings no longer appear
  • Verify no regressions with React 19 / Vite / standalone Webpack setups

🤖 Generated with Claude Code

…ression

React 18 calls console.error with a format string and separate arguments
(e.g. console.error('Invalid prop `%s` supplied to `%s`', 'data-ds',
'React.Fragment')), so checking only arguments[0] missed the match.
Join all arguments before checking for 'data-ds' and 'React.Fragment'.
@nx-cloud
Copy link

nx-cloud bot commented Mar 19, 2026

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit c2f992b

Command Status Duration Result
nx run domscribe-test-fixtures:integration--web... ✅ Succeeded 1m 48s View ↗
nx run domscribe-test-fixtures:integration--web... ✅ Succeeded 1m 49s View ↗
nx run domscribe-test-fixtures:integration--web... ✅ Succeeded 1m 42s View ↗
nx run domscribe-test-fixtures:integration--web... ✅ Succeeded 1m 42s View ↗
nx run domscribe-test-fixtures:install-fixture-... ✅ Succeeded 51s View ↗
nx run domscribe-test-fixtures:install-fixture-... ✅ Succeeded 43s View ↗
nx run domscribe-test-fixtures:integration--vit... ✅ Succeeded 31s View ↗
nx run domscribe-test-fixtures:integration--vit... ✅ Succeeded 32s View ↗
Additional runs (18) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2026-03-19 13:18:02 UTC

@Narrator Narrator merged commit 0b3b303 into main Mar 19, 2026
24 checks passed
@Narrator Narrator deleted the fix/fragment-warning-suppression branch March 19, 2026 13:22
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