Skip to content

Commit a71b6ce

Browse files
renovate[bot]mrstork
andauthoredMar 21, 2025··
fix(deps): update dependency @netlify/blobs to v8 (#5756)
* fix(deps): update dependency @netlify/blobs to v8 * chore: remove references to deprecated field * fix: force default region when using the legacy api * test: region is always set to auto in legacy deploy config api --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mateusz Bocian <mrstork@users.noreply.github.com>
1 parent 180306d commit a71b6ce

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed
 

‎package-lock.json

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

‎packages/build/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"license": "MIT",
6868
"dependencies": {
6969
"@bugsnag/js": "^7.0.0",
70-
"@netlify/blobs": "^7.4.0",
70+
"@netlify/blobs": "^8.1.1",
7171
"@netlify/cache-utils": "^5.2.0",
7272
"@netlify/config": "^21.0.3",
7373
"@netlify/edge-bundler": "12.3.3",

‎packages/build/src/plugins_core/blobs_upload/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ const coreStep: CoreStepFunction = async function ({
5050
// If using the deploy config API or the Frameworks API, configure the store
5151
// to use the region that was configured for the deploy. We don't do it for
5252
// the legacy file-based upload API since that would be a breaking change.
53-
if (blobs.apiVersion > 1) {
54-
storeOpts.experimentalRegion = 'auto'
53+
if (blobs.apiVersion === 1) {
54+
storeOpts.region = 'us-east-2'
5555
}
5656

5757
const blobStore = getDeployStore(storeOpts)

‎packages/build/src/plugins_core/dev_blobs_upload/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ const coreStep: CoreStepFunction = async function ({
5151
// If using the deploy config API or the Frameworks API, configure the store
5252
// to use the region that was configured for the deploy. We don't do it for
5353
// the legacy file-based upload API since that would be a breaking change.
54-
if (blobs.apiVersion > 1) {
55-
storeOpts.experimentalRegion = 'auto'
54+
if (blobs.apiVersion === 1) {
55+
storeOpts.region = 'us-east-2'
5656
}
5757

5858
const blobStore = getDeployStore(storeOpts)

‎packages/build/tests/blobs_upload/tests.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ test.serial('Blobs upload step uploads files to deploy store (legacy API)', asyn
8787
t.true(success)
8888
t.is(t.context.blobRequests.set.length, 6)
8989

90-
const regionRequests = t.context.blobRequests.set.filter((urlPath) => {
90+
const defaultRegionRequests = t.context.blobRequests.set.filter((urlPath) => {
9191
const url = new URL(urlPath, 'http://localhost')
9292

93-
return url.searchParams.has('region')
93+
return url.searchParams.get('region') === 'us-east-2'
9494
})
9595

96-
t.is(regionRequests.length, 0)
96+
t.is(defaultRegionRequests.length, 3)
9797

9898
const storeOpts = { deployID: 'abc123', siteID: 'test', token: TOKEN }
9999
if (semver.lt(nodeVersion, '18.0.0')) {
@@ -125,13 +125,13 @@ test.serial('Blobs upload step uploads files to deploy store (legacy deploy conf
125125
t.true(success)
126126
t.is(t.context.blobRequests.set.length, 6)
127127

128-
const regionRequests = t.context.blobRequests.set.filter((urlPath) => {
128+
const regionAutoRequests = t.context.blobRequests.set.filter((urlPath) => {
129129
const url = new URL(urlPath, 'http://localhost')
130130

131-
return url.searchParams.has('region')
131+
return url.searchParams.get('region') === 'auto'
132132
})
133133

134-
t.is(regionRequests.length, 3)
134+
t.is(regionAutoRequests.length, 3)
135135

136136
const storeOpts = { deployID: 'abc123', siteID: 'test', token: TOKEN }
137137
if (semver.lt(nodeVersion, '18.0.0')) {

0 commit comments

Comments
 (0)
Please sign in to comment.