Skip to content

Commit 0d2fad2

Browse files
authored
chore: upgrade to blobs v8 (#2595)
* chore: Upgrade blobs version to latest * chore: replace references to experimental region * fix: feature has been fully released and flag defaults to true
1 parent 4845302 commit 0d2fad2

File tree

5 files changed

+29
-20
lines changed

5 files changed

+29
-20
lines changed

package-lock.json

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

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"homepage": "https://github.com/netlify/next-runtime#readme",
5050
"devDependencies": {
5151
"@fastly/http-compute-js": "1.1.4",
52-
"@netlify/blobs": "^7.4.0",
52+
"@netlify/blobs": "^8.0.1",
5353
"@netlify/build": "^29.54.3",
5454
"@netlify/edge-bundler": "^12.2.3",
5555
"@netlify/edge-functions": "^2.10.0",

src/build/plugin-context.ts

-4
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,6 @@ export class PluginContext {
153153
}
154154

155155
get useRegionalBlobs(): boolean {
156-
if (!(this.featureFlags || {})['next-runtime-regional-blobs']) {
157-
return false
158-
}
159-
160156
// Region-aware blobs are only available as of CLI v17.23.5 (i.e. Build v29.41.5)
161157
const REQUIRED_BUILD_VERSION = '>=29.41.5'
162158
return satisfies(this.buildVersion, REQUIRED_BUILD_VERSION, { includePrerelease: true })

src/run/regional-blob-store.cts

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { getDeployStore, Store } from '@netlify/blobs'
1+
import { getDeployStore, GetWithMetadataOptions, Store } from '@netlify/blobs'
22

33
const fetchBeforeNextPatchedIt = globalThis.fetch
44

5-
export const getRegionalBlobStore = (args: Parameters<typeof getDeployStore>[0] = {}): Store => {
6-
const options = typeof args === 'string' ? { name: args } : args
5+
export const getRegionalBlobStore = (args: GetWithMetadataOptions = {}): Store => {
76
return getDeployStore({
8-
...options,
7+
...args,
98
fetch: fetchBeforeNextPatchedIt,
10-
experimentalRegion:
11-
process.env.USE_REGIONAL_BLOBS?.toUpperCase() === 'TRUE' ? 'context' : undefined,
9+
region: process.env.USE_REGIONAL_BLOBS?.toUpperCase() === 'TRUE' ? undefined : 'us-east-2',
1210
})
1311
}

tests/utils/helpers.ts

-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export const startMockBlobStore = async (ctx: FixtureTestContext) => {
5959
ctx.blobStore = getDeployStore({
6060
apiURL: `http://${ctx.blobStoreHost}`,
6161
deployID: ctx.deployID,
62-
experimentalRegion: 'context',
6362
siteID: ctx.siteID,
6463
token: BLOB_TOKEN,
6564
})
@@ -74,7 +73,6 @@ export const getBlobEntries = async (ctx: FixtureTestContext) => {
7473
: getDeployStore({
7574
apiURL: `http://${ctx.blobStoreHost}`,
7675
deployID: ctx.deployID,
77-
experimentalRegion: 'context',
7876
siteID: ctx.siteID,
7977
token: BLOB_TOKEN,
8078
})

0 commit comments

Comments
 (0)