Skip to content

fix(react): remove lynx.createSelectorQuery deprecated warning in p…#2195

Merged
Yradex merged 2 commits intolynx-family:mainfrom
Yradex:wt/fix-sq-warning-20260204
Feb 5, 2026
Merged

fix(react): remove lynx.createSelectorQuery deprecated warning in p…#2195
Yradex merged 2 commits intolynx-family:mainfrom
Yradex:wt/fix-sq-warning-20260204

Conversation

@Yradex
Copy link
Copy Markdown
Collaborator

@Yradex Yradex commented Feb 4, 2026

…roduction

Summary by CodeRabbit

  • Bug Fixes

    • Deprecated warning for lynx.createSelectorQuery now appears only in development, preventing unnecessary warnings in production.
  • Chores

    • Added a patch release entry documenting the behavior change and updated test configurations to use development mode.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@Yradex Yradex requested review from HuJean and hzy as code owners February 4, 2026 12:12
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 4, 2026

🦋 Changeset detected

Latest commit: f299b7c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lynx-js/react Patch

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

Adds a changeset for a patch release and narrows a deprecation warning to only run in development; two webpack test configs were set to development mode.

Changes

Cohort / File(s) Summary
Release Management
.changeset/breezy-queens-listen.md
New changeset documenting a patch release for @lynx-js/react noting the removal of the deprecated lynx.createSelectorQuery warning in production.
Development Warning Guard
packages/react/runtime/src/lynx/component.ts
Adjusted the deprecation warning condition to require __DEV__ in addition to the existing guard, so the warning only appears in development builds.
Webpack Test Configs
packages/webpack/react-webpack-plugin/test/cases/define/disable-create-selector-query/webpack.config.js, packages/webpack/react-webpack-plugin/test/cases/define/disable-create-selector-query-false/webpack.config.js
Added mode: 'development' to these test webpack configurations (no other logic changes).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • HuJean
  • colinaaa
  • upupming

Poem

🐰 I nibble at code, soft and fleet,
A warning tucked away in dev's retreat.
Tests set to play in daytime light,
Production sleeps through quiet night.
Hooray — small hops, everything's right! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the deprecated warning for lynx.createSelectorQuery in production builds, which is directly supported by the code changes in the component.ts file.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/react/runtime/src/lynx/component.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 4, 2026

Merging this PR will improve performance by 12.92%

⚡ 2 improved benchmarks
✅ 61 untouched benchmarks
⏩ 3 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
basic-performance-div-100 7.3 ms 6.9 ms +5.85%
002-hello-reactLynx-destroyBackground 695.4 µs 615.9 µs +12.92%

Comparing Yradex:wt/fix-sq-warning-20260204 (f299b7c) with main (4240138)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@relativeci
Copy link
Copy Markdown

relativeci bot commented Feb 4, 2026

Web Explorer

#7541 Bundle Size — 383.66KiB (0%).

f299b7c(current) vs 4240138 main#7535(baseline)

Bundle metrics  Change 1 change
                 Current
#7541
     Baseline
#7535
No change  Initial JS 154.82KiB 154.82KiB
No change  Initial CSS 35.05KiB 35.05KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 8 8
No change  Assets 8 8
Change  Modules 239(+0.84%) 237
No change  Duplicate Modules 16 16
No change  Duplicate Code 2.99% 2.99%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#7541
     Baseline
#7535
No change  JS 252.76KiB 252.76KiB
No change  Other 95.85KiB 95.85KiB
No change  CSS 35.05KiB 35.05KiB

Bundle analysis reportBranch Yradex:wt/fix-sq-warning-2026020...Project dashboard


Generated by RelativeCIDocumentationReport issue

@Yradex Yradex merged commit f9f0987 into lynx-family:main Feb 5, 2026
74 of 78 checks passed
@Yradex Yradex deleted the wt/fix-sq-warning-20260204 branch February 5, 2026 06:35
colinaaa pushed a commit that referenced this pull request Feb 23, 2026
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.3

### Patch Changes

