Skip to content

v1.1.0

Latest

Choose a tag to compare

@adams85 adams85 released this 27 May 14:51
9de37d9

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 httpAgent and httpsAgent options for Node.js and Bun. Alternatives: httpAgentFactory and httpsAgentFactory. (#47)
  • Add debug logging to built-in config fetcher implementations (NodeHttpConfigFetcher, ClientSideFetchApiConfigFetcher, ServerSideFetchApiConfigFetcher and XmlHttpRequestConfigFetcher). 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.url no longer includes query string parameters, only the path to the config JSON file. (If the SDK identifier string is needed, it can be obtained from FetchRequest.headers, by looking up the value for the User-Agent header.) (#47)
  • NodeHttpConfigFetcher (used for Node.js and Bun) no longer use http.globalAgent and https.globalAgent for making HTTP requests, but create and manage own, internal agent instances. (#47)