Main convert - #402
Conversation
…ient determineRuntime() equated 'no window' with server-side, so the signals Web Worker fell into 'server-with-fetch' and the ConvertAgent User-Agent announcement (meant for server-side SDK traffic only) ran inside real browsers. The resulting custom header forced a CORS preflight the signals endpoint rejects, breaking every signals worker upload and driving the WAF retry storm. Browser worker scopes are now detected via importScripts, which server runtimes (Node.js) and edge runtimes (Cloudflare Workers) do not expose, so those keep announcing ConvertAgent as intended. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Empty release commit so @convertcom/js-sdk ships a new version carrying the patched @convertcom/js-sdk-utils dependency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
typeof null is 'object', so a mocked environment defining self = null passed the typeof guard and the importScripts access would throw. Optional chaining degrades it to undefined and falls through to the server checks, matching the file's existing navigator?.sendBeacon idiom. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d-as-server fix(utils): classify browser Web Workers as browser runtime in HttpClient
There was a problem hiding this comment.
Code Review
This pull request updates the runtime determination logic in packages/utils/src/http-client.ts to correctly identify Browser Web Workers as a browser runtime by checking for the presence of self.importScripts. This prevents Web Workers from incorrectly falling back to a server-side runtime, which previously caused CORS preflight failures on signals uploads. There are no review comments, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Sync main into main-convert
|



No description provided.