Skip to content

Commit

Permalink
vercel kv exported as non-experimental (#372)
Browse files Browse the repository at this point in the history
* vercel kv exported as non-experimental

* deprecate old symbol

* remove not needed variable

* better deprecation

* restore required var

* docs
  • Loading branch information
lkostrowski authored Dec 17, 2024
1 parent 587553e commit 7e9b259
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-pans-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@saleor/app-sdk": minor
---

Added VercelKV APL. It provides out-of-the-box integration. See [docs](https://docs.saleor.io/developer/extending/apps/developing-apps/app-sdk/apl#vercelkvapl)
14 changes: 12 additions & 2 deletions src/APL/vercel-kv/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
// eslint-disable-next-line camelcase
export { VercelKvApl as _experimental_VercelKvApl } from "./vercel-kv-apl";
import { VercelKvApl } from "./vercel-kv-apl";

/**
* @deprecated - use VercelKvApl
*/
const _experimental_VercelKvApl = VercelKvApl;

export {
// TODO Remove in next minor
_experimental_VercelKvApl,
VercelKvApl,
};
2 changes: 1 addition & 1 deletion src/APL/vercel-kv/vercel-kv-apl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ export class VercelKvApl implements APL {

private envVariablesRequiredByKvExist() {
const variables = [
"KV_URL",
"KV_REST_API_URL",
"KV_REST_API_TOKEN",
"KV_REST_API_READ_ONLY_TOKEN",
"KV_STORAGE_NAMESPACE",
"KV_URL",
];

return variables.every((variable) => !!process.env[variable]);
Expand Down

0 comments on commit 7e9b259

Please sign in to comment.