·
1 commit
to master
since this release
[1.0.0] - October 10, 2025
Changed
- Updated
@optimizely/optimizely-sdkto version6.1.0with ES modules support. - Migrated from addEventListener pattern to modern Cloudflare Workers fetch handler export syntax.
- Replaced
uuidpackage with nativecrypto.randomUUID()for user ID generation. - Replaced Webpack build with native ES modules.
- Migrated configuration from
wrangler.tomltowrangler.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_SECONDSenvironment variable (default: 300 seconds). - Updated
cookiepackage from0.4.2to1.0.2. - Migrated from Prettier to Biome for code formatting and linting.
Added
- New
CloudflareRequestHandlerclass implementing custom request handler for Cloudflare Workers environment. - New
getOptimizelyClienthelper function for centralized client management with smart caching. - New
getDatafilehelper 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.jsoncconfiguration for code quality tools.vitest.config.jsfor test configuration.
Removed
- Removed
uuidpackage dependency (replaced with native Web Crypto API). - Removed Webpack build configuration (
webpack.config.js). - Removed old
wrangler.toml(replaced withwrangler.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.