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

Fix circular imports. #1091

Closed
wants to merge 5 commits into from
Closed

Fix circular imports. #1091

wants to merge 5 commits into from

Conversation

wjhsf
Copy link
Contributor

@wjhsf wjhsf commented Mar 28, 2023

Description

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • (change1)

How to Test-Drive This PR

  • (step1)

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@wjhsf wjhsf requested a review from a team as a code owner March 28, 2023 16:23
@wjhsf wjhsf added the ready for review PR is ready to be reviewed label Mar 28, 2023
Copy link
Collaborator

@bfeister bfeister left a comment

Choose a reason for hiding this comment

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

Can we get a description of what this is doing? Specifically, did this manifest as an error? If yes, how and where?

@wjhsf
Copy link
Contributor Author

wjhsf commented Mar 31, 2023

This is just moving function definitions to avoid circular imports. It's just to make the imports cleaner, there aren't currently any errors.

kevinxh
kevinxh previously approved these changes Mar 31, 2023
@wjhsf wjhsf changed the base branch from develop to v3 April 4, 2023 15:02
@wjhsf wjhsf dismissed kevinxh’s stale review April 4, 2023 15:02

The base branch was changed.

@wjhsf wjhsf changed the base branch from v3 to develop April 4, 2023 15:04
* @param {string} url
* @returns {object} site - a site object
*/
export const resolveSiteFromUrl = (url) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

a bit of context: reason we put this func and resolvePathFromUrl is to have all the multi-site util in one single file

@@ -1,13 +1,14 @@
/*
Copy link
Collaborator

Choose a reason for hiding this comment

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

The functions in this file is to process the given url and return a new one while resolveSiteFromUrl and resolveLocaleFromUrl is the other way around which it looks into the given url, extract and return data. I don't think they belong here 🤔

@wjhsf
Copy link
Contributor Author

wjhsf commented Apr 14, 2023

Replaced by #1133.

@wjhsf wjhsf closed this Apr 18, 2023
@wjhsf wjhsf deleted the fix/circular-imports branch April 18, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants