test: LiveQuery operator type confusion (GHSA-fjxm-vhvc-gcmj)#10208
test: LiveQuery operator type confusion (GHSA-fjxm-vhvc-gcmj)#10208mtrezza merged 3 commits intoparse-community:alphafrom
Conversation
|
🚀 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. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
📝 WalkthroughWalkthroughAdds a new test suite to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@spec/vulnerabilities.spec.js`:
- Around line 2819-2847: Replace the mixed async+done pattern in the spec by
removing the done callback and awaiting a Promise for the 'create' event on
validSubscription; specifically, change the test function signature to async ()
=>, wrap validSubscription.on('create', ...) into a new Promise that resolves
when the event fires and rejects on errors, ensure malClient.close() is called
in a finally block for guaranteed cleanup, and await that Promise before
finishing the test (keep use of malClient, malformedQuery, validQuery,
validSubscription, and obj to locate the relevant code).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f1efd61d-7185-4d53-a6c7-fb55bd744fe9
📒 Files selected for processing (1)
spec/vulnerabilities.spec.js
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #10208 +/- ##
=======================================
Coverage 92.56% 92.56%
=======================================
Files 192 192
Lines 16284 16284
Branches 199 199
=======================================
Hits 15073 15073
Misses 1194 1194
Partials 17 17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@spec/vulnerabilities.spec.js`:
- Around line 2773-2774: The test suite starting with
describe('(GHSA-fjxm-vhvc-gcmj) LiveQuery Operator Type Confusion' is missing
LiveQuery server setup; add a beforeEach that calls reconfigureServer with
liveQuery enabled and classNames including 'TestObject' (so the WebSocket will
accept subscriptions for that class) and an afterEach to tear down or
reconfigure the server back to defaults (or stop the LiveQuery server) so other
suites aren't affected; place these hooks inside the same describe block
alongside the existing matchesQuery require to ensure the LiveQuery server is
running for the tests that follow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 518c955f-9ff7-4ebe-a4e1-1d84919893dd
📒 Files selected for processing (1)
spec/vulnerabilities.spec.js
|
🎉 This change has been released in version 9.6.0-alpha.23 |
Summary
$in,$nin,$all,$containedBywith non-array values) does not crash the serverParseLiveQueryServer's existing try/catch handling and other subscriptions continue to work normallyTasks
Summary by CodeRabbit