Skip to content

Release 1.0.0

Latest

Choose a tag to compare

@mikechu-optimizely mikechu-optimizely released this 15 Oct 20:13
· 1 commit to master since this release
60c8f71

[1.0.0] - October 10, 2025

Changed

  • Updated @optimizely/optimizely-sdk to version 6.1.0 with ES modules support.
  • Migrated from addEventListener pattern to modern Cloudflare Workers fetch handler export syntax.
  • Replaced uuid package with native crypto.randomUUID() for user ID generation.
  • Replaced Webpack build with native ES modules.
  • Migrated configuration from wrangler.toml to wrangler.jsonc.
  • Refactored request handler to return standardized response format: {statusCode: number, body: string, headers: Object}.
  • Implemented graceful degradation: worker continues to function even if Optimizely initialization fails.
  • Enhanced error handling with try-catch blocks around all Optimizely operations - errors are logged but don't break the worker.
  • Added comprehensive JSDoc documentation throughout the codebase.
  • Improved datafile caching with module-scope cache and configurable TTL via OPTIMIZELY_DATAFILE_CACHE_TTL_SECONDS environment variable (default: 300 seconds).
  • Updated cookie package from 0.4.2 to 1.0.2.
  • Migrated from Prettier to Biome for code formatting and linting.

Added

  • New CloudflareRequestHandler class implementing custom request handler for Cloudflare Workers environment.
  • New getOptimizelyClient helper function for centralized client management with smart caching.
  • New getDatafile helper function for fetching datafiles from Optimizely CDN.
  • Comprehensive unit test suite using Vitest and vitest-environment-miniflare.
  • Test files: index.test.js, optimizely_helper.test.js, request_handler.test.js.
  • Test utilities and setup files for easier testing.
  • biome.jsonc configuration for code quality tools.
  • vitest.config.js for test configuration.

Removed

  • Removed uuid package dependency (replaced with native Web Crypto API).
  • Removed Webpack build configuration (webpack.config.js).
  • Removed old wrangler.toml (replaced with wrangler.jsonc).
  • Removed Prettier in favor of Biome.

Fixed

  • Response body is now always returned as a string for consistent interface with Optimizely SDK expectations.
  • Worker no longer returns 500 errors on Optimizely failures; continues with degraded functionality.
  • Improved AbortError handling in request handler with proper error wrapping.