Skip to content

Releases: vercel/flags

@flags-sdk/[email protected]

08 Mar 11:32
3a2a1a0
Compare
Choose a tag to compare

Minor Changes

  • 917ef42: change API from ldAdapter() to ldAdapter.variation()

Patch Changes

  • b375e4e: add metadata to package.json
  • 917ef42: expose ldClient on default ldAdapter

@flags-sdk/[email protected]

08 Mar 08:19
d1ed596
Compare
Choose a tag to compare

Patch Changes

@flags-sdk/[email protected]

08 Mar 07:33
ab4c41c
Compare
Choose a tag to compare

Minor Changes

  • 2fcc446: Add LaunchDarkly adapter

@flags-sdk/[email protected]

27 Feb 15:48
bdbaa46
Compare
Choose a tag to compare

Patch Changes

  • 9a687cb: accept consoleApiKey from getProviderData

@flags-sdk/[email protected]

26 Feb 15:12
f6cb1ef
Compare
Choose a tag to compare

Minor Changes

  • bd7e10a: Initial support for Feature Gates and Dynamic Configs

[email protected]

20 Feb 18:30
661039a
Compare
Choose a tag to compare

Patch Changes

  • 6955b68: emit reduced console info when falling back to defaultValue during development
  • cf532da: Update package.json and tsup.config.js for flags package

@vercel/[email protected]

14 Feb 18:45
cfad244
Compare
Choose a tag to compare

Patch Changes

  • 6955b68: emit reduced console info when falling back to defaultValue during development
  • cf532da: Update package.json and tsup.config.js for flags package

@flags-sdk/[email protected]

14 Feb 18:45
cfad244
Compare
Choose a tag to compare

Minor Changes

@vercel/[email protected]

24 Jan 15:48
1961a6a
Compare
Choose a tag to compare

Minor Changes

  • 76feb16: Add mergeProviderData function to @vercel/flags.

    This function allows merging ProviderData from multiple sources.

    This is handy when you declare feature flags in code, and want to extend those definitions with data loaded from your feature flag provider.

    import { verifyAccess, mergeProviderData, type ApiData } from '@vercel/flags';
    import { getProviderData } from '@vercel/flags/next';
    import { NextResponse, type NextRequest } from 'next/server';
    import { getProviderData as getStatsigProviderData } from '@flags-sdk/statsig';
    import * as flagsA from '../../../../flags-a'; // your feature flags file(s)
    import * as flagsB from '../../../../flags-b'; // your feature flags file(s)
    
    export async function GET(request: NextRequest) {
      const access = await verifyAccess(request.headers.get('Authorization'));
      if (!access) return NextResponse.json(null, { status: 401 });
    
      const providerData = await mergeProviderData([
        // expose flags declared in code first
        getProviderData({ ...flagsA, ...flagsB }),
        // then enhance them with metadata from your flag provider
        getStatsigProviderData({ consoleApiKey: '', projectId: '' }),
      ]);
    
      return NextResponse.json<ApiData>(providerData);
    }

Patch Changes

  • 2713ea7: Handle undefined values

    • fix: Fall back to defaultValue when a feature flag returns undefined
    • fix: Throw error when a flag resolves to undefined and no defaultValue is present

    The value undefined can not be serialized so feature flags should never resolve to undefined. Use null instead.

    Fix exports

    • fix: Export Identify and Decide types

@vercel/[email protected]

21 Jan 12:24
051eb57
Compare
Choose a tag to compare

Patch Changes

  • 708d5e2: generatePermutations: infer options of boolean flags