Angular pre-release updates #10470
main fromrefs/pull/10470/head·opened View on GitHub🎯 Changes#
I joined my previous PR's #10340 and #9986, that continued the work of @arnoud-dv at #9893, into 2 step PRs, one for fixing multiple issues, and another one for preparing the non-experimental release.
This one gets upgrades the deps to angular +20, fixes most reported issues, and ads a couple of features that might be expected to work for SSR (like in Analog).
The core idea is that this PR is as backwards compatible as it can be, but it prepares everything for a stable release that removes the usage of deprecated angular APIs (that are not part of LTS) and marks as deprecated some of the exported APIs. It is a heavy PR since it includes some new features for SSR plus examples for it, and a lot of tests to verify correct behavior. The commits are split in a way that is easier to review commit by commit.
Ordering the changes was heavelly powered by AI, but the core internal changes were not made by it.
New things and things to be aware of:
- Bump Angular to +20 since 18 has no active support.
- Implementation uses linked signals, lazy store initialization and lazy proxy reads to avoid issues when reading signals to early, fixing issues like #7488. Most of the work here is taking what was started on @arnoud-dv's PR at #9893
- Better pending task support, allowing proper SSR and better test integration via pending tasks, fixing issues like #10046
- Devtools as it's own package, following the same pattern as other adapters (explicit dep instead of optional dep).
- Fixes the implementation and types of
injectQueries - Added
withHydrationKey()andwithNoQueryHydration(), allowing multiple clients for hydratationa and using the same opt out of hydratation behaviour as the Angular HTTP ClientwithNoHttpTransferCache(). This might match some users expectation of how the client should work in Angular. - Support for SSR for
withPersistQueryClientby allowing a different signature that only runs on the browser.
I'm pushing some changes to my own scope @benjavicente/angular-query-experimental, but I will love to have a more official PR preview channel with pkg-pr-new for the PR, and then the fixes and features in the official package.
The next PR for the stable release would be this one: https://github.com/benjavicente/query/pull/8
✅ Checklist#
- I have followed the steps in the Contributing guide.
- I have tested this code locally with
pnpm run test:pr.
🚀 Release Impact#
- This change affects published code, and I have generated a changeset.
- This change is docs/CI/dev-only (no release).
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsdocumentation
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: angular-query-experimental
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: angular-query-persist-client
Released at
@benjavicente/angular-queryActually huge :)
I hope we can get this merged
thanks for all the work you're putting on this. hope this will get merged and the angular query package will get out of experimental
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
Diff Package Supply Chain
SecurityVulnerability Quality Maintenance License @types/express@5.0.6 zone.js@0.16.0 zone.js@0.16.1 @analogjs/vite-plugin-angular@2.5.3 Warning
Review the following alerts detected in dependencies.
According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
Action Severity Alert (click "▶" to expand/collapse) Warn Obfuscated code: npm
@angular/ssris 91.0% likely obfuscatedConfidence: 0.91
Location: Package overview
From: pnpm-lock.yaml →
npm/@angular/build@20.3.22→npm/@angular/ssr@20.3.26ℹ Read more on: This package | This alert | What is obfuscated code?
Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at
support@socket.dev.Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.
Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment
@SocketSecurity ignore npm/@angular/ssr@20.3.26. You can also ignore all packages with@SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.benjavicente(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Important
Review skipped#
Too many files!
This PR contains 192 files, which is 42 over the limit of 150.
To get a review, narrow the scope: • coderabbit review --type committed # exclude uncommitted changes • coderabbit review --dir # limit to a subdirectory • coderabbit review --base # compare against a closer base
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
741d2b0d-7be8-4e18-b529-349298080547📥 Commits
Reviewing files that changed from the base of the PR and between f3d8d2abbf15bf81ff7575d3be9845d7b402f25a and 014ed44c3f9c1f03120f4bfc9ed914dc20557fef.
⛔ Files ignored due to path filters (2)
examples/angular/dynamic-devtools/src/favicon.icois excluded by!**/*.icopnpm-lock.yamlis excluded by!**/pnpm-lock.yaml📒 Files selected for processing (192)
.changeset/angular-20-ssr-lazy-signals.mddocs/framework/angular/angular-httpclient-and-other-data-fetching-clients.mddocs/framework/angular/devtools.mddocs/framework/angular/guides/default-query-function.mddocs/framework/angular/guides/dependent-queries.mddocs/framework/angular/guides/parallel-queries.mddocs/framework/angular/guides/query-retries.mddocs/framework/angular/guides/ssr.mddocs/framework/angular/guides/testing.mddocs/framework/angular/installation.mddocs/framework/angular/overview.mddocs/framework/angular/quick-start.mddocs/framework/angular/reference/functions/injectInfiniteQuery.mddocs/framework/angular/reference/functions/injectMutation.mddocs/framework/angular/reference/functions/injectQueries.mddocs/framework/angular/reference/functions/injectQuery.mddocs/framework/angular/reference/functions/provideAngularQuery.mddocs/framework/angular/reference/functions/provideQueryClient.mddocs/framework/angular/reference/functions/provideTanStackQuery.mddocs/framework/angular/reference/functions/queryFeature.mddocs/framework/angular/reference/functions/queryOptions.mddocs/framework/angular/reference/functions/withHydrationKey.mddocs/framework/angular/reference/functions/withNoQueryHydration.mddocs/framework/angular/reference/index.mddocs/framework/angular/reference/interfaces/BaseQueryNarrowing.mddocs/framework/angular/reference/interfaces/CreateInfiniteQueryOptions.mddocs/framework/angular/reference/interfaces/CreateQueryOptions.mddocs/framework/angular/reference/interfaces/InjectInfiniteQueryOptions.mddocs/framework/angular/reference/interfaces/InjectMutationOptions.mddocs/framework/angular/reference/interfaces/InjectQueriesOptions.mddocs/framework/angular/reference/interfaces/InjectQueryOptions.mddocs/framework/angular/reference/interfaces/QueryFeature.mddocs/framework/angular/reference/type-aliases/CreateBaseQueryOptions.mddocs/framework/angular/reference/type-aliases/CreateBaseQueryResult.mddocs/framework/angular/reference/type-aliases/CreateInfiniteQueryResult.mddocs/framework/angular/reference/type-aliases/CreateMutationResult.mddocs/framework/angular/reference/type-aliases/CreateQueryOptions.mddocs/framework/angular/reference/type-aliases/CreateQueryResult.mddocs/framework/angular/reference/type-aliases/DefinedCreateInfiniteQueryResult.mddocs/framework/angular/reference/type-aliases/DefinedCreateQueryResult.mddocs/framework/angular/reference/type-aliases/DefinedInitialDataOptions.mddocs/framework/angular/reference/type-aliases/DevtoolsFeature.mddocs/framework/angular/reference/type-aliases/PersistQueryClientFeature.mddocs/framework/angular/reference/type-aliases/QueriesOptions.mddocs/framework/angular/reference/type-aliases/QueriesResults.mddocs/framework/angular/reference/type-aliases/QueryFeatures.mddocs/framework/angular/reference/type-aliases/UndefinedInitialDataOptions.mddocs/framework/angular/reference/type-aliases/UnusedSkipTokenOptions.mdexamples/angular/auto-refetching/package.jsonexamples/angular/auto-refetching/src/app/app.config.tsexamples/angular/basic-persister/package.jsonexamples/angular/basic-persister/src/app/app.config.tsexamples/angular/basic/package.jsonexamples/angular/basic/src/app/app.config.tsexamples/angular/devtools-panel/package.jsonexamples/angular/devtools-panel/src/app/app.config.tsexamples/angular/devtools-panel/src/app/components/basic-devtools-panel-example.component.tsexamples/angular/devtools-panel/src/app/components/lazy-load-devtools-panel-example.component.tsexamples/angular/dynamic-devtools/.devcontainer/devcontainer.jsonexamples/angular/dynamic-devtools/.eslintrc.cjsexamples/angular/dynamic-devtools/README.mdexamples/angular/dynamic-devtools/angular.jsonexamples/angular/dynamic-devtools/package.jsonexamples/angular/dynamic-devtools/src/app/app.component.tsexamples/angular/dynamic-devtools/src/app/app.config.tsexamples/angular/dynamic-devtools/src/app/components/dynamic-devtools-example.component.htmlexamples/angular/dynamic-devtools/src/app/components/dynamic-devtools-example.component.tsexamples/angular/dynamic-devtools/src/app/devtools-options.manager.tsexamples/angular/dynamic-devtools/src/index.htmlexamples/angular/dynamic-devtools/src/main.tsexamples/angular/dynamic-devtools/src/styles.cssexamples/angular/dynamic-devtools/tsconfig.app.jsonexamples/angular/dynamic-devtools/tsconfig.jsonexamples/angular/infinite-query-with-max-pages/package.jsonexamples/angular/infinite-query-with-max-pages/src/app/app.config.tsexamples/angular/optimistic-updates/package.jsonexamples/angular/optimistic-updates/src/app/app.config.tsexamples/angular/pagination/package.jsonexamples/angular/pagination/src/app/app.config.tsexamples/angular/query-options-from-a-service/package.jsonexamples/angular/query-options-from-a-service/src/app/app.config.tsexamples/angular/router/package.jsonexamples/angular/router/src/app/app.config.tsexamples/angular/rxjs/package.jsonexamples/angular/rxjs/src/app/app.config.tsexamples/angular/simple/package.jsonexamples/angular/simple/src/app/app.config.tsexamples/angular/ssr-persist/.devcontainer/devcontainer.jsonexamples/angular/ssr-persist/.eslintrc.cjsexamples/angular/ssr-persist/README.mdexamples/angular/ssr-persist/angular.jsonexamples/angular/ssr-persist/package.jsonexamples/angular/ssr-persist/src/app/app.component.tsexamples/angular/ssr-persist/src/app/app.config.server.tsexamples/angular/ssr-persist/src/app/app.config.tsexamples/angular/ssr-persist/src/app/app.routes.server.tsexamples/angular/ssr-persist/src/app/components/client-persist-demo.component.tsexamples/angular/ssr-persist/src/app/components/posts.component.tsexamples/angular/ssr-persist/src/app/query-client.tsexamples/angular/ssr-persist/src/app/query-persist-scope.tsexamples/angular/ssr-persist/src/app/services/posts.service.tsexamples/angular/ssr-persist/src/index.htmlexamples/angular/ssr-persist/src/main.server.tsexamples/angular/ssr-persist/src/main.tsexamples/angular/ssr-persist/src/server.tsexamples/angular/ssr-persist/src/styles.cssexamples/angular/ssr-persist/tsconfig.app.jsonexamples/angular/ssr-persist/tsconfig.jsonexamples/angular/ssr/.devcontainer/devcontainer.jsonexamples/angular/ssr/.eslintrc.cjsexamples/angular/ssr/README.mdexamples/angular/ssr/angular.jsonexamples/angular/ssr/package.jsonexamples/angular/ssr/src/app/app.component.tsexamples/angular/ssr/src/app/app.config.server.tsexamples/angular/ssr/src/app/app.config.tsexamples/angular/ssr/src/app/app.routes.server.tsexamples/angular/ssr/src/app/components/posts.component.tsexamples/angular/ssr/src/app/query-client.tsexamples/angular/ssr/src/app/services/posts.service.tsexamples/angular/ssr/src/index.htmlexamples/angular/ssr/src/main.server.tsexamples/angular/ssr/src/main.tsexamples/angular/ssr/src/server.tsexamples/angular/ssr/src/styles.cssexamples/angular/ssr/tsconfig.app.jsonexamples/angular/ssr/tsconfig.jsonintegrations/angular-cli-20/package.jsonintegrations/angular-cli-20/src/app/app.config.tsknip.jsonpackages/angular-query-devtools/package.jsonpackages/angular-query-devtools/src/__tests__/inject-devtools-panel.test.tspackages/angular-query-devtools/src/__tests__/test-utils.tspackages/angular-query-devtools/src/__tests__/with-devtools.test.tspackages/angular-query-devtools/src/devtools-panel/index.tspackages/angular-query-devtools/src/devtools-panel/inject-devtools-panel.tspackages/angular-query-devtools/src/devtools-panel/production/index.tspackages/angular-query-devtools/src/devtools-panel/stub.tspackages/angular-query-devtools/src/devtools-panel/types.tspackages/angular-query-devtools/src/index.tspackages/angular-query-devtools/src/production/index.tspackages/angular-query-devtools/src/stub.tspackages/angular-query-devtools/src/types.tspackages/angular-query-devtools/src/with-devtools.tspackages/angular-query-devtools/test-setup.tspackages/angular-query-devtools/tsconfig.jsonpackages/angular-query-devtools/tsconfig.prod.jsonpackages/angular-query-devtools/tsconfig.spec.jsonpackages/angular-query-devtools/vite.config.tspackages/angular-query-devtools/vitest.config.tspackages/angular-query-experimental/package.jsonpackages/angular-query-experimental/src/__tests__/inject-devtools-panel.test.tspackages/angular-query-experimental/src/__tests__/inject-infinite-query.test-d.tspackages/angular-query-experimental/src/__tests__/inject-infinite-query.test.tspackages/angular-query-experimental/src/__tests__/inject-is-fetching.test.tspackages/angular-query-experimental/src/__tests__/inject-is-mutating.test.tspackages/angular-query-experimental/src/__tests__/inject-is-restoring.test.tspackages/angular-query-experimental/src/__tests__/inject-mutation-state.test.tspackages/angular-query-experimental/src/__tests__/inject-mutation.test.tspackages/angular-query-experimental/src/__tests__/inject-queries.test-d.tspackages/angular-query-experimental/src/__tests__/inject-queries.test.tspackages/angular-query-experimental/src/__tests__/inject-query.test-d.tspackages/angular-query-experimental/src/__tests__/inject-query.test.tspackages/angular-query-experimental/src/__tests__/mutation-options.test.tspackages/angular-query-experimental/src/__tests__/pending-tasks.test.tspackages/angular-query-experimental/src/__tests__/provide-query-client.test.tspackages/angular-query-experimental/src/__tests__/provide-tanstack-query.test.tspackages/angular-query-experimental/src/__tests__/signal-proxy.test.tspackages/angular-query-experimental/src/__tests__/test-utils.tspackages/angular-query-experimental/src/__tests__/with-devtools.test.tspackages/angular-query-experimental/src/__tests__/with-hydration.test.tspackages/angular-query-experimental/src/create-base-query.tspackages/angular-query-experimental/src/hydration-state-key.tspackages/angular-query-experimental/src/index.tspackages/angular-query-experimental/src/inject-infinite-query.tspackages/angular-query-experimental/src/inject-mutation.tspackages/angular-query-experimental/src/inject-queries-experimental/index.tspackages/angular-query-experimental/src/inject-queries.tspackages/angular-query-experimental/src/inject-query.tspackages/angular-query-experimental/src/pending-tasks-compat.tspackages/angular-query-experimental/src/providers.tspackages/angular-query-experimental/src/query-options.tspackages/angular-query-experimental/src/signal-proxy.tspackages/angular-query-experimental/src/types.tspackages/angular-query-experimental/test-setup.tspackages/angular-query-experimental/tsconfig.spec.jsonpackages/angular-query-experimental/vite.config.tspackages/angular-query-experimental/vitest.config.tspackages/angular-query-persist-client/package.jsonpackages/angular-query-persist-client/src/__tests__/with-persist-query-client.test.tspackages/angular-query-persist-client/src/with-persist-query-client.tspackages/angular-query-persist-client/src/with-persist-query-client.types.tsYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share