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(pubsub): Vite build issues #10353

Merged
merged 2 commits into from
Sep 21, 2022

Conversation

stocaaro
Copy link
Member

@stocaaro stocaaro commented Sep 21, 2022

Description of changes

Short: This fixes refactors imports to remove all potential for import cycles

Long: Vite uses a different build process that is more sensitive to dependency cycles. In this case, I'm relatively confident that the problem was introduced with how the ConnectionState enum was accessed in ConnectionStateMonitor.ts, however having failed to root out all of the issues once, I've gone through to change the import structure to ensure that there are no import cycles in the package.

Issue #, if available

#10287
#10341

Description of how you validated changes

I have reproduction apps with both React and Vue. For both, I verified the issue before:

  • linking in my update package
  • removing all vite precomilation artifacts
  • restarting the server
rm -rf node_modules/.vite/deps && yarn dev

Checklist

  • PR description included
  • yarn test passes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@stocaaro stocaaro requested review from a team as code owners September 21, 2022 14:39
@codecov-commenter
Copy link

Codecov Report

Merging #10353 (34eb9c1) into main (3798cea) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main   #10353   +/-   ##
=======================================
  Coverage   84.43%   84.43%           
=======================================
  Files         258      259    +1     
  Lines       18694    18695    +1     
  Branches     4019     4019           
=======================================
+ Hits        15784    15785    +1     
  Misses       2820     2820           
  Partials       90       90           
Impacted Files Coverage Δ
...ackages/pubsub/src/Providers/MqttOverWSProvider.ts 92.52% <ø> (ø)
packages/pubsub/src/Providers/PubSubProvider.ts 100.00% <ø> (ø)
packages/pubsub/src/types/index.ts 100.00% <ø> (ø)
.../src/Providers/AWSAppSyncRealTimeProvider/index.ts 95.86% <100.00%> (ø)
packages/pubsub/src/index.ts 100.00% <100.00%> (ø)
packages/pubsub/src/types/PubSub.ts 100.00% <100.00%> (ø)
...ackages/pubsub/src/utils/ConnectionStateMonitor.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@elorzafe elorzafe left a comment

Choose a reason for hiding this comment

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

Looks good to me

Thanks @stocaaro

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

Successfully merging this pull request may close these issues.

4 participants