Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Refactor library public interface #87

Merged
merged 1 commit into from
Jan 27, 2021
Merged

Refactor library public interface #87

merged 1 commit into from
Jan 27, 2021

Conversation

paulomarg
Copy link
Contributor

WHY are these changes introduced?

As the code evolved along the project, we've made some changes that made some decisions on how things are exported less optimal. This PR aims to improve our public library, mainly to remove repetition in object layers and to hide session handling functions from Context behind their utils helpers.

WHAT is this pull request doing?

  • Changed the client 'namespace' from Shopify.Clients.Rest.RestClient() to Shopify.Clients.Rest()
  • Changed the session 'namespace' from Shopify.Auth.Session() to Shopify.Session()
  • Changed the OAuth 'namespace' from Shopify.Auth.OAuth to Shopify.Auth
  • Moved the Context functions loadSession, storeSession and deleteSession into a new folder auth/utils which is not exported, which forces apps to go through Shopify.Utils.loadCurrentSession(), Shopify.Utils.deleteCurrentSession() and a new Shopify.Utils.storeSession() which hold the logic for id management.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

@paulomarg paulomarg requested a review from a team as a code owner January 26, 2021 16:45
@paulomarg paulomarg force-pushed the refactor_exports branch 2 times, most recently from 7f0689c to 2e0ddde Compare January 26, 2021 16:55
@paulomarg
Copy link
Contributor Author

Thanks @thecodepixi. I'm also cc-ing the rest of the team here, I'm keen on getting as much feedback as I can on this one :)

@paulomarg paulomarg merged commit f789212 into main Jan 27, 2021
@paulomarg paulomarg deleted the refactor_exports branch January 27, 2021 19:11
@paulomarg paulomarg temporarily deployed to production January 27, 2021 19:19 Inactive
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants