-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(angular-query): move devtools to conditional sub-paths #9270
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
Open
arnoud-dv
wants to merge
11
commits into
TanStack:main
Choose a base branch
from
arnoud-dv:feature/angular-query-devtools-sub-path-imports
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(angular-query): move devtools to conditional sub-paths #9270
arnoud-dv
wants to merge
11
commits into
TanStack:main
from
arnoud-dv:feature/angular-query-devtools-sub-path-imports
+650
−703
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
View your CI Pipeline Execution ↗ for commit d6f6fa3.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9270 +/- ##
==========================================
+ Coverage 45.37% 45.61% +0.24%
==========================================
Files 207 211 +4
Lines 8276 8317 +41
Branches 1862 1873 +11
==========================================
+ Hits 3755 3794 +39
- Misses 4080 4082 +2
Partials 441 441 🚀 New features to boost your workflow:
|
… improves tree shaking and dependency injection
2cf432d
to
cd70269
Compare
…ry-devtools-sub-path-imports # Conflicts: # examples/angular/devtools-panel/package.json # packages/angular-query-devtools-experimental/package.json
…hub.com:arnoud-dv/query into feature/angular-query-devtools-sub-path-imports
c2ebe03
to
b724764
Compare
b724764
to
e9055fb
Compare
053d604
to
c2600eb
Compare
695d33a
to
d6f6fa3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
Improvements or additions to documentation
package: angular-query-devtools-experimental
package: angular-query-experimental
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Breaking changes
Import paths
withDevtools moved to subpath
Most applications, to completely tree shake devtools from production builds
If you want to also use devtools in production builds
injectDevtoolsPanel moved to main package
Most applications, to completely tree shake devtools panel from production builds
If you want to also use devtools panel in production builds
angular-query-devtools-experimental package
After moving injectDevtoolsPanel to the main package, the angular devtools package is obsolete.
Improvements and fixes
Subpath exports
Experience with subpath exports paves the way to add functionality such as RxJs integration without needing to have the whole Angular TanStack Query package depend on RxJs.
Isolating devtools to a subpath reliably fixes #9078, where esbuild was generating chunks even when devtools were not used at all. While these chunks were not adding to the main bundle size it unnecessarily increased build time and deployment size.
Conditional exports
The devtools subpath exports further utilize conditional exports. For development builds, the function is exported normally. For production builds a tiny stub function is exported, resulting in excellent tree shaking without having to configure environments.
Dependency injection in the devtools callback
Fixes #8824 After no longer running the options computation function in the injection context it was no longer possible to use dependency injection to inject values. The withDevtools function now has a
deps
option to automatically inject dependencies and pass it as a parameter to the computation function. This solves this issue while not injecting a value each time the computation function is run which would be the case if the function would run in the injection context. This is similar to and internally usesdeps
on Angular'suseFactory
.Adds a check if devtools were already provided
Fixes #8705