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

refactor(store-devtools): resolve import cycle to improve tool compatibility #4662

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

raphinesse
Copy link

@raphinesse raphinesse commented Jan 7, 2025

This change resolves the cyclical import dependency store-devtools/src/{provide-store-devtools <-> instrument}.ts by moving createStateObservable to provide-store-devtools.ts, its only user.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

The import cycle breaks TS language tools/environments (e.g. Google's TS build) that don't support cyclical imports.

What is the new behavior?

Support TS language tools/environments that don't support cyclical imports.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Copy link

netlify bot commented Jan 7, 2025

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit d527427
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/67812d5534960100071d2ea5

@raphinesse raphinesse changed the title Resolve import cycle to improve tool compatibility refactor(store-devtools): resolve import cycle to improve tool compatibility Jan 7, 2025
@raphinesse raphinesse marked this pull request as ready for review January 7, 2025 18:07
Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, I left some comments

modules/store-devtools/src/provide-store-devtools.ts Outdated Show resolved Hide resolved
modules/store-devtools/src/provide-store-devtools.ts Outdated Show resolved Hide resolved
This change resolves the cyclical import dependency
`store-devtools/src/{provide-store-devtools <-> instrument}.ts` by
moving `createStateObservable` to `provide-store-devtools.ts`, its only
user.
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.

2 participants