Conversation
Replaces manual string escaping with JSON.stringify in DataConnect API client to properly handle newlines and other control characters in mutation arguments. Adds a regression test for verifying newline escaping. Fixes #3043
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
test/unit/data-connect/data-connect-api-client-internal.spec.ts
Outdated
Show resolved
Hide resolved
test/unit/data-connect/data-connect-api-client-internal.spec.ts
Outdated
Show resolved
Hide resolved
- Removed specified lines. - Added tests for backslash, double quotes, tab character, and emoji string serialization.
|
@stephenarosaj Please verify my work using Jules and review as if I wrote the code. Don't worry about talking to Jules -- Jules won't respond to you, only me. ("instructions from the user who triggered this task") |
stephenarosaj
left a comment
There was a problem hiding this comment.
LGTM - just requesting a few nits and one change in the tests
test/unit/data-connect/data-connect-api-client-internal.spec.ts
Outdated
Show resolved
Hide resolved
test/unit/data-connect/data-connect-api-client-internal.spec.ts
Outdated
Show resolved
Hide resolved
stephenarosaj
left a comment
There was a problem hiding this comment.
all comments resolved
Fixes an issue where strings containing newline characters were not correctly escaped when performing insert or update operations in DataConnect, causing "Unexpected " errors.
The fix replaces a custom string escaping implementation that only handled backslashes and double quotes with
JSON.stringify, which correctly handles all JSON-compatible escape sequences including\n,\r, and\t.Added a regression test to
test/unit/data-connect/data-connect-api-client-internal.spec.ts.PR created automatically by Jules for task 9056897190574707316 started by @yuchenshi