-
Notifications
You must be signed in to change notification settings - Fork 0
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: optimizely/optimizely-edge-agent
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: optimizely/optimizely-edge-agent
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: mike/attempt-2-main
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 4 commits
- 103 files changed
- 2 contributors
Commits on Jan 2, 2025
-
Project Structure Refactoring (#2)
* refactor(core): reorganize core business logic files - Move coreLogic.js to core/providers/ - Move optimizely provider files to core/providers/ - Move event listeners to core/providers/events/ Part of the project restructure to improve code organization and maintainability. * refactor(adapters): reorganize CDN adapters - Move all CDN adapters to src/adapters/ - Move shared adapter helpers to src/adapters/base/ - Remove old cdn-adapters directory Part of the project restructure to improve code organization and maintainability. * refactor(utils): reorganize utility files - Move config files to utils/config/ - Move logger to utils/logging/ - Move abstraction helpers and classes to utils/ - Remove old _helpers_ and _config_ directories Part of the project restructure to improve code organization and maintainability. * refactor(api): move API files to core - Move API router and handlers to src/core/api/ - Remove old _api_ directory Part of the project restructure to improve code organization and maintainability. * refactor(utils): update import paths - Update import paths in abstraction classes - Update import paths in config files - Update import paths in logging - Update import paths in helpers Adjust imports to match new directory structure. * refactor(adapters): update import paths - Update import paths in all CDN adapters (Akamai, Cloudflare, CloudFront, Fastly, Vercel) - Update import paths in KV interfaces - Update import paths in adapter entry files Adjust imports to match new directory structure. * refactor(core): update import paths - Update import paths in API handlers and router - Update import paths in providers (core logic, optimizely provider) - Update import paths in event listeners - Update import paths in user profile service Adjust imports to match new directory structure. * refactor: update remaining import paths - Update import paths in index.js - Update import paths in cloudfront/index.entry.js - Update import paths in vercel/index.entry.js Finalize import path updates to match new directory structure. * refactor(structure): reorganize project directories - Move abstraction classes to core/interfaces/ - Elevate config/ to root level - Group helpers in utils/helpers/ - Remove empty types/ directory - Update import paths * docs: update README with new project structure and name - Rename project to 'Optimizely Edge Agent' - Add comprehensive project structure documentation - Remove 'Hybrid Edge Serverless' references - Update architecture descriptions --------- Co-authored-by: Mike Chu <mikechu-optimizely@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 0746b43 - Browse repository at this point
Copy the full SHA 0746b43View commit details
Commits on Jan 3, 2025
-
refactor: Migrate to Biome and TypeScript, Modernize Project Structure (
#3) * build: initial typescript setup with edge worker configuration - Add tsconfig.json with ES modules and edge worker settings - Add TypeScript dependencies - Update all dependencies to latest versions * fix: correct malformed string literals in adapter files - Fix mismatched quotes in Cloudflare adapter - Fix mismatched quotes in Akamai adapter - Fix mismatched quotes in CloudFront adapter * build: migrate to pnpm and biome - Remove npm-specific files and prettier - Add pnpm as package manager - Add Biome for formatting and linting - Update scripts in package.json * build: update biome configuration - Update schema to latest version 1.9.4 - Disable VCS integration - Set tab indentation - Configure JavaScript quote style and trailing comma - Remove dist ignore as it's handled by .gitignore * style: apply biome formatting and add ignore patterns - Add ignore patterns for generated and IDE directories - Apply Biome formatting across the codebase - Format biome.json configuration * build: configure vscode for biome and development tools - Set Biome as default formatter for all relevant file types - Add support for React file extensions (jsx/tsx) - Enable format on save - Add recommended extensions: - biomejs.biome for formatting and linting - eamodio.gitlens for Git integration - vitest.explorer for test running - jeanp413.open-remote-wsl for WSL support * feat: add core typescript interfaces - Add CDN adapter interfaces for request/response handling - Add KVStore interface for key-value operations - Add Optimizely configuration and user context interfaces - Create types barrel file for clean imports * feat: implement CDN adapter factory pattern - Add CDNAdapterFactory with singleton pattern - Create BaseAdapter with common cookie handling - Add type-safe adapter registration and creation - Implement cookie serialization and parsing utilities * feat: add typescript cloudflare adapter - Create CloudflareAdapter class extending BaseAdapter - Add Cloudflare-specific types for env and context - Implement cookie handling methods - Add basic request handling structure - Export adapter through index files * feat: add caching and event handling to cloudflare adapter - Add CDN settings and event batch settings types - Implement KV-based caching with TTL support - Add event queuing and batched event dispatch - Handle caching requests with origin fallback - Add cache key generation and response serialization * feat: start converting CoreLogic to TypeScript - Add core type definitions for requests, decisions, and settings - Create CoreLogic class with TypeScript types - Implement initial set of methods with proper typing - Add dependency injection pattern for better testability * feat: add request processing and initialization to CoreLogic - Add main request processing pipeline - Implement visitor ID handling with multiple sources - Add datafile retrieval with KV storage caching - Add Optimizely initialization with error handling - Improve type safety for all methods * feat: add response handling to CoreLogic - Add response preparation for both origin and local responses - Add header management for visitor ID and decisions - Add cookie management with proper security settings - Add error handling for origin forwarding - Improve type safety for response handling * feat: complete CoreLogic implementation - Add flag decision handling with validation - Add cookie parsing and security measures - Add error handling utilities - Add type guards and validation - Add comprehensive logging * fix: install uuid * feat: convert OptimizelyProvider to TypeScript - Add proper type definitions for Optimizely SDK - Add interfaces for events and decisions - Add type safety for user profiles and attributes - Add error handling and logging * feat: convert UserProfileService to TypeScript - Add UserProfile and CacheData interfaces - Add type safety for KV store operations - Add proper return types for all methods - Add readonly modifiers for immutable properties - Improve error handling and logging * feat: convert EventListeners to TypeScript - Add EventType union type for event names - Add EventListener type for listener functions - Add EventListenersMap for type-safe event mapping - Add new utility methods for event management - Add improved error handling and type safety * feat: convert RegisteredListeners to TypeScript - Add interfaces for event parameters - Add type safety for all event handlers - Add proper typing for request and response objects - Add type definitions for all event listeners - Add improved error handling and logging * feat: convert OptimizelyHelper to TypeScript - Add interfaces for CdnProvider, FetchOptions, CookieOptions, and Decision - Add type safety for all helper functions - Add proper return types and parameter types - Add improved error handling with type checking - Add type guards for JSON parsing and validation * feat: convert AbstractionHelper to TypeScript - Add interfaces for CDN providers and headers - Add type safety for response handling - Add proper typing for environment variables - Add type definitions for KV store operations - Add improved error handling with type checking * chore(deps): upgrade dependencies and set Node v22 - Upgrade @biomejs/biome to 1.9.4 - Upgrade @vercel/edge to 1.2.0 - Upgrade vite to 6.0.7 - Set Node.js version to v22 in .nvmrc * refactor: move legacy JS to a dir * refactor: rename CloudflareKVInterface to CloudflareKVStore Renamed to better reflect its role as a concrete implementation of IKVStore rather than an interface definition. Updated related imports and documentation. * refactor(adapters): standardize CDN adapters and exports * Add KVStore exports to all adapter index files * Implement missing cookie methods in FastlyAdapter * Add constructor and KVStore initialization to all adapters * Update adapter class documentation * Replace forEach with for...of loop in BaseAdapter --------- Co-authored-by: Mike Chu <mikechu-optimizely@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for dda211e - Browse repository at this point
Copy the full SHA dda211eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 55564b9 - Browse repository at this point
Copy the full SHA 55564b9View commit details
Commits on Jan 6, 2025
-
Too Many TypeScript errors (#4)
* chore: remove legacy dir I'll use a .gitignored copy of `master` for Windsurf's ref * refactor: improve TypeScript type system and module resolution - Add proper request/response type interfaces - Update tsconfig.json with better module resolution - Clean up adapter imports and type usage - Remove redundant CDNSettings imports - Improve CloudflareAdapter type safety * fix: resolve Decision type export ambiguity Keep Decision interface in OptimizelyProvider as it's a core Optimizely concept * fix: singleton Logger use * fix: void union * refactor: remove JavaScript duplicates and update imports to TypeScript versions - Removed duplicate JavaScript files that have TypeScript equivalents: - coreLogic.js -> CoreLogic.ts - optimizelyProvider.js -> OptimizelyProvider.ts - userProfileService.js -> UserProfileService.ts - eventListeners.js -> EventListeners.ts - registeredListeners.js -> RegisteredListeners.ts - Updated imports in affected files to use TypeScript versions: - CoreLogic.ts - CloudflareAdapter.ts - index.js * refactor: migrate API handlers and router to TypeScript - Created new TypeScript API types in src/types/api.ts - Migrated API handlers to TypeScript: - apiRouter.js -> ApiRouter.ts - handlers/datafile.js -> handlers/Datafile.ts - handlers/flagKeys.js -> handlers/FlagKeys.ts - handlers/sdk.js -> handlers/Sdk.ts - handlers/variationChanges.js -> handlers/VariationChanges.ts - Created handlers/index.ts to export all handlers - Updated index.js to use new TypeScript API router - Removed old JavaScript API files * refactor: convert interfaces to types and remove I prefix - Removed 'I' prefix from type names following TypeScript best practices - Converted interfaces to type aliases where appropriate - Updated type exports to use explicit named exports - Updated type documentation to reflect changes - Maintained consistent type naming across the codebase * refactor: update imports to use type-only imports in adapter.ts * refactor: improve UserProfileService code quality - Remove unused optlyHelper dependency - Replace helper functions with native JSON methods - Add proper error handling for JSON parsing - Fix parameter reassignment with proper variable scoping - Use TypeScript idiomatic type checking * refactor/feat: Logger class * fix: type usage * fix: node package import * fix: references & missing types * refactor: update imports and function names - Convert regular imports to type imports where appropriate - Rename extractCdnSettings to extractDecisionSettings - Update DefaultSettings export to named export - Fix trailingComma to trailingCommas in biome config --------- Co-authored-by: Mike Chu <mikechu-optimizely@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 6c6a902 - Browse repository at this point
Copy the full SHA 6c6a902View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...mike/attempt-2-main