fix(plugin-qrcode): skip interactive loop in non-TTY environments (#2201)#2202
fix(plugin-qrcode): skip interactive loop in non-TTY environments (#2201)#2202colinaaa merged 1 commit intolynx-family:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 4c19c08 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 |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdded an early-return guard in the QR code plugin's loop to detect non-interactive stdin (via Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 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🧪 Generate unit tests (beta)
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 |
60553b4 to
131b76d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
CodSpeed Performance ReportMerging this PR will degrade performance by 10.33%Comparing Summary
Performance Changes
Footnotes
|
Web Explorer#7579 Bundle Size — 383.74KiB (0%).4c19c08(current) vs a10b3ec main#7575(baseline) Bundle metrics
|
| Current #7579 |
Baseline #7575 |
|
|---|---|---|
154.88KiB |
154.88KiB |
|
35.06KiB |
35.06KiB |
|
0% |
0% |
|
8 |
8 |
|
8 |
8 |
|
238 |
238 |
|
16 |
16 |
|
2.99% |
2.99% |
|
4 |
4 |
|
0 |
0 |
Bundle size by type no changes
| Current #7579 |
Baseline #7575 |
|
|---|---|---|
252.82KiB |
252.82KiB |
|
95.85KiB |
95.85KiB |
|
35.06KiB |
35.06KiB |
Bundle analysis report Branch knullptr:main Project dashboard
Generated by RelativeCI Documentation Report issue
…x-family#2201) Add TTY check before starting keyboard shortcuts loop to prevent errors in non-interactive environments such as CI/CD pipelines or piped commands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
When stdin is not a TTY (CI, piped output, Docker without -it), the interactive shortcut menu is now skipped to prevent hangs, while still printing the QR code.
Summary by CodeRabbit
Bug Fixes
Chores
Checklist