Skip to content
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

feat: add region-helper functionality #81

Merged
merged 11 commits into from
Mar 6, 2024

Conversation

BibiSebi
Copy link
Contributor

@BibiSebi BibiSebi commented Feb 27, 2024

This PR adds the new @storyblok/region-helper functionality and replaces the old way of managing the regions. This way there will be a single source of truth, which is the region-helper which will be consumed by other libraries and therefore will provide an easier and more stable way of dealing with regions.

Summary of additions:

  • replace old region functionality with region helper
  • workflow to check for region-helper version updates

Pull request type

Jira Link: EXT-2186

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Other (please describe):

How to test this PR

This change is not supposed to modify any behavior but as region is widely used throughout the project, many commands can be impacted by it. So, as far as I have mapped here, the following commands are the ones that should be validated:

  • Login with token
    • passing invalid region
    • passing valid region (check .netrc file to see if the persisted region is the correct one)
  • Login without token
    • passing invalid region
    • passing valid region (check .netrc file to see if the persisted region is the correct one)
  • Pull Languages
  • Pull Components
  • Push Components
  • Delete Component
  • Delete Datasources
  • Sync
  • Generate Migration
  • Run Migration
  • Rollback migration

So, for example, to test the login with token scenario, you should, from the root of the project, run:

yarn install
node . login --token <YOUR_TOKEN> --region eu

I've tested each of them and everything seemed to be working nicely, but a second view is always more than welcomed.

What is the new behavior?

@BibiSebi BibiSebi changed the title feat: add region-helper functionality and replace old region retrievi… feat: add region-helper functionality Feb 27, 2024
@demetriusfeijoo demetriusfeijoo marked this pull request as ready for review March 1, 2024 00:52
Copy link
Member

@ademarCardoso ademarCardoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's working very well, congratulations 🚀

@demetriusfeijoo demetriusfeijoo merged commit 7a0e234 into master Mar 6, 2024
1 check passed
@BibiSebi
Copy link
Contributor Author

BibiSebi commented Mar 6, 2024

@ademarCardoso thank you for your quick review, it is very much appreciated especially given that you are most likely very busy at the moment. If you have the time, would you please share some information on how to publish a new version of the CLI or what the release flow is?

Copy link

github-actions bot commented Mar 6, 2024

🎉 This PR is included in version 3.27.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@demetriusfeijoo
Copy link
Contributor

Hey @BibiSebi, it was released here: https://github.com/storyblok/storyblok-cli/releases/tag/v3.27.0

As soon as it got merged to the master branch, the release workflow was triggered.
This workflow uses a package called semantic-release which handles all the processes to release a new version. It only requires the commits to use a semantic versioning approach (which I didn't do 🤣).

But yeah, it's released 🙌

@ademarCardoso
Copy link
Member

@ademarCardoso thank you for your quick review, it is very much appreciated especially given that you are most likely very busy at the moment. If you have the time, would you please share some information on how to publish a new version of the CLI or what the release flow is?

@BibiSebi Ping me on slack and i can share all the things 😄 I Already talked with @demetriusfeijoo about that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants