feat: support suppress BROKEN warnings during compilation#2157
Conversation
🦋 Changeset detectedLatest commit: ea6e68b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughIntroduces a Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4813e06 to
ea6e68b
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @.changeset/friendly-cats-dance.md:
- Around line 5-8: Update the changeset text to state that the
disableDeprecatedWarning option suppresses all deprecation warnings (including
both BROKEN and DEPRECATED), not just BROKEN; mention the affected APIs such as
getNodeRef/getNodeRefFromRoot/createSelectorQuery and getElementById and clarify
users should migrate to refs or lynx.createSelectorQuery/lynx.getElementById as
appropriate so the wording matches the actual implementation that gates both
BROKEN and DEPRECATED warnings.
In `@packages/react/transform/crates/swc_plugin_compat/lib.rs`:
- Around line 413-417: The helper emit_deprecation_warning currently respects
opts.disable_deprecated_warning but many other warning sites call HANDLER
directly and bypass that flag; update those call sites (e.g., the item-key props
warning, class config warnings, and the JSXSpread/addComponentElement warning)
to call self.emit_deprecation_warning(span, message) instead of HANDLER.with(|h|
h... ) so they honor disable_deprecated_warning (refer to the
emit_deprecation_warning function, the disable_deprecated_warning option, and
HANDLER to find and replace direct handler calls), or if you intend the flag to
only cover the current subset, rename disable_deprecated_warning to indicate
partial coverage and document which warnings are controlled.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Merging this PR will improve performance by 5.96%
Performance Changes
Comparing Footnotes
|
Web Explorer#7431 Bundle Size — 383.56KiB (0%).ea6e68b(current) vs d1b0d9e main#7429(baseline) Bundle metrics
Bundle size by type
|
| Current #7431 |
Baseline #7429 |
|
|---|---|---|
252.66KiB |
252.66KiB |
|
95.85KiB |
95.85KiB |
|
35.05KiB |
35.05KiB |
Bundle analysis report Branch feat/support-suppress-broken-war... Project dashboard
Generated by RelativeCI Documentation Report issue
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @lynx-js/motion@0.0.2 ### Patch Changes - Add initial support for `@lynx-js/motion` ([#1062](#1062)) ## @lynx-js/react@0.116.2 ### Patch Changes - Fix "TypeError: not a function" error caused by `replaceAll` not supported in ES5. ([#2142](#2142)) - Bump `swc_core` v56. ([#2154](#2154)) - Use `disableDeprecatedWarning` option to suppress BROKEN warnings during compilation. ([#2157](#2157)) 1. BROKEN: `getNodeRef`/`getNodeRefFromRoot`/`createSelectorQuery` on component instance is broken and MUST be migrated in ReactLynx 3.0, please use ref or lynx.createSelectorQuery instead. 2. BROKEN: `getElementById` on component instance is broken and MUST be migrated in ReactLynx 3.0, please use ref or lynx.getElementById instead. - Fix memory leak by clearing list callbacks when \_\_DestroyLifetime event is triggered. ([#2112](#2112)) ## @lynx-js/rspeedy@0.13.3 ### Patch Changes - Updated dependencies \[]: - @lynx-js/web-rsbuild-server-middleware@0.19.7 ## @lynx-js/qrcode-rsbuild-plugin@0.4.4 ### Patch Changes - Bump `@clack/prompts` v1.0 ([#2171](#2171)) ## @lynx-js/react-rsbuild-plugin@0.12.7 ### Patch Changes - Updated dependencies \[[`92881e7`](92881e7), [`1a5f2a1`](1a5f2a1)]: - @lynx-js/template-webpack-plugin@0.10.3 - @lynx-js/css-extract-webpack-plugin@0.7.0 - @lynx-js/react-webpack-plugin@0.7.3 - @lynx-js/react-alias-rsbuild-plugin@0.12.7 - @lynx-js/use-sync-external-store@1.5.0 - @lynx-js/react-refresh-webpack-plugin@0.3.4 ## @lynx-js/web-constants@0.19.7 ### Patch Changes - Updated dependencies \[]: - @lynx-js/web-worker-rpc@0.19.7 ## @lynx-js/web-core@0.19.7 ### Patch Changes - feat: add browser config of lynx-view, now you can customize the browser config of lynx-view: ([#2140](#2140)) lynxView.browserConfig = { pixelRatio: 1, pixelWidth: 1234, pixelHeight: 5678, } - Updated dependencies \[]: - @lynx-js/web-constants@0.19.7 - @lynx-js/web-mainthread-apis@0.19.7 - @lynx-js/web-worker-rpc@0.19.7 - @lynx-js/web-worker-runtime@0.19.7 ## @lynx-js/web-core-wasm@0.0.2 ### Patch Changes - Updated dependencies \[[`43fc7e7`](43fc7e7)]: - @lynx-js/web-elements@0.11.1 - @lynx-js/web-worker-rpc@0.19.7 ## @lynx-js/web-elements@0.11.1 ### Patch Changes - feat: add wheel event handling and corresponding tests for x-foldview-ng ([#2145](#2145)) ## @lynx-js/web-mainthread-apis@0.19.7 ### Patch Changes - Updated dependencies \[]: - @lynx-js/web-constants@0.19.7 ## @lynx-js/web-worker-runtime@0.19.7 ### Patch Changes - Updated dependencies \[]: - @lynx-js/web-constants@0.19.7 - @lynx-js/web-mainthread-apis@0.19.7 - @lynx-js/web-worker-rpc@0.19.7 ## @lynx-js/template-webpack-plugin@0.10.3 ### Patch Changes - Fix "Failed to load CSS update file" for lazy bundle ([#2150](#2150)) - Fix "TypeError: cannot read property 'call' of undefined" error of lazy bundle HMR. ([#2146](#2146)) ## create-rspeedy@0.13.3 ## @lynx-js/react-alias-rsbuild-plugin@0.12.7 ## upgrade-rspeedy@0.13.3 ## @lynx-js/web-core-server@0.19.7 ## @lynx-js/web-rsbuild-server-middleware@0.19.7 ## @lynx-js/web-worker-rpc@0.19.7 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary by CodeRabbit
New Features
disableDeprecatedWarningoption to suppress deprecation warnings during compilation.Documentation
getNodeRef,getNodeRefFromRoot,createSelectorQuery, andgetElementByIdmethods withreforlynx.*equivalents.✏️ Tip: You can customize this high-level summary in your review settings.
Checklist