- 5fb6969: Make
@opentelemetry/api
optional and expose asetTracerProvider
function
- 78d5814: prevents having too many open connections
- 4e7e216: mark @opentelemetry/api as optional peer dependency
-
fcdc55e: - BREAKING CHANGE Return values are now read-only to improve in-memory caching
It used to be possible to change the returned value as shown in this example:
import { get } from '@vercel/edge-config'; const countries = await get('allowedCountryCodes'); countries.DE = true; // Will now cause TypeScript to error
Moving forward, modifications like the above will cause a type error.
If there is a need to modify the value, then the
clone
function can be used to clone the data and make it modifiable.import { get, clone } from '@vercel/edge-config'; const myArray = await get('listOfAllowedIPs'); const myArrayClone = clone(myArray); // Clones the data to make it modifiable myArrayClone.push('127.0.0.1'); // The `push` operation will work now
-
BREAKING CHANGE SDK now throws underlying errors
Previous versions of the
@vercel/edge-config
package would catch most errors thrown by native functions and throw a generic network error instead - even if the underlying issue wasn't a network error. The new version will throw the original errors.Note applications which rely on the
@vercel/edge-config: Unexpected error
and@vercel/edge-config: Network error
errors must adapt to the new implementation by ensuring other types of errors are handled as well. -
The SDK now uses stale-while-revalidate semantics during development
When
@vercel/edge-config
is used during development, withNODE_ENV
being set todevelopment
, any read operation will fetch the entire Edge Config once and keep it in-memory to quickly resolve all other read operations for other keys, without waiting for the network. Subsequent reads will update the in-memory data in the background.This behaviour can be disabled by setting the environment variable
EDGE_CONFIG_DISABLE_DEVELOPMENT_SWR
to1
, or by using thedisableDevelopmentCache
option on thecreateClient
function.
-
- 3105f2b: make parseConnectionString parse both internal and external connection strings
- d90e973: Removed
"types"
field from package.json to support"moduleResolution": "Node16"
- e01f1ef: add stale-if-error semantics
- cedd4b9: adds connection info to edge config clients
- 97a3d06: Add
x-edge-config-vercel-env
andx-edge-config-sdk
headers to requests
- 7944205: support third-party connection strings
- d224a2a: add JSDoc comments
- 490a976: internal rewrite - no functionality should have changed
- 282b5ee: work around an issue which prevented edge config from being read via async page components in app router on the nodejs runtime
- 282b5ee: work around an issue which prevented edge config from being read via async page components in app router on the nodejs runtime
- 490a976: internal rewrite - no functionality should have changed
- c4a8aa5: feat: Docs section for Vite environment config
- 1ade1f0: chore: Update package.json and licenses
- 7a3a45b: prevent has() from failing on subsequent invocations
- 7a3a45b: prevent has() from failing on subsequent invocations
- b8d26e9: read body to avoid memory leaks
- 523f7a7: accept interfaces as generic types of get and getAll
- becf6bf: add cache: no-store to fetch requests
- becf6bf: add cache: no-store to fetch requests
- af5f776: explicitly target edge-light runtime environment
- af5f776: explicitly target edge-light runtime environment
- 2df8aac: avoid reusing ReadableStream across request contexts
- 419c38e: adds an etag based cache to reduce latency and bandwidth
- 6047c1d: make
get()
andgetAll()
return type EdgeConfigValue instead of any, kudos @jzxhuang - 9aadcf8: upgrade dependencies
- 4f93dad: Removes main and module fields to force the use of the exports field
- 868f702: split bundles into edge-runtime and node
- 4f93dad: Removes main and module fields to force the use of the exports field
- 9aadcf8: upgrade dependencies
- 6047c1d: make
get()
andgetAll()
return type EdgeConfigValue instead of any, kudos @jzxhuang
- 868f702: split bundles into edge-runtime and node
- b870314: support calling getAll() without any arguments
If you were already on 0.1.0-canary.15 there are no breaking changes for you. This is an identical version, just without the canary tag.
-
578d34a: pass version via search param
-
b8ae62b: Allow reading embedded edge configs
-
edf1cc9: Add getAll() method
getAll()
allows fetching all items of an Edge ConfiggetAll(keys: string[])
allows fetching a subset of the Edge Config's items
Use
process.env.EDGE_CONFIG
instead ofprocess.env.VERCEL_EDGE_CONFIG
for the default Edge Config. -
888b861: drop cjs support
-
b614218: drop esm support
-
81bfed2: renamedcreateEdgeConfigClient to createClient
-
667c121: drop /config
- 5432011: add README
- 0c78c58: use URL instead of URLPattern to support node
- 311fedd: loosen edge config item value type to be "any"
- f5a7354: fix digest response body parsing as it has changed upstream
- 99ac8af: access edge config via renamed folder
- 85fb6ac: silence dependency expression warning
- a048274: export esm
- 264ab8d: Throw when attempting to read value of non-existing Edge Config
- 888b861: fix dynamic import by adding webpackIgnore comment
- 7cb351a: replace dynamic import with fs
- 5aabd54: make package publicly available again
- 0e79aa3: renames matchEdgeConfigConnectionString to parseConnectionString
- a048274: use dynamic import
- d0c55ee: add descriptive README
- 9bf7828: avoid build time warning aboud Node.js module being loaded when used in Next.js
- 5432011: add README
- f5a7354: fix digest response body parsing as it has changed upstream
- 0e79aa3: renames matchEdgeConfigConnectionString to parseConnectionString
- 667c121: drop /config
- 0c78c58: use URL instead of URLPattern to support node
- 578d34a: pass version via search param
- 81bfed2: renamedcreateEdgeConfigClient to createClient
- 99ac8af: access edge config via renamed folder
- 85fb6ac: silence dependency expression warning
- 9bf7828: avoid build time warning aboud Node.js module being loaded when used in Next.js
- 7cb351a: replace dynamic import with fs
- 888b861: drop cjs support
- 888b861: fix dynamic import by adding webpackIgnore comment
- a048274: export esm
- a048274: use dynamic import
- 311fedd: loosen edge config item value type to be "any"
- b614218: drop esm support
- 5aabd54: make package publicly available again
-
edf1cc9: Add getAll() method
getAll()
allows fetching all items of an Edge ConfiggetAll(keys: string[])
allows fetching a subset of the Edge Config's items
- 264ab8d: Throw when attempting to read value of non-existing Edge Config
- Allow reading embedded edge configs