Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Optimizely adapter#164

Open
blurrah wants to merge 22 commits into
main from
optimizely-adapter-edge
Open

Add Optimizely adapter #164
blurrah wants to merge 22 commits into
main from
optimizely-adapter-edge

Conversation

@blurrah

@blurrah blurrah commented Sep 5, 2025
edited
Loading

Copy link
Copy Markdown

This adds an Optimizely adapter for use with the flag() function.

It optimizes Optimizely (hah) for use with serverless/edge runtimes by offloading event dispatches to waitUntil() and sets up fetch() as a request handler instead of node https.

This is still a naive implementation where each individual event dispatch (if you're tracking experiments for the flag) gets added to waitUntil(). There's no batching or time based flushing happening for longer living instances.

The adapter has the following functions:

  • decide() to decide on a feature flag, can be directly used as adapter
  • (削除) userContext() which returns a user context interface so users can track events for example, more of a helper function (削除ここまで) Dropped this for now as I need to properly make it work with a deduped identify function
  • initialize() to get an initialized Optimizely instance

Based off of #175 for now so I can import their universal SDK.

Extra notes:

  • Was playing around with pnpm versions to link so I remade the lockfile a few times 🙈

vercel Bot commented Sep 5, 2025
edited
Loading

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
flags-sdk-snippets Ready Ready Preview Comment Sep 24, 2025 5:16am
flags-sdk-sveltekit-snippets Ready Ready Preview Comment Sep 24, 2025 5:16am
shirt-shop Ready Ready Preview Comment Sep 24, 2025 5:16am

socket-security Bot commented Sep 5, 2025
edited
Loading

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated eslint-config-prettier@​9.1.0 ⏵ 9.1.2 100 100 72 87 100
Updated @​sveltejs/​adapter-vercel@​5.6.3 ⏵ 5.10.2 100 100 72 +196 +3100
Updated @​types/​react-dom@​19.0.4 ⏵ 19.1.9 100 +1100 75 +193 100
Updated @​types/​react-dom@​19.0.4 ⏵ 18.3.7 100 +1100 76 +293 100
Updated statsig-node-lite@​0.4.2 ⏵ 0.4.4 100 100 77 +188 100
Updated @​types/​react@​19.0.10 ⏵ 19.1.13 100 +1100 80 +194 100
Updated @​tailwindcss/​postcss@​4.0.13 ⏵ 4.1.13 100 +1100 80 +399 +1100
Updated @​sveltejs/​kit@​2.20.2 ⏵ 2.39.1 99 100 +581 +299 +1100
Updated @​eslint/​eslintrc@​3.3.0 ⏵ 3.3.1 99 100 100 82 100
Updated postcss@​8.5.3 ⏵ 8.5.6 100 +1100 82 +183 100
Updated @​headlessui/​react@​2.2.0 ⏵ 2.2.8 100 100 83 +199 +1100
Updated react@​19.0.0 ⏵ 19.1.1 100 100 84 97 100
Updated prettier-plugin-svelte@​3.3.3 ⏵ 3.4.0 100 +1100 100 86 +1100
Added @​optimizely/​optimizely-sdk@​6.1.0 99 100 100 86 100
Updated @​growthbook/​growthbook@​1.5.1 ⏵ 1.6.1 96 +1100 100 +187 -1100
Updated svelte@​5.23.0 ⏵ 5.38.10 99 +1100 87 +298 +1100
Updated @​openfeature/​server-sdk@​1.17.1 ⏵ 1.19.0 100 +1100 100 89 100
Added typescript@​5.9.2 100 100 90 100 100
Updated svelte-check@​4.1.5 ⏵ 4.3.1 100 100 100 91 100
Updated react-dom@​19.0.0 ⏵ 19.1.1 100 100 92 +197 100
Updated eslint@​9.22.0 ⏵ 9.35.0 97 100 100 96 +1100

View full report

Already set on provider level
need a few things from other entrypoints but not available in node resolution
This way you have stable attributes for a user

Copy link
Copy Markdown
Collaborator

I created a snapshot release as v0.2.0-bcd73bd1-20250924051654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dferber90 dferber90 Awaiting requested review from dferber90

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /