Conversation
WalkthroughThe release updates package.json version to 0.14.0 and aligns the x-sdk-version header in src/client.ts to 0.14.0. In src/models.ts, the JSDoc for Execution.requestHeaders now correctly refers to HTTP request headers; types remain unchanged. In src/query.ts, the signatures of Query.equal and Query.notEqual changed from (attribute: string, value: QueryTypes | any[]) to (attribute: string, value: QueryTypes). A new static method, Query.orderRandom(), was added, returning a query string with method "orderRandom". Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
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
🧹 Nitpick comments (1)
src/client.ts (1)
118-118: x-sdk-version updated to 0.14.0 — good. Consider de-duping version sources.To avoid future drift between package.json and this header, consider injecting the version at build time (e.g., Rollup define/replace) instead of hardcoding.
Example Rollup replace (conceptual):
+// rollup.config.js +import replace from '@rollup/plugin-replace'; export default { plugins: [ + replace({ + preventAssignment: true, + __SDK_VERSION__: JSON.stringify(require('./package.json').version), + }), ] }- 'x-sdk-version': '0.14.0', + 'x-sdk-version': __SDK_VERSION__,
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
package.json(1 hunks)src/client.ts(1 hunks)src/models.ts(1 hunks)src/query.ts(2 hunks)
🔇 Additional comments (3)
src/query.ts (2)
36-41: equal/notEqual typing change — looks safe.Switch to
QueryTypesretains array support viaQueryTypesList, so no breaking change expected.Please confirm existing call sites using array values still type-check and behave as before (e.g.,
Query.equal('status', ['open','closed'])).
81-83: New Query.orderRandom(): LGTM.Nice addition. Add usage to README/API docs and clarify interaction with
orderAsc/Desc(mutual exclusivity or last-one-wins).package.json (1)
5-5: Version bump to 0.14.0 — LGTM; verify external release metadata.rg found package.json:5 and src/client.ts:118 set to 0.14.0; no 0.13.0 in the repo. Confirm PR title, release tag, and CHANGELOG on GitHub are updated to 0.14.0.
| * HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous. | ||
| */ | ||
| requestHeaders: Headers[]; |
There was a problem hiding this comment.
🧹 Nitpick
Doc wording mismatch with type (array vs key-value object).
requestHeaders is Headers[], not a key-value object. Update the JSDoc to reflect an array of {name, value} pairs. Similarly adjust responseHeaders (Line 1037) for consistency.
Apply:
- * HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
+ * List of HTTP request headers as name/value pairs. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.And for response headers (near Line 1037):
- * HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
+ * List of HTTP response headers as name/value pairs. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| * HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous. | |
| */ | |
| requestHeaders: Headers[]; | |
| * List of HTTP request headers as name/value pairs. This will return only whitelisted headers. All headers are returned if execution is created as synchronous. | |
| */ | |
| requestHeaders: Headers[]; |
🤖 Prompt for AI Agents
In src/models.ts around lines 1025-1027 (and similarly near line 1037 for
responseHeaders), the JSDoc incorrectly describes requestHeaders/responseHeaders
as a key-value object while the actual type is Headers[]; update the JSDoc
comments to state that these fields are arrays of header objects (e.g., an array
of { name: string, value: string } pairs), mention that only whitelisted headers
are included unless execution is synchronous, and ensure the wording matches the
Headers[] type for consistency.
This PR contains updates to the React Native SDK for version 0.13.0.
Summary by CodeRabbit
New Features
Refactor
Documentation
Chores