-
Notifications
You must be signed in to change notification settings - Fork 3
feat!: add region parameter #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for blobs-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@github-actions
github-actions
bot
added
the
type: feature
code contributing to the implementation of a feature and/or user facing functionality
label
Jul 3, 2024
JGAntunes
JGAntunes
approved these changes
Jul 3, 2024
serhalp
added a commit
to serhalp/unstorage
that referenced
this pull request
Sep 15, 2024
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 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which problem is this pull request solving?
In #158, we've added experimental support for configurable regions to deploy-scoped stores (i.e. stores created with
getDeployStore()
). It works as follows:getDeployStore({ experimentalRegion: "auto" })
to instruct the API to choose the same region as the one configured for functionsgetDeployStore({ experimentalRegion: "context" })
to instruct the CDN to choose the region defined in the environmentThis PR introduces the following changes:
experimentalRegion
parameter is removedregion
parameter is added to thegetDeployStore
method, which takes the name of a regionregion
parameter, that will be usedauto
region
parameter, that will be usedTechnically, this is a breaking change because
getDeployStore()
now selects the functions region by default instead of the default region, accessing the same store using different versions of the Blobs client might generate different reasons, since they may be pointing to different regions.Should you want to update your Blobs client but keep accessing a deploy-scoped store that has been created with an older version, you can use
getDeployStore({ region: "us-east-2" })
to ensure you're using the right region.