From 7321a0b92bd763388ea6480736cfffc6dd4e5f52 Mon Sep 17 00:00:00 2001 From: Luis Meyer Date: Thu, 23 Jul 2026 12:12:42 +0200 Subject: [PATCH 1/2] Rename Edge Config to Global Config across examples (FLA-3104) Swaps @vercel/edge-config for the renamed @vercel/global-config package and updates user-facing "Edge Config" mentions to "Global Config" in READMEs, comments, and UI copy. Env var names (EDGE_CONFIG), API endpoints, and third-party SDK option keys are left untouched since those haven't been renamed yet. --- edge-middleware/ab-testing-statsig/README.md | 10 +-- .../ab-testing-statsig/middleware.ts | 8 +-- .../ab-testing-statsig/package.json | 2 +- .../ab-testing-statsig/pages/[bucket].tsx | 20 +++--- .../ab-testing-statsig/pnpm-lock.yaml | 30 +++++++-- .../feature-flag-apple-store/README.md | 14 ++-- .../lib/feature-flags.ts | 4 +- .../feature-flag-apple-store/middleware.ts | 4 +- .../feature-flag-apple-store/package.json | 2 +- .../pages/api/store/close.ts | 2 +- .../pages/api/store/open.ts | 2 +- ...e-config.tsx => missing-global-config.tsx} | 4 +- .../feature-flag-apple-store/pnpm-lock.yaml | 29 +++++++-- .../feature-flag-hypertune/README.md | 8 +-- .../feature-flag-hypertune/app/page.tsx | 8 +-- .../lib/getHypertune.ts | 2 +- .../feature-flag-hypertune/package.json | 2 +- .../feature-flag-hypertune/pnpm-lock.yaml | 64 ++++++++----------- .../feature-flag-launchdarkly/README.md | 6 +- .../feature-flag-launchdarkly/app/page.tsx | 12 ++-- .../feature-flag-launchdarkly/package.json | 2 +- .../feature-flag-launchdarkly/pnpm-lock.yaml | 44 ++++++------- edge-middleware/feature-flag-split/README.md | 4 +- .../page.tsx | 7 +- .../app/missing-split-item/page.tsx | 17 ++--- .../feature-flag-split/lib/split.ts | 6 +- .../feature-flag-split/middleware.ts | 4 +- .../feature-flag-split/package.json | 2 +- .../feature-flag-split/pnpm-lock.yaml | 36 ++++++++--- edge-middleware/maintenance-page/README.md | 6 +- .../maintenance-page/middleware.ts | 4 +- edge-middleware/maintenance-page/package.json | 2 +- .../maintenance-page/pages/index.tsx | 6 +- ...e-config.tsx => missing-global-config.tsx} | 4 +- .../maintenance-page/pnpm-lock.yaml | 31 +++++++-- .../redirects-bloom-filter/app/page.tsx | 2 +- .../experimentation-statsig/package.json | 2 +- .../experimentation-statsig/pnpm-lock.yaml | 20 +++++- flags-sdk/flagsmith/package.json | 2 +- flags-sdk/flagsmith/pnpm-lock.yaml | 18 +++--- flags-sdk/growthbook/package.json | 2 +- flags-sdk/growthbook/pnpm-lock.yaml | 20 +++++- flags-sdk/hypertune/package.json | 2 +- flags-sdk/hypertune/pnpm-lock.yaml | 31 +++++++-- flags-sdk/launchdarkly/README.md | 4 +- flags-sdk/launchdarkly/package.json | 2 +- flags-sdk/launchdarkly/pnpm-lock.yaml | 20 +++++- flags-sdk/posthog/package.json | 2 +- flags-sdk/posthog/pnpm-lock.yaml | 20 +++++- flags-sdk/reflag/package.json | 2 +- flags-sdk/reflag/pnpm-lock.yaml | 18 +++--- internal/fields.json | 2 +- rust/wait-until/AGENTS.md | 3 +- rust/websocket/AGENTS.md | 3 +- .../src/lib/flags.ts | 2 +- 55 files changed, 369 insertions(+), 216 deletions(-) rename edge-middleware/feature-flag-apple-store/pages/{missing-edge-config.tsx => missing-global-config.tsx} (96%) rename edge-middleware/feature-flag-split/app/{missing-edge-config => missing-global-config}/page.tsx (94%) rename edge-middleware/maintenance-page/pages/{missing-edge-config.tsx => missing-global-config.tsx} (96%) diff --git a/edge-middleware/ab-testing-statsig/README.md b/edge-middleware/ab-testing-statsig/README.md index 53527f27ab..0a842a43a3 100644 --- a/edge-middleware/ab-testing-statsig/README.md +++ b/edge-middleware/ab-testing-statsig/README.md @@ -4,11 +4,11 @@ slug: ab-testing-statsig description: Reduce CLS and improve performance from client-loaded experiments at the edge with Statsig framework: Next.js useCase: - - Edge Config + - Global Config - Edge Middleware - Documentation css: Tailwind -deployUrl: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Fab-testing-statsig&project-name=ab-testing-statsig&repository-name=ab-testing-statsig&integration-ids=oac_NAO87zzp3ADxj2ZUh3vikLip&env=STATSIG_SERVER_API_KEY,NEXT_PUBLIC_STATSIG_CLIENT_KEY,STATSIG_CONSOLE_API_KEY,EDGE_CONFIG,EDGE_CONFIG_ITEM_KEY&envDescription=Statsig%20API%20keys%20and%20Edge%20Config%20settings&envLink=https%3A%2F%2Fdocs.statsig.com%2Fguides%2Ffirst-feature +deployUrl: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Fab-testing-statsig&project-name=ab-testing-statsig&repository-name=ab-testing-statsig&integration-ids=oac_NAO87zzp3ADxj2ZUh3vikLip&env=STATSIG_SERVER_API_KEY,NEXT_PUBLIC_STATSIG_CLIENT_KEY,STATSIG_CONSOLE_API_KEY,EDGE_CONFIG,EDGE_CONFIG_ITEM_KEY&envDescription=Statsig%20API%20keys%20and%20Global%20Config%20settings&envLink=https%3A%2F%2Fdocs.statsig.com%2Fguides%2Ffirst-feature demoUrl: https://edge-ab-testing-statsig.vercel.app relatedTemplates: - ab-testing-google-optimize @@ -17,7 +17,7 @@ relatedTemplates: # Experimentation with Statsig -This example shows how to do experimentation using Statsig, leveraging Edge Config and Edge Middleware. +This example shows how to do experimentation using Statsig, leveraging Global Config and Edge Middleware. ## Demo @@ -31,7 +31,7 @@ You can choose from one of the following two methods to use this repository: Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples): -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Fab-testing-statsig&project-name=ab-testing-statsig&repository-name=ab-testing-statsig&integration-ids=oac_NAO87zzp3ADxj2ZUh3vikLip&env=STATSIG_SERVER_API_KEY,NEXT_PUBLIC_STATSIG_CLIENT_KEY,STATSIG_CONSOLE_API_KEY,EDGE_CONFIG,EDGE_CONFIG_ITEM_KEY&envDescription=Statsig%20API%20keys%20and%20Edge%20Config%20settings&envLink=https%3A%2F%2Fdocs.statsig.com%2Fguides%2Ffirst-feature) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Fab-testing-statsig&project-name=ab-testing-statsig&repository-name=ab-testing-statsig&integration-ids=oac_NAO87zzp3ADxj2ZUh3vikLip&env=STATSIG_SERVER_API_KEY,NEXT_PUBLIC_STATSIG_CLIENT_KEY,STATSIG_CONSOLE_API_KEY,EDGE_CONFIG,EDGE_CONFIG_ITEM_KEY&envDescription=Statsig%20API%20keys%20and%20Global%20Config%20settings&envLink=https%3A%2F%2Fdocs.statsig.com%2Fguides%2Ffirst-feature) ### Clone and Deploy @@ -53,7 +53,7 @@ cp .env.example .env.local ``` Install the [Statsig Vercel Integration](https://vercel.com/integrations/statsig) for your project. -Then fill in `.env.local` with the provided Edge Config Connection String and Edge Config Item Key. +Then fill in `.env.local` with the provided Global Config Connection String and Global Config Item Key. Next, run Next.js in development mode: diff --git a/edge-middleware/ab-testing-statsig/middleware.ts b/edge-middleware/ab-testing-statsig/middleware.ts index 53a56c2e06..2aa460f468 100644 --- a/edge-middleware/ab-testing-statsig/middleware.ts +++ b/edge-middleware/ab-testing-statsig/middleware.ts @@ -1,7 +1,7 @@ import { NextRequest, NextResponse, NextFetchEvent } from 'next/server' import Statsig from 'statsig-node-lite' import { EdgeConfigDataAdapter } from 'statsig-node-vercel' -import { createClient } from '@vercel/edge-config' +import { createClient } from '@vercel/global-config' import { EXPERIMENT, UID_COOKIE, GROUP_PARAM_FALLBACK } from './lib/constants' // We'll use this to validate a random UUID @@ -38,7 +38,7 @@ export async function middleware(req: NextRequest, event: NextFetchEvent) { await Statsig.initialize(process.env.STATSIG_SERVER_API_KEY!, { // 🚨 It's extremly important to set this, otherwise Statsig will attempt // to fetch the ID List over the network, which is slow and would render - // using the Edge Config Adapter useless. + // using the Global Config Adapter useless. // // If you are not using the ID List feature, set this to "none". // @@ -46,9 +46,9 @@ export async function middleware(req: NextRequest, event: NextFetchEvent) { // that the ID List will not apply in most cases as it will only get fetched // after the experiment ran initStrategyForIDLists: 'none', - // This makes Statsig load experiments from Edge Config + // This makes Statsig load experiments from Global Config dataAdapter, - // Disable any syncing to prevent network activity, as Edge Config will + // Disable any syncing to prevent network activity, as Global Config will // return the latest values anyhow, and as ID Lists are disabled. disableIdListsSync: true, }) diff --git a/edge-middleware/ab-testing-statsig/package.json b/edge-middleware/ab-testing-statsig/package.json index 4e1c3cadd9..e276ff4e79 100644 --- a/edge-middleware/ab-testing-statsig/package.json +++ b/edge-middleware/ab-testing-statsig/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@vercel/edge-config": "^0.3.0", + "@vercel/global-config": "^1.4.3", "@vercel/examples-ui": "^1.0.4", "js-cookie": "^3.0.1", "next": "^16.0.10", diff --git a/edge-middleware/ab-testing-statsig/pages/[bucket].tsx b/edge-middleware/ab-testing-statsig/pages/[bucket].tsx index a71711ba77..139b156342 100644 --- a/edge-middleware/ab-testing-statsig/pages/[bucket].tsx +++ b/edge-middleware/ab-testing-statsig/pages/[bucket].tsx @@ -57,7 +57,7 @@ function BucketPage({ bucket }: Props) { In this demo we use Statsig's Server SDK at the edge to pull experiment variants and show the resulting allocation. We leverage the{' '} - edge config integration + global config integration {' '} to pull Statsig configurations from the edge. As long as you have a bucket assigned you will always see the same result, otherwise you @@ -88,17 +88,17 @@ function BucketPage({ bucket }: Props) { Reset bucket - In order to set this demo up yourself, in the + In order to set this demo up yourself, in the{' '} + Statsig console - , create a new experiment called "statsig_example". - Create experiment groups, each with a "bucket" parameter. - Make sure to start the experiment, and from there this example will display the bucket that the user was assigned to. - See the screenshot below for an example experiment setup. + + , create a new experiment called "statsig_example". Create + experiment groups, each with a "bucket" parameter. Make sure + to start the experiment, and from there this example will display the + bucket that the user was assigned to. See the screenshot below for an + example experiment setup. - Example Statsig Experiment Setup + Example Statsig Experiment Setup
diff --git a/edge-middleware/ab-testing-statsig/pnpm-lock.yaml b/edge-middleware/ab-testing-statsig/pnpm-lock.yaml index 6da019882b..5b0bf3685d 100644 --- a/edge-middleware/ab-testing-statsig/pnpm-lock.yaml +++ b/edge-middleware/ab-testing-statsig/pnpm-lock.yaml @@ -8,12 +8,12 @@ importers: .: dependencies: - '@vercel/edge-config': - specifier: ^0.3.0 - version: 0.3.0 '@vercel/examples-ui': specifier: ^1.0.4 version: 1.0.5(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@vercel/global-config': + specifier: ^1.4.3 + version: 1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) js-cookie: specifier: ^3.0.1 version: 3.0.5 @@ -400,6 +400,18 @@ packages: react: ^17.0.2 || ^18.0.0-0 react-dom: ^17.0.2 || ^18.0.0-0 + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} + engines: {node: '>=14.6'} + peerDependencies: + '@opentelemetry/api': ^1.7.0 + next: '>=1' + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + next: + optional: true + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1913,6 +1925,12 @@ snapshots: react-dom: 19.2.3(react@19.2.3) sugar-high: 0.4.7 + '@vercel/global-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + dependencies: + '@vercel/edge-config-fs': 0.1.0 + optionalDependencies: + next: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + acorn-jsx@5.3.2(acorn@8.10.0): dependencies: acorn: 8.10.0 @@ -2257,7 +2275,7 @@ snapshots: debug: 4.3.4 enhanced-resolve: 5.15.0 eslint: 8.49.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.6.0(eslint@8.49.0)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.6.0(eslint@8.49.0)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.49.0))(eslint@8.49.0))(eslint@8.49.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.6.0(eslint@8.49.0)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.49.0) eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.6.0(eslint@8.49.0)(typescript@5.9.3))(eslint-import-resolver-typescript@3.6.0)(eslint@8.49.0) fast-glob: 3.3.1 get-tsconfig: 4.7.0 @@ -2269,7 +2287,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.6.0(eslint@8.49.0)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.6.0(eslint@8.49.0)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.49.0))(eslint@8.49.0))(eslint@8.49.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.6.0(eslint@8.49.0)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.49.0): dependencies: debug: 3.2.7 optionalDependencies: @@ -2290,7 +2308,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.49.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.6.0(eslint@8.49.0)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.6.0(eslint@8.49.0)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.49.0))(eslint@8.49.0))(eslint@8.49.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.6.0(eslint@8.49.0)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.49.0) has: 1.0.3 is-core-module: 2.13.0 is-glob: 4.0.3 diff --git a/edge-middleware/feature-flag-apple-store/README.md b/edge-middleware/feature-flag-apple-store/README.md index 62bc6c089f..e2e36c1e6f 100644 --- a/edge-middleware/feature-flag-apple-store/README.md +++ b/edge-middleware/feature-flag-apple-store/README.md @@ -1,12 +1,12 @@ --- name: Feature Flag Apple Store slug: feature-flag-apple-store -description: This template uses Edge Config as fast storage to control whether a store is open or closed. +description: This template uses Global Config as fast storage to control whether a store is open or closed. framework: Next.js useCase: - Edge Functions - Edge Middleware - - Edge Config + - Global Config css: Tailwind deployUrl: 'https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-apple-store&project-name=feature-flag-apple-store&repo-name=feature-flag-apple-store&env=EDGE_CONFIG&edge-config-stores=%7B%22EDGE_CONFIG%22%3A%7B%22featureFlagsAppleStore_storeClosed%22%3Atrue%7D%7D' demoUrl: https://edge-functions-feature-flag-apple-store.vercel.app/ @@ -18,7 +18,7 @@ relatedTemplates: # Feature Flag Apple Store -This template uses Edge Config as fast storage to control whether the store is open or closed. +This template uses Global Config as fast storage to control whether the store is open or closed. ## Demo @@ -50,9 +50,9 @@ Copy the `.env.example` file in this directory to `.env.local` (which will be ig cp .env.example .env.local ``` -This example requires you to set up an Edge Config and store its connection string in the `EDGE_CONFIG` environment variable. +This example requires you to set up a Global Config and store its connection string in the `EDGE_CONFIG` environment variable. -Fill the Edge Config you create with this content: +Fill the Global Config you create with this content: ```json { "featureFlagsAppleStore_storeClosed": true } @@ -68,7 +68,7 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut ## Opening / Closing the Store using the Dashboard -You can control whether the store is open or not by changing the value of `featureFlagsAppleStore_storeClosed` using the [Edge Config Dashboard](https://vercel.com/docs/concepts/edge-network/edge-config/edge-config-dashboard#manage-edge-configs). +You can control whether the store is open or not by changing the value of `featureFlagsAppleStore_storeClosed` using the [Global Config Dashboard](https://vercel.com/docs/concepts/edge-network/edge-config/edge-config-dashboard#manage-edge-configs). ## Opening / Closing the Store using API Routes @@ -86,4 +86,4 @@ To close the store go to: http://localhost:3000/api/store/close ``` -Alternatively you can use the Edge Config UI in your Vercel dashboard to update the `featureFlagsAppleStore_storeClosed` value directly. +Alternatively you can use the Global Config UI in your Vercel dashboard to update the `featureFlagsAppleStore_storeClosed` value directly. diff --git a/edge-middleware/feature-flag-apple-store/lib/feature-flags.ts b/edge-middleware/feature-flag-apple-store/lib/feature-flags.ts index 05451d83db..41ba64cd0c 100644 --- a/edge-middleware/feature-flag-apple-store/lib/feature-flags.ts +++ b/edge-middleware/feature-flag-apple-store/lib/feature-flags.ts @@ -1,10 +1,10 @@ -import { createClient, parseConnectionString } from '@vercel/edge-config' +import { createClient, parseConnectionString } from '@vercel/global-config' interface FeatureFlags { storeClosed: boolean } -// We use prefixes to avoid mixing up the flags with other Edge Config values +// We use prefixes to avoid mixing up the flags with other Global Config values const prefixKey = (key: string) => `featureFlagsAppleStore_${key}` export async function get(key: keyof FeatureFlags) { diff --git a/edge-middleware/feature-flag-apple-store/middleware.ts b/edge-middleware/feature-flag-apple-store/middleware.ts index 6bdf688463..3614ab5bcb 100644 --- a/edge-middleware/feature-flag-apple-store/middleware.ts +++ b/edge-middleware/feature-flag-apple-store/middleware.ts @@ -1,6 +1,6 @@ import { NextRequest, NextResponse } from 'next/server' import { get } from 'lib/feature-flags' -import { parseConnectionString } from '@vercel/edge-config' +import { parseConnectionString } from '@vercel/global-config' export const config = { matcher: '/', @@ -12,7 +12,7 @@ export async function middleware(req: NextRequest) { !process.env.EDGE_CONFIG || !parseConnectionString(process.env.EDGE_CONFIG) ) { - req.nextUrl.pathname = '/missing-edge-config' + req.nextUrl.pathname = '/missing-global-config' return NextResponse.rewrite(req.nextUrl) } diff --git a/edge-middleware/feature-flag-apple-store/package.json b/edge-middleware/feature-flag-apple-store/package.json index 7e2862e951..b359a29a0b 100644 --- a/edge-middleware/feature-flag-apple-store/package.json +++ b/edge-middleware/feature-flag-apple-store/package.json @@ -10,7 +10,7 @@ "start": "next start" }, "dependencies": { - "@vercel/edge-config": "0.1.0-canary.15", + "@vercel/global-config": "^1.4.3", "next": "^16.0.10", "react": "^19.2.1", "react-dom": "^19.2.1" diff --git a/edge-middleware/feature-flag-apple-store/pages/api/store/close.ts b/edge-middleware/feature-flag-apple-store/pages/api/store/close.ts index 4e921cae99..38b48d2c3f 100644 --- a/edge-middleware/feature-flag-apple-store/pages/api/store/close.ts +++ b/edge-middleware/feature-flag-apple-store/pages/api/store/close.ts @@ -9,7 +9,7 @@ export default async function CloseStore() { const result = await set('storeClosed', true) if (!result) { - throw new Error(`Something went wrong when updating the Edge Config`) + throw new Error(`Something went wrong when updating the Global Config`) } return new Response( diff --git a/edge-middleware/feature-flag-apple-store/pages/api/store/open.ts b/edge-middleware/feature-flag-apple-store/pages/api/store/open.ts index 5bc699b02e..a4560f93f7 100644 --- a/edge-middleware/feature-flag-apple-store/pages/api/store/open.ts +++ b/edge-middleware/feature-flag-apple-store/pages/api/store/open.ts @@ -9,7 +9,7 @@ export default async function OpenStore() { const result = await set('storeClosed', false) if (!result) { - throw new Error(`Something went wrong when updating the Edge Config`) + throw new Error(`Something went wrong when updating the Global Config`) } return new Response( diff --git a/edge-middleware/feature-flag-apple-store/pages/missing-edge-config.tsx b/edge-middleware/feature-flag-apple-store/pages/missing-global-config.tsx similarity index 96% rename from edge-middleware/feature-flag-apple-store/pages/missing-edge-config.tsx rename to edge-middleware/feature-flag-apple-store/pages/missing-global-config.tsx index 4344cc8b91..258f08671b 100644 --- a/edge-middleware/feature-flag-apple-store/pages/missing-edge-config.tsx +++ b/edge-middleware/feature-flag-apple-store/pages/missing-global-config.tsx @@ -1,4 +1,4 @@ -export default function MissingEdgeConfigDialog() { +export default function MissingGlobalConfigDialog() { return (
  1. - Create an Edge Config and connect it to this project and + Create a Global Config and connect it to this project and store its connection string under the{' '} EDGE_CONFIG diff --git a/edge-middleware/feature-flag-apple-store/pnpm-lock.yaml b/edge-middleware/feature-flag-apple-store/pnpm-lock.yaml index 597e280c94..9b1e58e570 100644 --- a/edge-middleware/feature-flag-apple-store/pnpm-lock.yaml +++ b/edge-middleware/feature-flag-apple-store/pnpm-lock.yaml @@ -8,9 +8,9 @@ importers: .: dependencies: - '@vercel/edge-config': - specifier: 0.1.0-canary.15 - version: 0.1.0-canary.15 + '@vercel/global-config': + specifier: ^1.4.3 + version: 1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) next: specifier: ^16.0.10 version: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) @@ -340,9 +340,20 @@ packages: resolution: {integrity: sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@vercel/edge-config@0.1.0-canary.15': - resolution: {integrity: sha512-CgafJ+qlF2XZU5z6YJ/Dc06A9z/3KHeuenQqZdQQNMEm1yYyZcKkL3i68qSXT/4h4axZ2oqzcdwHJA2A6Yqt9g==} + '@vercel/edge-config-fs@0.1.0': + resolution: {integrity: sha512-NRIBwfcS0bUoUbRWlNGetqjvLSwgYH/BqKqDN7vK1g32p7dN96k0712COgaz6VFizAm9b0g6IG6hR6+hc0KCPg==} + + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} engines: {node: '>=14.6'} + peerDependencies: + '@opentelemetry/api': ^1.7.0 + next: '>=1' + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + next: + optional: true acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} @@ -1781,7 +1792,13 @@ snapshots: '@typescript-eslint/types': 5.56.0 eslint-visitor-keys: 3.3.0 - '@vercel/edge-config@0.1.0-canary.15': {} + '@vercel/edge-config-fs@0.1.0': {} + + '@vercel/global-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + dependencies: + '@vercel/edge-config-fs': 0.1.0 + optionalDependencies: + next: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) acorn-jsx@5.3.2(acorn@8.8.2): dependencies: diff --git a/edge-middleware/feature-flag-hypertune/README.md b/edge-middleware/feature-flag-hypertune/README.md index 38a348d26c..76505e066d 100644 --- a/edge-middleware/feature-flag-hypertune/README.md +++ b/edge-middleware/feature-flag-hypertune/README.md @@ -5,7 +5,7 @@ description: Learn to use Hypertune, a powerful feature flag, A/B testing, analy framework: Next.js useCase: Edge Middleware css: Tailwind -deployUrl: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhypertunehq%2Fvercel-examples-fork%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-hypertune&env=NEXT_PUBLIC_HYPERTUNE_TOKEN,HYPERTUNE_ADMIN_TOKEN,EDGE_CONFIG,EDGE_CONFIG_HYPERTUNE_ITEM_KEY,FLAGS_SECRET&envDescription=Environment%20variables%20needed%20to%20use%20Hypertune%20with%20Vercel%20Edge%20Config%20and%20the%20Vercel%20Toolbar&envLink=https%3A%2F%2Fdocs.hypertune.com%2Fgetting-started%2Fvercel-quickstart&project-name=feature-flag-hypertune&repository-name=feature-flag-hypertune&demo-title=Hypertune%20with%20Vercel&demo-description=Use%20Hypertune%20with%20Vercel%20Edge%20Config%20and%20the%20Vercel%20Toolbar&demo-url=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2F&demo-image=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2Fdemo.png&integration-ids=oac_naLXREDG2o9KihTGYBVz9fVl +deployUrl: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhypertunehq%2Fvercel-examples-fork%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-hypertune&env=NEXT_PUBLIC_HYPERTUNE_TOKEN,HYPERTUNE_ADMIN_TOKEN,EDGE_CONFIG,EDGE_CONFIG_HYPERTUNE_ITEM_KEY,FLAGS_SECRET&envDescription=Environment%20variables%20needed%20to%20use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&envLink=https%3A%2F%2Fdocs.hypertune.com%2Fgetting-started%2Fvercel-quickstart&project-name=feature-flag-hypertune&repository-name=feature-flag-hypertune&demo-title=Hypertune%20with%20Vercel&demo-description=Use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&demo-url=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2F&demo-image=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2Fdemo.png&integration-ids=oac_naLXREDG2o9KihTGYBVz9fVl demoUrl: https://feature-flag-hypertune.vercel.app relatedTemplates: - maintenance-page @@ -18,11 +18,11 @@ relatedTemplates: No need to juggle different SDKs for the server and the client. Install one SDK that works across the server and the client and is compatible with the App Router and Server Components. -Avoid layout shift, UI flickers, hydration errors and page load delay. Instantly initialize the SDK on the server from Vercel Edge Config. And instantly initialize the SDK on the client from server props on the first render. +Avoid layout shift, UI flickers, hydration errors and page load delay. Instantly initialize the SDK on the server from Vercel Global Config. And instantly initialize the SDK on the client from server props on the first render. Static typing and code generation gives you full end-to-end type-safety across your flag inputs, outputs and logic so you can be confident in your code and upgrade your developer experience. -This example shows how to use the [Hypertune integration](https://vercel.com/integrations/hypertune) with Vercel Edge Config to initialize the Hypertune SDK with near-zero latency on the server so you can access your feature flags and run A/B tests with no performance impact to your app. +This example shows how to use the [Hypertune integration](https://vercel.com/integrations/hypertune) with Vercel Global Config to initialize the Hypertune SDK with near-zero latency on the server so you can access your feature flags and run A/B tests with no performance impact to your app. It also shows how to integrate Hypertune with Vercel's Flags SDK to use the Vercel Toolbar, to view and override your feature flags without leaving your frontend, and Vercel's Flags pattern. @@ -30,7 +30,7 @@ It also shows how to integrate Hypertune with Vercel's Flags SDK to use the Verc Deploy this example with Vercel in one click: -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhypertunehq%2Fvercel-examples-fork%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-hypertune&env=NEXT_PUBLIC_HYPERTUNE_TOKEN,HYPERTUNE_ADMIN_TOKEN,EDGE_CONFIG,EDGE_CONFIG_HYPERTUNE_ITEM_KEY,FLAGS_SECRET&envDescription=Environment%20variables%20needed%20to%20use%20Hypertune%20with%20Vercel%20Edge%20Config%20and%20the%20Vercel%20Toolbar&envLink=https%3A%2F%2Fdocs.hypertune.com%2Fgetting-started%2Fvercel-quickstart&project-name=feature-flag-hypertune&repository-name=feature-flag-hypertune&demo-title=Hypertune%20with%20Vercel&demo-description=Use%20Hypertune%20with%20Vercel%20Edge%20Config%20and%20the%20Vercel%20Toolbar&demo-url=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2F&demo-image=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2Fdemo.png&integration-ids=oac_naLXREDG2o9KihTGYBVz9fVl) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhypertunehq%2Fvercel-examples-fork%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-hypertune&env=NEXT_PUBLIC_HYPERTUNE_TOKEN,HYPERTUNE_ADMIN_TOKEN,EDGE_CONFIG,EDGE_CONFIG_HYPERTUNE_ITEM_KEY,FLAGS_SECRET&envDescription=Environment%20variables%20needed%20to%20use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&envLink=https%3A%2F%2Fdocs.hypertune.com%2Fgetting-started%2Fvercel-quickstart&project-name=feature-flag-hypertune&repository-name=feature-flag-hypertune&demo-title=Hypertune%20with%20Vercel&demo-description=Use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&demo-url=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2F&demo-image=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2Fdemo.png&integration-ids=oac_naLXREDG2o9KihTGYBVz9fVl) You'll be guided through installing the [Hypertune Vercel integration](https://vercel.com/integrations/hypertune) and setting up the required environment variables. diff --git a/edge-middleware/feature-flag-hypertune/app/page.tsx b/edge-middleware/feature-flag-hypertune/app/page.tsx index eb9daf576c..5312f4a207 100644 --- a/edge-middleware/feature-flag-hypertune/app/page.tsx +++ b/edge-middleware/feature-flag-hypertune/app/page.tsx @@ -6,7 +6,7 @@ import ServerComponent from '../components/ServerComponent' export const metadata = { title: 'Vercel x Hypertune example', description: - 'An example showing how to use Hypertune with Vercel. This example builds on top of the Hypertune integration which syncs Hypertune flags into Edge Config so you can read them from your application near-instantly. It also shows how to integrate with the Vercel Toolbar so you can easily view and override your feature flags without leaving your frontend. Finally, it shows how to use the Vercel Feature Flags pattern to use flags on a static page.', + 'An example showing how to use Hypertune with Vercel. This example builds on top of the Hypertune integration which syncs Hypertune flags into Global Config so you can read them from your application near-instantly. It also shows how to integrate with the Vercel Toolbar so you can easily view and override your feature flags without leaving your frontend. Finally, it shows how to use the Vercel Feature Flags pattern to use flags on a static page.', } export const runtime = 'edge' @@ -24,9 +24,9 @@ export default async function Home() { > Hypertune integration {' '} - with Vercel Edge Config to initialize the Hypertune SDK with near-zero - latency on the server so you can access your feature flags and run A/B - tests with no performance impact to your app. + with Vercel Global Config to initialize the Hypertune SDK with + near-zero latency on the server so you can access your feature flags + and run A/B tests with no performance impact to your app. It also shows how to integrate Hypertune with Vercel's Flags SDK diff --git a/edge-middleware/feature-flag-hypertune/lib/getHypertune.ts b/edge-middleware/feature-flag-hypertune/lib/getHypertune.ts index 5da9aa0153..a106531eda 100644 --- a/edge-middleware/feature-flag-hypertune/lib/getHypertune.ts +++ b/edge-middleware/feature-flag-hypertune/lib/getHypertune.ts @@ -3,7 +3,7 @@ import { VercelEdgeConfigInitDataProvider } from 'hypertune' import { ReadonlyHeaders } from 'next/dist/server/web/spec-extension/adapters/headers' import { RequestCookies } from 'next/dist/server/web/spec-extension/cookies' import { unstable_noStore as noStore } from 'next/cache' -import { createClient } from '@vercel/edge-config' +import { createClient } from '@vercel/global-config' import { Environment, createSource } from '../generated/hypertune' import { getVercelOverride } from '../generated/hypertune.vercel' diff --git a/edge-middleware/feature-flag-hypertune/package.json b/edge-middleware/feature-flag-hypertune/package.json index 19667dae53..5165af6da9 100644 --- a/edge-middleware/feature-flag-hypertune/package.json +++ b/edge-middleware/feature-flag-hypertune/package.json @@ -11,7 +11,7 @@ "lint": "next lint" }, "dependencies": { - "@vercel/edge-config": "^1.1.1", + "@vercel/global-config": "^1.4.3", "@vercel/examples-ui": "^2.0.4", "@vercel/flags": "2.5.1", "@vercel/toolbar": "^0.1.15", diff --git a/edge-middleware/feature-flag-hypertune/pnpm-lock.yaml b/edge-middleware/feature-flag-hypertune/pnpm-lock.yaml index aef2b387f6..75b414ab1d 100644 --- a/edge-middleware/feature-flag-hypertune/pnpm-lock.yaml +++ b/edge-middleware/feature-flag-hypertune/pnpm-lock.yaml @@ -8,15 +8,15 @@ importers: .: dependencies: - '@vercel/edge-config': - specifier: ^1.1.1 - version: 1.1.1(typescript@5.2.2) '@vercel/examples-ui': specifier: ^2.0.4 version: 2.0.4(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@vercel/flags': specifier: 2.5.1 version: 2.5.1(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@vercel/global-config': + specifier: ^1.4.3 + version: 1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) '@vercel/toolbar': specifier: ^0.1.15 version: 0.1.15(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3) @@ -470,15 +470,6 @@ packages: '@vercel/edge-config-fs@0.1.0': resolution: {integrity: sha512-NRIBwfcS0bUoUbRWlNGetqjvLSwgYH/BqKqDN7vK1g32p7dN96k0712COgaz6VFizAm9b0g6IG6hR6+hc0KCPg==} - '@vercel/edge-config@1.1.1': - resolution: {integrity: sha512-tZM3bTFoEJNXs3hJbKHvpZton4BvWbxD1+0HJJrdDGLX3nCO9O778mMUBf6NmI33fB8iM8PLLQiKC6RpiBjiBg==} - engines: {node: '>=14.6'} - peerDependencies: - '@opentelemetry/api': ^1.7.0 - peerDependenciesMeta: - '@opentelemetry/api': - optional: true - '@vercel/examples-ui@2.0.4': resolution: {integrity: sha512-wiauqJ3SDSNq7Oz7Y/N1aKemtCaIUhBSVECVMbBfx2IYrH3xqVQ7937abvsyd6UcP1Pdsxdb6zDHajQOQV3MNg==} peerDependencies: @@ -493,6 +484,18 @@ packages: react: '*' react-dom: '*' + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} + engines: {node: '>=14.6'} + peerDependencies: + '@opentelemetry/api': ^1.7.0 + next: '>=1' + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + next: + optional: true + '@vercel/toolbar@0.1.15': resolution: {integrity: sha512-YDwRdYM6ij5CbkZm9NgoO1H7uXPuoM5nnzoHYMAZtF0sJylhQ7JIgwLniW71V6RNCKCrJGS1B23BvrQQl8WyrQ==} peerDependencies: @@ -1837,14 +1840,6 @@ packages: peerDependencies: typescript: '>=4.2.0' - ts-essentials@9.4.1: - resolution: {integrity: sha512-oke0rI2EN9pzHsesdmrOrnqv1eQODmJpd/noJjwj2ZPC3Z4N2wbjrOEqnsEgmvlO2+4fBb0a794DCna2elEVIQ==} - peerDependencies: - typescript: '>=4.1.0' - peerDependenciesMeta: - typescript: - optional: true - ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} @@ -2331,13 +2326,6 @@ snapshots: '@vercel/edge-config-fs@0.1.0': {} - '@vercel/edge-config@1.1.1(typescript@5.2.2)': - dependencies: - '@vercel/edge-config-fs': 0.1.0 - ts-essentials: 9.4.1(typescript@5.2.2) - transitivePeerDependencies: - - typescript - '@vercel/examples-ui@2.0.4(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@swc/helpers': 0.5.15 @@ -2353,6 +2341,12 @@ snapshots: react: 19.2.3 react-dom: 19.2.3(react@19.2.3) + '@vercel/global-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + dependencies: + '@vercel/edge-config-fs': 0.1.0 + optionalDependencies: + next: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@vercel/toolbar@0.1.15(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3)': dependencies: '@tinyhttp/app': 1.3.0 @@ -2731,7 +2725,7 @@ snapshots: eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.7.1(eslint@8.57.0) eslint-plugin-react: 7.33.2(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) @@ -2758,8 +2752,8 @@ snapshots: debug: 4.3.4 enhanced-resolve: 5.15.0 eslint: 8.57.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.1 get-tsconfig: 4.7.2 is-core-module: 2.13.0 @@ -2770,7 +2764,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: @@ -2781,7 +2775,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 @@ -2791,7 +2785,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.4(eslint@8.57.0)(typescript@5.2.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) has: 1.0.4 is-core-module: 2.13.0 is-glob: 4.0.3 @@ -3863,10 +3857,6 @@ snapshots: dependencies: typescript: 5.2.2 - ts-essentials@9.4.1(typescript@5.2.2): - optionalDependencies: - typescript: 5.2.2 - ts-interface-checker@0.1.13: {} tsconfig-paths@3.14.2: diff --git a/edge-middleware/feature-flag-launchdarkly/README.md b/edge-middleware/feature-flag-launchdarkly/README.md index ffa8e93ea4..d216d985b8 100644 --- a/edge-middleware/feature-flag-launchdarkly/README.md +++ b/edge-middleware/feature-flag-launchdarkly/README.md @@ -1,7 +1,7 @@ --- name: LaunchDarkly Integration example slug: feature-flag-launchdarkly -description: Learn how to set up the LaunchDarkly integration to read flags from Edge Config +description: Learn how to set up the LaunchDarkly integration to read flags from Global Config framework: Next.js useCase: Edge Middleware css: Tailwind @@ -18,7 +18,7 @@ This example shows how to use the native [LaunchDarkly integration](https://verc The integration provides the `NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_SIDE_ID` environment variable, which contains your client-side ID from LaunchDarkly. -LaunchDarkly syncs your feature flags into an Edge Config. When installing the LaunchDarkly integration from the Vercel Marketplace, turn on the **Enable Edge Config Syncing** toggle in the "Configuration and Plan" step of the install process. This provisions an Edge Config and exposes its connection string as the `EXPERIMENTATION_CONFIG` environment variable, which this example reads to create the Edge Config client. +LaunchDarkly syncs your feature flags into a Global Config. When installing the LaunchDarkly integration from the Vercel Marketplace, turn on the **Enable Global Config Syncing** toggle in the "Configuration and Plan" step of the install process. This provisions a Global Config and exposes its connection string as the `EXPERIMENTATION_CONFIG` environment variable, which this example reads to create the Global Config client. ## Set up the feature flag @@ -26,7 +26,7 @@ Head over to the [LaunchDarkly Console](https://app.launchdarkly.com) and create - `My Flag` (type boolean) with the key `my-flag` and the variations `true` and `false` -Turn the flag ON. Toggling targeting on and off changes what the page shows, confirming flags are being read from Edge Config. +Turn the flag ON. Toggling targeting on and off changes what the page shows, confirming flags are being read from Global Config. The example evaluates the flag against a context of kind `org` with the key `my-org-key` (see `app/page.tsx`). Contexts do not need to be created in LaunchDarkly ahead of time — they are simply sent by the app at evaluation time. The default targeting rule works without any extra setup. If you want to add targeting rules, target the `org` context kind rather than `user`. diff --git a/edge-middleware/feature-flag-launchdarkly/app/page.tsx b/edge-middleware/feature-flag-launchdarkly/app/page.tsx index e068b70a2b..d928566c8c 100644 --- a/edge-middleware/feature-flag-launchdarkly/app/page.tsx +++ b/edge-middleware/feature-flag-launchdarkly/app/page.tsx @@ -1,12 +1,12 @@ import { Text, Page, Link } from '@vercel/examples-ui' import { type LDClient, init } from '@launchdarkly/vercel-server-sdk' -import { createClient } from '@vercel/edge-config' +import { createClient } from '@vercel/global-config' import { cache } from 'react' export const metadata = { title: 'Vercel x LaunchDarkly example', description: - 'An example showing how to use LaunchDarkly and Vercel. This example builds on top of the LaunchDarkly integration which syncs LaunchDarkly flags into Edge Config, so you can read them from your application near-instantly.', + 'An example showing how to use LaunchDarkly and Vercel. This example builds on top of the LaunchDarkly integration which syncs LaunchDarkly flags into Global Config, so you can read them from your application near-instantly.', } export const runtime = 'edge' @@ -68,7 +68,7 @@ export default async function Home() { > LaunchDarkly integration {' '} - with Edge Config. + with Global Config.