- Fix an issue that motion/mini will accidentally imports full version,
causing compiling error
([#2204](#2204))

## @lynx-js/react@0.116.3

### Patch Changes

- fix: remove `lynx.createSelectorQuery` deprecated warning in
production
([#2195](#2195))

- Add a DEV-only guard that detects MainThread flush loops caused by
re-entrant MTS handlers.
([#2159](#2159))

This typically happens when a MainThread handler (e.g. event callback or
`MainThreadRef`) performs UI mutations (like `Element.setStyleProperty`,
`setStyleProperties`, `setAttribute`, or `invoke`) that synchronously
trigger a flush which re-enters the handler again.

- Avoid DEV_ONLY_SetSnapshotEntryName on standalone lazy bundle.
([#2184](#2184))

- Add alog and trace for BTS event handlers.
([#2102](#2102))

- fix: Main thread functions cannot access properties on `this` before
hydration completes.
([#2194](#2194))

    This fixes the `cannot convert to object` error.

- Remove element api calls alog by default, and only enable it when
`__ALOG_ELEMENT_API__` is defined to `true` or environment variable
`REACT_ALOG_ELEMENT_API` is set to `true`.
([#2192](#2192))

- fix: captured variables in main thread functions within class
components do not update correctly
([#2197](#2197))

## @lynx-js/rspeedy@0.13.4

### Patch Changes

- Bump ts-blank-space v0.7.0
([#2238](#2238))

- Bump Rsbuild v1.7.3 with Rspack v1.7.5.
([#2189](#2189))

-   Updated dependencies \[]:
    -   @lynx-js/web-rsbuild-server-middleware@0.19.8

## @lynx-js/qrcode-rsbuild-plugin@0.4.5

### Patch Changes

- Only register console shortcuts when running in TTY environments
([#2202](#2202))

## @lynx-js/react-rsbuild-plugin@0.12.8

### Patch Changes

- Updated dependencies
\[[`4240138`](4240138)]:
    -   @lynx-js/react-webpack-plugin@0.7.4
    -   @lynx-js/react-alias-rsbuild-plugin@0.12.8
    -   @lynx-js/use-sync-external-store@1.5.0
    -   @lynx-js/react-refresh-webpack-plugin@0.3.4
    -   @lynx-js/template-webpack-plugin@0.10.3

## @lynx-js/testing-environment@0.1.11

### Patch Changes

- Remove element api calls alog by default, and only enable it when
`__ALOG_ELEMENT_API__` is defined to `true` or environment variable
`REACT_ALOG_ELEMENT_API` is set to `true`.
([#2192](#2192))

## @lynx-js/web-constants@0.19.8

### Patch Changes

-   Updated dependencies \[]:
    -   @lynx-js/web-worker-rpc@0.19.8

## @lynx-js/web-core@0.19.8

### Patch Changes

- fix: avoid error when LynxView is removed immediately after connected
([#2182](#2182))

-   Updated dependencies \[]:
    -   @lynx-js/web-constants@0.19.8
    -   @lynx-js/web-mainthread-apis@0.19.8
    -   @lynx-js/web-worker-rpc@0.19.8
    -   @lynx-js/web-worker-runtime@0.19.8

## @lynx-js/web-core-wasm@0.0.3

### Patch Changes

- Updated dependencies
\[[`e0972ef`](e0972ef),
[`3bc017e`](3bc017e),
[`e2d349e`](e2d349e),
[`d924b6a`](d924b6a)]:
    -   @lynx-js/web-elements@0.11.2
    -   @lynx-js/web-worker-rpc@0.19.8

## @lynx-js/web-elements@0.11.2

### Patch Changes

- Add scrollHeight/scrollWidth getters to XList.
([#2156](#2156))

- Inherit padding styles for x-input elements.
([#2199](#2199))

- Remove the default lazy-loading attribute from x-image elements.
([#2186](#2186))

- Fix x-input number type forwarding to the inner input element.
([#2193](#2193))

## @lynx-js/web-mainthread-apis@0.19.8

### Patch Changes

-   Updated dependencies \[]:
    -   @lynx-js/web-constants@0.19.8

## @lynx-js/web-worker-runtime@0.19.8

### Patch Changes

-   Updated dependencies \[]:
    -   @lynx-js/web-constants@0.19.8
    -   @lynx-js/web-mainthread-apis@0.19.8
    -   @lynx-js/web-worker-rpc@0.19.8

## @lynx-js/react-webpack-plugin@0.7.4

### Patch Changes

- Remove element api calls alog by default, and only enable it when
`__ALOG_ELEMENT_API__` is defined to `true` or environment variable
`REACT_ALOG_ELEMENT_API` is set to `true`.
([#2192](#2192))

## create-rspeedy@0.13.4



## @lynx-js/react-alias-rsbuild-plugin@0.12.8



## upgrade-rspeedy@0.13.4



## @lynx-js/web-core-server@0.19.8



## @lynx-js/web-rsbuild-server-middleware@0.19.8



## @lynx-js/web-worker-rpc@0.19.8

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants