Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

Commit dda35d5

Browse files
committed
chore(deps): support @netlify/blobs v8
The peer dependency only specifies support for v6 and v7, but v8 works just fine. This adds v8 to the peer dependencies, bumps the dev dep to v8, updates the tests (there's a new requirement that's specific to unusual use cases like unstorage's tests, which are run outside of the Netlify platform and the Netlify CLI), and adjust the driver types to ensure compatibility with all supported versions. See netlify/blobs#183. I believe @netlify/blobs@8 will error in local dev when using netlify-cli before 17.21.1. This doesn't seem like unstorage's problem though, so I didn't do anything about that here.
1 parent 3e9c499 commit dda35d5

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"@azure/storage-blob": "^12.24.0",
6565
"@capacitor/preferences": "^6.0.2",
6666
"@cloudflare/workers-types": "^4.20240903.0",
67-
"@netlify/blobs": "^7.4.0",
67+
"@netlify/blobs": "^8.0.1",
6868
"@planetscale/database": "^1.19.0",
6969
"@types/ioredis-mock": "^8.2.5",
7070
"@types/jsdom": "^21.1.7",
@@ -105,7 +105,7 @@
105105
"@azure/keyvault-secrets": "^4.8.0",
106106
"@azure/storage-blob": "^12.24.0",
107107
"@capacitor/preferences": "^6.0.2",
108-
"@netlify/blobs": "^6.5.0 || ^7.0.0",
108+
"@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.0.0",
109109
"@planetscale/database": "^1.19.0",
110110
"@upstash/redis": "^1.34.0",
111111
"@vercel/kv": "^1.0.1",

pnpm-lock.yaml

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/drivers/netlify-blobs.ts

+6
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,19 @@ export interface NetlifyDeployStoreOptions extends NetlifyBaseStoreOptions {
3333
deployID?: string;
3434
}
3535

36+
export interface NetlifyDeployStoreV8Options extends NetlifyDeployStoreOptions {
37+
// TODO(serhalp) Export this type from @netlify/blobs instead
38+
region?: "us-east-1" | "us-east-2";
39+
}
40+
3641
export interface NetlifyNamedStoreOptions extends NetlifyBaseStoreOptions {
3742
name: string;
3843
deployScoped?: false;
3944
}
4045

4146
export type NetlifyStoreOptions =
4247
| NetlifyDeployStoreOptions
48+
| NetlifyDeployStoreV8Options
4349
| NetlifyNamedStoreOptions;
4450

4551
export default defineDriver((options: NetlifyStoreOptions) => {

test/drivers/netlify-blobs.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ describe("drivers: netlify-blobs", async () => {
3939
token,
4040
siteID,
4141
deployID: "test",
42+
// Usually defaulted via the environment; only required in a test environment like this
43+
region: "us-east-1",
4244
}),
4345
});
4446

0 commit comments

Comments
 (0)