diff --git a/package-lock.json b/package-lock.json index 880e471c1..8f26c0b71 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "devDependencies": { "@fastly/http-compute-js": "1.1.4", - "@netlify/blobs": "^7.4.0", + "@netlify/blobs": "^8.0.1", "@netlify/build": "^29.54.3", "@netlify/edge-bundler": "^12.2.3", "@netlify/edge-functions": "^2.10.0", @@ -3880,10 +3880,11 @@ "dev": true }, "node_modules/@netlify/blobs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-7.4.0.tgz", - "integrity": "sha512-7rdPzo8bggt3D2CVO+U1rmEtxxs8X7cLusDbHZRJaMlxqxBD05mXgThj5DUJMFOvmfVjhEH/S/3AyiLUbDQGDg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-8.0.1.tgz", + "integrity": "sha512-IrZHVqillU0x12eDbsap4Ba6poi+4IdVCYjZa+tA0eD95TaSbSqfw1zNkO27MiKw0pOjPB6+RXFK4pdfOs/qUQ==", "dev": true, + "license": "MIT", "engines": { "node": "^14.16.0 || >=16.0.0" } @@ -3969,6 +3970,16 @@ } } }, + "node_modules/@netlify/build/node_modules/@netlify/blobs": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-7.4.0.tgz", + "integrity": "sha512-7rdPzo8bggt3D2CVO+U1rmEtxxs8X7cLusDbHZRJaMlxqxBD05mXgThj5DUJMFOvmfVjhEH/S/3AyiLUbDQGDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.16.0 || >=16.0.0" + } + }, "node_modules/@netlify/build/node_modules/@netlify/opentelemetry-utils": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@netlify/opentelemetry-utils/-/opentelemetry-utils-1.2.1.tgz", @@ -22801,9 +22812,9 @@ "dev": true }, "@netlify/blobs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-7.4.0.tgz", - "integrity": "sha512-7rdPzo8bggt3D2CVO+U1rmEtxxs8X7cLusDbHZRJaMlxqxBD05mXgThj5DUJMFOvmfVjhEH/S/3AyiLUbDQGDg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-8.0.1.tgz", + "integrity": "sha512-IrZHVqillU0x12eDbsap4Ba6poi+4IdVCYjZa+tA0eD95TaSbSqfw1zNkO27MiKw0pOjPB6+RXFK4pdfOs/qUQ==", "dev": true }, "@netlify/build": { @@ -22872,6 +22883,12 @@ "yargs": "^17.6.0" }, "dependencies": { + "@netlify/blobs": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-7.4.0.tgz", + "integrity": "sha512-7rdPzo8bggt3D2CVO+U1rmEtxxs8X7cLusDbHZRJaMlxqxBD05mXgThj5DUJMFOvmfVjhEH/S/3AyiLUbDQGDg==", + "dev": true + }, "@netlify/opentelemetry-utils": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@netlify/opentelemetry-utils/-/opentelemetry-utils-1.2.1.tgz", diff --git a/package.json b/package.json index 768a54660..da01d4081 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "homepage": "https://github.com/netlify/next-runtime#readme", "devDependencies": { "@fastly/http-compute-js": "1.1.4", - "@netlify/blobs": "^7.4.0", + "@netlify/blobs": "^8.0.1", "@netlify/build": "^29.54.3", "@netlify/edge-bundler": "^12.2.3", "@netlify/edge-functions": "^2.10.0", diff --git a/src/build/plugin-context.ts b/src/build/plugin-context.ts index 9b0ecc199..e678cd936 100644 --- a/src/build/plugin-context.ts +++ b/src/build/plugin-context.ts @@ -153,10 +153,6 @@ export class PluginContext { } get useRegionalBlobs(): boolean { - if (!(this.featureFlags || {})['next-runtime-regional-blobs']) { - return false - } - // Region-aware blobs are only available as of CLI v17.23.5 (i.e. Build v29.41.5) const REQUIRED_BUILD_VERSION = '>=29.41.5' return satisfies(this.buildVersion, REQUIRED_BUILD_VERSION, { includePrerelease: true }) diff --git a/src/run/regional-blob-store.cts b/src/run/regional-blob-store.cts index 350237472..a524569cc 100644 --- a/src/run/regional-blob-store.cts +++ b/src/run/regional-blob-store.cts @@ -1,13 +1,11 @@ -import { getDeployStore, Store } from '@netlify/blobs' +import { getDeployStore, GetWithMetadataOptions, Store } from '@netlify/blobs' const fetchBeforeNextPatchedIt = globalThis.fetch -export const getRegionalBlobStore = (args: Parameters[0] = {}): Store => { - const options = typeof args === 'string' ? { name: args } : args +export const getRegionalBlobStore = (args: GetWithMetadataOptions = {}): Store => { return getDeployStore({ - ...options, + ...args, fetch: fetchBeforeNextPatchedIt, - experimentalRegion: - process.env.USE_REGIONAL_BLOBS?.toUpperCase() === 'TRUE' ? 'context' : undefined, + region: process.env.USE_REGIONAL_BLOBS?.toUpperCase() === 'TRUE' ? undefined : 'us-east-2', }) } diff --git a/tests/utils/helpers.ts b/tests/utils/helpers.ts index c9d6e4ae1..db6961734 100644 --- a/tests/utils/helpers.ts +++ b/tests/utils/helpers.ts @@ -59,7 +59,6 @@ export const startMockBlobStore = async (ctx: FixtureTestContext) => { ctx.blobStore = getDeployStore({ apiURL: `http://${ctx.blobStoreHost}`, deployID: ctx.deployID, - experimentalRegion: 'context', siteID: ctx.siteID, token: BLOB_TOKEN, }) @@ -74,7 +73,6 @@ export const getBlobEntries = async (ctx: FixtureTestContext) => { : getDeployStore({ apiURL: `http://${ctx.blobStoreHost}`, deployID: ctx.deployID, - experimentalRegion: 'context', siteID: ctx.siteID, token: BLOB_TOKEN, })