This release focuses on networking-related improvements. Upgrading is highly recommended if you occasionally see HTTP errors or timeouts in the SDK's log.
Improvements:
- Implement logic to retry failed HTTP requests one time (on receiving unexpected status code, timeout or request error). (#47)
- Deprecate the
httpAgentandhttpsAgentoptions for Node.js and Bun. Alternatives:httpAgentFactoryandhttpsAgentFactory. (#47) - Add debug logging to built-in config fetcher implementations (
NodeHttpConfigFetcher,ClientSideFetchApiConfigFetcher,ServerSideFetchApiConfigFetcherandXmlHttpRequestConfigFetcher). Also, enable logging for these even if they are created externally. (#47) - Log the CF-RAY header also when the headers are received but downloading the response body times out or fails. (#47)
- Improve handling of the edge case where the config fetcher gets disposed while a fetch operation is in progress. (The fetch operation, including pending HTTP requests, will be aborted.) (#47)
- Improve internal URL processing and manipulation to properly handle user-provided base URLs or fetch request URLs (those may contain query strings, URI-encoded characters, etc.) (#47)
- Revise other debug logging and eliminate redundancy to reduce bundle size. (#47)
- Minor performance and bundle size improvements. (#47, #50)
Bug fixes:
- Fix bug that can lead to the process crashing on some runtimes like Node.js or Deno when an error is thrown and left unhandled during a cache sync or config refresh operation. (#47)
Breaking changes:
FetchRequest.urlno longer includes query string parameters, only the path to the config JSON file. (If the SDK identifier string is needed, it can be obtained fromFetchRequest.headers, by looking up the value for theUser-Agentheader.) (#47)NodeHttpConfigFetcher(used for Node.js and Bun) no longer usehttp.globalAgentandhttps.globalAgentfor making HTTP requests, but create and manage own, internal agent instances. (#47)