Skip to content

fix: LiveQuery regexTimeout default value not applied#10156

Merged
mtrezza merged 1 commit intoparse-community:alphafrom
mtrezza:fix/GHSA-wmr3-qf83-v5mf-v9
Mar 9, 2026
Merged

fix: LiveQuery regexTimeout default value not applied#10156
mtrezza merged 1 commit intoparse-community:alphafrom
mtrezza:fix/GHSA-wmr3-qf83-v5mf-v9

Conversation

@mtrezza
Copy link
Member

@mtrezza mtrezza commented Mar 9, 2026

Pull Request

Issue

LiveQuery regexTimeout default value not applied.

Tasks

  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)
  • Add security check
  • Add new Parse Error codes to Parse JS SDK

Summary by CodeRabbit

Release Notes

  • New Features

    • LiveQuery configuration now applies a default regexTimeout value of 100 when not explicitly configured.
    • Enhanced validation for LiveQuery options to ensure proper regexTimeout values.
  • Tests

    • Added test case to verify default regexTimeout behavior in LiveQuery configuration.

@parse-github-assistant
Copy link

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement.

@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2ac32c6e-c336-4102-a55f-c2e6db452045

📥 Commits

Reviewing files that changed from the base of the PR and between 00c6c7c and 0ad05e8.

📒 Files selected for processing (2)
  • spec/QueryTools.spec.js
  • src/Config.js

📝 Walkthrough

Walkthrough

This PR adds LiveQuery configuration support to the Config class, introducing validation that applies a default regexTimeout value (100) when liveQuery is configured without an explicit timeout. A test case verifies this default behavior.

Changes

Cohort / File(s) Summary
LiveQuery Configuration and Validation
src/Config.js
Adds liveQuery parameter to constructor, introduces validateLiveQueryOptions() static method that sets default regexTimeout (100) when liveQuery is provided without an explicit timeout, and enforces numeric type for provided regexTimeout values.
LiveQuery Configuration Test
spec/QueryTools.spec.js
Adds new test case verifying that default regexTimeout (100) is applied when liveQuery is configured without an explicit regexTimeout.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description covers the issue and marks the test task as complete, but the Approach section required by the template is missing. Add an Approach section describing the specific changes made to Config.js and how the default regexTimeout is applied when liveQuery is configured.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding a default regexTimeout value for LiveQuery configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 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.

@parseplatformorg
Copy link
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mtrezza mtrezza merged commit 416cfbc into parse-community:alpha Mar 9, 2026
21 of 22 checks passed
parseplatformorg pushed a commit that referenced this pull request Mar 9, 2026
## [9.5.2-alpha.14](9.5.2-alpha.13...9.5.2-alpha.14) (2026-03-09)

### Bug Fixes

*  LiveQuery `regexTimeout` default value not applied ([#10156](#10156)) ([416cfbc](416cfbc))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 9.5.2-alpha.14

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Mar 9, 2026
@mtrezza mtrezza deleted the fix/GHSA-wmr3-qf83-v5mf-v9 branch March 9, 2026 18:07
@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.57%. Comparing base (5bbca7b) to head (0ad05e8).
⚠️ Report is 3 commits behind head on alpha.

Files with missing lines Patch % Lines
src/Config.js 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            alpha   #10156      +/-   ##
==========================================
- Coverage   92.58%   92.57%   -0.01%     
==========================================
  Files         192      192              
  Lines       16192    16199       +7     
  Branches      183      183              
==========================================
+ Hits        14991    14997       +6     
- Misses       1189     1190       +1     
  Partials       12       12              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants