diff --git a/package-lock.json b/package-lock.json index 5a8e42449a..a1b19cd87f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6466,9 +6466,9 @@ "license": "Apache 2" }, "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.1.1", + "resolved": "https://registry.npmjs.org/@netlify/blobs/-/blobs-8.1.1.tgz", + "integrity": "sha512-7Dg3PzArvQ0Owq4wpkLECC9iaDBOxuWUN2uwbQtUF6tZssyez2QN+eO0CjuIhhZUivbw+X9bwsyiEjWkdJnv/A==", "license": "MIT", "engines": { "node": "^14.16.0 || >=16.0.0" @@ -27907,7 +27907,7 @@ "license": "MIT", "dependencies": { "@bugsnag/js": "^7.0.0", - "@netlify/blobs": "^7.4.0", + "@netlify/blobs": "^8.1.1", "@netlify/cache-utils": "^5.2.0", "@netlify/config": "^21.0.3", "@netlify/edge-bundler": "12.3.3", diff --git a/packages/build/package.json b/packages/build/package.json index ca5d6e31f6..6f4a4bfd80 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -67,7 +67,7 @@ "license": "MIT", "dependencies": { "@bugsnag/js": "^7.0.0", - "@netlify/blobs": "^7.4.0", + "@netlify/blobs": "^8.1.1", "@netlify/cache-utils": "^5.2.0", "@netlify/config": "^21.0.3", "@netlify/edge-bundler": "12.3.3", diff --git a/packages/build/src/plugins_core/blobs_upload/index.ts b/packages/build/src/plugins_core/blobs_upload/index.ts index 7ee7596146..c453a5eece 100644 --- a/packages/build/src/plugins_core/blobs_upload/index.ts +++ b/packages/build/src/plugins_core/blobs_upload/index.ts @@ -50,8 +50,8 @@ const coreStep: CoreStepFunction = async function ({ // If using the deploy config API or the Frameworks API, configure the store // to use the region that was configured for the deploy. We don't do it for // the legacy file-based upload API since that would be a breaking change. - if (blobs.apiVersion > 1) { - storeOpts.experimentalRegion = 'auto' + if (blobs.apiVersion === 1) { + storeOpts.region = 'us-east-2' } const blobStore = getDeployStore(storeOpts) diff --git a/packages/build/src/plugins_core/dev_blobs_upload/index.ts b/packages/build/src/plugins_core/dev_blobs_upload/index.ts index 2b7a645067..83de5b4168 100644 --- a/packages/build/src/plugins_core/dev_blobs_upload/index.ts +++ b/packages/build/src/plugins_core/dev_blobs_upload/index.ts @@ -51,8 +51,8 @@ const coreStep: CoreStepFunction = async function ({ // If using the deploy config API or the Frameworks API, configure the store // to use the region that was configured for the deploy. We don't do it for // the legacy file-based upload API since that would be a breaking change. - if (blobs.apiVersion > 1) { - storeOpts.experimentalRegion = 'auto' + if (blobs.apiVersion === 1) { + storeOpts.region = 'us-east-2' } const blobStore = getDeployStore(storeOpts) diff --git a/packages/build/tests/blobs_upload/tests.js b/packages/build/tests/blobs_upload/tests.js index 16d1325d17..d4d95d776a 100644 --- a/packages/build/tests/blobs_upload/tests.js +++ b/packages/build/tests/blobs_upload/tests.js @@ -87,13 +87,13 @@ test.serial('Blobs upload step uploads files to deploy store (legacy API)', asyn t.true(success) t.is(t.context.blobRequests.set.length, 6) - const regionRequests = t.context.blobRequests.set.filter((urlPath) => { + const defaultRegionRequests = t.context.blobRequests.set.filter((urlPath) => { const url = new URL(urlPath, 'http://localhost') - return url.searchParams.has('region') + return url.searchParams.get('region') === 'us-east-2' }) - t.is(regionRequests.length, 0) + t.is(defaultRegionRequests.length, 3) const storeOpts = { deployID: 'abc123', siteID: 'test', token: TOKEN } if (semver.lt(nodeVersion, '18.0.0')) { @@ -125,13 +125,13 @@ test.serial('Blobs upload step uploads files to deploy store (legacy deploy conf t.true(success) t.is(t.context.blobRequests.set.length, 6) - const regionRequests = t.context.blobRequests.set.filter((urlPath) => { + const regionAutoRequests = t.context.blobRequests.set.filter((urlPath) => { const url = new URL(urlPath, 'http://localhost') - return url.searchParams.has('region') + return url.searchParams.get('region') === 'auto' }) - t.is(regionRequests.length, 3) + t.is(regionAutoRequests.length, 3) const storeOpts = { deployID: 'abc123', siteID: 'test', token: TOKEN } if (semver.lt(nodeVersion, '18.0.0')) {