Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add vercel-kv driver #213

Merged
merged 18 commits into from
May 5, 2023
Merged

feat: add vercel-kv driver #213

merged 18 commits into from
May 5, 2023

Conversation

danielroe
Copy link
Member

This adds a new driver (based on the redis driver) for the Vercel KV store.

See https://vercel.com/docs/storage/vercel-kv for an implementation

For a demo, see https://github.com/danielroe/vercel-kv, and you can hit https://vercel-kv.vercel.app/api/kv for a response rendered using the KV store.

@danielroe danielroe added enhancement New feature or request driver labels May 2, 2023
@danielroe danielroe requested a review from pi0 May 2, 2023 14:02
@danielroe danielroe self-assigned this May 2, 2023
@nuxt-studio
Copy link

nuxt-studio bot commented May 2, 2023

Live Preview ready!

Name Edit Preview Latest Commit
unstorage Edit on Studio ↗︎ View Live Preview 252fbe0

@codecov
Copy link

codecov bot commented May 2, 2023

Codecov Report

Merging #213 (d812f1d) into main (305472c) will increase coverage by 0.19%.
The diff coverage is 100.00%.

❗ Current head d812f1d differs from pull request most recent head 252fbe0. Consider uploading reports for the commit 252fbe0 to get more accurate results

@@            Coverage Diff             @@
##             main     #213      +/-   ##
==========================================
+ Coverage   80.36%   80.56%   +0.19%     
==========================================
  Files          24       24              
  Lines        2633     2634       +1     
  Branches      462      443      -19     
==========================================
+ Hits         2116     2122       +6     
+ Misses        516      511       -5     
  Partials        1        1              
Impacted Files Coverage Δ
src/index.ts 100.00% <100.00%> (+3.57%) ⬆️

... and 3 files with indirect coverage changes

src/drivers/vercel-kv.ts Outdated Show resolved Hide resolved
src/drivers/vercel-kv.ts Show resolved Hide resolved
src/drivers/vercel-kv.ts Outdated Show resolved Hide resolved
src/drivers/vercel-kv.ts Outdated Show resolved Hide resolved
@pi0
Copy link
Member

pi0 commented May 2, 2023

Two more things:

  • There is a file listing supported drivers in src dir we shall include vercel for types and nitro support out of the box
  • Should we also introduce upstash in next steps as an standalone driver?

@danielroe
Copy link
Member Author

danielroe commented May 2, 2023

Should we also introduce upstash in next steps as an standalone driver?

great idea!

There is a file listing supported drivers in src dir we shall include vercel for types and nitro support out of the box

do you think we should add @vercel/kv dep to nitro directly?

Copy link

@Intevel Intevel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great - Good work on this 👯

@Intevel
Copy link

Intevel commented May 3, 2023

@danielroe What do you think about adding this to the Nuxt 3 Documentation? To the Vercel Deployment?

@pi0 pi0 merged commit 622011d into main May 5, 2023
@pi0 pi0 deleted the feat/vercel-kv branch May 5, 2023 06:30
@pi0
Copy link
Member

pi0 commented May 5, 2023

Driver tests to be added later (as well as upstash provider. they are almost identical!)

@pi0
Copy link
Member

pi0 commented May 5, 2023

Followup #218

@pi0 pi0 mentioned this pull request May 5, 2023
@Hebilicious Hebilicious mentioned this pull request Oct 9, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants