Commit Graph

114 Commits

Author SHA1 Message Date
github-actions[bot] c1fbe2f19d Version Packages (#284)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-06 13:57:18 +02:00
Luis Meyer 96ba1226c8 Extract @vercel/prepare-flags-definitions package (#301)
* Extract @vercel/prepare-flags-definitions package

Extract the core flag definitions preparation logic from the Vercel CLI into a standalone, reusable package. This includes:
- prepareFlagsDefinitions() function that collects SDK keys from env, fetches definitions, and writes to node_modules
- hashSdkKey() helper for SHA-256 hashing
- generateDefinitionsModule() for JS module generation with deduplication and lazy parsing

Follows repo conventions: pnpm workspaces, tsup, vitest, ES modules with CJS fallback.

* Add JSDoc comments from original CLI source

* Add inline comments from original CLI source

* Add optional output parameter with debug logging

* Add output.time for datafile fetching

* Add changeset for @vercel/prepare-flags-definitions
2026-03-06 10:10:01 +01:00
Dominik Ferber b70c2ea466 Control (#278)
* refactor

* remove retries

* simplify

* simplify options

* before

* rename DataSource to Controller

* refactor and better tests

* avoid double polling

* rename

* fix

* simplify test setup

* wip

* unify

* wip

* only track 1 read per build

* make BundledSource lazy

* clean up fallback behavior

* add mode

* mutually exclusive streaming & polling

* rely more on black box testing

* simplify

* Update CLAUDE.md

* various fixes

* add tests

* more fixes

* Update CLAUDE.md

* more fixes

* resolve more issues

* unite black box tests

* tests

* progress

* adjust

* don't report on 401s; use Response.json

* enforce min polling interval

* progress

* types

* capture all logs

* throw with prefix

* added a minimum gap of `BASE_DELAY_MS` (1 second) between connection
 attempts

* step

* progress

* use request context in tests

* add separate tests depending on context

* tests

* rm unused option

* add state machine chart

* rm sources

* use fake timers for more tests

* swap remaining tests from msw to mocked fetch

* update comments

* Update CLAUDE.md

* update comment

* fix comment

* fix types

* rm peek

* adds ping checks and sending x-revision header  (#282)

* abort on missed pings

* use revision from bundled definitions

* tests

* simplify

* send x-revsion on reconnects too

* simplify StreamSource

* rename

* rename in test

* wait for stream

* replace startBackgroundUpdates with explicit call

* Update CLAUDE.md

* restore stronger tests

* Update CLAUDE.md

* convert

* simplify tests

* fix test

* fixes

* rm state machine

* await first poll before resoliving init

* rm outdated comment

* avoid leaking _origin

* changeset

* avoid log on reconnect due to missed pings

* don't warn on missed pings

* Update event reporting for control rewrite (#289)

* Update event reporting for control rewrite

* Log ingest response

* Use string for revision

* Add retries when ingesting events

* adapt changeset

* adjust test

---------

Co-authored-by: Luis Meyer <luis.meyer@vercel.com>
Co-authored-by: Andy <AndyBitz@users.noreply.github.com>
Co-authored-by: Andy Bitz <artzbitz@gmail.com>
2026-03-06 10:05:01 +02:00
Vincent Derks 722b0d054e Added new comparators: (not_)contains and case-insensitive versions (#288)
* Added new comparators: (not_)contains and case-insensitive versions

* Switched to "ci" option instead of creating new condition for every ci-case

* Cleanup

* More cleanup

* Some more cleanup & finetuning

Made-with: Cursor

* Changeset

* Switch options key to just "i" and also allow for passing "i" as string instead of options object

* Apply suggestions from code review

* Update packages/vercel-flags-core/src/evaluate.ts

Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>

* naming

* Renaming

---------

Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>
2026-03-06 07:52:32 +02:00
Vincent Derks 689b1575f6 Flags core as normal dep (#298)
* Changed @vercel/flags-core to dependency from peerDependency

* Updated docs and skills

* More explanation

* Updated skill with singleton explanation and example

* update README

* FLAGS_SDK_KEY → FLAGS

* update skill

* update changeset

---------

Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>
2026-03-05 12:53:04 +01:00
Vincent Derks a924044282 Fixed bug with inverted NOT_ONE_OF segment comparator (#296)
* Fixed bug with inverted NOT_ONE_OF segment comparator

* Feedback

* Changeset

* Updated unit-test
2026-03-05 10:52:50 +01:00
Luis Meyer 823bf786c1 Add CJS support for @vercel/flags-core (#283)
* Add CJS support for @vercel/flags-core

Update tsup config to build both ESM and CJS formats, and update package.json exports to use import/require conditions with separate entry points for CommonJS consumers.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* changeset

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-24 17:13:52 +01:00
github-actions[bot] fa58c6900d Version Packages (#275)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-13 15:19:35 +02:00
Dominik Ferber 7d7719a255 [@vercel/flags-core] deduplicate concurrent initialize() calls (#274)
* add shop

* wip

* fix parallel init initialize

* avoid double polling

* add tests

* rm shirt-shop-vercel

* ignore

* refactor

* rm unnecessary fix

* minimal

* changeset

* fix tests
2026-02-13 14:34:46 +02:00
github-actions[bot] 47806d4f89 Version Packages (#260)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-11 15:55:44 +02:00
Dominik Ferber 4d12447037 prepare v1 release (#271) 2026-02-11 15:53:11 +02:00
Dominik Ferber 6b7af06c74 downgrade release to minor, not major (#269)
* minor first

* wording
2026-02-11 15:41:07 +02:00
Dominik Ferber c71729b37f add READMEs and changesets (#265)
* add READMEs

* add changesets
2026-02-11 15:23:22 +02:00
Luis Meyer be1a323486 Add custom fetch option to flags client (#262)
* Add custom fetch option to flags client

Allow passing a custom fetch function to createClient() for testing purposes (e.g. resolving to a different IP). Threads fetch through FlagNetworkDataSource, fetchDatafile(), and connectStream().

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* changeset

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-10 09:50:40 +01:00
Dominik Ferber 795dfd46a1 throw on declaration if flag is missing decide function (#259) 2026-02-09 13:28:41 +02:00
Vincent Derks a0f0d9f5c2 Removed next-14 (#243) 2026-02-06 09:02:27 +01:00
github-actions[bot] 54d39ffd05 Version Packages (#221)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-22 06:48:11 +02:00
Dominik Ferber 620974c52b rename label to note (#220)
* label -> note

* make note optional

* add changeset
2025-11-22 06:46:03 +02:00
github-actions[bot] 78bcfe6f93 Version Packages (#219)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-20 14:21:02 +02:00
Dominik Ferber 43293a3799 depend on edge-config (#218)
* depend on edge-config

* add changeset
2025-11-20 14:09:53 +02:00
github-actions[bot] bf8858051e Version Packages (#217)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-07 14:59:37 +02:00
Jeremy Dorn 0da9c49fcd [GrowthBook provider] Auto refresh flags with a stale-while-revalidate strategy (#148)
* Auto refresh features with a stale-while-revalidate strategy

* Update default cache TTL for a better developer experience

* Reduce latency for edge config

* Add changeset entry

* Treat edge config client as a singleton

* Use AsyncLocalStorage to only read from edgeConfig once per request
2025-11-07 14:49:04 +02:00
github-actions[bot] b6f52d9f10 Version Packages (#214)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-06 17:18:43 +02:00
Dominik Ferber 5f3757afc7 stop relying on workspace tsconfig (#213)
* stop relying on workspace tsconfig

closes #204

* add changeset
2025-11-06 17:06:49 +02:00
github-actions[bot] 9ae6acf435 Version Packages (#212)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-06 16:12:49 +02:00
Dominik Ferber 6a7313a567 publish cjs bundles besides esm (#211) 2025-11-06 14:31:20 +01:00
github-actions[bot] 5761a8a1a9 Version Packages (#208)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-06 14:46:46 +02:00
Dominik Ferber d43589a0f5 @flags-sdk/growthbook: support stringified json (#210)
closes #209
2025-11-06 14:45:49 +02:00
Dominik Ferber df76e2c641 export evaluate (#207)
* export evaluate

* add changeset
2025-11-05 07:29:35 +02:00
github-actions[bot] f05effbddb Version Packages (#206)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-05 06:38:40 +02:00
Dominik Ferber 9ecc4debb9 export packed type (#205)
* export packed type

* export as type
2025-11-05 06:37:11 +02:00
github-actions[bot] 7244870173 Version Packages (#203)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-30 11:49:24 +02:00
Dominik Ferber 5fa72581f7 add @flags-sdk/flagsmith (#167)
* Revert "Revert "Adds Flagsmith adapter (#103)""

This reverts commit bf85f9729a.

* prepare flagsmith adapter for release

* adjust changeset

* update lockfile

* shrink readme

* provider @flags-sdk/flagsmith with correct options for Flag Explorer (#182)

* Revert "Revert "Adds Flagsmith adapter (#103)""

This reverts commit bf85f9729a.

* prepare flagsmith adapter for release

* adjust changeset

* update lockfile

* shrink readme

* feat: get-mv-options-to-build-possible-values

---------

Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>

* update lockfile

* Flagsmith (#186)

* Revert "Revert "Adds Flagsmith adapter (#103)""

This reverts commit bf85f9729a.

* prepare flagsmith adapter for release

* adjust changeset

* update lockfile

* shrink readme

* feat: get-mv-options-to-build-possible-values

* feat: reworked-decide-signature-and-readme

* feat: rebase

* adjust changeset

* update lockfile

* feat: reworked-decide-signature-and-readme

* feat: updated-tests

* feat: fix-pnpm-lok

---------

Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>

* Flagsmith (#190)

* Revert "Revert "Adds Flagsmith adapter (#103)""

This reverts commit bf85f9729a.

* prepare flagsmith adapter for release

* adjust changeset

* update lockfile

* shrink readme

* feat: get-mv-options-to-build-possible-values

* feat: reworked-decide-signature-and-readme

* feat: rebase

* adjust changeset

* update lockfile

* feat: reworked-decide-signature-and-readme

* feat: updated-tests

* feat: fix-pnpm-lok

* feat: added-documentation-for-identify

* feat: added-full-example

---------

Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>

* rewrite changeset

* Feat/flagsmith coercion method (#194)

* Revert "Revert "Adds Flagsmith adapter (#103)""

This reverts commit bf85f9729a.

* prepare flagsmith adapter for release

* adjust changeset

* update lockfile

* shrink readme

* feat: get-mv-options-to-build-possible-values

* feat: reworked-decide-signature-and-readme

* feat: rebase

* adjust changeset

* update lockfile

* feat: reworked-decide-signature-and-readme

* feat: updated-tests

* feat: fix-pnpm-lok

* feat: added-documentation-for-identify

* feat: added-full-example

* feat: added-type-free-coercion-method

* feat: removed-per-type-functions-in-favor-of-get-value

---------

Co-authored-by: Dominik Ferber <dominik.ferber@gmail.com>

* rm next-13

* esm

---------

Co-authored-by: Zaimwa9 <wadii.zaim@gmail.com>
2025-10-30 11:19:06 +02:00
github-actions[bot] db3cf0eae0 Version Packages (#202)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-25 15:10:04 +03:00
Dominik Ferber bfe9080a53 export DataSource type (#201) 2025-10-25 15:01:47 +03:00
github-actions[bot] 6952384fb2 Version Packages (#200)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-25 12:02:45 +03:00
Dominik Ferber ff052f0417 upgrade to @vercel/edge-config dependency (#199)
* upgrade to @vercel/edge-config dep

* update lockfile
2025-10-25 12:00:06 +03:00
Dominik Ferber 0910327c65 add next-16 tests (#195)
* add next-16 tests

* upgrade biome

* upgrade react in next-16

* tsconfig

* try with middleware.ts

* Revert "try with middleware.ts"

This reverts commit 894b6ed5ce.

* Revert "try adding executablePath"

This reverts commit a4991996fe.

* ensure x-middleware-rewrite

* test x-nextjs-cache

* rm playwright --ui

* adjust biome schema version

* disable getStaticPaths in pages router

* try chromium

* re-enable ci playwright workaround
2025-10-25 00:49:34 +03:00
Dominik Ferber ba4eec7b23 replace eslint and prettier with biome (#187)
* remove @pyra/eslint-config

* wip

* wip

* convert shirt-shop-api

* convert shirt-shop

* convert snippets

* convert next-13

* convert next-14

* convert next-15

* eslint configs

* upgrade prettier

* use eslint v9

* run prettier

* resolve type-check

* adjust eslint

* drop Next.js v13

* fix next-14

Avoid accidentally using implicitly installed eslint v8

* update lockfile

* rm @eslint/eslintrc

* add @next/eslint-plugin-next

* biome

* biome fixes

* wip

* apply formatting

* tabs

* rm prettier

* spaces

* fix svelte

* update lockfile

* single quotes

* format all

* rm eslint-disable comments

* upgrade playwright

* upgrade publint

* upgrade playwright ci workflow

* try chromium headless

* try adding executablePath
2025-10-15 23:38:17 +03:00
github-actions[bot] d1b153e5e4 Version Packages (#185)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-13 15:38:15 +03:00
Dominik Ferber 48adbf2de1 [@flags-sdk/statsig] update statsig-node-lite to v0.5.2 (#184) 2025-10-13 15:33:10 +03:00
github-actions[bot] e5be34f680 Version Packages (#173)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-12 08:04:21 +03:00
Dominik Ferber a7b9be80db Update hypertune adapter (#172)
* Support nested flags by using the getFlagValues method. Pass a key to createSource to prevent conflicts with the getHypertune setup.

* address review comments

---------

Co-authored-by: Miraan Tabrez <miraan.tabrez@gmail.com>
2025-09-12 08:02:14 +03:00
github-actions[bot] dbf43160d0 Version Packages (#170)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-11 18:59:05 +03:00
Dominik Ferber e1def0eb34 upgrade @flags-sdk/launchdarkly (#169)
* upgrade @flags-sdk/launchdarkly

* remove unused dependencies
2025-09-11 18:54:03 +03:00
Dominik Ferber bf85f9729a Revert "Adds Flagsmith adapter (#103)"
This reverts commit 63edc40ec8.
2025-09-09 13:42:03 +03:00
Tiago Paiva 63edc40ec8 Adds Flagsmith adapter (#103)
adds tests

fix README

fix documentation

remove asdf file

implements getFeature pattern

update README

Update packages/adapter-flagsmith/README.md

Co-authored-by: Aaron Morris <aaron@vercel.com>

address changes

implements provider

adds different methods for different types of flags

fix tests

changeset
2025-08-22 09:24:18 +03:00
github-actions[bot] 12d153d483 Version Packages (#157)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-06 10:45:47 +03:00
Dominik Ferber 595e9d055b @flags-sdk/launchdarkly: only read edge config once per request (#156)
* @flags-sdk/launchdarkly: only read edge config once per request

* fix test
2025-08-06 10:36:21 +03:00
github-actions[bot] 0976e8f760 Version Packages (#154)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-28 08:52:03 -04:00