@@ -80,9 +80,9 @@ export default async function Home() { {duration === 0 ? `<1` : duration}ms.

- The feature flag above is loaded from Edge Config. The LaunchDarkly - integration syncs all LaunchDarkly flags into Edge Config so they can - be read from your application near-instantly. + The feature flag above is loaded from Global Config. The LaunchDarkly + integration syncs all LaunchDarkly flags into Global Config so they + can be read from your application near-instantly. Read more about this in our{' '} diff --git a/edge-middleware/feature-flag-launchdarkly/package.json b/edge-middleware/feature-flag-launchdarkly/package.json index c4706e5dff..6f04d12e93 100644 --- a/edge-middleware/feature-flag-launchdarkly/package.json +++ b/edge-middleware/feature-flag-launchdarkly/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@launchdarkly/vercel-server-sdk": "^1.3.3", - "@vercel/edge-config": "^1.1.0", + "@vercel/global-config": "^1.4.3", "@vercel/examples-ui": "^2.0.4", "next": "^16.2.0", "react": "^19.2.1", diff --git a/edge-middleware/feature-flag-launchdarkly/pnpm-lock.yaml b/edge-middleware/feature-flag-launchdarkly/pnpm-lock.yaml index f55399a763..362bee75df 100644 --- a/edge-middleware/feature-flag-launchdarkly/pnpm-lock.yaml +++ b/edge-middleware/feature-flag-launchdarkly/pnpm-lock.yaml @@ -11,12 +11,12 @@ importers: '@launchdarkly/vercel-server-sdk': specifier: ^1.3.3 version: 1.3.3(typescript@5.1.6) - '@vercel/edge-config': - specifier: ^1.1.0 - version: 1.1.0(typescript@5.1.6) '@vercel/examples-ui': specifier: ^2.0.4 version: 2.0.4(next@16.2.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@vercel/global-config': + specifier: ^1.4.3 + version: 1.4.3(next@16.2.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) next: specifier: ^16.2.0 version: 16.2.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) @@ -131,105 +131,89 @@ packages: resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==} cpu: [arm64] os: [linux] - libc: [glibc] '@img/sharp-libvips-linux-arm@1.2.4': resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} cpu: [arm] os: [linux] - libc: [glibc] '@img/sharp-libvips-linux-ppc64@1.2.4': resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} cpu: [ppc64] os: [linux] - libc: [glibc] '@img/sharp-libvips-linux-riscv64@1.2.4': resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} cpu: [riscv64] os: [linux] - libc: [glibc] '@img/sharp-libvips-linux-s390x@1.2.4': resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==} cpu: [s390x] os: [linux] - libc: [glibc] '@img/sharp-libvips-linux-x64@1.2.4': resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==} cpu: [x64] os: [linux] - libc: [glibc] '@img/sharp-libvips-linuxmusl-arm64@1.2.4': resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==} cpu: [arm64] os: [linux] - libc: [musl] '@img/sharp-libvips-linuxmusl-x64@1.2.4': resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==} cpu: [x64] os: [linux] - libc: [musl] '@img/sharp-linux-arm64@0.34.5': resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] - libc: [glibc] '@img/sharp-linux-arm@0.34.5': resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm] os: [linux] - libc: [glibc] '@img/sharp-linux-ppc64@0.34.5': resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [ppc64] os: [linux] - libc: [glibc] '@img/sharp-linux-riscv64@0.34.5': resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [riscv64] os: [linux] - libc: [glibc] '@img/sharp-linux-s390x@0.34.5': resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [s390x] os: [linux] - libc: [glibc] '@img/sharp-linux-x64@0.34.5': resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] - libc: [glibc] '@img/sharp-linuxmusl-arm64@0.34.5': resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] - libc: [musl] '@img/sharp-linuxmusl-x64@0.34.5': resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] - libc: [musl] '@img/sharp-wasm32@0.34.5': resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==} @@ -307,28 +291,24 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [glibc] '@next/swc-linux-arm64-musl@16.2.10': resolution: {integrity: sha512-zkN9MQYS7UQBro+FnISUq1itaQjXI9xqISzuQ+2bc921NcJ1x4yPCqrn77tVN6/dOOXaaWVX3k6/bR07pPwK+A==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [musl] '@next/swc-linux-x64-gnu@16.2.10': resolution: {integrity: sha512-iCVJnwvrPYECvA6WM/7+oo+OiTvedIKLxtCLAZP4xZR3nXa1zmzZyLPbYCmWvpd4CvMYF1EMTafd0ii3DygLvA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [glibc] '@next/swc-linux-x64-musl@16.2.10': resolution: {integrity: sha512-ov2g4H0dHY9bPoOU83m91hWT7Iq5qy13bUnyyshLU3HGR1Ownn0X9QpmDPc5iIUaahTp7f7LeGAhV4DSFtackw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [musl] '@next/swc-win32-arm64-msvc@16.2.10': resolution: {integrity: sha512-DwAnhLX76HQiFFQNgWlcK+JzlnD1rZ+UK/WY0ZMI/deXpvgnesjNYrqcfo1JzBuz4Kf7o3brIBL0glI1junatA==} @@ -419,6 +399,18 @@ packages: react: ^17.0.2 || ^18.0.0-0 || ^19.0.0-0 react-dom: ^17.0.2 || ^18.0.0-0 || ^19.0.0-0 + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} + engines: {node: '>=14.6'} + peerDependencies: + '@opentelemetry/api': ^1.7.0 + next: '>=1' + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + next: + optional: true + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1919,6 +1911,12 @@ snapshots: react: 19.2.3 react-dom: 19.2.3(react@19.2.3) + '@vercel/global-config@1.4.3(next@16.2.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + dependencies: + '@vercel/edge-config-fs': 0.1.0 + optionalDependencies: + next: 16.2.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + acorn-jsx@5.3.2(acorn@8.10.0): dependencies: acorn: 8.10.0 diff --git a/edge-middleware/feature-flag-split/README.md b/edge-middleware/feature-flag-split/README.md index 8ffa7ec027..670615c077 100644 --- a/edge-middleware/feature-flag-split/README.md +++ b/edge-middleware/feature-flag-split/README.md @@ -59,9 +59,9 @@ Then fill it with the following information: - Log in to the [Split console](https://app.split.io/login) and navigate to **Profile -> Admin Settings -> API Keys -> SDK API Keys** to retreive your SDK API Key. - Install the [Split Vercel Integration](https://vercel.com/integrations/split) for your project. - Then fill in `.env.local` with the provided Edge Config Item Key. + Then fill in `.env.local` with the provided Global Config Item Key. -- You can find the Edge Config Connection String on vercel.com -> Storage -> \[Your Edge Config\] -> Projects. You can click Connect Project if your Edge Config is not connected to any project yet. This will automatically create a token for you and set it up as an environment variable on your project. Note that you still need to provide it to your `.env.local` file. Otherwise, click on Tokens in the sidebar and find the token you want to use. Then click on the three dots of and select Copy Connection String. +- You can find the Global Config Connection String on vercel.com -> Storage -> \[Your Global Config\] -> Projects. You can click Connect Project if your Global Config is not connected to any project yet. This will automatically create a token for you and set it up as an environment variable on your project. Note that you still need to provide it to your `.env.local` file. Otherwise, click on Tokens in the sidebar and find the token you want to use. Then click on the three dots of and select Copy Connection String. - You also need to create feature flags called `New_Marketing_Page` and `New_About_Page`. You can set the user targeting to `Joe` and `Bobby` in whatever configuration you'd like as those users are used by this example. diff --git a/edge-middleware/feature-flag-split/app/missing-edge-config/page.tsx b/edge-middleware/feature-flag-split/app/missing-global-config/page.tsx similarity index 94% rename from edge-middleware/feature-flag-split/app/missing-edge-config/page.tsx rename to edge-middleware/feature-flag-split/app/missing-global-config/page.tsx index 8d4343d09a..6ab880ebed 100644 --- a/edge-middleware/feature-flag-split/app/missing-edge-config/page.tsx +++ b/edge-middleware/feature-flag-split/app/missing-global-config/page.tsx @@ -19,7 +19,7 @@ function ExclamantionTriangleIcon() { ) } -export default function MissingEdgeConfigDialog() { +export default function MissingGlobalConfigDialog() { return (
  1. - Create an Edge Config and connect it to this project and + Create a Global Config and connect it to this project and store its connection string under the{' '} EDGE_CONFIG @@ -63,7 +63,8 @@ export default function MissingEdgeConfigDialog() { environment variable configured and it contains the item key as specified by the Split integration. You can find this key on your account at Vercel under Integrations > - Split > Manage > Configure > Edge Config Item Key + Split > Manage > Configure > Global Config Item + Key
  2. Pull your latest Environment Variables if you are diff --git a/edge-middleware/feature-flag-split/app/missing-split-item/page.tsx b/edge-middleware/feature-flag-split/app/missing-split-item/page.tsx index bbf950f110..278a90adf8 100644 --- a/edge-middleware/feature-flag-split/app/missing-split-item/page.tsx +++ b/edge-middleware/feature-flag-split/app/missing-split-item/page.tsx @@ -61,14 +61,14 @@ export default function MissingSplitItemDialog() {
  3. Make sure the integration is configured to sync your Split - project to a Vercel Edge Config. Go to vercel.com → + project to a Vercel Global Config. Go to vercel.com → Integrations → Split → Manage → Configure.
  4. - Make sure that Edge Config is connected to your project. + Make sure that Global Config is connected to your project. To do so, open vercel.com, find your project and click on - Storage. The Edge Config should show up there. If not, add - it. + Storage. The Global Config should show up there. If not, + add it.
  5. Ensure you have the{' '} @@ -78,11 +78,12 @@ export default function MissingSplitItemDialog() { environment variable configured and it contains the item key as specified by the Split integration. You can find this key on your account at Vercel under Integrations → - Split → Manage → Configure → Edge Config Item Key + Split → Manage → Configure → Global Config Item Key
  6. - Ensure the Edge Config actually contains your Split data. - Check whether your Edge Config contains a key called{' '} + Ensure the Global Config actually contains your Split + data. Check whether your Global Config contains a key + called{' '} {process.env.EDGE_CONFIG_SPLIT_ITEM_KEY} @@ -90,7 +91,7 @@ export default function MissingSplitItemDialog() { variable. If it does not contain such a key, you can go to Split and make a change to a feature flag. This causes the integration to resync. You should then see the value in - your Edge Config. + your Global Config.
  7. Pull your latest Environment Variables if you are diff --git a/edge-middleware/feature-flag-split/lib/split.ts b/edge-middleware/feature-flag-split/lib/split.ts index bea461ae59..645d3e6241 100644 --- a/edge-middleware/feature-flag-split/lib/split.ts +++ b/edge-middleware/feature-flag-split/lib/split.ts @@ -4,7 +4,7 @@ import { ErrorLogger, } from '@splitsoftware/splitio-browserjs' import { EdgeConfigWrapper } from '@splitsoftware/vercel-integration-utils' -import { createClient } from '@vercel/edge-config' +import { createClient } from '@vercel/global-config' const edgeConfigClient = createClient(process.env.EDGE_CONFIG) @@ -17,7 +17,7 @@ export async function createSplitClient(userKey: string) { mode: 'consumer_partial', storage: PluggableStorage({ wrapper: EdgeConfigWrapper({ - // The Edge Config item where Split stores feature flag definitions, specified in the Split integration step + // The Global Config item where Split stores feature flag definitions, specified in the Split integration step edgeConfigItemKey: process.env.EDGE_CONFIG_SPLIT_ITEM_KEY!, edgeConfig: edgeConfigClient, }), @@ -26,7 +26,7 @@ export async function createSplitClient(userKey: string) { debug: ErrorLogger(), }).client() - // Wait to load feature flag definitions from the Edge Config + // Wait to load feature flag definitions from the Global Config await client.ready() return client diff --git a/edge-middleware/feature-flag-split/middleware.ts b/edge-middleware/feature-flag-split/middleware.ts index 40e148a2be..a6a2f9d716 100644 --- a/edge-middleware/feature-flag-split/middleware.ts +++ b/edge-middleware/feature-flag-split/middleware.ts @@ -4,7 +4,7 @@ * It would not be needed in a real application. */ import { NextRequest, NextResponse } from 'next/server' -import { has } from '@vercel/edge-config' +import { has } from '@vercel/global-config' export const config = { matcher: ['/', '/about', '/marketing'], @@ -12,7 +12,7 @@ export const config = { export async function middleware(req: NextRequest) { if (!process.env.EDGE_CONFIG || !process.env.EDGE_CONFIG_SPLIT_ITEM_KEY) { - req.nextUrl.pathname = `/missing-edge-config` + req.nextUrl.pathname = `/missing-global-config` return NextResponse.rewrite(req.nextUrl) } diff --git a/edge-middleware/feature-flag-split/package.json b/edge-middleware/feature-flag-split/package.json index 92bf7ce10b..6a6d938cea 100644 --- a/edge-middleware/feature-flag-split/package.json +++ b/edge-middleware/feature-flag-split/package.json @@ -12,7 +12,7 @@ "dependencies": { "@splitsoftware/splitio-browserjs": "^0.9.6", "@splitsoftware/vercel-integration-utils": "1.0.1", - "@vercel/edge-config": "^0.2.1", + "@vercel/global-config": "^1.4.3", "@vercel/examples-ui": "^2.0.1", "js-cookie": "^3.0.5", "next": "^16.0.10", diff --git a/edge-middleware/feature-flag-split/pnpm-lock.yaml b/edge-middleware/feature-flag-split/pnpm-lock.yaml index 76f76ea93c..1050e8ee69 100644 --- a/edge-middleware/feature-flag-split/pnpm-lock.yaml +++ b/edge-middleware/feature-flag-split/pnpm-lock.yaml @@ -14,12 +14,12 @@ importers: '@splitsoftware/vercel-integration-utils': specifier: 1.0.1 version: 1.0.1(@vercel/edge-config@0.2.1) - '@vercel/edge-config': - specifier: ^0.2.1 - version: 0.2.1 '@vercel/examples-ui': specifier: ^2.0.1 version: 2.0.1(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@vercel/global-config': + specifier: ^1.4.3 + version: 1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) js-cookie: specifier: ^3.0.5 version: 3.0.5 @@ -426,6 +426,18 @@ packages: react: ^17.0.2 || ^18.0.0-0 react-dom: ^17.0.2 || ^18.0.0-0 + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} + engines: {node: '>=14.6'} + peerDependencies: + '@opentelemetry/api': ^1.7.0 + next: '>=1' + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + next: + optional: true + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -2029,6 +2041,12 @@ snapshots: react: 19.2.3 react-dom: 19.2.3(react@19.2.3) + '@vercel/global-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + dependencies: + '@vercel/edge-config-fs': 0.1.0 + optionalDependencies: + next: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + acorn-jsx@5.3.2(acorn@8.10.0): dependencies: acorn: 8.10.0 @@ -2344,7 +2362,7 @@ snapshots: eslint: 8.45.0 eslint-import-resolver-node: 0.3.7 eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.45.0))(eslint@8.45.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.45.0))(eslint@8.45.0))(eslint@8.45.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) eslint-plugin-jsx-a11y: 6.7.1(eslint@8.45.0) eslint-plugin-react: 7.32.2(eslint@8.45.0) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.45.0) @@ -2367,8 +2385,8 @@ snapshots: debug: 4.3.4 enhanced-resolve: 5.15.0 eslint: 8.45.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.45.0))(eslint@8.45.0))(eslint@8.45.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.45.0))(eslint@8.45.0))(eslint@8.45.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) get-tsconfig: 4.6.2 globby: 13.2.2 is-core-module: 2.12.1 @@ -2380,7 +2398,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.45.0))(eslint@8.45.0))(eslint@8.45.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0): dependencies: debug: 3.2.7 optionalDependencies: @@ -2391,7 +2409,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.45.0))(eslint@8.45.0))(eslint@8.45.0): + eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0): dependencies: array-includes: 3.1.6 array.prototype.flat: 1.3.1 @@ -2400,7 +2418,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.45.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.27.5(eslint@8.45.0))(eslint@8.45.0))(eslint@8.45.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) has: 1.0.3 is-core-module: 2.12.1 is-glob: 4.0.3 diff --git a/edge-middleware/maintenance-page/README.md b/edge-middleware/maintenance-page/README.md index 243cbf8c19..fe9054db84 100644 --- a/edge-middleware/maintenance-page/README.md +++ b/edge-middleware/maintenance-page/README.md @@ -1,11 +1,11 @@ --- name: Maintenance Page slug: maintenance-page -description: This template shows how to quickly trigger a maintenance page using Edge Config +description: This template shows how to quickly trigger a maintenance page using Global Config framework: Next.js useCase: - Edge Middleware - - Edge Config + - Global Config css: Tailwind deployUrl: 'https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Fmaintenance-page&project-name=maintenance-page&repo-name=maintenance-page&env=EDGE_CONFIG&edge-config-stores=%7B%22EDGE_CONFIG%22%3A%7B%22isInMaintenanceMode%22%3Atrue%7D%7D' demoUrl: https://edge-maintenance-page.vercel.app/ @@ -48,7 +48,7 @@ Copy the `.env.example` file in this directory to `.env.local` (which will be ig cp .env.example .env.local ``` -This example requires you to set up an Edge Config and store its connection string in the `EDGE_CONFIG` environment variable. Fill the Edge Config you create with this content: +This example requires you to set up a Global Config and store its connection string in the `EDGE_CONFIG` environment variable. Fill the Global Config you create with this content: ```json { "isInMaintenanceMode": true } diff --git a/edge-middleware/maintenance-page/middleware.ts b/edge-middleware/maintenance-page/middleware.ts index c4e362522e..e06d7fd5e1 100644 --- a/edge-middleware/maintenance-page/middleware.ts +++ b/edge-middleware/maintenance-page/middleware.ts @@ -1,5 +1,5 @@ import { NextRequest, NextResponse } from 'next/server' -import { get } from '@vercel/edge-config' +import { get } from '@vercel/global-config' export const config = { matcher: ['/big-promo'], @@ -7,7 +7,7 @@ export const config = { export async function middleware(req: NextRequest) { if (!process.env.EDGE_CONFIG) { - req.nextUrl.pathname = `/missing-edge-config` + req.nextUrl.pathname = `/missing-global-config` return NextResponse.rewrite(req.nextUrl) } diff --git a/edge-middleware/maintenance-page/package.json b/edge-middleware/maintenance-page/package.json index b3308ab849..03fbecaf92 100644 --- a/edge-middleware/maintenance-page/package.json +++ b/edge-middleware/maintenance-page/package.json @@ -10,7 +10,7 @@ "lint": "next lint" }, "dependencies": { - "@vercel/edge-config": "0.1.0-canary.15", + "@vercel/global-config": "^1.4.3", "@vercel/examples-ui": "^1.0.5", "next": "^16.0.10", "react": "^19.2.1", diff --git a/edge-middleware/maintenance-page/pages/index.tsx b/edge-middleware/maintenance-page/pages/index.tsx index 43d8f12fc2..53d2f00c8b 100644 --- a/edge-middleware/maintenance-page/pages/index.tsx +++ b/edge-middleware/maintenance-page/pages/index.tsx @@ -13,7 +13,7 @@ function Home() { attention than usual to a page; Its a good idea to have a backup plan that includes showing a different page to the users in case something fails. If this page receives a lot of traffic, we can use the edge, a - previously generated static page and Edge Config to give the users + previously generated static page and Global Config to give the users dynamic at the speed of static. Graph showing how to use middleware @@ -31,14 +31,14 @@ function Home() { this: {`import { NextRequest, NextResponse } from 'next/server' -import { get } from '@vercel/edge-config' +import { get } from '@vercel/global-config' export const config = { matcher: '/big-promo', } export async function middleware(req: NextRequest) { - // Check Edge Config to see if the maintenance page should be shown + // Check Global Config to see if the maintenance page should be shown const isInMaintenanceMode = await get('isInMaintenanceMode') // If in maintenance mode, point the url pathname to the maintenance page diff --git a/edge-middleware/maintenance-page/pages/missing-edge-config.tsx b/edge-middleware/maintenance-page/pages/missing-global-config.tsx similarity index 96% rename from edge-middleware/maintenance-page/pages/missing-edge-config.tsx rename to edge-middleware/maintenance-page/pages/missing-global-config.tsx index 2eadae86f6..29b35885b6 100644 --- a/edge-middleware/maintenance-page/pages/missing-edge-config.tsx +++ b/edge-middleware/maintenance-page/pages/missing-global-config.tsx @@ -1,4 +1,4 @@ -export default function MissingEdgeConfigDialog() { +export default function MissingGlobalConfigDialog() { return (
    1. - Create an Edge Config and connect it to this project and + Create a Global Config and connect it to this project and store its connection string under the{' '} EDGE_CONFIG diff --git a/edge-middleware/maintenance-page/pnpm-lock.yaml b/edge-middleware/maintenance-page/pnpm-lock.yaml index 24d5937e1f..b260ba57b2 100644 --- a/edge-middleware/maintenance-page/pnpm-lock.yaml +++ b/edge-middleware/maintenance-page/pnpm-lock.yaml @@ -8,12 +8,12 @@ importers: .: dependencies: - '@vercel/edge-config': - specifier: 0.1.0-canary.15 - version: 0.1.0-canary.15 '@vercel/examples-ui': specifier: ^1.0.5 version: 1.0.5(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@vercel/global-config': + specifier: ^1.4.3 + version: 1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) next: specifier: ^16.0.10 version: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) @@ -346,9 +346,8 @@ packages: resolution: {integrity: sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@vercel/edge-config@0.1.0-canary.15': - resolution: {integrity: sha512-CgafJ+qlF2XZU5z6YJ/Dc06A9z/3KHeuenQqZdQQNMEm1yYyZcKkL3i68qSXT/4h4axZ2oqzcdwHJA2A6Yqt9g==} - engines: {node: '>=14.6'} + '@vercel/edge-config-fs@0.1.0': + resolution: {integrity: sha512-NRIBwfcS0bUoUbRWlNGetqjvLSwgYH/BqKqDN7vK1g32p7dN96k0712COgaz6VFizAm9b0g6IG6hR6+hc0KCPg==} '@vercel/examples-ui@1.0.5': resolution: {integrity: sha512-6pj8V9MPLgrPajIUbqEkbmupEMnK6xBk5zkwsilwhA9mYQdxttqgVyDqlFMQhEVqb3tk0PshA+XxnZoDfLCpoQ==} @@ -357,6 +356,18 @@ packages: react: ^17.0.2 || ^18.0.0-0 react-dom: ^17.0.2 || ^18.0.0-0 + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} + engines: {node: '>=14.6'} + peerDependencies: + '@opentelemetry/api': ^1.7.0 + next: '>=1' + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + next: + optional: true + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1805,7 +1816,7 @@ snapshots: '@typescript-eslint/types': 5.56.0 eslint-visitor-keys: 3.3.0 - '@vercel/edge-config@0.1.0-canary.15': {} + '@vercel/edge-config-fs@0.1.0': {} '@vercel/examples-ui@1.0.5(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: @@ -1816,6 +1827,12 @@ snapshots: react-dom: 19.2.3(react@19.2.3) sugar-high: 0.4.6 + '@vercel/global-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + dependencies: + '@vercel/edge-config-fs': 0.1.0 + optionalDependencies: + next: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + acorn-jsx@5.3.2(acorn@8.8.2): dependencies: acorn: 8.8.2 diff --git a/edge-middleware/redirects-bloom-filter/app/page.tsx b/edge-middleware/redirects-bloom-filter/app/page.tsx index fecd95ceb0..08203a1404 100644 --- a/edge-middleware/redirects-bloom-filter/app/page.tsx +++ b/edge-middleware/redirects-bloom-filter/app/page.tsx @@ -51,7 +51,7 @@ export default function Page() { Although this example stores the redirects in a JSON file, you can also use a database such as{' '} - Edge Config + Global Config {' '} or Redis. diff --git a/flags-sdk/experimentation-statsig/package.json b/flags-sdk/experimentation-statsig/package.json index 11fdbf6ed0..625cce798a 100644 --- a/flags-sdk/experimentation-statsig/package.json +++ b/flags-sdk/experimentation-statsig/package.json @@ -19,7 +19,7 @@ "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", "@vercel/edge": "1.2.1", - "@vercel/edge-config": "1.4.3", + "@vercel/global-config": "1.4.3", "@vercel/toolbar": "0.1.33", "motion": "12.17.0", "clsx": "2.1.1", diff --git a/flags-sdk/experimentation-statsig/pnpm-lock.yaml b/flags-sdk/experimentation-statsig/pnpm-lock.yaml index 06f812023e..54451ae7a2 100644 --- a/flags-sdk/experimentation-statsig/pnpm-lock.yaml +++ b/flags-sdk/experimentation-statsig/pnpm-lock.yaml @@ -38,7 +38,7 @@ importers: '@vercel/edge': specifier: 1.2.1 version: 1.2.1 - '@vercel/edge-config': + '@vercel/global-config': specifier: 1.4.3 version: 1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) '@vercel/toolbar': @@ -744,6 +744,18 @@ packages: '@aws-sdk/credential-provider-web-identity': optional: true + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} + engines: {node: '>=14.6'} + peerDependencies: + '@opentelemetry/api': ^1.7.0 + next: '>=1' + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + next: + optional: true + '@vercel/microfrontends@1.0.0': resolution: {integrity: sha512-83ikhvV/k9F48zu/J7KtIi6ly1hZ5vSAosBBdkb9hmFgz8iL7iifjEpNp9cREjYa/8hajpbuVhqzsL23Cc+70Q==} hasBin: true @@ -2819,6 +2831,12 @@ snapshots: '@vercel/functions@1.6.0': {} + '@vercel/global-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + dependencies: + '@vercel/edge-config-fs': 0.1.0 + optionalDependencies: + next: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@vercel/microfrontends@1.0.0(@vercel/analytics@1.5.0(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: ajv: 8.17.1 diff --git a/flags-sdk/flagsmith/package.json b/flags-sdk/flagsmith/package.json index 2fa0640226..14d129c987 100644 --- a/flags-sdk/flagsmith/package.json +++ b/flags-sdk/flagsmith/package.json @@ -17,7 +17,7 @@ "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", "@vercel/edge": "1.2.1", - "@vercel/edge-config": "1.4.3", + "@vercel/global-config": "1.4.3", "@vercel/toolbar": "0.1.33", "clsx": "2.1.1", "flags": "^4.0.1", diff --git a/flags-sdk/flagsmith/pnpm-lock.yaml b/flags-sdk/flagsmith/pnpm-lock.yaml index aad9c22432..9022577b31 100644 --- a/flags-sdk/flagsmith/pnpm-lock.yaml +++ b/flags-sdk/flagsmith/pnpm-lock.yaml @@ -32,7 +32,7 @@ importers: '@vercel/edge': specifier: 1.2.1 version: 1.2.1 - '@vercel/edge-config': + '@vercel/global-config': specifier: 1.4.3 version: 1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) '@vercel/toolbar': @@ -703,8 +703,11 @@ packages: '@vercel/edge-config-fs@0.1.0': resolution: {integrity: sha512-NRIBwfcS0bUoUbRWlNGetqjvLSwgYH/BqKqDN7vK1g32p7dN96k0712COgaz6VFizAm9b0g6IG6hR6+hc0KCPg==} - '@vercel/edge-config@1.4.3': - resolution: {integrity: sha512-8vTDATodRrH49wMzKEjZ8/5H2qs1aPkD0uRK585f/Fx4YN2wfHfY/3td9OFrh+gdnCq07z8A5f0hoY6xhBcPkg==} + '@vercel/edge@1.2.1': + resolution: {integrity: sha512-1++yncEyIAi68D3UEOlytYb1IUcIulMWdoSzX2h9LuSeeyR7JtaIgR8DcTQ6+DmYOQn+5MCh6LY+UmK6QBByNA==} + + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} engines: {node: '>=14.6'} peerDependencies: '@opentelemetry/api': ^1.7.0 @@ -715,9 +718,6 @@ packages: next: optional: true - '@vercel/edge@1.2.1': - resolution: {integrity: sha512-1++yncEyIAi68D3UEOlytYb1IUcIulMWdoSzX2h9LuSeeyR7JtaIgR8DcTQ6+DmYOQn+5MCh6LY+UmK6QBByNA==} - '@vercel/microfrontends@1.0.0': resolution: {integrity: sha512-83ikhvV/k9F48zu/J7KtIi6ly1hZ5vSAosBBdkb9hmFgz8iL7iifjEpNp9cREjYa/8hajpbuVhqzsL23Cc+70Q==} hasBin: true @@ -2727,14 +2727,14 @@ snapshots: '@vercel/edge-config-fs@0.1.0': {} - '@vercel/edge-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + '@vercel/edge@1.2.1': {} + + '@vercel/global-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': dependencies: '@vercel/edge-config-fs': 0.1.0 optionalDependencies: next: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - '@vercel/edge@1.2.1': {} - '@vercel/microfrontends@1.0.0(@vercel/analytics@1.5.0(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: ajv: 8.17.1 diff --git a/flags-sdk/growthbook/package.json b/flags-sdk/growthbook/package.json index f7bcb7b39b..a9ca2299af 100644 --- a/flags-sdk/growthbook/package.json +++ b/flags-sdk/growthbook/package.json @@ -18,7 +18,7 @@ "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", "@vercel/edge": "1.2.1", - "@vercel/edge-config": "1.4.3", + "@vercel/global-config": "1.4.3", "@vercel/toolbar": "0.1.33", "motion": "12.17.0", "clsx": "2.1.1", diff --git a/flags-sdk/growthbook/pnpm-lock.yaml b/flags-sdk/growthbook/pnpm-lock.yaml index dde9882af0..265b6698da 100644 --- a/flags-sdk/growthbook/pnpm-lock.yaml +++ b/flags-sdk/growthbook/pnpm-lock.yaml @@ -35,7 +35,7 @@ importers: '@vercel/edge': specifier: 1.2.1 version: 1.2.1 - '@vercel/edge-config': + '@vercel/global-config': specifier: 1.4.3 version: 1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) '@vercel/toolbar': @@ -731,6 +731,18 @@ packages: '@aws-sdk/credential-provider-web-identity': optional: true + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} + engines: {node: '>=14.6'} + peerDependencies: + '@opentelemetry/api': ^1.7.0 + next: '>=1' + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + next: + optional: true + '@vercel/microfrontends@1.0.0': resolution: {integrity: sha512-83ikhvV/k9F48zu/J7KtIi6ly1hZ5vSAosBBdkb9hmFgz8iL7iifjEpNp9cREjYa/8hajpbuVhqzsL23Cc+70Q==} hasBin: true @@ -2761,6 +2773,12 @@ snapshots: '@vercel/functions@1.6.0': {} + '@vercel/global-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + dependencies: + '@vercel/edge-config-fs': 0.1.0 + optionalDependencies: + next: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@vercel/microfrontends@1.0.0(@vercel/analytics@1.5.0(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: ajv: 8.17.1 diff --git a/flags-sdk/hypertune/package.json b/flags-sdk/hypertune/package.json index baf24d33da..7e5c354cc4 100644 --- a/flags-sdk/hypertune/package.json +++ b/flags-sdk/hypertune/package.json @@ -17,7 +17,7 @@ "@tailwindcss/forms": "0.5.10", "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", - "@vercel/edge-config": "^1.4.0", + "@vercel/global-config": "^1.4.3", "@vercel/otel": "^1.11.0", "@vercel/toolbar": "0.1.33", "clsx": "2.1.1", diff --git a/flags-sdk/hypertune/pnpm-lock.yaml b/flags-sdk/hypertune/pnpm-lock.yaml index 6f491fccd5..f7720e4004 100644 --- a/flags-sdk/hypertune/pnpm-lock.yaml +++ b/flags-sdk/hypertune/pnpm-lock.yaml @@ -32,9 +32,9 @@ importers: '@tailwindcss/typography': specifier: 0.5.16 version: 0.5.16(tailwindcss@4.1.5) - '@vercel/edge-config': - specifier: ^1.4.0 - version: 1.4.0(@opentelemetry/api@1.9.0) + '@vercel/global-config': + specifier: ^1.4.3 + version: 1.4.3(@opentelemetry/api@1.9.0)(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) '@vercel/otel': specifier: ^1.11.0 version: 1.11.0(@opentelemetry/api@1.9.0)(@opentelemetry/resources@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-metrics@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0)) @@ -434,19 +434,19 @@ packages: resolution: {integrity: sha512-5UxZqiAgLYGFjS4s9qm5mBVo433u+dSPUFWVWXmLAD4wB65oMCoXaJP1KJa9DIYYMeHu3z4BZcStG3LC593cWA==} engines: {node: '>=14'} peerDependencies: - '@opentelemetry/api': 1.9.0 + '@opentelemetry/api': '>=1.0.0 <1.10.0' '@opentelemetry/sdk-metrics@1.30.1': resolution: {integrity: sha512-q9zcZ0Okl8jRgmy7eNW3Ku1XSgg3sDLa5evHZpCwjspw7E8Is4K/haRPDJrBcX3YSn/Y7gUvFnByNYEKQNbNog==} engines: {node: '>=14'} peerDependencies: - '@opentelemetry/api': 1.9.0 + '@opentelemetry/api': '>=1.3.0 <1.10.0' '@opentelemetry/sdk-trace-base@1.30.1': resolution: {integrity: sha512-jVPgBbH1gCy2Lb7X0AVQ8XAfgg0pJ4nvl8/IiQA6nxOsPvS+0zMJaFSs2ltXe0J6C8dqjcnpyqINDJmU30+uOg==} engines: {node: '>=14'} peerDependencies: - '@opentelemetry/api': 1.9.0 + '@opentelemetry/api': '>=1.0.0 <1.10.0' '@opentelemetry/semantic-conventions@1.28.0': resolution: {integrity: sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==} @@ -843,6 +843,18 @@ packages: '@opentelemetry/api': optional: true + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} + engines: {node: '>=14.6'} + peerDependencies: + '@opentelemetry/api': ^1.7.0 + next: '>=1' + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + next: + optional: true + '@vercel/microfrontends@1.0.0': resolution: {integrity: sha512-83ikhvV/k9F48zu/J7KtIi6ly1hZ5vSAosBBdkb9hmFgz8iL7iifjEpNp9cREjYa/8hajpbuVhqzsL23Cc+70Q==} hasBin: true @@ -3043,6 +3055,13 @@ snapshots: optionalDependencies: '@opentelemetry/api': 1.9.0 + '@vercel/global-config@1.4.3(@opentelemetry/api@1.9.0)(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + dependencies: + '@vercel/edge-config-fs': 0.1.0 + optionalDependencies: + '@opentelemetry/api': 1.9.0 + next: 16.0.10(@opentelemetry/api@1.9.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@vercel/microfrontends@1.0.0(next@16.0.10(@opentelemetry/api@1.9.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: ajv: 8.17.1 diff --git a/flags-sdk/launchdarkly/README.md b/flags-sdk/launchdarkly/README.md index 4b5dc855b1..ff78b599a7 100644 --- a/flags-sdk/launchdarkly/README.md +++ b/flags-sdk/launchdarkly/README.md @@ -25,7 +25,7 @@ The easiest way to get started with LaunchDarkly is through the native integrati [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fflags-sdk%2Flaunchdarkly&env=FLAGS_SECRET&envDescription=The+FLAGS_SECRET+will+be+used+by+the+Flags+Explorer+to+securely+overwrite+feature+flags.+Must+be+32+random+bytes%2C+base64-encoded.+Use+the+generated+value+or+set+your+own.&envLink=https%3A%2F%2Fvercel.com%2Fdocs%2Fworkflow-collaboration%2Ffeature-flags%2Fsupporting-feature-flags%23flags_secret-environment-variable&project-name=launchdarkly-flags-sdk&repository-name=launchdarkly-flags-sdk&products=%5B%7B%22integrationSlug%22%3A%22launchdarkly%22%2C%22productSlug%22%3A%22launchdarkly%22%2C%22type%22%3A%22integration%22%2C%22protocol%22%3A%22experimentation%22%7D%5D) -When installing the LaunchDarkly integration from the Vercel Marketplace, turn on the **Enable Edge Config Syncing** toggle in the "Configuration and Plan" step of the install process. This provisions an Edge Config and exposes its connection string as the `EXPERIMENTATION_CONFIG` environment variable, which LaunchDarkly syncs your flags into. The `@flags-sdk/launchdarkly` adapter (v1.0.0+) reads this variable by default. +When installing the LaunchDarkly integration from the Vercel Marketplace, turn on the **Enable Global Config Syncing** toggle in the "Configuration and Plan" step of the install process. This provisions a Global Config and exposes its connection string as the `EXPERIMENTATION_CONFIG` environment variable, which LaunchDarkly syncs your flags into. The `@flags-sdk/launchdarkly` adapter (v1.0.0+) reads this variable by default. ### Step 1: Link the project @@ -92,7 +92,7 @@ After that, start the Experiment. See `.env.example` for a template. - [`FLAGS_SECRET`](https://vercel.com/docs/feature-flags/flags-explorer/reference#flags_secret-environment-variable) -- `EXPERIMENTATION_CONFIG` (Edge Config connection string, exposed by the LaunchDarkly Marketplace integration when you turn on **Enable Edge Config Syncing** during install) +- `EXPERIMENTATION_CONFIG` (Global Config connection string, exposed by the LaunchDarkly Marketplace integration when you turn on **Enable Global Config Syncing** during install) - `LAUNCHDARKLY_PROJECT_SLUG` - `LAUNCHDARKLY_CLIENT_SIDE_ID` - `NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_SIDE_ID` (set to same value as `LAUNCHDARKLY_CLIENT_SIDE_ID`) diff --git a/flags-sdk/launchdarkly/package.json b/flags-sdk/launchdarkly/package.json index b015d40704..f29b3d7e64 100644 --- a/flags-sdk/launchdarkly/package.json +++ b/flags-sdk/launchdarkly/package.json @@ -17,7 +17,7 @@ "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", "@vercel/edge": "1.2.1", - "@vercel/edge-config": "1.4.3", + "@vercel/global-config": "1.4.3", "@vercel/toolbar": "0.1.33", "clsx": "2.1.1", "flags": "^4.0.0", diff --git a/flags-sdk/launchdarkly/pnpm-lock.yaml b/flags-sdk/launchdarkly/pnpm-lock.yaml index ce62a4355b..c36176088b 100644 --- a/flags-sdk/launchdarkly/pnpm-lock.yaml +++ b/flags-sdk/launchdarkly/pnpm-lock.yaml @@ -32,7 +32,7 @@ importers: '@vercel/edge': specifier: 1.2.1 version: 1.2.1 - '@vercel/edge-config': + '@vercel/global-config': specifier: 1.4.3 version: 1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) '@vercel/toolbar': @@ -754,6 +754,18 @@ packages: '@vercel/edge@1.2.1': resolution: {integrity: sha512-1++yncEyIAi68D3UEOlytYb1IUcIulMWdoSzX2h9LuSeeyR7JtaIgR8DcTQ6+DmYOQn+5MCh6LY+UmK6QBByNA==} + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} + engines: {node: '>=14.6'} + peerDependencies: + '@opentelemetry/api': ^1.7.0 + next: '>=1' + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + next: + optional: true + '@vercel/microfrontends@1.0.0': resolution: {integrity: sha512-83ikhvV/k9F48zu/J7KtIi6ly1hZ5vSAosBBdkb9hmFgz8iL7iifjEpNp9cREjYa/8hajpbuVhqzsL23Cc+70Q==} hasBin: true @@ -2840,6 +2852,12 @@ snapshots: '@vercel/edge@1.2.1': {} + '@vercel/global-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + dependencies: + '@vercel/edge-config-fs': 0.1.0 + optionalDependencies: + next: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@vercel/microfrontends@1.0.0(@vercel/analytics@1.5.0(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: ajv: 8.17.1 diff --git a/flags-sdk/posthog/package.json b/flags-sdk/posthog/package.json index c41618c428..3bd5ac4341 100644 --- a/flags-sdk/posthog/package.json +++ b/flags-sdk/posthog/package.json @@ -17,7 +17,7 @@ "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", "@vercel/edge": "1.2.1", - "@vercel/edge-config": "1.4.3", + "@vercel/global-config": "1.4.3", "@vercel/toolbar": "0.1.33", "clsx": "2.1.1", "flags": "^4.0.2", diff --git a/flags-sdk/posthog/pnpm-lock.yaml b/flags-sdk/posthog/pnpm-lock.yaml index c64ab41364..df15ba282b 100644 --- a/flags-sdk/posthog/pnpm-lock.yaml +++ b/flags-sdk/posthog/pnpm-lock.yaml @@ -32,7 +32,7 @@ importers: '@vercel/edge': specifier: 1.2.1 version: 1.2.1 - '@vercel/edge-config': + '@vercel/global-config': specifier: 1.4.3 version: 1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) '@vercel/toolbar': @@ -715,6 +715,18 @@ packages: '@vercel/edge@1.2.1': resolution: {integrity: sha512-1++yncEyIAi68D3UEOlytYb1IUcIulMWdoSzX2h9LuSeeyR7JtaIgR8DcTQ6+DmYOQn+5MCh6LY+UmK6QBByNA==} + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} + engines: {node: '>=14.6'} + peerDependencies: + '@opentelemetry/api': ^1.7.0 + next: '>=1' + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + next: + optional: true + '@vercel/microfrontends@1.0.0': resolution: {integrity: sha512-83ikhvV/k9F48zu/J7KtIi6ly1hZ5vSAosBBdkb9hmFgz8iL7iifjEpNp9cREjYa/8hajpbuVhqzsL23Cc+70Q==} hasBin: true @@ -2767,6 +2779,12 @@ snapshots: '@vercel/edge@1.2.1': {} + '@vercel/global-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + dependencies: + '@vercel/edge-config-fs': 0.1.0 + optionalDependencies: + next: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) + '@vercel/microfrontends@1.0.0(@vercel/analytics@1.5.0(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: ajv: 8.17.1 diff --git a/flags-sdk/reflag/package.json b/flags-sdk/reflag/package.json index 721ad21bbb..c8ce0a6405 100644 --- a/flags-sdk/reflag/package.json +++ b/flags-sdk/reflag/package.json @@ -17,7 +17,7 @@ "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", "@vercel/edge": "1.2.1", - "@vercel/edge-config": "1.4.3", + "@vercel/global-config": "1.4.3", "@vercel/toolbar": "0.1.33", "clsx": "2.1.1", "flags": "^4.0.1", diff --git a/flags-sdk/reflag/pnpm-lock.yaml b/flags-sdk/reflag/pnpm-lock.yaml index 3c03fe9809..dc75c5965a 100644 --- a/flags-sdk/reflag/pnpm-lock.yaml +++ b/flags-sdk/reflag/pnpm-lock.yaml @@ -32,7 +32,7 @@ importers: '@vercel/edge': specifier: 1.2.1 version: 1.2.1 - '@vercel/edge-config': + '@vercel/global-config': specifier: 1.4.3 version: 1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3)) '@vercel/toolbar': @@ -706,8 +706,11 @@ packages: '@vercel/edge-config-fs@0.1.0': resolution: {integrity: sha512-NRIBwfcS0bUoUbRWlNGetqjvLSwgYH/BqKqDN7vK1g32p7dN96k0712COgaz6VFizAm9b0g6IG6hR6+hc0KCPg==} - '@vercel/edge-config@1.4.3': - resolution: {integrity: sha512-8vTDATodRrH49wMzKEjZ8/5H2qs1aPkD0uRK585f/Fx4YN2wfHfY/3td9OFrh+gdnCq07z8A5f0hoY6xhBcPkg==} + '@vercel/edge@1.2.1': + resolution: {integrity: sha512-1++yncEyIAi68D3UEOlytYb1IUcIulMWdoSzX2h9LuSeeyR7JtaIgR8DcTQ6+DmYOQn+5MCh6LY+UmK6QBByNA==} + + '@vercel/global-config@1.4.3': + resolution: {integrity: sha512-IH0qScChzEgto5qmG/jMPQmJmmDWua5UZQqNu40zAZ5Y9ray+gFQzox4/FTFWthIycVxDwGfshNKH4AX4+lcDQ==} engines: {node: '>=14.6'} peerDependencies: '@opentelemetry/api': ^1.7.0 @@ -718,9 +721,6 @@ packages: next: optional: true - '@vercel/edge@1.2.1': - resolution: {integrity: sha512-1++yncEyIAi68D3UEOlytYb1IUcIulMWdoSzX2h9LuSeeyR7JtaIgR8DcTQ6+DmYOQn+5MCh6LY+UmK6QBByNA==} - '@vercel/microfrontends@1.0.0': resolution: {integrity: sha512-83ikhvV/k9F48zu/J7KtIi6ly1hZ5vSAosBBdkb9hmFgz8iL7iifjEpNp9cREjYa/8hajpbuVhqzsL23Cc+70Q==} hasBin: true @@ -2738,14 +2738,14 @@ snapshots: '@vercel/edge-config-fs@0.1.0': {} - '@vercel/edge-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': + '@vercel/edge@1.2.1': {} + + '@vercel/global-config@1.4.3(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))': dependencies: '@vercel/edge-config-fs': 0.1.0 optionalDependencies: next: 16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - '@vercel/edge@1.2.1': {} - '@vercel/microfrontends@1.0.0(@vercel/analytics@1.5.0(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react@19.2.3))(next@16.0.10(react-dom@19.2.3(react@19.2.3))(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: ajv: 8.17.1 diff --git a/internal/fields.json b/internal/fields.json index ff7a5f19be..e00be6a351 100644 --- a/internal/fields.json +++ b/internal/fields.json @@ -106,7 +106,7 @@ "AI", "Edge Functions", "Edge Middleware", - "Edge Config", + "Global Config", "Portfolio", "Virtual Event", "SaaS", diff --git a/rust/wait-until/AGENTS.md b/rust/wait-until/AGENTS.md index 3f10b93946..cc39c38e1c 100644 --- a/rust/wait-until/AGENTS.md +++ b/rust/wait-until/AGENTS.md @@ -1,4 +1,5 @@ + ## Best practices for developing on Vercel These defaults are optimized for AI coding agents (and humans) working on apps that deploy to Vercel. @@ -14,7 +15,7 @@ These defaults are optimized for AI coding agents (and humans) working on apps t - Tune Fluid Compute knobs (e.g., `maxDuration`, memory/CPU) for long I/O-heavy calls (LLMs, APIs) - Use Runtime Cache for fast **regional** caching + tag invalidation (don't treat it as global KV) - Use Cron Jobs for schedules; cron runs in UTC and triggers your production URL via HTTP GET -- Use Vercel Blob for uploads/media; Use Edge Config for small, globally-read config +- Use Vercel Blob for uploads/media; Use Global Config for small, globally-read config - If Enable Deployment Protection is enabled, use a bypass secret to directly access them - Add OpenTelemetry via `@vercel/otel` on Node; don't expect OTEL support on the Edge runtime - Enable Web Analytics + Speed Insights early diff --git a/rust/websocket/AGENTS.md b/rust/websocket/AGENTS.md index 3f10b93946..cc39c38e1c 100644 --- a/rust/websocket/AGENTS.md +++ b/rust/websocket/AGENTS.md @@ -1,4 +1,5 @@ + ## Best practices for developing on Vercel These defaults are optimized for AI coding agents (and humans) working on apps that deploy to Vercel. @@ -14,7 +15,7 @@ These defaults are optimized for AI coding agents (and humans) working on apps t - Tune Fluid Compute knobs (e.g., `maxDuration`, memory/CPU) for long I/O-heavy calls (LLMs, APIs) - Use Runtime Cache for fast **regional** caching + tag invalidation (don't treat it as global KV) - Use Cron Jobs for schedules; cron runs in UTC and triggers your production URL via HTTP GET -- Use Vercel Blob for uploads/media; Use Edge Config for small, globally-read config +- Use Vercel Blob for uploads/media; Use Global Config for small, globally-read config - If Enable Deployment Protection is enabled, use a bypass secret to directly access them - Add OpenTelemetry via `@vercel/otel` on Node; don't expect OTEL support on the Edge runtime - Enable Web Analytics + Speed Insights early diff --git a/toolbar/toolbar-feature-flags-sveltekit/src/lib/flags.ts b/toolbar/toolbar-feature-flags-sveltekit/src/lib/flags.ts index 1446d54e3f..78950da0a0 100644 --- a/toolbar/toolbar-feature-flags-sveltekit/src/lib/flags.ts +++ b/toolbar/toolbar-feature-flags-sveltekit/src/lib/flags.ts @@ -9,7 +9,7 @@ export const svelteColor = flag({ decide(event) { // Very simple example to show how to use the URL to determine the flag. // In real live you would probably query an external source such as - // Vercel Edge Config (https://vercel.com/docs/storage/edge-config) + // Vercel Global Config (https://vercel.com/docs/storage/edge-config) return event.url.searchParams.has('svelteColor') }, }) From 1830ee7f361bb348432c0008e1dd6a29bd2ebeb3 Mon Sep 17 00:00:00 2001 From: Luis Meyer Date: Thu, 23 Jul 2026 13:04:16 +0200 Subject: [PATCH 2/2] Prepare examples for future Global Config phases (FLA-3104) Speculatively targets @vercel/global-config@1.5.0 (unreleased), renames EDGE_CONFIG* env vars to GLOBAL_CONFIG*, and switches the apple-store REST call to the not-yet-public /v1/global-config endpoint. These examples won't build/deploy until the corresponding platform phases (env var rename, public API route, 1.5.0 release) ship. Note: feature-flag-launchdarkly now fails tsc/next build type checking because @launchdarkly/vercel-server-sdk still depends on the old @vercel/edge-config internally, so its init() rejects a @vercel/global-config client (DeepReadonly structural mismatch). Left as-is per direction; needs a fix once LaunchDarkly's SDK updates its own dependency. --- edge-middleware/ab-testing-statsig/.env.example | 4 ++-- edge-middleware/ab-testing-statsig/README.md | 4 ++-- edge-middleware/ab-testing-statsig/middleware.ts | 4 ++-- edge-middleware/ab-testing-statsig/package.json | 2 +- .../feature-flag-apple-store/.env.example | 2 +- edge-middleware/feature-flag-apple-store/README.md | 6 +++--- .../feature-flag-apple-store/lib/feature-flags.ts | 14 +++++++------- .../feature-flag-apple-store/middleware.ts | 6 +++--- .../feature-flag-apple-store/package.json | 2 +- .../pages/missing-global-config.tsx | 2 +- edge-middleware/feature-flag-hypertune/README.md | 4 ++-- .../feature-flag-hypertune/app/layout.tsx | 2 +- .../feature-flag-hypertune/lib/getHypertune.ts | 6 +++--- .../feature-flag-hypertune/package.json | 2 +- .../feature-flag-launchdarkly/package.json | 2 +- edge-middleware/feature-flag-split/.env.example | 8 ++++---- edge-middleware/feature-flag-split/README.md | 4 ++-- edge-middleware/feature-flag-split/app/layout.tsx | 2 +- .../app/missing-global-config/page.tsx | 4 ++-- .../app/missing-split-item/page.tsx | 14 +++++++------- edge-middleware/feature-flag-split/lib/split.ts | 4 ++-- edge-middleware/feature-flag-split/middleware.ts | 4 ++-- edge-middleware/feature-flag-split/package.json | 2 +- edge-middleware/maintenance-page/.env.example | 2 +- edge-middleware/maintenance-page/README.md | 6 +++--- edge-middleware/maintenance-page/middleware.ts | 4 ++-- edge-middleware/maintenance-page/package.json | 2 +- .../pages/missing-global-config.tsx | 2 +- flags-sdk/experimentation-statsig/package.json | 2 +- flags-sdk/flagsmith/package.json | 2 +- flags-sdk/growthbook/package.json | 2 +- flags-sdk/hypertune/.env.example | 2 +- flags-sdk/hypertune/package.json | 2 +- flags-sdk/launchdarkly/package.json | 2 +- flags-sdk/posthog/package.json | 2 +- flags-sdk/reflag/package.json | 2 +- 36 files changed, 68 insertions(+), 68 deletions(-) diff --git a/edge-middleware/ab-testing-statsig/.env.example b/edge-middleware/ab-testing-statsig/.env.example index 42826ba10c..5d01f860a6 100644 --- a/edge-middleware/ab-testing-statsig/.env.example +++ b/edge-middleware/ab-testing-statsig/.env.example @@ -1,5 +1,5 @@ -EDGE_CONFIG= -EDGE_CONFIG_ITEM_KEY= +GLOBAL_CONFIG= +GLOBAL_CONFIG_ITEM_KEY= STATSIG_SERVER_API_KEY= STATSIG_CONSOLE_API_KEY= NEXT_PUBLIC_STATSIG_CLIENT_KEY= \ No newline at end of file diff --git a/edge-middleware/ab-testing-statsig/README.md b/edge-middleware/ab-testing-statsig/README.md index 0a842a43a3..69f8fc5ada 100644 --- a/edge-middleware/ab-testing-statsig/README.md +++ b/edge-middleware/ab-testing-statsig/README.md @@ -8,7 +8,7 @@ useCase: - Edge Middleware - Documentation css: Tailwind -deployUrl: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Fab-testing-statsig&project-name=ab-testing-statsig&repository-name=ab-testing-statsig&integration-ids=oac_NAO87zzp3ADxj2ZUh3vikLip&env=STATSIG_SERVER_API_KEY,NEXT_PUBLIC_STATSIG_CLIENT_KEY,STATSIG_CONSOLE_API_KEY,EDGE_CONFIG,EDGE_CONFIG_ITEM_KEY&envDescription=Statsig%20API%20keys%20and%20Global%20Config%20settings&envLink=https%3A%2F%2Fdocs.statsig.com%2Fguides%2Ffirst-feature +deployUrl: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Fab-testing-statsig&project-name=ab-testing-statsig&repository-name=ab-testing-statsig&integration-ids=oac_NAO87zzp3ADxj2ZUh3vikLip&env=STATSIG_SERVER_API_KEY,NEXT_PUBLIC_STATSIG_CLIENT_KEY,STATSIG_CONSOLE_API_KEY,GLOBAL_CONFIG,GLOBAL_CONFIG_ITEM_KEY&envDescription=Statsig%20API%20keys%20and%20Global%20Config%20settings&envLink=https%3A%2F%2Fdocs.statsig.com%2Fguides%2Ffirst-feature demoUrl: https://edge-ab-testing-statsig.vercel.app relatedTemplates: - ab-testing-google-optimize @@ -31,7 +31,7 @@ You can choose from one of the following two methods to use this repository: Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples): -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Fab-testing-statsig&project-name=ab-testing-statsig&repository-name=ab-testing-statsig&integration-ids=oac_NAO87zzp3ADxj2ZUh3vikLip&env=STATSIG_SERVER_API_KEY,NEXT_PUBLIC_STATSIG_CLIENT_KEY,STATSIG_CONSOLE_API_KEY,EDGE_CONFIG,EDGE_CONFIG_ITEM_KEY&envDescription=Statsig%20API%20keys%20and%20Global%20Config%20settings&envLink=https%3A%2F%2Fdocs.statsig.com%2Fguides%2Ffirst-feature) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Fab-testing-statsig&project-name=ab-testing-statsig&repository-name=ab-testing-statsig&integration-ids=oac_NAO87zzp3ADxj2ZUh3vikLip&env=STATSIG_SERVER_API_KEY,NEXT_PUBLIC_STATSIG_CLIENT_KEY,STATSIG_CONSOLE_API_KEY,GLOBAL_CONFIG,GLOBAL_CONFIG_ITEM_KEY&envDescription=Statsig%20API%20keys%20and%20Global%20Config%20settings&envLink=https%3A%2F%2Fdocs.statsig.com%2Fguides%2Ffirst-feature) ### Clone and Deploy diff --git a/edge-middleware/ab-testing-statsig/middleware.ts b/edge-middleware/ab-testing-statsig/middleware.ts index 2aa460f468..7cb7642cea 100644 --- a/edge-middleware/ab-testing-statsig/middleware.ts +++ b/edge-middleware/ab-testing-statsig/middleware.ts @@ -7,10 +7,10 @@ import { EXPERIMENT, UID_COOKIE, GROUP_PARAM_FALLBACK } from './lib/constants' // We'll use this to validate a random UUID const IS_UUID = /^[0-9a-f-]+$/i -const edgeConfigClient = createClient(process.env.EDGE_CONFIG) +const edgeConfigClient = createClient(process.env.GLOBAL_CONFIG) const dataAdapter = new EdgeConfigDataAdapter({ edgeConfigClient, - edgeConfigItemKey: process.env.EDGE_CONFIG_ITEM_KEY!, + edgeConfigItemKey: process.env.GLOBAL_CONFIG_ITEM_KEY!, }) export const config = { diff --git a/edge-middleware/ab-testing-statsig/package.json b/edge-middleware/ab-testing-statsig/package.json index e276ff4e79..c87ca0a14f 100644 --- a/edge-middleware/ab-testing-statsig/package.json +++ b/edge-middleware/ab-testing-statsig/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@vercel/global-config": "^1.4.3", + "@vercel/global-config": "^1.5.0", "@vercel/examples-ui": "^1.0.4", "js-cookie": "^3.0.1", "next": "^16.0.10", diff --git a/edge-middleware/feature-flag-apple-store/.env.example b/edge-middleware/feature-flag-apple-store/.env.example index 7bc7c0f17c..2d80e87415 100644 --- a/edge-middleware/feature-flag-apple-store/.env.example +++ b/edge-middleware/feature-flag-apple-store/.env.example @@ -1,3 +1,3 @@ -EDGE_CONFIG = +GLOBAL_CONFIG = TEAM_ID_VERCEL= AUTH_BEARER_TOKEN= diff --git a/edge-middleware/feature-flag-apple-store/README.md b/edge-middleware/feature-flag-apple-store/README.md index e2e36c1e6f..cbdcdab587 100644 --- a/edge-middleware/feature-flag-apple-store/README.md +++ b/edge-middleware/feature-flag-apple-store/README.md @@ -8,7 +8,7 @@ useCase: - Edge Middleware - Global Config css: Tailwind -deployUrl: 'https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-apple-store&project-name=feature-flag-apple-store&repo-name=feature-flag-apple-store&env=EDGE_CONFIG&edge-config-stores=%7B%22EDGE_CONFIG%22%3A%7B%22featureFlagsAppleStore_storeClosed%22%3Atrue%7D%7D' +deployUrl: 'https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-apple-store&project-name=feature-flag-apple-store&repo-name=feature-flag-apple-store&env=GLOBAL_CONFIG&global-config-stores=%7B%22GLOBAL_CONFIG%22%3A%7B%22featureFlagsAppleStore_storeClosed%22%3Atrue%7D%7D' demoUrl: https://edge-functions-feature-flag-apple-store.vercel.app/ relatedTemplates: - maintenance-page @@ -32,7 +32,7 @@ You can choose from one of the following two methods to use this repository: Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples): -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-apple-store&project-name=feature-flag-apple-store&repo-name=feature-flag-apple-store&env=EDGE_CONFIG&edge-config-stores=%7B%22EDGE_CONFIG%22%3A%7B%22featureFlagsAppleStore_storeClosed%22%3Atrue%7D%7D) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-apple-store&project-name=feature-flag-apple-store&repo-name=feature-flag-apple-store&env=GLOBAL_CONFIG&global-config-stores=%7B%22GLOBAL_CONFIG%22%3A%7B%22featureFlagsAppleStore_storeClosed%22%3Atrue%7D%7D) ### Clone and Deploy @@ -50,7 +50,7 @@ Copy the `.env.example` file in this directory to `.env.local` (which will be ig cp .env.example .env.local ``` -This example requires you to set up a Global Config and store its connection string in the `EDGE_CONFIG` environment variable. +This example requires you to set up a Global Config and store its connection string in the `GLOBAL_CONFIG` environment variable. Fill the Global Config you create with this content: diff --git a/edge-middleware/feature-flag-apple-store/lib/feature-flags.ts b/edge-middleware/feature-flag-apple-store/lib/feature-flags.ts index 41ba64cd0c..831f415de8 100644 --- a/edge-middleware/feature-flag-apple-store/lib/feature-flags.ts +++ b/edge-middleware/feature-flag-apple-store/lib/feature-flags.ts @@ -9,7 +9,7 @@ const prefixKey = (key: string) => `featureFlagsAppleStore_${key}` export async function get(key: keyof FeatureFlags) { const prefixedKey = prefixKey(key) - const edgeConfig = createClient(process.env.EDGE_CONFIG) + const edgeConfig = createClient(process.env.GLOBAL_CONFIG) const featureFlag = await edgeConfig.get(prefixedKey) return featureFlag } @@ -18,22 +18,22 @@ export async function set(key: keyof FeatureFlags, value: boolean) { if (!process.env.AUTH_BEARER_TOKEN) { throw new Error('Missing Environment Variable AUTH_BEARER_TOKEN') } - if (!process.env.EDGE_CONFIG) { - throw new Error('Missing Environment Variable EDGE_CONFIG') + if (!process.env.GLOBAL_CONFIG) { + throw new Error('Missing Environment Variable GLOBAL_CONFIG') } - const connectionString = parseConnectionString(process.env.EDGE_CONFIG!) + const connectionString = parseConnectionString(process.env.GLOBAL_CONFIG!) if (!connectionString) { throw new Error( - 'Could not parse connection string stored in EDGE_CONFIG environment variable' + 'Could not parse connection string stored in GLOBAL_CONFIG environment variable' ) } - const edgeConfigId = connectionString.id + const globalConfigId = connectionString.id const prefixedKey = prefixKey(key) const response = await fetch( - `https://api.vercel.com/v1/edge-config/${edgeConfigId}/items?teamId=${process.env.TEAM_ID_VERCEL}`, + `https://api.vercel.com/v1/global-config/${globalConfigId}/items?teamId=${process.env.TEAM_ID_VERCEL}`, { method: 'PATCH', headers: { diff --git a/edge-middleware/feature-flag-apple-store/middleware.ts b/edge-middleware/feature-flag-apple-store/middleware.ts index 3614ab5bcb..597994cfea 100644 --- a/edge-middleware/feature-flag-apple-store/middleware.ts +++ b/edge-middleware/feature-flag-apple-store/middleware.ts @@ -7,10 +7,10 @@ export const config = { } export async function middleware(req: NextRequest) { - // for demo purposes, warn when there is no EDGE_CONFIG + // for demo purposes, warn when there is no GLOBAL_CONFIG if ( - !process.env.EDGE_CONFIG || - !parseConnectionString(process.env.EDGE_CONFIG) + !process.env.GLOBAL_CONFIG || + !parseConnectionString(process.env.GLOBAL_CONFIG) ) { req.nextUrl.pathname = '/missing-global-config' return NextResponse.rewrite(req.nextUrl) diff --git a/edge-middleware/feature-flag-apple-store/package.json b/edge-middleware/feature-flag-apple-store/package.json index b359a29a0b..cbc64ba515 100644 --- a/edge-middleware/feature-flag-apple-store/package.json +++ b/edge-middleware/feature-flag-apple-store/package.json @@ -10,7 +10,7 @@ "start": "next start" }, "dependencies": { - "@vercel/global-config": "^1.4.3", + "@vercel/global-config": "^1.5.0", "next": "^16.0.10", "react": "^19.2.1", "react-dom": "^19.2.1" diff --git a/edge-middleware/feature-flag-apple-store/pages/missing-global-config.tsx b/edge-middleware/feature-flag-apple-store/pages/missing-global-config.tsx index 258f08671b..ea0962b0d5 100644 --- a/edge-middleware/feature-flag-apple-store/pages/missing-global-config.tsx +++ b/edge-middleware/feature-flag-apple-store/pages/missing-global-config.tsx @@ -45,7 +45,7 @@ export default function MissingGlobalConfigDialog() { Create a Global Config and connect it to this project and store its connection string under the{' '} - EDGE_CONFIG + GLOBAL_CONFIG {' '} environment variable
    2. diff --git a/edge-middleware/feature-flag-hypertune/README.md b/edge-middleware/feature-flag-hypertune/README.md index 76505e066d..c094b7755b 100644 --- a/edge-middleware/feature-flag-hypertune/README.md +++ b/edge-middleware/feature-flag-hypertune/README.md @@ -5,7 +5,7 @@ description: Learn to use Hypertune, a powerful feature flag, A/B testing, analy framework: Next.js useCase: Edge Middleware css: Tailwind -deployUrl: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhypertunehq%2Fvercel-examples-fork%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-hypertune&env=NEXT_PUBLIC_HYPERTUNE_TOKEN,HYPERTUNE_ADMIN_TOKEN,EDGE_CONFIG,EDGE_CONFIG_HYPERTUNE_ITEM_KEY,FLAGS_SECRET&envDescription=Environment%20variables%20needed%20to%20use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&envLink=https%3A%2F%2Fdocs.hypertune.com%2Fgetting-started%2Fvercel-quickstart&project-name=feature-flag-hypertune&repository-name=feature-flag-hypertune&demo-title=Hypertune%20with%20Vercel&demo-description=Use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&demo-url=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2F&demo-image=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2Fdemo.png&integration-ids=oac_naLXREDG2o9KihTGYBVz9fVl +deployUrl: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhypertunehq%2Fvercel-examples-fork%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-hypertune&env=NEXT_PUBLIC_HYPERTUNE_TOKEN,HYPERTUNE_ADMIN_TOKEN,GLOBAL_CONFIG,GLOBAL_CONFIG_HYPERTUNE_ITEM_KEY,FLAGS_SECRET&envDescription=Environment%20variables%20needed%20to%20use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&envLink=https%3A%2F%2Fdocs.hypertune.com%2Fgetting-started%2Fvercel-quickstart&project-name=feature-flag-hypertune&repository-name=feature-flag-hypertune&demo-title=Hypertune%20with%20Vercel&demo-description=Use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&demo-url=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2F&demo-image=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2Fdemo.png&integration-ids=oac_naLXREDG2o9KihTGYBVz9fVl demoUrl: https://feature-flag-hypertune.vercel.app relatedTemplates: - maintenance-page @@ -30,7 +30,7 @@ It also shows how to integrate Hypertune with Vercel's Flags SDK to use the Verc Deploy this example with Vercel in one click: -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhypertunehq%2Fvercel-examples-fork%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-hypertune&env=NEXT_PUBLIC_HYPERTUNE_TOKEN,HYPERTUNE_ADMIN_TOKEN,EDGE_CONFIG,EDGE_CONFIG_HYPERTUNE_ITEM_KEY,FLAGS_SECRET&envDescription=Environment%20variables%20needed%20to%20use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&envLink=https%3A%2F%2Fdocs.hypertune.com%2Fgetting-started%2Fvercel-quickstart&project-name=feature-flag-hypertune&repository-name=feature-flag-hypertune&demo-title=Hypertune%20with%20Vercel&demo-description=Use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&demo-url=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2F&demo-image=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2Fdemo.png&integration-ids=oac_naLXREDG2o9KihTGYBVz9fVl) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhypertunehq%2Fvercel-examples-fork%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-hypertune&env=NEXT_PUBLIC_HYPERTUNE_TOKEN,HYPERTUNE_ADMIN_TOKEN,GLOBAL_CONFIG,GLOBAL_CONFIG_HYPERTUNE_ITEM_KEY,FLAGS_SECRET&envDescription=Environment%20variables%20needed%20to%20use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&envLink=https%3A%2F%2Fdocs.hypertune.com%2Fgetting-started%2Fvercel-quickstart&project-name=feature-flag-hypertune&repository-name=feature-flag-hypertune&demo-title=Hypertune%20with%20Vercel&demo-description=Use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&demo-url=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2F&demo-image=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2Fdemo.png&integration-ids=oac_naLXREDG2o9KihTGYBVz9fVl) You'll be guided through installing the [Hypertune Vercel integration](https://vercel.com/integrations/hypertune) and setting up the required environment variables. diff --git a/edge-middleware/feature-flag-hypertune/app/layout.tsx b/edge-middleware/feature-flag-hypertune/app/layout.tsx index c60a4bbd51..81f81f2103 100644 --- a/edge-middleware/feature-flag-hypertune/app/layout.tsx +++ b/edge-middleware/feature-flag-hypertune/app/layout.tsx @@ -34,7 +34,7 @@ export default async function RootLayout({ path="edge-middleware/feature-flag-hypertune" deployButton={{ customDeployUrl: - 'https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhypertunehq%2Fvercel-examples-fork%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-hypertune&env=NEXT_PUBLIC_HYPERTUNE_TOKEN,HYPERTUNE_ADMIN_TOKEN,EDGE_CONFIG,EDGE_CONFIG_HYPERTUNE_ITEM_KEY,FLAGS_SECRET&envDescription=Environment%20variables%20needed%20to%20use%20Hypertune%20with%20Vercel%20Edge%20Config%20and%20the%20Vercel%20Toolbar&envLink=https%3A%2F%2Fdocs.hypertune.com%2Fgetting-started%2Fvercel-quickstart&project-name=feature-flag-hypertune&repository-name=feature-flag-hypertune&demo-title=Hypertune%20with%20Vercel&demo-description=Use%20Hypertune%20with%20Vercel%20Edge%20Config%20and%20the%20Vercel%20Toolbar&demo-url=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2F&demo-image=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2Fdemo.png&integration-ids=oac_naLXREDG2o9KihTGYBVz9fVl', + 'https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhypertunehq%2Fvercel-examples-fork%2Ftree%2Fmain%2Fedge-middleware%2Ffeature-flag-hypertune&env=NEXT_PUBLIC_HYPERTUNE_TOKEN,HYPERTUNE_ADMIN_TOKEN,GLOBAL_CONFIG,GLOBAL_CONFIG_HYPERTUNE_ITEM_KEY,FLAGS_SECRET&envDescription=Environment%20variables%20needed%20to%20use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&envLink=https%3A%2F%2Fdocs.hypertune.com%2Fgetting-started%2Fvercel-quickstart&project-name=feature-flag-hypertune&repository-name=feature-flag-hypertune&demo-title=Hypertune%20with%20Vercel&demo-description=Use%20Hypertune%20with%20Vercel%20Global%20Config%20and%20the%20Vercel%20Toolbar&demo-url=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2F&demo-image=https%3A%2F%2Ffeature-flag-hypertune.vercel.app%2Fdemo.png&integration-ids=oac_naLXREDG2o9KihTGYBVz9fVl', }} > {children} diff --git a/edge-middleware/feature-flag-hypertune/lib/getHypertune.ts b/edge-middleware/feature-flag-hypertune/lib/getHypertune.ts index a106531eda..b757adf81f 100644 --- a/edge-middleware/feature-flag-hypertune/lib/getHypertune.ts +++ b/edge-middleware/feature-flag-hypertune/lib/getHypertune.ts @@ -10,10 +10,10 @@ import { getVercelOverride } from '../generated/hypertune.vercel' const hypertuneSource = createSource({ token: process.env.NEXT_PUBLIC_HYPERTUNE_TOKEN!, initDataProvider: - process.env.EDGE_CONFIG && process.env.EDGE_CONFIG_HYPERTUNE_ITEM_KEY + process.env.GLOBAL_CONFIG && process.env.GLOBAL_CONFIG_HYPERTUNE_ITEM_KEY ? new VercelEdgeConfigInitDataProvider({ - edgeConfigClient: createClient(process.env.EDGE_CONFIG), - itemKey: process.env.EDGE_CONFIG_HYPERTUNE_ITEM_KEY, + edgeConfigClient: createClient(process.env.GLOBAL_CONFIG), + itemKey: process.env.GLOBAL_CONFIG_HYPERTUNE_ITEM_KEY, }) : undefined, }) diff --git a/edge-middleware/feature-flag-hypertune/package.json b/edge-middleware/feature-flag-hypertune/package.json index 5165af6da9..0f0c9d19c5 100644 --- a/edge-middleware/feature-flag-hypertune/package.json +++ b/edge-middleware/feature-flag-hypertune/package.json @@ -11,7 +11,7 @@ "lint": "next lint" }, "dependencies": { - "@vercel/global-config": "^1.4.3", + "@vercel/global-config": "^1.5.0", "@vercel/examples-ui": "^2.0.4", "@vercel/flags": "2.5.1", "@vercel/toolbar": "^0.1.15", diff --git a/edge-middleware/feature-flag-launchdarkly/package.json b/edge-middleware/feature-flag-launchdarkly/package.json index 6f04d12e93..48e4740c73 100644 --- a/edge-middleware/feature-flag-launchdarkly/package.json +++ b/edge-middleware/feature-flag-launchdarkly/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@launchdarkly/vercel-server-sdk": "^1.3.3", - "@vercel/global-config": "^1.4.3", + "@vercel/global-config": "^1.5.0", "@vercel/examples-ui": "^2.0.4", "next": "^16.2.0", "react": "^19.2.1", diff --git a/edge-middleware/feature-flag-split/.env.example b/edge-middleware/feature-flag-split/.env.example index 194c7ff17a..8e6df4691c 100644 --- a/edge-middleware/feature-flag-split/.env.example +++ b/edge-middleware/feature-flag-split/.env.example @@ -1,7 +1,7 @@ # This is the SDK key (aka client-side key) that matches your environment id SPLIT_SDK_CLIENT_API_KEY= -# This is the connection string for the Edge Config the Split.io integration syncs its values into -EDGE_CONFIG= -# This is the key under which the Split.io integration syncs its values into Edge Config +# This is the connection string for the Global Config the Split.io integration syncs its values into +GLOBAL_CONFIG= +# This is the key under which the Split.io integration syncs its values into Global Config # You can find it on the "Configure" page of your Split.io integration installation on vercel.com -EDGE_CONFIG_SPLIT_ITEM_KEY= +GLOBAL_CONFIG_SPLIT_ITEM_KEY= diff --git a/edge-middleware/feature-flag-split/README.md b/edge-middleware/feature-flag-split/README.md index 670615c077..d0a086ab41 100644 --- a/edge-middleware/feature-flag-split/README.md +++ b/edge-middleware/feature-flag-split/README.md @@ -5,7 +5,7 @@ description: Learn to use Split, a feature delivery platform that powers feature framework: Next.js useCase: Edge Middleware css: Tailwind -deployUrl: https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/edge-middleware/feature-flag-split&env=SPLIT_SDK_CLIENT_API_KEY,EDGE_CONFIG,EDGE_CONFIG_SPLIT_ITEM_KEY&project-name=feature-flag-split&repository-name=feature-flag-split&integration-ids=oac_bic40oWF5k9pDFboJhKYqMd1&edge-config-stores=%7B%22EDGE_CONFIG%22%3A%7B%7D%7D +deployUrl: https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/edge-middleware/feature-flag-split&env=SPLIT_SDK_CLIENT_API_KEY,GLOBAL_CONFIG,GLOBAL_CONFIG_SPLIT_ITEM_KEY&project-name=feature-flag-split&repository-name=feature-flag-split&integration-ids=oac_bic40oWF5k9pDFboJhKYqMd1&global-config-stores=%7B%22GLOBAL_CONFIG%22%3A%7B%7D%7D demoUrl: https://ab-testing-split.vercel.app relatedTemplates: - maintenance-page @@ -28,7 +28,7 @@ You can choose from one of the following two methods to use this repository: Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme): -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/edge-middleware/feature-flag-split&env=SPLIT_SDK_CLIENT_API_KEY,EDGE_CONFIG,EDGE_CONFIG_SPLIT_ITEM_KEY&project-name=feature-flag-split&repository-name=feature-flag-split&integration-ids=oac_bic40oWF5k9pDFboJhKYqMd1&edge-config-stores=%7B%22EDGE_CONFIG%22%3A%7B%7D%7D) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/edge-middleware/feature-flag-split&env=SPLIT_SDK_CLIENT_API_KEY,GLOBAL_CONFIG,GLOBAL_CONFIG_SPLIT_ITEM_KEY&project-name=feature-flag-split&repository-name=feature-flag-split&integration-ids=oac_bic40oWF5k9pDFboJhKYqMd1&global-config-stores=%7B%22GLOBAL_CONFIG%22%3A%7B%7D%7D) ### Clone and Deploy diff --git a/edge-middleware/feature-flag-split/app/layout.tsx b/edge-middleware/feature-flag-split/app/layout.tsx index 0ad343fe66..aa8c4a85dc 100644 --- a/edge-middleware/feature-flag-split/app/layout.tsx +++ b/edge-middleware/feature-flag-split/app/layout.tsx @@ -15,7 +15,7 @@ export default function RootLayout({ children }: { children: ReactNode }) { path="edge-middleware/feature-flag-split" deployButton={{ customDeployUrl: - 'https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/edge-middleware/feature-flag-split&env=SPLIT_SDK_CLIENT_API_KEY,EDGE_CONFIG,EDGE_CONFIG_SPLIT_ITEM_KEY&project-name=feature-flag-split&repository-name=feature-flag-split&integration-ids=oac_bic40oWF5k9pDFboJhKYqMd1&edge-config-stores=%7B%22EDGE_CONFIG%22%3A%7B%7D%7D', + 'https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/edge-middleware/feature-flag-split&env=SPLIT_SDK_CLIENT_API_KEY,GLOBAL_CONFIG,GLOBAL_CONFIG_SPLIT_ITEM_KEY&project-name=feature-flag-split&repository-name=feature-flag-split&integration-ids=oac_bic40oWF5k9pDFboJhKYqMd1&global-config-stores=%7B%22GLOBAL_CONFIG%22%3A%7B%7D%7D', }} > {children} diff --git a/edge-middleware/feature-flag-split/app/missing-global-config/page.tsx b/edge-middleware/feature-flag-split/app/missing-global-config/page.tsx index 6ab880ebed..2036fd9796 100644 --- a/edge-middleware/feature-flag-split/app/missing-global-config/page.tsx +++ b/edge-middleware/feature-flag-split/app/missing-global-config/page.tsx @@ -51,14 +51,14 @@ export default function MissingGlobalConfigDialog() { Create a Global Config and connect it to this project and store its connection string under the{' '} - EDGE_CONFIG + GLOBAL_CONFIG {' '} environment variable
    3. Ensure you have the{' '} - EDGE_CONFIG_SPLIT_ITEM_KEY + GLOBAL_CONFIG_SPLIT_ITEM_KEY {' '} environment variable configured and it contains the item key as specified by the Split integration. You can find diff --git a/edge-middleware/feature-flag-split/app/missing-split-item/page.tsx b/edge-middleware/feature-flag-split/app/missing-split-item/page.tsx index 278a90adf8..89daf3941f 100644 --- a/edge-middleware/feature-flag-split/app/missing-split-item/page.tsx +++ b/edge-middleware/feature-flag-split/app/missing-split-item/page.tsx @@ -73,7 +73,7 @@ export default function MissingSplitItemDialog() {
    4. Ensure you have the{' '} - EDGE_CONFIG_SPLIT_ITEM_KEY + GLOBAL_CONFIG_SPLIT_ITEM_KEY {' '} environment variable configured and it contains the item key as specified by the Split integration. You can find @@ -85,13 +85,13 @@ export default function MissingSplitItemDialog() { data. Check whether your Global Config contains a key called{' '} - {process.env.EDGE_CONFIG_SPLIT_ITEM_KEY} + {process.env.GLOBAL_CONFIG_SPLIT_ITEM_KEY} - , as defined by the EDGE_CONFIG_SPLIT_ITEM_KEY environment - variable. If it does not contain such a key, you can go to - Split and make a change to a feature flag. This causes the - integration to resync. You should then see the value in - your Global Config. + , as defined by the GLOBAL_CONFIG_SPLIT_ITEM_KEY + environment variable. If it does not contain such a key, + you can go to Split and make a change to a feature flag. + This causes the integration to resync. You should then see + the value in your Global Config.
    5. Pull your latest Environment Variables if you are diff --git a/edge-middleware/feature-flag-split/lib/split.ts b/edge-middleware/feature-flag-split/lib/split.ts index 645d3e6241..44915cc9a4 100644 --- a/edge-middleware/feature-flag-split/lib/split.ts +++ b/edge-middleware/feature-flag-split/lib/split.ts @@ -6,7 +6,7 @@ import { import { EdgeConfigWrapper } from '@splitsoftware/vercel-integration-utils' import { createClient } from '@vercel/global-config' -const edgeConfigClient = createClient(process.env.EDGE_CONFIG) +const edgeConfigClient = createClient(process.env.GLOBAL_CONFIG) export async function createSplitClient(userKey: string) { const client = SplitFactory({ @@ -18,7 +18,7 @@ export async function createSplitClient(userKey: string) { storage: PluggableStorage({ wrapper: EdgeConfigWrapper({ // The Global Config item where Split stores feature flag definitions, specified in the Split integration step - edgeConfigItemKey: process.env.EDGE_CONFIG_SPLIT_ITEM_KEY!, + edgeConfigItemKey: process.env.GLOBAL_CONFIG_SPLIT_ITEM_KEY!, edgeConfig: edgeConfigClient, }), }), diff --git a/edge-middleware/feature-flag-split/middleware.ts b/edge-middleware/feature-flag-split/middleware.ts index a6a2f9d716..3141391285 100644 --- a/edge-middleware/feature-flag-split/middleware.ts +++ b/edge-middleware/feature-flag-split/middleware.ts @@ -11,12 +11,12 @@ export const config = { } export async function middleware(req: NextRequest) { - if (!process.env.EDGE_CONFIG || !process.env.EDGE_CONFIG_SPLIT_ITEM_KEY) { + if (!process.env.GLOBAL_CONFIG || !process.env.GLOBAL_CONFIG_SPLIT_ITEM_KEY) { req.nextUrl.pathname = `/missing-global-config` return NextResponse.rewrite(req.nextUrl) } - if (!(await has(process.env.EDGE_CONFIG_SPLIT_ITEM_KEY))) { + if (!(await has(process.env.GLOBAL_CONFIG_SPLIT_ITEM_KEY))) { req.nextUrl.pathname = `/missing-split-item` return NextResponse.rewrite(req.nextUrl) } diff --git a/edge-middleware/feature-flag-split/package.json b/edge-middleware/feature-flag-split/package.json index 6a6d938cea..32871af90e 100644 --- a/edge-middleware/feature-flag-split/package.json +++ b/edge-middleware/feature-flag-split/package.json @@ -12,7 +12,7 @@ "dependencies": { "@splitsoftware/splitio-browserjs": "^0.9.6", "@splitsoftware/vercel-integration-utils": "1.0.1", - "@vercel/global-config": "^1.4.3", + "@vercel/global-config": "^1.5.0", "@vercel/examples-ui": "^2.0.1", "js-cookie": "^3.0.5", "next": "^16.0.10", diff --git a/edge-middleware/maintenance-page/.env.example b/edge-middleware/maintenance-page/.env.example index 96e6d200ba..2d7950ae39 100644 --- a/edge-middleware/maintenance-page/.env.example +++ b/edge-middleware/maintenance-page/.env.example @@ -1 +1 @@ -EDGE_CONFIG = +GLOBAL_CONFIG = diff --git a/edge-middleware/maintenance-page/README.md b/edge-middleware/maintenance-page/README.md index fe9054db84..658f3b242b 100644 --- a/edge-middleware/maintenance-page/README.md +++ b/edge-middleware/maintenance-page/README.md @@ -7,7 +7,7 @@ useCase: - Edge Middleware - Global Config css: Tailwind -deployUrl: 'https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Fmaintenance-page&project-name=maintenance-page&repo-name=maintenance-page&env=EDGE_CONFIG&edge-config-stores=%7B%22EDGE_CONFIG%22%3A%7B%22isInMaintenanceMode%22%3Atrue%7D%7D' +deployUrl: 'https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Fmaintenance-page&project-name=maintenance-page&repo-name=maintenance-page&env=GLOBAL_CONFIG&global-config-stores=%7B%22GLOBAL_CONFIG%22%3A%7B%22isInMaintenanceMode%22%3Atrue%7D%7D' demoUrl: https://edge-maintenance-page.vercel.app/ relatedTemplates: - feature-flag-apple-store @@ -30,7 +30,7 @@ You can choose from one of the following two methods to use this repository: Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples): -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/examples/tree/main/edge-middleware/maintenance-page&project-name=maintenance-page&repository-name=maintenance-page&env=EDGE_CONFIG&edge-config-stores=%7B%22EDGE_CONFIG%22%3A%7B%22isInMaintenanceMode%22%3Atrue%7D%7D) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/examples/tree/main/edge-middleware/maintenance-page&project-name=maintenance-page&repository-name=maintenance-page&env=GLOBAL_CONFIG&global-config-stores=%7B%22GLOBAL_CONFIG%22%3A%7B%22isInMaintenanceMode%22%3Atrue%7D%7D) ### Clone and Deploy @@ -48,7 +48,7 @@ Copy the `.env.example` file in this directory to `.env.local` (which will be ig cp .env.example .env.local ``` -This example requires you to set up a Global Config and store its connection string in the `EDGE_CONFIG` environment variable. Fill the Global Config you create with this content: +This example requires you to set up a Global Config and store its connection string in the `GLOBAL_CONFIG` environment variable. Fill the Global Config you create with this content: ```json { "isInMaintenanceMode": true } diff --git a/edge-middleware/maintenance-page/middleware.ts b/edge-middleware/maintenance-page/middleware.ts index e06d7fd5e1..fc96cd9674 100644 --- a/edge-middleware/maintenance-page/middleware.ts +++ b/edge-middleware/maintenance-page/middleware.ts @@ -6,7 +6,7 @@ export const config = { } export async function middleware(req: NextRequest) { - if (!process.env.EDGE_CONFIG) { + if (!process.env.GLOBAL_CONFIG) { req.nextUrl.pathname = `/missing-global-config` return NextResponse.rewrite(req.nextUrl) } @@ -23,7 +23,7 @@ export async function middleware(req: NextRequest) { return NextResponse.rewrite(req.nextUrl) } } catch (error) { - // show the default page if EDGE_CONFIG env var is missing, + // show the default page if GLOBAL_CONFIG env var is missing, // but log the error to the console console.error(error) } diff --git a/edge-middleware/maintenance-page/package.json b/edge-middleware/maintenance-page/package.json index 03fbecaf92..a55675bac8 100644 --- a/edge-middleware/maintenance-page/package.json +++ b/edge-middleware/maintenance-page/package.json @@ -10,7 +10,7 @@ "lint": "next lint" }, "dependencies": { - "@vercel/global-config": "^1.4.3", + "@vercel/global-config": "^1.5.0", "@vercel/examples-ui": "^1.0.5", "next": "^16.0.10", "react": "^19.2.1", diff --git a/edge-middleware/maintenance-page/pages/missing-global-config.tsx b/edge-middleware/maintenance-page/pages/missing-global-config.tsx index 29b35885b6..2c605bb17c 100644 --- a/edge-middleware/maintenance-page/pages/missing-global-config.tsx +++ b/edge-middleware/maintenance-page/pages/missing-global-config.tsx @@ -45,7 +45,7 @@ export default function MissingGlobalConfigDialog() { Create a Global Config and connect it to this project and store its connection string under the{' '} - EDGE_CONFIG + GLOBAL_CONFIG {' '} environment variable
    6. diff --git a/flags-sdk/experimentation-statsig/package.json b/flags-sdk/experimentation-statsig/package.json index 625cce798a..c2570dbc40 100644 --- a/flags-sdk/experimentation-statsig/package.json +++ b/flags-sdk/experimentation-statsig/package.json @@ -19,7 +19,7 @@ "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", "@vercel/edge": "1.2.1", - "@vercel/global-config": "1.4.3", + "@vercel/global-config": "1.5.0", "@vercel/toolbar": "0.1.33", "motion": "12.17.0", "clsx": "2.1.1", diff --git a/flags-sdk/flagsmith/package.json b/flags-sdk/flagsmith/package.json index 14d129c987..4fdb53a347 100644 --- a/flags-sdk/flagsmith/package.json +++ b/flags-sdk/flagsmith/package.json @@ -17,7 +17,7 @@ "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", "@vercel/edge": "1.2.1", - "@vercel/global-config": "1.4.3", + "@vercel/global-config": "1.5.0", "@vercel/toolbar": "0.1.33", "clsx": "2.1.1", "flags": "^4.0.1", diff --git a/flags-sdk/growthbook/package.json b/flags-sdk/growthbook/package.json index a9ca2299af..e948b4fdf3 100644 --- a/flags-sdk/growthbook/package.json +++ b/flags-sdk/growthbook/package.json @@ -18,7 +18,7 @@ "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", "@vercel/edge": "1.2.1", - "@vercel/global-config": "1.4.3", + "@vercel/global-config": "1.5.0", "@vercel/toolbar": "0.1.33", "motion": "12.17.0", "clsx": "2.1.1", diff --git a/flags-sdk/hypertune/.env.example b/flags-sdk/hypertune/.env.example index 36d8ae8477..22812a7e09 100644 --- a/flags-sdk/hypertune/.env.example +++ b/flags-sdk/hypertune/.env.example @@ -4,6 +4,6 @@ FLAGS_SECRET=ReplaceThisWith32RandomBytesBase64UrlString # Hypertune NEXT_PUBLIC_HYPERTUNE_TOKEN="92abefboijasdfklaoibwefoi8312noninaociweowe=" -# Optional Edge Config details +# Optional Global Config details EXPERIMENTATION_CONFIG_ITEM_KEY="hypertune_99999" EXPERIMENTATION_CONFIG="https://edge-config.vercel.com/ecfg_xyz?token=abc" \ No newline at end of file diff --git a/flags-sdk/hypertune/package.json b/flags-sdk/hypertune/package.json index 7e5c354cc4..0b9a411dac 100644 --- a/flags-sdk/hypertune/package.json +++ b/flags-sdk/hypertune/package.json @@ -17,7 +17,7 @@ "@tailwindcss/forms": "0.5.10", "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", - "@vercel/global-config": "^1.4.3", + "@vercel/global-config": "^1.5.0", "@vercel/otel": "^1.11.0", "@vercel/toolbar": "0.1.33", "clsx": "2.1.1", diff --git a/flags-sdk/launchdarkly/package.json b/flags-sdk/launchdarkly/package.json index f29b3d7e64..db87bcf994 100644 --- a/flags-sdk/launchdarkly/package.json +++ b/flags-sdk/launchdarkly/package.json @@ -17,7 +17,7 @@ "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", "@vercel/edge": "1.2.1", - "@vercel/global-config": "1.4.3", + "@vercel/global-config": "1.5.0", "@vercel/toolbar": "0.1.33", "clsx": "2.1.1", "flags": "^4.0.0", diff --git a/flags-sdk/posthog/package.json b/flags-sdk/posthog/package.json index 3bd5ac4341..af03bf9362 100644 --- a/flags-sdk/posthog/package.json +++ b/flags-sdk/posthog/package.json @@ -17,7 +17,7 @@ "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", "@vercel/edge": "1.2.1", - "@vercel/global-config": "1.4.3", + "@vercel/global-config": "1.5.0", "@vercel/toolbar": "0.1.33", "clsx": "2.1.1", "flags": "^4.0.2", diff --git a/flags-sdk/reflag/package.json b/flags-sdk/reflag/package.json index c8ce0a6405..9b6af7e663 100644 --- a/flags-sdk/reflag/package.json +++ b/flags-sdk/reflag/package.json @@ -17,7 +17,7 @@ "@tailwindcss/postcss": "^4.0.8", "@tailwindcss/typography": "0.5.16", "@vercel/edge": "1.2.1", - "@vercel/global-config": "1.4.3", + "@vercel/global-config": "1.5.0", "@vercel/toolbar": "0.1.33", "clsx": "2.1.1", "flags": "^4.0.1",