From f327a5dd4a1ac18596721f093c53ef1fa9fd3bc3 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 12:02:19 +0200 Subject: [PATCH 01/35] feat(angular-query): - Created isRestoring injection token and provider - handled restoration phase in create-base-query.ts - handled restoration phase in --- .../src/create-base-query.ts | 63 ++++++++++++------- .../angular-query-experimental/src/index.ts | 1 + .../src/inject-is-restoring.ts | 32 ++++++++++ .../src/inject-queries.ts | 18 ++++-- 4 files changed, 85 insertions(+), 29 deletions(-) create mode 100644 packages/angular-query-experimental/src/inject-is-restoring.ts diff --git a/packages/angular-query-experimental/src/create-base-query.ts b/packages/angular-query-experimental/src/create-base-query.ts index c44aea2317..e78692ca2c 100644 --- a/packages/angular-query-experimental/src/create-base-query.ts +++ b/packages/angular-query-experimental/src/create-base-query.ts @@ -13,6 +13,7 @@ import { QueryClient, notifyManager } from '@tanstack/query-core' import { signalProxy } from './signal-proxy' import { shouldThrowError } from './util' import { lazyInit } from './util/lazy-init/lazy-init' +import { injectIsRestoring } from './inject-is-restoring' import type { QueryKey, QueryObserver, @@ -22,6 +23,8 @@ import type { CreateBaseQueryOptions } from './types' /** * Base implementation for `injectQuery` and `injectInfiniteQuery`. + * @param optionsFn + * @param Observer */ export function createBaseQuery< TQueryFnData, @@ -44,6 +47,7 @@ export function createBaseQuery< const ngZone = injector.get(NgZone) const destroyRef = injector.get(DestroyRef) const queryClient = injector.get(QueryClient) + const isRestoring = injectIsRestoring(injector) /** * Signal that has the default options from query client applied @@ -54,7 +58,9 @@ export function createBaseQuery< const defaultedOptionsSignal = computed(() => { const options = runInInjectionContext(injector, () => optionsFn()) const defaultedOptions = queryClient.defaultQueryOptions(options) - defaultedOptions._optimisticResults = 'optimistic' + defaultedOptions._optimisticResults = isRestoring() + ? 'isRestoring' + : 'optimistic' return defaultedOptions }) @@ -87,30 +93,39 @@ export function createBaseQuery< }, ) - // observer.trackResult is not used as this optimization is not needed for Angular - const unsubscribe = ngZone.runOutsideAngular(() => - observer.subscribe( - notifyManager.batchCalls( - (state: QueryObserverResult) => { - ngZone.run(() => { - if ( - state.isError && - !state.isFetching && - // !isRestoring() && // todo: enable when client persistence is implemented - shouldThrowError(observer.options.throwOnError, [ - state.error, - observer.getCurrentQuery(), - ]) - ) { - throw state.error - } - resultSignal.set(state) - }) - }, - ), - ), + effect( + () => { + // observer.trackResult is not used as this optimization is not needed for Angular + const unsubscribe = isRestoring() + ? () => undefined + : ngZone.runOutsideAngular(() => + observer.subscribe( + notifyManager.batchCalls( + (state: QueryObserverResult) => { + ngZone.run(() => { + if ( + state.isError && + !state.isFetching && + !isRestoring() && + shouldThrowError(observer.options.throwOnError, [ + state.error, + observer.getCurrentQuery(), + ]) + ) { + throw state.error + } + resultSignal.set(state) + }) + }, + ), + ), + ) + destroyRef.onDestroy(unsubscribe) + }, + { + injector, + }, ) - destroyRef.onDestroy(unsubscribe) return signalProxy(resultSignal) }) diff --git a/packages/angular-query-experimental/src/index.ts b/packages/angular-query-experimental/src/index.ts index aa6292d4b5..da68067d33 100644 --- a/packages/angular-query-experimental/src/index.ts +++ b/packages/angular-query-experimental/src/index.ts @@ -22,6 +22,7 @@ export { infiniteQueryOptions } from './infinite-query-options' export * from './inject-infinite-query' export * from './inject-is-fetching' export * from './inject-is-mutating' +export * from './inject-is-restoring' export * from './inject-mutation' export * from './inject-mutation-state' export * from './inject-queries' diff --git a/packages/angular-query-experimental/src/inject-is-restoring.ts b/packages/angular-query-experimental/src/inject-is-restoring.ts new file mode 100644 index 0000000000..a03a227562 --- /dev/null +++ b/packages/angular-query-experimental/src/inject-is-restoring.ts @@ -0,0 +1,32 @@ +import { InjectionToken, computed, inject } from '@angular/core' +import { assertInjector } from './util/assert-injector/assert-injector' +import type { Injector, Provider, Signal } from '@angular/core' + +const IsRestoring = new InjectionToken>('IsRestoring') + +/** + * Injects a signal that tracks whether a restore is currently in progress. {@link injectQuery} and friends also check this internally to avoid race conditions between the restore and mounting queries. + * @param injector - The Angular injector to use. + * @returns signal with boolean that indicates whether a restore is in progress. + * @public + */ +export function injectIsRestoring(injector?: Injector): Signal { + return assertInjector( + injectIsRestoring, + injector, + () => inject(IsRestoring, { optional: true }) ?? computed(() => false), + ) +} + +/** + * Used by angular query persist client plugin to provide the signal that tracks the restore state + * @param isRestoring - a readonly signal that returns a boolean + * @returns Provider for the `isRestoring` signal + * @public + */ +export function provideIsRestoring(isRestoring: Signal): Provider { + return { + provide: IsRestoring, + useValue: isRestoring, + } +} diff --git a/packages/angular-query-experimental/src/inject-queries.ts b/packages/angular-query-experimental/src/inject-queries.ts index 8f969993d6..aa2421139d 100644 --- a/packages/angular-query-experimental/src/inject-queries.ts +++ b/packages/angular-query-experimental/src/inject-queries.ts @@ -24,6 +24,7 @@ import type { QueryObserverResult, ThrowOnError, } from '@tanstack/query-core' +import { injectIsRestoring } from './inject-is-restoring' // This defines the `CreateQueryOptions` that are accepted in `QueriesOptions` & `GetOptions`. // `placeholderData` function does not have a parameter @@ -212,12 +213,15 @@ export function injectQueries< const destroyRef = inject(DestroyRef) const ngZone = inject(NgZone) const queryClient = inject(QueryClient) + const isRestoring = injectIsRestoring(injector) const defaultedQueries = computed(() => { return queries().map((opts) => { const defaultedOptions = queryClient.defaultQueryOptions(opts) // Make sure the results are already in fetching state before subscribing or updating options - defaultedOptions._optimisticResults = 'optimistic' + defaultedOptions._optimisticResults = isRestoring() + ? 'isRestoring' + : 'optimistic' return defaultedOptions as QueryObserverOptions }) @@ -246,10 +250,14 @@ export function injectQueries< const result = signal(getCombinedResult() as any) - const unsubscribe = ngZone.runOutsideAngular(() => - observer.subscribe(notifyManager.batchCalls(result.set)), - ) - destroyRef.onDestroy(unsubscribe) + effect(() => { + const unsubscribe = isRestoring() + ? () => undefined + : ngZone.runOutsideAngular(() => + observer.subscribe(notifyManager.batchCalls(result.set)), + ) + destroyRef.onDestroy(unsubscribe) + }) return result }) From dd92bfca475c48a8c7399232acba82eda09f6e5d Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 22 Nov 2024 16:23:29 +0200 Subject: [PATCH 02/35] feat(angular-query): created package for experimental persistence support, and the withPersistQueryClient feature --- .../.attw.json | 3 + .../config/api-extractor.json | 24 +++++ .../eslint.config.js | 31 ++++++ .../package.json | 71 ++++++++++++++ .../src/index.ts | 4 + .../src/with-persist-query-client.ts | 94 +++++++++++++++++++ .../tsconfig.json | 13 +++ .../tsup.config.js | 10 ++ .../vite.config.ts | 16 ++++ .../src/providers.ts | 13 ++- scripts/publish.js | 4 + 11 files changed, 280 insertions(+), 3 deletions(-) create mode 100644 packages/angular-persist-query-client-experimental/.attw.json create mode 100644 packages/angular-persist-query-client-experimental/config/api-extractor.json create mode 100644 packages/angular-persist-query-client-experimental/eslint.config.js create mode 100644 packages/angular-persist-query-client-experimental/package.json create mode 100644 packages/angular-persist-query-client-experimental/src/index.ts create mode 100644 packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts create mode 100644 packages/angular-persist-query-client-experimental/tsconfig.json create mode 100644 packages/angular-persist-query-client-experimental/tsup.config.js create mode 100644 packages/angular-persist-query-client-experimental/vite.config.ts diff --git a/packages/angular-persist-query-client-experimental/.attw.json b/packages/angular-persist-query-client-experimental/.attw.json new file mode 100644 index 0000000000..ce409e67a8 --- /dev/null +++ b/packages/angular-persist-query-client-experimental/.attw.json @@ -0,0 +1,3 @@ +{ + "ignoreRules": ["cjs-resolves-to-esm", "no-resolution"] +} diff --git a/packages/angular-persist-query-client-experimental/config/api-extractor.json b/packages/angular-persist-query-client-experimental/config/api-extractor.json new file mode 100644 index 0000000000..dd9a7a854f --- /dev/null +++ b/packages/angular-persist-query-client-experimental/config/api-extractor.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + "mainEntryPointFilePath": "/build/index.d.ts", + + "newlineKind": "lf", + + "apiReport": { + "enabled": true + }, + + "docModel": { + "enabled": false + }, + + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "/build/rollup.d.ts" + }, + + "tsdocMetadata": { + "enabled": false + } +} diff --git a/packages/angular-persist-query-client-experimental/eslint.config.js b/packages/angular-persist-query-client-experimental/eslint.config.js new file mode 100644 index 0000000000..b0ec381452 --- /dev/null +++ b/packages/angular-persist-query-client-experimental/eslint.config.js @@ -0,0 +1,31 @@ +// @ts-check + +import pluginJsdoc from 'eslint-plugin-jsdoc' +import rootConfig from '../../eslint.config.js' + +export default [ + ...rootConfig, + pluginJsdoc.configs['flat/recommended-typescript'], + { + rules: { + 'cspell/spellchecker': [ + 'warn', + { + cspell: { + ignoreRegExpList: ['\\ɵ.+'], + }, + }, + ], + 'jsdoc/require-hyphen-before-param-description': 1, + 'jsdoc/sort-tags': 1, + 'jsdoc/require-throws': 1, + 'jsdoc/check-tag-names': [ + 'warn', + { + // Not compatible with Api Extractor @public + typed: false, + }, + ], + }, + }, +] diff --git a/packages/angular-persist-query-client-experimental/package.json b/packages/angular-persist-query-client-experimental/package.json new file mode 100644 index 0000000000..efef2362c4 --- /dev/null +++ b/packages/angular-persist-query-client-experimental/package.json @@ -0,0 +1,71 @@ +{ + "name": "@tanstack/angular-query-persist-client-experimental", + "version": "5.61.1", + "description": "Angular bindings to work with persisters in TanStack/angular-query", + "author": "Omer Gronich", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/TanStack/query.git", + "directory": "packages/angular-query-persist-client-experimental" + }, + "homepage": "https://tanstack.com/query", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "scripts": { + "clean": "rimraf ./build ./coverage", + "test:eslint": "eslint ./src", + "test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"", + "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js", + "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js", + "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js", + "test:types:ts53": "tsc", + "test:lib": "vitest", + "test:lib:dev": "pnpm run test:lib --watch", + "test:build": "publint --strict && attw --pack", + "build": "pnpm build:tsup", + "build:tsup": "tsup" + }, + "type": "module", + "types": "build/index.d.ts", + "module": "build/index.js", + "exports": { + ".": { + "import": { + "types": "./build/index.d.ts", + "default": "./build/index.js" + } + }, + "./package.json": { + "default": "./package.json" + } + }, + "sideEffects": false, + "files": [ + "build", + "src", + "!src/__tests__" + ], + "dependencies": { + "@tanstack/query-persist-client-core": "workspace:*" + }, + "devDependencies": { + "@analogjs/vite-plugin-angular": "^1.6.4", + "@angular/compiler": "^17.3.12", + "@angular/core": "^17.3.12", + "@angular/platform-browser": "^17.3.12", + "@angular/platform-browser-dynamic": "^17.3.12", + "@microsoft/api-extractor": "^7.47.4", + "@tanstack/angular-query-experimental": "workspace:*", + "eslint-plugin-jsdoc": "^50.2.2", + "tsup": "8.0.2", + "typescript": "5.3.3" + }, + "peerDependencies": { + "@angular/common": ">=16.0.0", + "@angular/core": ">=16.0.0", + "@tanstack/angular-query-experimental": "workspace:*" + } +} diff --git a/packages/angular-persist-query-client-experimental/src/index.ts b/packages/angular-persist-query-client-experimental/src/index.ts new file mode 100644 index 0000000000..2f7546d196 --- /dev/null +++ b/packages/angular-persist-query-client-experimental/src/index.ts @@ -0,0 +1,4 @@ +// Re-export core +export * from '@tanstack/query-persist-client-core' + +export * from './with-persist-query-client' diff --git a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts new file mode 100644 index 0000000000..cee649cdd6 --- /dev/null +++ b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts @@ -0,0 +1,94 @@ +import { + injectQueryClient, + provideIsRestoring, + queryFeature, +} from '@tanstack/angular-query-experimental' +import { + DestroyRef, + ENVIRONMENT_INITIALIZER, + PLATFORM_ID, + inject, + signal, +} from '@angular/core' +import { isPlatformBrowser } from '@angular/common' +import { + persistQueryClientRestore, + persistQueryClientSubscribe, +} from '@tanstack/query-persist-client-core' +import type { PersistQueryClientOptions as PersistQueryClientOptionsCore } from '@tanstack/query-persist-client-core' +import type { PersistQueryClientFeature } from '@tanstack/angular-query-experimental' + +type PersistQueryClientOptions = { + persistOptions: Omit + onSuccess?: () => Promise | unknown +} + +/** + * Enables persistence. + * + * **Example** + * + * ```ts + * const localStoragePersister = createSyncStoragePersister({ + * storage: window.localStorage, + * }) + * + * export const appConfig: ApplicationConfig = { + * providers: [ + * provideTanStackQuery( + * new QueryClient(), + * withPersistQueryClient([ + * { + * persistOptions: { + * persister: localStoragePersister, + * }, + * onSuccess: () => console.log('Restoration completed successfully.'), + * }, + * ]) + * ) + * ] + * } + * ``` + * + * @param persistQueryClientOptions - An array of objects containing persistOptions and an onSuccess callback which gets called when the restoration process is complete. + * @returns A set of providers for use with `provideTanStackQuery`. + * @public + */ +export function withPersistQueryClient( + persistQueryClientOptions: Array, +): PersistQueryClientFeature { + const isRestoring = signal(false) + const providers = [ + provideIsRestoring(isRestoring.asReadonly()), + { + provide: ENVIRONMENT_INITIALIZER, + multi: true, + useValue: () => { + if (!isPlatformBrowser(inject(PLATFORM_ID))) return + const destroyRef = inject(DestroyRef) + const queryClient = injectQueryClient() + + isRestoring.set(true) + const restorations = persistQueryClientOptions.map( + ({ onSuccess, persistOptions }) => { + const options = { queryClient, ...persistOptions } + return persistQueryClientRestore(options).then(async () => { + try { + if (onSuccess) { + await onSuccess() + } + } finally { + const cleanup = persistQueryClientSubscribe(options) + destroyRef.onDestroy(cleanup) + } + }) + }, + ) + Promise.all(restorations).finally(() => { + isRestoring.set(false) + }) + }, + }, + ] + return queryFeature('PersistQueryClient', providers) +} diff --git a/packages/angular-persist-query-client-experimental/tsconfig.json b/packages/angular-persist-query-client-experimental/tsconfig.json new file mode 100644 index 0000000000..c7fce5ae9d --- /dev/null +++ b/packages/angular-persist-query-client-experimental/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "moduleResolution": "Bundler", + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noFallthroughCasesInSwitch": true, + "useDefineForClassFields": false, + "target": "ES2022", + "types": ["vitest/globals"] + }, + "include": ["src", "eslint.config.js", "tsup.config.js", "vite.config.ts"] +} diff --git a/packages/angular-persist-query-client-experimental/tsup.config.js b/packages/angular-persist-query-client-experimental/tsup.config.js new file mode 100644 index 0000000000..eadb7ad63d --- /dev/null +++ b/packages/angular-persist-query-client-experimental/tsup.config.js @@ -0,0 +1,10 @@ +import { defineConfig } from 'tsup' + +export default defineConfig({ + entry: ['src/index.ts'], + sourcemap: true, + clean: true, + format: ['esm'], + dts: true, + outDir: 'build', +}) diff --git a/packages/angular-persist-query-client-experimental/vite.config.ts b/packages/angular-persist-query-client-experimental/vite.config.ts new file mode 100644 index 0000000000..3793a2137c --- /dev/null +++ b/packages/angular-persist-query-client-experimental/vite.config.ts @@ -0,0 +1,16 @@ +import { defineConfig } from 'vitest/config' +import packageJson from './package.json' + +export default defineConfig({ + test: { + name: packageJson.name, + dir: './src', + watch: false, + environment: 'jsdom', + setupFiles: ['src/test-setup.ts'], + coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'] }, + typecheck: { enabled: true }, + globals: true, + restoreMocks: true, + }, +}) diff --git a/packages/angular-query-experimental/src/providers.ts b/packages/angular-query-experimental/src/providers.ts index cd340757df..50fffaff2d 100644 --- a/packages/angular-query-experimental/src/providers.ts +++ b/packages/angular-query-experimental/src/providers.ts @@ -141,7 +141,7 @@ export interface QueryFeature { * @param providers - * @returns A Query feature. */ -function queryFeature( +export function queryFeature( kind: TFeatureKind, providers: Array, ): QueryFeature { @@ -156,6 +156,13 @@ function queryFeature( */ export type DeveloperToolsFeature = QueryFeature<'DeveloperTools'> +/** + * A type alias that represents a feature which enables persistence. + * The type is used to describe the return value of the `withPersistQueryClient` function. + * @public + */ +export type PersistQueryClientFeature = QueryFeature<'PersistQueryClient'> + /** * Options for configuring the TanStack Query devtools. * @public @@ -345,8 +352,8 @@ export function withDevtools( * @public * @see {@link provideTanStackQuery} */ -export type QueryFeatures = DeveloperToolsFeature // Union type of features but just one now +export type QueryFeatures = DeveloperToolsFeature | PersistQueryClientFeature -export const queryFeatures = ['DeveloperTools'] as const +export const queryFeatures = ['DeveloperTools', 'PersistQueryClient'] as const export type QueryFeatureKind = (typeof queryFeatures)[number] diff --git a/scripts/publish.js b/scripts/publish.js index 9bfa1e5a35..3b6d770f1f 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -92,6 +92,10 @@ await publish({ name: '@tanstack/angular-query-experimental', packageDir: 'packages/angular-query-experimental', }, + { + name: '@tanstack/angular-query-persist-client-experimental', + packageDir: 'packages/angular-persist-query-client-experimental', + }, ], branchConfigs: { main: { From b8afd8acfbfbc44523c818b737e017ae60f43622 Mon Sep 17 00:00:00 2001 From: omergronich Date: Sat, 23 Nov 2024 19:38:10 +0200 Subject: [PATCH 03/35] test(persistQuery): add tests for withPersistQueryClient --- .../package.json | 2 + .../src/__tests__/utils.ts | 11 + .../with-persist-query-client.test.ts | 501 ++++++++++++++++++ .../src/test-setup.ts | 12 + 4 files changed, 526 insertions(+) create mode 100644 packages/angular-persist-query-client-experimental/src/__tests__/utils.ts create mode 100644 packages/angular-persist-query-client-experimental/src/__tests__/with-persist-query-client.test.ts create mode 100644 packages/angular-persist-query-client-experimental/src/test-setup.ts diff --git a/packages/angular-persist-query-client-experimental/package.json b/packages/angular-persist-query-client-experimental/package.json index efef2362c4..644da881eb 100644 --- a/packages/angular-persist-query-client-experimental/package.json +++ b/packages/angular-persist-query-client-experimental/package.json @@ -59,6 +59,8 @@ "@angular/platform-browser-dynamic": "^17.3.12", "@microsoft/api-extractor": "^7.47.4", "@tanstack/angular-query-experimental": "workspace:*", + "@testing-library/angular": "^17.3.2", + "@testing-library/dom": "^10.4.0", "eslint-plugin-jsdoc": "^50.2.2", "tsup": "8.0.2", "typescript": "5.3.3" diff --git a/packages/angular-persist-query-client-experimental/src/__tests__/utils.ts b/packages/angular-persist-query-client-experimental/src/__tests__/utils.ts new file mode 100644 index 0000000000..c693697673 --- /dev/null +++ b/packages/angular-persist-query-client-experimental/src/__tests__/utils.ts @@ -0,0 +1,11 @@ +let queryKeyCount = 0 +export function queryKey(): Array { + queryKeyCount++ + return [`query_${queryKeyCount}`] +} + +export function sleep(timeout: number): Promise { + return new Promise((resolve, _reject) => { + setTimeout(resolve, timeout) + }) +} diff --git a/packages/angular-persist-query-client-experimental/src/__tests__/with-persist-query-client.test.ts b/packages/angular-persist-query-client-experimental/src/__tests__/with-persist-query-client.test.ts new file mode 100644 index 0000000000..c8c88b1129 --- /dev/null +++ b/packages/angular-persist-query-client-experimental/src/__tests__/with-persist-query-client.test.ts @@ -0,0 +1,501 @@ +import { describe, expect, test, vi } from 'vitest' +import { + injectQuery, + provideTanStackQuery, + QueryClient, +} from '@tanstack/angular-query-experimental' +import type { + PersistedClient, + Persister, +} from '@tanstack/query-persist-client-core' +import { persistQueryClientSave } from '@tanstack/query-persist-client-core' +import { Component, effect } from '@angular/core' +import { render, screen, waitFor } from '@testing-library/angular' +import { withPersistQueryClient } from '../with-persist-query-client' +import { queryKey, sleep } from './utils' + +const createMockPersister = (): Persister => { + let storedState: PersistedClient | undefined + + return { + async persistClient(persistClient: PersistedClient) { + storedState = persistClient + }, + async restoreClient() { + await sleep(10) + return storedState + }, + removeClient() { + storedState = undefined + }, + } +} + +const createMockErrorPersister = ( + removeClient: Persister['removeClient'], +): [Error, Persister] => { + const error = new Error('restore failed') + return [ + error, + { + async persistClient() { + // noop + }, + async restoreClient() { + await sleep(10) + throw error + }, + removeClient, + }, + ] +} + +describe('withPersistQueryClient', () => { + test('restores cache from persister', async () => { + const key = queryKey() + const states: Array<{ + status: string + fetchStatus: string + data: string | undefined + }> = [] + + const queryClient = new QueryClient() + await queryClient.prefetchQuery({ + queryKey: key, + queryFn: () => Promise.resolve('hydrated'), + }) + + const persister = createMockPersister() + + await persistQueryClientSave({ queryClient, persister }) + + queryClient.clear() + + @Component({ + template: ` +
+

{{ state.data() }}

+

fetchStatus: {{ state.fetchStatus() }}

+
+ `, + }) + class Page { + state = injectQuery(() => ({ + queryKey: key, + queryFn: async () => { + await sleep(10) + return 'fetched' + }, + })) + _ = effect(() => { + states.push({ + status: this.state.status(), + fetchStatus: this.state.fetchStatus(), + data: this.state.data(), + }) + }) + } + + render(Page, { + providers: [ + provideTanStackQuery( + queryClient, + withPersistQueryClient([{ persistOptions: { persister } }]), + ), + ], + }) + + await waitFor(() => screen.getByText('fetchStatus: idle')) + await waitFor(() => screen.getByText('hydrated')) + await waitFor(() => screen.getByText('fetched')) + + expect(states).toHaveLength(3) + + expect(states[0]).toMatchObject({ + status: 'pending', + fetchStatus: 'idle', + data: undefined, + }) + + expect(states[1]).toMatchObject({ + status: 'success', + fetchStatus: 'fetching', + data: 'hydrated', + }) + + expect(states[2]).toMatchObject({ + status: 'success', + fetchStatus: 'idle', + data: 'fetched', + }) + }) + + test.todo( + '(Write this test after injectQueries is working) should also put injectQueries into idle state', + ) + + test('should show initialData while restoring', async () => { + const key = queryKey() + const states: Array<{ + status: string + fetchStatus: string + data: string | undefined + }> = [] + + const queryClient = new QueryClient() + await queryClient.prefetchQuery({ + queryKey: key, + queryFn: () => Promise.resolve('hydrated'), + }) + + const persister = createMockPersister() + + await persistQueryClientSave({ queryClient, persister }) + + queryClient.clear() + + @Component({ + template: ` +
+

{{ state.data() }}

+

fetchStatus: {{ state.fetchStatus() }}

+
+ `, + }) + class Page { + state = injectQuery(() => ({ + queryKey: key, + queryFn: async () => { + await sleep(10) + return 'fetched' + }, + initialData: 'initial', + // make sure that initial data is older than the hydration data + // otherwise initialData would be newer and takes precedence + initialDataUpdatedAt: 1, + })) + _ = effect(() => { + states.push({ + status: this.state.status(), + fetchStatus: this.state.fetchStatus(), + data: this.state.data(), + }) + }) + } + + render(Page, { + providers: [ + provideTanStackQuery( + queryClient, + withPersistQueryClient([{ persistOptions: { persister } }]), + ), + ], + }) + + await waitFor(() => screen.getByText('fetched')) + + expect(states).toHaveLength(3) + + expect(states[0]).toMatchObject({ + status: 'success', + fetchStatus: 'idle', + data: 'initial', + }) + + expect(states[1]).toMatchObject({ + status: 'success', + fetchStatus: 'fetching', + data: 'hydrated', + }) + + expect(states[2]).toMatchObject({ + status: 'success', + fetchStatus: 'idle', + data: 'fetched', + }) + }) + + test('should not refetch after restoring when data is fresh', async () => { + const key = queryKey() + const states: Array<{ + status: string + fetchStatus: string + data: string | undefined + }> = [] + + const queryClient = new QueryClient() + await queryClient.prefetchQuery({ + queryKey: key, + queryFn: () => Promise.resolve('hydrated'), + }) + + const persister = createMockPersister() + + await persistQueryClientSave({ queryClient, persister }) + + queryClient.clear() + + let fetched = false + + @Component({ + template: ` +
+

data: {{ state.data() ?? 'null' }}

+

fetchStatus: {{ state.fetchStatus() }}

+
+ `, + }) + class Page { + state = injectQuery(() => ({ + queryKey: key, + queryFn: async () => { + fetched = true + await sleep(10) + return 'fetched' + }, + staleTime: Infinity, + })) + _ = effect(() => { + states.push({ + status: this.state.status(), + fetchStatus: this.state.fetchStatus(), + data: this.state.data(), + }) + }) + } + + render(Page, { + providers: [ + provideTanStackQuery( + queryClient, + withPersistQueryClient([{ persistOptions: { persister } }]), + ), + ], + }) + + await waitFor(() => screen.getByText('data: null')) + await waitFor(() => screen.getByText('data: hydrated')) + + expect(states).toHaveLength(2) + + expect(fetched).toBe(false) + + expect(states[0]).toMatchObject({ + status: 'pending', + fetchStatus: 'idle', + data: undefined, + }) + + expect(states[1]).toMatchObject({ + status: 'success', + fetchStatus: 'idle', + data: 'hydrated', + }) + }) + + test('should call onSuccess after successful restoring', async () => { + const key = queryKey() + const queryClient = new QueryClient() + await queryClient.prefetchQuery({ + queryKey: key, + queryFn: () => Promise.resolve('hydrated'), + }) + + const persister = createMockPersister() + await persistQueryClientSave({ queryClient, persister }) + + queryClient.clear() + + @Component({ + template: ` +
+

{{ state.data() }}

+

fetchStatus: {{ state.fetchStatus() }}

+
+ `, + }) + class Page { + state = injectQuery(() => ({ + queryKey: key, + queryFn: async () => { + await sleep(10) + return 'fetched' + }, + })) + } + + const onSuccess = vi.fn() + + render(Page, { + providers: [ + provideTanStackQuery( + queryClient, + withPersistQueryClient([ + { + persistOptions: { persister }, + onSuccess, + }, + ]), + ), + ], + }) + + expect(onSuccess).toHaveBeenCalledTimes(0) + await waitFor(() => screen.getByText('fetched')) + expect(onSuccess).toHaveBeenCalledTimes(1) + }) + + test('should remove cache after non-successful restoring', async () => { + const key = queryKey() + const onErrorMock = vi + .spyOn(console, 'error') + .mockImplementation(() => undefined) + const queryClient = new QueryClient() + const removeClient = vi.fn() + const [error, persister] = createMockErrorPersister(removeClient) + + @Component({ + template: ` +
+

{{ state.data() }}

+

fetchStatus: {{ state.fetchStatus() }}

+
+ `, + }) + class Page { + state = injectQuery(() => ({ + queryKey: key, + queryFn: async () => { + await sleep(10) + return 'fetched' + }, + })) + } + + render(Page, { + providers: [ + provideTanStackQuery( + queryClient, + withPersistQueryClient([ + { + persistOptions: { persister }, + }, + ]), + ), + ], + }) + + await waitFor(() => screen.getByText('fetched')) + expect(removeClient).toHaveBeenCalledTimes(1) + expect(onErrorMock).toHaveBeenCalledTimes(1) + expect(onErrorMock).toHaveBeenNthCalledWith(1, error) + onErrorMock.mockRestore() + }) + + test('should be able to support multiple persisters', async () => { + const key1 = queryKey() + const key2 = queryKey() + const states1: Array<{ + status: string + fetchStatus: string + data: string | undefined + }> = [] + const states2: Array<{ + status: string + fetchStatus: string + data: string | undefined + }> = [] + + const queryClient = new QueryClient() + await queryClient.prefetchQuery({ + queryKey: key1, + queryFn: () => Promise.resolve('hydrated 1'), + }) + + const persister1 = createMockPersister() + await persistQueryClientSave({ queryClient, persister: persister1 }) + queryClient.clear() + + const persister2 = createMockPersister() + await queryClient.prefetchQuery({ + queryKey: key2, + queryFn: () => Promise.resolve('hydrated 2'), + }) + await persistQueryClientSave({ queryClient, persister: persister2 }) + queryClient.clear() + + @Component({ + template: ` +
+

{{ query1.data() }}

+

fetchStatus: {{ query1.fetchStatus() }}

+
+
+

{{ query2.data() }}

+

fetchStatus: {{ query2.fetchStatus() }}

+
+ `, + }) + class Page { + query1 = injectQuery(() => ({ + queryKey: key1, + queryFn: async () => { + await sleep(10) + return 'fetched 1' + }, + })) + query2 = injectQuery(() => ({ + queryKey: key2, + queryFn: async () => { + await sleep(10) + return 'fetched 2' + }, + })) + + _ = effect(() => { + states1.push({ + status: this.query1.status(), + fetchStatus: this.query1.fetchStatus(), + data: this.query1.data(), + }) + states2.push({ + status: this.query2.status(), + fetchStatus: this.query2.fetchStatus(), + data: this.query2.data(), + }) + }) + } + + const onSuccess1 = vi.fn() + const onSuccess2 = vi.fn() + + render(Page, { + providers: [ + provideTanStackQuery( + queryClient, + withPersistQueryClient([ + { + persistOptions: { + persister: persister1, + }, + onSuccess: onSuccess1, + }, + { + persistOptions: { + persister: persister2, + }, + onSuccess: onSuccess2, + }, + ]), + ), + ], + }) + + expect(onSuccess1).toHaveBeenCalledTimes(0) + expect(onSuccess2).toHaveBeenCalledTimes(0) + await waitFor(() => screen.getByText('fetched 1')) + await waitFor(() => screen.getByText('fetched 2')) + expect(onSuccess1).toHaveBeenCalledTimes(1) + expect(onSuccess2).toHaveBeenCalledTimes(1) + }) +}) diff --git a/packages/angular-persist-query-client-experimental/src/test-setup.ts b/packages/angular-persist-query-client-experimental/src/test-setup.ts new file mode 100644 index 0000000000..cb5fd340f3 --- /dev/null +++ b/packages/angular-persist-query-client-experimental/src/test-setup.ts @@ -0,0 +1,12 @@ +import '@analogjs/vite-plugin-angular/setup-vitest' + +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting, +} from '@angular/platform-browser-dynamic/testing' +import { getTestBed } from '@angular/core/testing' + +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting(), +) From 547ae9e71211e6b8788fe0c166242c607eabd913 Mon Sep 17 00:00:00 2001 From: omergronich Date: Sat, 23 Nov 2024 22:11:51 +0200 Subject: [PATCH 04/35] docs(angular-query): add basic persister example --- .../.devcontainer/devcontainer.json | 4 + .../angular/basic-persister/.eslintrc.cjs | 6 + examples/angular/basic-persister/README.md | 6 + examples/angular/basic-persister/angular.json | 104 ++++++++++++++++++ examples/angular/basic-persister/package.json | 30 +++++ .../src/app/app.component.html | 10 ++ .../basic-persister/src/app/app.component.ts | 14 +++ .../basic-persister/src/app/app.config.ts | 37 +++++++ .../src/app/components/post.component.html | 19 ++++ .../src/app/components/post.component.ts | 39 +++++++ .../src/app/components/posts.component.html | 39 +++++++ .../src/app/components/posts.component.ts | 28 +++++ .../src/app/services/posts-service.ts | 21 ++++ .../angular/basic-persister/src/favicon.ico | Bin 0 -> 15086 bytes .../angular/basic-persister/src/index.html | 13 +++ examples/angular/basic-persister/src/main.ts | 7 ++ .../angular/basic-persister/tsconfig.app.json | 9 ++ .../angular/basic-persister/tsconfig.json | 29 +++++ 18 files changed, 415 insertions(+) create mode 100644 examples/angular/basic-persister/.devcontainer/devcontainer.json create mode 100644 examples/angular/basic-persister/.eslintrc.cjs create mode 100644 examples/angular/basic-persister/README.md create mode 100644 examples/angular/basic-persister/angular.json create mode 100644 examples/angular/basic-persister/package.json create mode 100644 examples/angular/basic-persister/src/app/app.component.html create mode 100644 examples/angular/basic-persister/src/app/app.component.ts create mode 100644 examples/angular/basic-persister/src/app/app.config.ts create mode 100644 examples/angular/basic-persister/src/app/components/post.component.html create mode 100644 examples/angular/basic-persister/src/app/components/post.component.ts create mode 100644 examples/angular/basic-persister/src/app/components/posts.component.html create mode 100644 examples/angular/basic-persister/src/app/components/posts.component.ts create mode 100644 examples/angular/basic-persister/src/app/services/posts-service.ts create mode 100644 examples/angular/basic-persister/src/favicon.ico create mode 100644 examples/angular/basic-persister/src/index.html create mode 100644 examples/angular/basic-persister/src/main.ts create mode 100644 examples/angular/basic-persister/tsconfig.app.json create mode 100644 examples/angular/basic-persister/tsconfig.json diff --git a/examples/angular/basic-persister/.devcontainer/devcontainer.json b/examples/angular/basic-persister/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..36f47d8762 --- /dev/null +++ b/examples/angular/basic-persister/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Node.js", + "image": "mcr.microsoft.com/devcontainers/javascript-node:18" +} diff --git a/examples/angular/basic-persister/.eslintrc.cjs b/examples/angular/basic-persister/.eslintrc.cjs new file mode 100644 index 0000000000..cca134ce16 --- /dev/null +++ b/examples/angular/basic-persister/.eslintrc.cjs @@ -0,0 +1,6 @@ +// @ts-check + +/** @type {import('eslint').Linter.Config} */ +const config = {} + +module.exports = config diff --git a/examples/angular/basic-persister/README.md b/examples/angular/basic-persister/README.md new file mode 100644 index 0000000000..15f2ed2f4a --- /dev/null +++ b/examples/angular/basic-persister/README.md @@ -0,0 +1,6 @@ +# TanStack Query Angular basic example + +To run this example: + +- `npm install` or `yarn` or `pnpm i` or `bun i` +- `npm run start` or `yarn start` or `pnpm start` or `bun start` diff --git a/examples/angular/basic-persister/angular.json b/examples/angular/basic-persister/angular.json new file mode 100644 index 0000000000..1256bd9784 --- /dev/null +++ b/examples/angular/basic-persister/angular.json @@ -0,0 +1,104 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "cli": { + "packageManager": "pnpm", + "analytics": false, + "cache": { + "enabled": false + } + }, + "newProjectRoot": "projects", + "projects": { + "basic": { + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "inlineTemplate": true, + "inlineStyle": true, + "skipTests": true + }, + "@schematics/angular:class": { + "skipTests": true + }, + "@schematics/angular:directive": { + "skipTests": true + }, + "@schematics/angular:guard": { + "skipTests": true + }, + "@schematics/angular:interceptor": { + "skipTests": true + }, + "@schematics/angular:pipe": { + "skipTests": true + }, + "@schematics/angular:resolver": { + "skipTests": true + }, + "@schematics/angular:service": { + "skipTests": true + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:application", + "options": { + "outputPath": "dist/basic", + "index": "src/index.html", + "browser": "src/main.ts", + "polyfills": ["zone.js"], + "tsConfig": "tsconfig.app.json", + "assets": ["src/favicon.ico", "src/assets"], + "styles": [], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "basic:build:production" + }, + "development": { + "buildTarget": "basic:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "buildTarget": "basic:build" + } + } + } + } + } +} diff --git a/examples/angular/basic-persister/package.json b/examples/angular/basic-persister/package.json new file mode 100644 index 0000000000..1c8c29b1de --- /dev/null +++ b/examples/angular/basic-persister/package.json @@ -0,0 +1,30 @@ +{ + "name": "@tanstack/query-example-angular-basic-persister", + "type": "module", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development" + }, + "private": true, + "dependencies": { + "@angular/common": "^17.3.12", + "@angular/compiler": "^17.3.12", + "@angular/core": "^17.3.12", + "@angular/platform-browser": "^17.3.12", + "@angular/platform-browser-dynamic": "^17.3.12", + "@tanstack/angular-query-experimental": "^5.60.5", + "@tanstack/angular-query-persist-client-experimental": "^5.60.5", + "@tanstack/query-sync-storage-persister": "^5.60.6", + "rxjs": "^7.8.1", + "tslib": "^2.6.3", + "zone.js": "^0.14.8" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^17.3.8", + "@angular/cli": "^17.3.8", + "@angular/compiler-cli": "^17.3.12", + "typescript": "5.3.3" + } +} diff --git a/examples/angular/basic-persister/src/app/app.component.html b/examples/angular/basic-persister/src/app/app.component.html new file mode 100644 index 0000000000..5e11cadf9b --- /dev/null +++ b/examples/angular/basic-persister/src/app/app.component.html @@ -0,0 +1,10 @@ +

+ Try to mock offline behavior with the button in the devtools. You can + navigate around as long as there is already data in the cache. You'll get + a refetch as soon as you go "online" again. +

+@if (postId() > -1) { + +} @else { + +} diff --git a/examples/angular/basic-persister/src/app/app.component.ts b/examples/angular/basic-persister/src/app/app.component.ts new file mode 100644 index 0000000000..deb2fe24b2 --- /dev/null +++ b/examples/angular/basic-persister/src/app/app.component.ts @@ -0,0 +1,14 @@ +import { ChangeDetectionStrategy, Component, signal } from '@angular/core' +import { PostComponent } from './components/post.component' +import { PostsComponent } from './components/posts.component' + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'basic-example', + standalone: true, + templateUrl: './app.component.html', + imports: [PostComponent, PostsComponent], +}) +export class BasicExampleComponent { + postId = signal(-1) +} diff --git a/examples/angular/basic-persister/src/app/app.config.ts b/examples/angular/basic-persister/src/app/app.config.ts new file mode 100644 index 0000000000..9d7b34fbd8 --- /dev/null +++ b/examples/angular/basic-persister/src/app/app.config.ts @@ -0,0 +1,37 @@ +import { provideHttpClient, withFetch } from '@angular/common/http' +import { + QueryClient, + provideTanStackQuery, + withDevtools, +} from '@tanstack/angular-query-experimental' +import { withPersistQueryClient } from '@tanstack/angular-query-persist-client-experimental' +import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister' +import type { ApplicationConfig } from '@angular/core' + +const localStoragePersister = createSyncStoragePersister({ + storage: window.localStorage, +}) + +export const appConfig: ApplicationConfig = { + providers: [ + provideHttpClient(withFetch()), + provideTanStackQuery( + new QueryClient({ + defaultOptions: { + queries: { + staleTime: 1000 * 60, + gcTime: 1000 * 60 * 60 * 24, // 24 hours + }, + }, + }), + withDevtools(), + withPersistQueryClient([ + { + persistOptions: { + persister: localStoragePersister, + }, + }, + ]), + ), + ], +} diff --git a/examples/angular/basic-persister/src/app/components/post.component.html b/examples/angular/basic-persister/src/app/components/post.component.html new file mode 100644 index 0000000000..34b36e94fc --- /dev/null +++ b/examples/angular/basic-persister/src/app/components/post.component.html @@ -0,0 +1,19 @@ +
+
+ Back +
+ @if (postQuery.isPending()) { + Loading... + } @else if (postQuery.isError()) { + Error: {{ postQuery.error().message }} + } + @if (postQuery.data(); as post) { +

{{ post.title }}

+
+

{{ post.body }}

+
+ @if (postQuery.isFetching()) { + Background Updating... + } + } +
diff --git a/examples/angular/basic-persister/src/app/components/post.component.ts b/examples/angular/basic-persister/src/app/components/post.component.ts new file mode 100644 index 0000000000..d77e707e99 --- /dev/null +++ b/examples/angular/basic-persister/src/app/components/post.component.ts @@ -0,0 +1,39 @@ +import { + ChangeDetectionStrategy, + Component, + EventEmitter, + Output, + inject, + input, +} from '@angular/core' +import { QueryClient, injectQuery } from '@tanstack/angular-query-experimental' +import { fromEvent, lastValueFrom, takeUntil } from 'rxjs' +import { PostsService } from '../services/posts-service' + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'post', + standalone: true, + templateUrl: './post.component.html', +}) +export class PostComponent { + #postsService = inject(PostsService) + + @Output() setPostId = new EventEmitter() + + postId = input(0) + + postQuery = injectQuery(() => ({ + enabled: this.postId() > 0, + queryKey: ['post', this.postId()], + queryFn: async (context) => { + // Cancels the request when component is destroyed before the request finishes + const abort$ = fromEvent(context.signal, 'abort') + return lastValueFrom( + this.#postsService.postById$(this.postId()).pipe(takeUntil(abort$)), + ) + }, + })) + + queryClient = inject(QueryClient) +} diff --git a/examples/angular/basic-persister/src/app/components/posts.component.html b/examples/angular/basic-persister/src/app/components/posts.component.html new file mode 100644 index 0000000000..568a6a4df4 --- /dev/null +++ b/examples/angular/basic-persister/src/app/components/posts.component.html @@ -0,0 +1,39 @@ +
+

Posts

+ @switch (postsQuery.status()) { + @case ('pending') { + Loading... + } + @case ('error') { + Error: {{ postsQuery.error()?.message }} + } + @default { +
+ @for (post of postsQuery.data(); track post.id) { +

+ + + {{ post.title }} +

+ } +
+ } + } +
+ @if (postsQuery.isFetching()) { + Background Updating... + } +
+
diff --git a/examples/angular/basic-persister/src/app/components/posts.component.ts b/examples/angular/basic-persister/src/app/components/posts.component.ts new file mode 100644 index 0000000000..3c8bf7c79d --- /dev/null +++ b/examples/angular/basic-persister/src/app/components/posts.component.ts @@ -0,0 +1,28 @@ +import { + ChangeDetectionStrategy, + Component, + EventEmitter, + Output, + inject, +} from '@angular/core' +import { QueryClient, injectQuery } from '@tanstack/angular-query-experimental' +import { lastValueFrom } from 'rxjs' +import { PostsService } from '../services/posts-service' + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'posts', + standalone: true, + templateUrl: './posts.component.html', +}) +export class PostsComponent { + queryClient = inject(QueryClient) + #postsService = inject(PostsService) + + @Output() setPostId = new EventEmitter() + + postsQuery = injectQuery(() => ({ + queryKey: ['posts'], + queryFn: () => lastValueFrom(this.#postsService.allPosts$()), + })) +} diff --git a/examples/angular/basic-persister/src/app/services/posts-service.ts b/examples/angular/basic-persister/src/app/services/posts-service.ts new file mode 100644 index 0000000000..fed2a1b11c --- /dev/null +++ b/examples/angular/basic-persister/src/app/services/posts-service.ts @@ -0,0 +1,21 @@ +import { HttpClient } from '@angular/common/http' +import { Injectable, inject } from '@angular/core' + +@Injectable({ + providedIn: 'root', +}) +export class PostsService { + #http = inject(HttpClient) + + postById$ = (postId: number) => + this.#http.get(`https://jsonplaceholder.typicode.com/posts/${postId}`) + + allPosts$ = () => + this.#http.get>('https://jsonplaceholder.typicode.com/posts') +} + +export interface Post { + id: number + title: string + body: string +} diff --git a/examples/angular/basic-persister/src/favicon.ico b/examples/angular/basic-persister/src/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..57614f9c967596fad0a3989bec2b1deff33034f6 GIT binary patch literal 15086 zcmd^G33O9Omi+`8$@{|M-I6TH3wzF-p5CV8o}7f~KxR60LK+ApEFB<$bcciv%@SmA zV{n>g85YMFFeU*Uvl=i4v)C*qgnb;$GQ=3XTe9{Y%c`mO%su)noNCCQ*@t1WXn|B(hQ7i~ zrUK8|pUkD6#lNo!bt$6)jR!&C?`P5G(`e((P($RaLeq+o0Vd~f11;qB05kdbAOm?r zXv~GYr_sibQO9NGTCdT;+G(!{4Xs@4fPak8#L8PjgJwcs-Mm#nR_Z0s&u?nDX5^~@ z+A6?}g0|=4e_LoE69pPFO`yCD@BCjgKpzMH0O4Xs{Ahc?K3HC5;l=f zg>}alhBXX&);z$E-wai+9TTRtBX-bWYY@cl$@YN#gMd~tM_5lj6W%8ah4;uZ;jP@Q zVbuel1rPA?2@x9Y+u?e`l{Z4ngfG5q5BLH5QsEu4GVpt{KIp1?U)=3+KQ;%7ec8l* zdV=zZgN5>O3G(3L2fqj3;oBbZZw$Ij@`Juz@?+yy#OPw)>#wsTewVgTK9BGt5AbZ&?K&B3GVF&yu?@(Xj3fR3n+ZP0%+wo)D9_xp>Z$`A4 zfV>}NWjO#3lqumR0`gvnffd9Ka}JJMuHS&|55-*mCD#8e^anA<+sFZVaJe7{=p*oX zE_Uv?1>e~ga=seYzh{9P+n5<+7&9}&(kwqSaz;1aD|YM3HBiy<))4~QJSIryyqp| z8nGc(8>3(_nEI4n)n7j(&d4idW1tVLjZ7QbNLXg;LB ziHsS5pXHEjGJZb59KcvS~wv;uZR-+4qEqow`;JCfB*+b^UL^3!?;-^F%yt=VjU|v z39SSqKcRu_NVvz!zJzL0CceJaS6%!(eMshPv_0U5G`~!a#I$qI5Ic(>IONej@aH=f z)($TAT#1I{iCS4f{D2+ApS=$3E7}5=+y(rA9mM#;Cky%b*Gi0KfFA`ofKTzu`AV-9 znW|y@19rrZ*!N2AvDi<_ZeR3O2R{#dh1#3-d%$k${Rx42h+i&GZo5!C^dSL34*AKp z27mTd>k>?V&X;Nl%GZ(>0s`1UN~Hfyj>KPjtnc|)xM@{H_B9rNr~LuH`Gr5_am&Ep zTjZA8hljNj5H1Ipm-uD9rC}U{-vR!eay5&6x6FkfupdpT*84MVwGpdd(}ib)zZ3Ky z7C$pnjc82(W_y_F{PhYj?o!@3__UUvpX)v69aBSzYj3 zdi}YQkKs^SyXyFG2LTRz9{(w}y~!`{EuAaUr6G1M{*%c+kP1olW9z23dSH!G4_HSK zzae-DF$OGR{ofP*!$a(r^5Go>I3SObVI6FLY)N@o<*gl0&kLo-OT{Tl*7nCz>Iq=? zcigIDHtj|H;6sR?or8Wd_a4996GI*CXGU}o;D9`^FM!AT1pBY~?|4h^61BY#_yIfO zKO?E0 zJ{Pc`9rVEI&$xxXu`<5E)&+m(7zX^v0rqofLs&bnQT(1baQkAr^kEsk)15vlzAZ-l z@OO9RF<+IiJ*O@HE256gCt!bF=NM*vh|WVWmjVawcNoksRTMvR03H{p@cjwKh(CL4 z7_PB(dM=kO)!s4fW!1p0f93YN@?ZSG` z$B!JaAJCtW$B97}HNO9(x-t30&E}Mo1UPi@Av%uHj~?T|!4JLwV;KCx8xO#b9IlUW zI6+{a@Wj|<2Y=U;a@vXbxqZNngH8^}LleE_4*0&O7#3iGxfJ%Id>+sb;7{L=aIic8 z|EW|{{S)J-wr@;3PmlxRXU8!e2gm_%s|ReH!reFcY8%$Hl4M5>;6^UDUUae?kOy#h zk~6Ee_@ZAn48Bab__^bNmQ~+k=02jz)e0d9Z3>G?RGG!65?d1>9}7iG17?P*=GUV-#SbLRw)Hu{zx*azHxWkGNTWl@HeWjA?39Ia|sCi{e;!^`1Oec zb>Z|b65OM*;eC=ZLSy?_fg$&^2xI>qSLA2G*$nA3GEnp3$N-)46`|36m*sc#4%C|h zBN<2U;7k>&G_wL4=Ve5z`ubVD&*Hxi)r@{4RCDw7U_D`lbC(9&pG5C*z#W>8>HU)h z!h3g?2UL&sS!oY5$3?VlA0Me9W5e~V;2jds*fz^updz#AJ%G8w2V}AEE?E^=MK%Xt z__Bx1cr7+DQmuHmzn*|hh%~eEc9@m05@clWfpEFcr+06%0&dZJH&@8^&@*$qR@}o3 z@Tuuh2FsLz^zH+dN&T&?0G3I?MpmYJ;GP$J!EzjeM#YLJ!W$}MVNb0^HfOA>5Fe~UNn%Zk(PT@~9}1dt)1UQ zU*B5K?Dl#G74qmg|2>^>0WtLX#Jz{lO4NT`NYB*(L#D|5IpXr9v&7a@YsGp3vLR7L zHYGHZg7{ie6n~2p$6Yz>=^cEg7tEgk-1YRl%-s7^cbqFb(U7&Dp78+&ut5!Tn(hER z|Gp4Ed@CnOPeAe|N>U(dB;SZ?NU^AzoD^UAH_vamp6Ws}{|mSq`^+VP1g~2B{%N-!mWz<`)G)>V-<`9`L4?3dM%Qh6<@kba+m`JS{Ya@9Fq*m6$$ zA1%Ogc~VRH33|S9l%CNb4zM%k^EIpqY}@h{w(aBcJ9c05oiZx#SK9t->5lSI`=&l~ z+-Ic)a{FbBhXV$Xt!WRd`R#Jk-$+_Z52rS>?Vpt2IK<84|E-SBEoIw>cs=a{BlQ7O z-?{Fy_M&84&9|KM5wt~)*!~i~E=(6m8(uCO)I=)M?)&sRbzH$9Rovzd?ZEY}GqX+~ zFbEbLz`BZ49=2Yh-|<`waK-_4!7`ro@zlC|r&I4fc4oyb+m=|c8)8%tZ-z5FwhzDt zL5kB@u53`d@%nHl0Sp)Dw`(QU&>vujEn?GPEXUW!Wi<+4e%BORl&BIH+SwRcbS}X@ z01Pk|vA%OdJKAs17zSXtO55k!;%m9>1eW9LnyAX4uj7@${O6cfii`49qTNItzny5J zH&Gj`e}o}?xjQ}r?LrI%FjUd@xflT3|7LA|ka%Q3i}a8gVm<`HIWoJGH=$EGClX^C0lysQJ>UO(q&;`T#8txuoQ_{l^kEV9CAdXuU1Ghg8 zN_6hHFuy&1x24q5-(Z7;!poYdt*`UTdrQOIQ!2O7_+AHV2hgXaEz7)>$LEdG z<8vE^Tw$|YwZHZDPM!SNOAWG$?J)MdmEk{U!!$M#fp7*Wo}jJ$Q(=8>R`Ats?e|VU?Zt7Cdh%AdnfyN3MBWw{ z$OnREvPf7%z6`#2##_7id|H%Y{vV^vWXb?5d5?a_y&t3@p9t$ncHj-NBdo&X{wrfJ zamN)VMYROYh_SvjJ=Xd!Ga?PY_$;*L=SxFte!4O6%0HEh%iZ4=gvns7IWIyJHa|hT z2;1+e)`TvbNb3-0z&DD_)Jomsg-7p_Uh`wjGnU1urmv1_oVqRg#=C?e?!7DgtqojU zWoAB($&53;TsXu^@2;8M`#z{=rPy?JqgYM0CDf4v@z=ZD|ItJ&8%_7A#K?S{wjxgd z?xA6JdJojrWpB7fr2p_MSsU4(R7=XGS0+Eg#xR=j>`H@R9{XjwBmqAiOxOL` zt?XK-iTEOWV}f>Pz3H-s*>W z4~8C&Xq25UQ^xH6H9kY_RM1$ch+%YLF72AA7^b{~VNTG}Tj#qZltz5Q=qxR`&oIlW Nr__JTFzvMr^FKp4S3v*( literal 0 HcmV?d00001 diff --git a/examples/angular/basic-persister/src/index.html b/examples/angular/basic-persister/src/index.html new file mode 100644 index 0000000000..0ca80dd67a --- /dev/null +++ b/examples/angular/basic-persister/src/index.html @@ -0,0 +1,13 @@ + + + + + TanStack Query Angular basic example + + + + + + + + diff --git a/examples/angular/basic-persister/src/main.ts b/examples/angular/basic-persister/src/main.ts new file mode 100644 index 0000000000..aa33a0b9ff --- /dev/null +++ b/examples/angular/basic-persister/src/main.ts @@ -0,0 +1,7 @@ +import { bootstrapApplication } from '@angular/platform-browser' +import { appConfig } from './app/app.config' +import { BasicExampleComponent } from './app/app.component' + +bootstrapApplication(BasicExampleComponent, appConfig).catch((err) => + console.error(err), +) diff --git a/examples/angular/basic-persister/tsconfig.app.json b/examples/angular/basic-persister/tsconfig.app.json new file mode 100644 index 0000000000..5b9d3c5ecb --- /dev/null +++ b/examples/angular/basic-persister/tsconfig.app.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": ["src/main.ts"], + "include": ["src/**/*.d.ts"] +} diff --git a/examples/angular/basic-persister/tsconfig.json b/examples/angular/basic-persister/tsconfig.json new file mode 100644 index 0000000000..82c63d482a --- /dev/null +++ b/examples/angular/basic-persister/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "esModuleInterop": true, + "sourceMap": true, + "declaration": false, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": ["ES2022", "dom"] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} From 7130913ba2435a44031b407c0dae3cb8c0584f17 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 12:09:59 +0200 Subject: [PATCH 05/35] fix(angular-query): synced angular versions in new package --- .../package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/angular-persist-query-client-experimental/package.json b/packages/angular-persist-query-client-experimental/package.json index 644da881eb..355e3c188a 100644 --- a/packages/angular-persist-query-client-experimental/package.json +++ b/packages/angular-persist-query-client-experimental/package.json @@ -53,10 +53,10 @@ }, "devDependencies": { "@analogjs/vite-plugin-angular": "^1.6.4", - "@angular/compiler": "^17.3.12", - "@angular/core": "^17.3.12", - "@angular/platform-browser": "^17.3.12", - "@angular/platform-browser-dynamic": "^17.3.12", + "@angular/compiler": "^19.0.0", + "@angular/core": "^19.0.0", + "@angular/platform-browser": "^19.0.0", + "@angular/platform-browser-dynamic": "^19.0.0", "@microsoft/api-extractor": "^7.47.4", "@tanstack/angular-query-experimental": "workspace:*", "@testing-library/angular": "^17.3.2", From 570918440e500075f147275e717a44fdbc19c5e1 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 12:17:30 +0200 Subject: [PATCH 06/35] fix(angular-query): commit before ng update --- examples/angular/basic-persister/package.json | 3 +-- .../angular-persist-query-client-experimental/package.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/angular/basic-persister/package.json b/examples/angular/basic-persister/package.json index 1c8c29b1de..599f473d97 100644 --- a/examples/angular/basic-persister/package.json +++ b/examples/angular/basic-persister/package.json @@ -14,8 +14,7 @@ "@angular/core": "^17.3.12", "@angular/platform-browser": "^17.3.12", "@angular/platform-browser-dynamic": "^17.3.12", - "@tanstack/angular-query-experimental": "^5.60.5", - "@tanstack/angular-query-persist-client-experimental": "^5.60.5", + "@tanstack/angular-query-experimental": "5.61.6", "@tanstack/query-sync-storage-persister": "^5.60.6", "rxjs": "^7.8.1", "tslib": "^2.6.3", diff --git a/packages/angular-persist-query-client-experimental/package.json b/packages/angular-persist-query-client-experimental/package.json index 355e3c188a..cd3d6cb5e0 100644 --- a/packages/angular-persist-query-client-experimental/package.json +++ b/packages/angular-persist-query-client-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-persist-client-experimental", - "version": "5.61.1", + "version": "5.61.6", "description": "Angular bindings to work with persisters in TanStack/angular-query", "author": "Omer Gronich", "license": "MIT", From 9e6ef24c34a805d8e750853296f6980ddd236ed5 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 12:20:52 +0200 Subject: [PATCH 07/35] feat(angular-query): updated example to v18 --- examples/angular/basic-persister/angular.json | 6 ++--- examples/angular/basic-persister/package.json | 22 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/angular/basic-persister/angular.json b/examples/angular/basic-persister/angular.json index 1256bd9784..1fa5e38462 100644 --- a/examples/angular/basic-persister/angular.json +++ b/examples/angular/basic-persister/angular.json @@ -45,7 +45,7 @@ "prefix": "app", "architect": { "build": { - "builder": "@angular-devkit/build-angular:application", + "builder": "@angular/build:application", "options": { "outputPath": "dist/basic", "index": "src/index.html", @@ -81,7 +81,7 @@ "defaultConfiguration": "production" }, "serve": { - "builder": "@angular-devkit/build-angular:dev-server", + "builder": "@angular/build:dev-server", "configurations": { "production": { "buildTarget": "basic:build:production" @@ -93,7 +93,7 @@ "defaultConfiguration": "development" }, "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", + "builder": "@angular/build:extract-i18n", "options": { "buildTarget": "basic:build" } diff --git a/examples/angular/basic-persister/package.json b/examples/angular/basic-persister/package.json index 599f473d97..b9c6f905d3 100644 --- a/examples/angular/basic-persister/package.json +++ b/examples/angular/basic-persister/package.json @@ -9,21 +9,21 @@ }, "private": true, "dependencies": { - "@angular/common": "^17.3.12", - "@angular/compiler": "^17.3.12", - "@angular/core": "^17.3.12", - "@angular/platform-browser": "^17.3.12", - "@angular/platform-browser-dynamic": "^17.3.12", + "@angular/common": "^18.2.13", + "@angular/compiler": "^18.2.13", + "@angular/core": "^18.2.13", + "@angular/platform-browser": "^18.2.13", + "@angular/platform-browser-dynamic": "^18.2.13", "@tanstack/angular-query-experimental": "5.61.6", "@tanstack/query-sync-storage-persister": "^5.60.6", "rxjs": "^7.8.1", "tslib": "^2.6.3", - "zone.js": "^0.14.8" + "zone.js": "^0.14.10" }, "devDependencies": { - "@angular-devkit/build-angular": "^17.3.8", - "@angular/cli": "^17.3.8", - "@angular/compiler-cli": "^17.3.12", - "typescript": "5.3.3" + "@angular/build": "^18.2.12", + "@angular/cli": "^18.2.12", + "@angular/compiler-cli": "^18.2.13", + "typescript": "5.5.4" } -} +} \ No newline at end of file From 962cf32434273633267bfaf69cca73611093ca73 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 12:24:33 +0200 Subject: [PATCH 08/35] fix(angular-query): fixed project name to basic-persister --- examples/angular/basic-persister/README.md | 2 +- examples/angular/basic-persister/angular.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/angular/basic-persister/README.md b/examples/angular/basic-persister/README.md index 15f2ed2f4a..47d5931979 100644 --- a/examples/angular/basic-persister/README.md +++ b/examples/angular/basic-persister/README.md @@ -1,4 +1,4 @@ -# TanStack Query Angular basic example +# TanStack Query Angular basic persister example To run this example: diff --git a/examples/angular/basic-persister/angular.json b/examples/angular/basic-persister/angular.json index 1fa5e38462..64adfea7c4 100644 --- a/examples/angular/basic-persister/angular.json +++ b/examples/angular/basic-persister/angular.json @@ -10,7 +10,7 @@ }, "newProjectRoot": "projects", "projects": { - "basic": { + "basic-persister": { "projectType": "application", "schematics": { "@schematics/angular:component": { @@ -47,7 +47,7 @@ "build": { "builder": "@angular/build:application", "options": { - "outputPath": "dist/basic", + "outputPath": "dist/basic-persister", "index": "src/index.html", "browser": "src/main.ts", "polyfills": ["zone.js"], @@ -84,10 +84,10 @@ "builder": "@angular/build:dev-server", "configurations": { "production": { - "buildTarget": "basic:build:production" + "buildTarget": "basic-persister:build:production" }, "development": { - "buildTarget": "basic:build:development" + "buildTarget": "basic-persister:build:development" } }, "defaultConfiguration": "development" @@ -95,7 +95,7 @@ "extract-i18n": { "builder": "@angular/build:extract-i18n", "options": { - "buildTarget": "basic:build" + "buildTarget": "basic-persister:build" } } } From 4d305a579390d977156cb88ff32dd562ef0aca92 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 12:27:46 +0200 Subject: [PATCH 09/35] feat(angular-query): updated example basic-persister to v19 --- examples/angular/basic-persister/package.json | 18 +++++++++--------- .../basic-persister/src/app/app.component.ts | 1 - 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/examples/angular/basic-persister/package.json b/examples/angular/basic-persister/package.json index b9c6f905d3..058d812e64 100644 --- a/examples/angular/basic-persister/package.json +++ b/examples/angular/basic-persister/package.json @@ -9,21 +9,21 @@ }, "private": true, "dependencies": { - "@angular/common": "^18.2.13", - "@angular/compiler": "^18.2.13", - "@angular/core": "^18.2.13", - "@angular/platform-browser": "^18.2.13", - "@angular/platform-browser-dynamic": "^18.2.13", + "@angular/common": "^19.0.1", + "@angular/compiler": "^19.0.1", + "@angular/core": "^19.0.1", + "@angular/platform-browser": "^19.0.1", + "@angular/platform-browser-dynamic": "^19.0.1", "@tanstack/angular-query-experimental": "5.61.6", "@tanstack/query-sync-storage-persister": "^5.60.6", "rxjs": "^7.8.1", "tslib": "^2.6.3", - "zone.js": "^0.14.10" + "zone.js": "^0.15.0" }, "devDependencies": { - "@angular/build": "^18.2.12", - "@angular/cli": "^18.2.12", - "@angular/compiler-cli": "^18.2.13", + "@angular/build": "^19.0.2", + "@angular/cli": "^19.0.2", + "@angular/compiler-cli": "^19.0.1", "typescript": "5.5.4" } } \ No newline at end of file diff --git a/examples/angular/basic-persister/src/app/app.component.ts b/examples/angular/basic-persister/src/app/app.component.ts index deb2fe24b2..5958a1b5e7 100644 --- a/examples/angular/basic-persister/src/app/app.component.ts +++ b/examples/angular/basic-persister/src/app/app.component.ts @@ -5,7 +5,6 @@ import { PostsComponent } from './components/posts.component' @Component({ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'basic-example', - standalone: true, templateUrl: './app.component.html', imports: [PostComponent, PostsComponent], }) From 630e4627c270e145ed3511bd52726864f3447934 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 12:29:30 +0200 Subject: [PATCH 10/35] feat(angular-query): included back the persister package after angular migration --- examples/angular/basic-persister/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/angular/basic-persister/package.json b/examples/angular/basic-persister/package.json index 058d812e64..f31ac49a5e 100644 --- a/examples/angular/basic-persister/package.json +++ b/examples/angular/basic-persister/package.json @@ -15,6 +15,7 @@ "@angular/platform-browser": "^19.0.1", "@angular/platform-browser-dynamic": "^19.0.1", "@tanstack/angular-query-experimental": "5.61.6", + "@tanstack/angular-query-persist-client-experimental": "5.61.6", "@tanstack/query-sync-storage-persister": "^5.60.6", "rxjs": "^7.8.1", "tslib": "^2.6.3", @@ -26,4 +27,4 @@ "@angular/compiler-cli": "^19.0.1", "typescript": "5.5.4" } -} \ No newline at end of file +} From fed1caa5c860274c5cabb7c7628fba8641f57761 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 12:46:23 +0200 Subject: [PATCH 11/35] feat(angular-query): migrate to provideEnvironmentInitializer --- .../src/with-persist-query-client.ts | 52 +++--- .../src/providers.ts | 162 +++++++++--------- 2 files changed, 101 insertions(+), 113 deletions(-) diff --git a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts index cee649cdd6..ef55b3c109 100644 --- a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts +++ b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts @@ -5,9 +5,9 @@ import { } from '@tanstack/angular-query-experimental' import { DestroyRef, - ENVIRONMENT_INITIALIZER, PLATFORM_ID, inject, + provideEnvironmentInitializer, signal, } from '@angular/core' import { isPlatformBrowser } from '@angular/common' @@ -60,35 +60,31 @@ export function withPersistQueryClient( const isRestoring = signal(false) const providers = [ provideIsRestoring(isRestoring.asReadonly()), - { - provide: ENVIRONMENT_INITIALIZER, - multi: true, - useValue: () => { - if (!isPlatformBrowser(inject(PLATFORM_ID))) return - const destroyRef = inject(DestroyRef) - const queryClient = injectQueryClient() + provideEnvironmentInitializer(() => { + if (!isPlatformBrowser(inject(PLATFORM_ID))) return + const destroyRef = inject(DestroyRef) + const queryClient = injectQueryClient() - isRestoring.set(true) - const restorations = persistQueryClientOptions.map( - ({ onSuccess, persistOptions }) => { - const options = { queryClient, ...persistOptions } - return persistQueryClientRestore(options).then(async () => { - try { - if (onSuccess) { - await onSuccess() - } - } finally { - const cleanup = persistQueryClientSubscribe(options) - destroyRef.onDestroy(cleanup) + isRestoring.set(true) + const restorations = persistQueryClientOptions.map( + ({ onSuccess, persistOptions }) => { + const options = { queryClient, ...persistOptions } + return persistQueryClientRestore(options).then(async () => { + try { + if (onSuccess) { + await onSuccess() } - }) - }, - ) - Promise.all(restorations).finally(() => { - isRestoring.set(false) - }) - }, - }, + } finally { + const cleanup = persistQueryClientSubscribe(options) + destroyRef.onDestroy(cleanup) + } + }) + }, + ) + Promise.all(restorations).finally(() => { + isRestoring.set(false) + }) + }), ] return queryFeature('PersistQueryClient', providers) } diff --git a/packages/angular-query-experimental/src/providers.ts b/packages/angular-query-experimental/src/providers.ts index 50fffaff2d..dc02533143 100644 --- a/packages/angular-query-experimental/src/providers.ts +++ b/packages/angular-query-experimental/src/providers.ts @@ -1,12 +1,12 @@ import { DestroyRef, - ENVIRONMENT_INITIALIZER, Injector, PLATFORM_ID, computed, effect, inject, makeEnvironmentProviders, + provideEnvironmentInitializer, runInInjectionContext, } from '@angular/core' import { QueryClient, onlineManager } from '@tanstack/query-core' @@ -21,6 +21,8 @@ import type { TanstackQueryDevtools, } from '@tanstack/query-devtools' +type Providers = Provider | EnvironmentProviders + /** * Usually {@link provideTanStackQuery} is used once to set up TanStack Query and the * {@link https://tanstack.com/query/latest/docs/reference/QueryClient|QueryClient} @@ -98,15 +100,11 @@ export function provideTanStackQuery( ): EnvironmentProviders { return makeEnvironmentProviders([ provideQueryClient(queryClient), - { - provide: ENVIRONMENT_INITIALIZER, - multi: true, - useValue: () => { - queryClient.mount() - // Unmount the query client on application destroy - inject(DestroyRef).onDestroy(() => queryClient.unmount()) - }, - }, + provideEnvironmentInitializer(() => { + queryClient.mount() + // Unmount the query client on application destroy + inject(DestroyRef).onDestroy(() => queryClient.unmount()) + }), features.map((feature) => feature.ɵproviders), ]) } @@ -132,7 +130,7 @@ export function provideAngularQuery( */ export interface QueryFeature { ɵkind: TFeatureKind - ɵproviders: Array + ɵproviders: Providers } /** @@ -143,7 +141,7 @@ export interface QueryFeature { */ export function queryFeature( kind: TFeatureKind, - providers: Array, + providers: Providers, ): QueryFeature { return { ɵkind: kind, ɵproviders: providers } } @@ -250,95 +248,89 @@ export interface DevtoolsOptions { export function withDevtools( optionsFn?: () => DevtoolsOptions, ): DeveloperToolsFeature { - let providers: Array = [] + let providers: Providers = [] if (!isDevMode() && !optionsFn) { providers = [] } else { providers = [ - { - provide: ENVIRONMENT_INITIALIZER, - multi: true, - useFactory: () => { - if (!isPlatformBrowser(inject(PLATFORM_ID))) return noop - const injector = inject(Injector) - const options = computed(() => - runInInjectionContext(injector, () => optionsFn?.() ?? {}), - ) + provideEnvironmentInitializer(() => { + if (!isPlatformBrowser(inject(PLATFORM_ID))) return noop + const injector = inject(Injector) + const options = computed(() => + runInInjectionContext(injector, () => optionsFn?.() ?? {}), + ) - let devtools: TanstackQueryDevtools | null = null - let el: HTMLElement | null = null + let devtools: TanstackQueryDevtools | null = null + let el: HTMLElement | null = null - const shouldLoadToolsSignal = computed(() => { - const { loadDevtools } = options() - return typeof loadDevtools === 'boolean' - ? loadDevtools - : isDevMode() - }) + const shouldLoadToolsSignal = computed(() => { + const { loadDevtools } = options() + return typeof loadDevtools === 'boolean' ? loadDevtools : isDevMode() + }) - const destroyRef = inject(DestroyRef) + const destroyRef = inject(DestroyRef) - const getResolvedQueryClient = () => { - const injectedClient = injector.get(QueryClient, null) - const client = options().client ?? injectedClient - if (!client) { - throw new Error('No QueryClient found') - } - return client + const getResolvedQueryClient = () => { + const injectedClient = injector.get(QueryClient, null) + const client = options().client ?? injectedClient + if (!client) { + throw new Error('No QueryClient found') } + return client + } - const destroyDevtools = () => { - devtools?.unmount() - el?.remove() - devtools = null - } + const destroyDevtools = () => { + devtools?.unmount() + el?.remove() + devtools = null + } - return () => - effect(() => { - const shouldLoadTools = shouldLoadToolsSignal() - const { - client, - position, - errorTypes, - buttonPosition, - initialIsOpen, - } = options() + return () => + effect(() => { + const shouldLoadTools = shouldLoadToolsSignal() + const { + client, + position, + errorTypes, + buttonPosition, + initialIsOpen, + } = options() - if (devtools && !shouldLoadTools) { - destroyDevtools() - return - } else if (devtools && shouldLoadTools) { - client && devtools.setClient(client) - position && devtools.setPosition(position) - errorTypes && devtools.setErrorTypes(errorTypes) - buttonPosition && devtools.setButtonPosition(buttonPosition) - initialIsOpen && devtools.setInitialIsOpen(initialIsOpen) - return - } else if (!shouldLoadTools) { - return - } + if (devtools && !shouldLoadTools) { + destroyDevtools() + return + } else if (devtools && shouldLoadTools) { + client && devtools.setClient(client) + position && devtools.setPosition(position) + errorTypes && devtools.setErrorTypes(errorTypes) + buttonPosition && devtools.setButtonPosition(buttonPosition) + initialIsOpen && devtools.setInitialIsOpen(initialIsOpen) + return + } else if (!shouldLoadTools) { + return + } - el = document.body.appendChild(document.createElement('div')) - el.classList.add('tsqd-parent-container') + el = document.body.appendChild(document.createElement('div')) + el.classList.add('tsqd-parent-container') - import('@tanstack/query-devtools').then((queryDevtools) => - runInInjectionContext(injector, () => { - devtools = new queryDevtools.TanstackQueryDevtools({ - ...options(), - client: getResolvedQueryClient(), - queryFlavor: 'Angular Query', - version: '5', - onlineManager, - }) + import('@tanstack/query-devtools').then((queryDevtools) => + runInInjectionContext(injector, () => { + devtools = new queryDevtools.TanstackQueryDevtools({ + ...options(), + client: getResolvedQueryClient(), + queryFlavor: 'Angular Query', + version: '5', + onlineManager, + }) - el && devtools.mount(el) + el && devtools.mount(el) - // Unmount the devtools on application destroy - destroyRef.onDestroy(destroyDevtools) - }), - ) - }) - }, - }, + // Unmount the devtools on application destroy + destroyRef.onDestroy(destroyDevtools) + }), + ) + }) + }), ] } return queryFeature('DeveloperTools', providers) From 63831fb577bae16a69093c78be7f69a4b83ae7e1 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 12:47:46 +0200 Subject: [PATCH 12/35] fix(angular-query): fix eslint issues in inject-queries.ts --- packages/angular-query-experimental/src/inject-queries.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular-query-experimental/src/inject-queries.ts b/packages/angular-query-experimental/src/inject-queries.ts index aa2421139d..345d511924 100644 --- a/packages/angular-query-experimental/src/inject-queries.ts +++ b/packages/angular-query-experimental/src/inject-queries.ts @@ -12,6 +12,7 @@ import { signal, } from '@angular/core' import { assertInjector } from './util/assert-injector/assert-injector' +import { injectIsRestoring } from './inject-is-restoring' import type { Injector, Signal } from '@angular/core' import type { DefaultError, @@ -24,7 +25,6 @@ import type { QueryObserverResult, ThrowOnError, } from '@tanstack/query-core' -import { injectIsRestoring } from './inject-is-restoring' // This defines the `CreateQueryOptions` that are accepted in `QueriesOptions` & `GetOptions`. // `placeholderData` function does not have a parameter From 059b6209bc0e1a0ec04dd8cce706d0bc30855ccb Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 12:55:49 +0200 Subject: [PATCH 13/35] Revert "feat(angular-query): migrate to provideEnvironmentInitializer" This reverts commit af5b47b31511dd2db180abfd92f08541f29532d4. --- .../src/with-persist-query-client.ts | 52 +++--- .../src/providers.ts | 162 +++++++++--------- 2 files changed, 113 insertions(+), 101 deletions(-) diff --git a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts index ef55b3c109..cee649cdd6 100644 --- a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts +++ b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts @@ -5,9 +5,9 @@ import { } from '@tanstack/angular-query-experimental' import { DestroyRef, + ENVIRONMENT_INITIALIZER, PLATFORM_ID, inject, - provideEnvironmentInitializer, signal, } from '@angular/core' import { isPlatformBrowser } from '@angular/common' @@ -60,31 +60,35 @@ export function withPersistQueryClient( const isRestoring = signal(false) const providers = [ provideIsRestoring(isRestoring.asReadonly()), - provideEnvironmentInitializer(() => { - if (!isPlatformBrowser(inject(PLATFORM_ID))) return - const destroyRef = inject(DestroyRef) - const queryClient = injectQueryClient() + { + provide: ENVIRONMENT_INITIALIZER, + multi: true, + useValue: () => { + if (!isPlatformBrowser(inject(PLATFORM_ID))) return + const destroyRef = inject(DestroyRef) + const queryClient = injectQueryClient() - isRestoring.set(true) - const restorations = persistQueryClientOptions.map( - ({ onSuccess, persistOptions }) => { - const options = { queryClient, ...persistOptions } - return persistQueryClientRestore(options).then(async () => { - try { - if (onSuccess) { - await onSuccess() + isRestoring.set(true) + const restorations = persistQueryClientOptions.map( + ({ onSuccess, persistOptions }) => { + const options = { queryClient, ...persistOptions } + return persistQueryClientRestore(options).then(async () => { + try { + if (onSuccess) { + await onSuccess() + } + } finally { + const cleanup = persistQueryClientSubscribe(options) + destroyRef.onDestroy(cleanup) } - } finally { - const cleanup = persistQueryClientSubscribe(options) - destroyRef.onDestroy(cleanup) - } - }) - }, - ) - Promise.all(restorations).finally(() => { - isRestoring.set(false) - }) - }), + }) + }, + ) + Promise.all(restorations).finally(() => { + isRestoring.set(false) + }) + }, + }, ] return queryFeature('PersistQueryClient', providers) } diff --git a/packages/angular-query-experimental/src/providers.ts b/packages/angular-query-experimental/src/providers.ts index dc02533143..50fffaff2d 100644 --- a/packages/angular-query-experimental/src/providers.ts +++ b/packages/angular-query-experimental/src/providers.ts @@ -1,12 +1,12 @@ import { DestroyRef, + ENVIRONMENT_INITIALIZER, Injector, PLATFORM_ID, computed, effect, inject, makeEnvironmentProviders, - provideEnvironmentInitializer, runInInjectionContext, } from '@angular/core' import { QueryClient, onlineManager } from '@tanstack/query-core' @@ -21,8 +21,6 @@ import type { TanstackQueryDevtools, } from '@tanstack/query-devtools' -type Providers = Provider | EnvironmentProviders - /** * Usually {@link provideTanStackQuery} is used once to set up TanStack Query and the * {@link https://tanstack.com/query/latest/docs/reference/QueryClient|QueryClient} @@ -100,11 +98,15 @@ export function provideTanStackQuery( ): EnvironmentProviders { return makeEnvironmentProviders([ provideQueryClient(queryClient), - provideEnvironmentInitializer(() => { - queryClient.mount() - // Unmount the query client on application destroy - inject(DestroyRef).onDestroy(() => queryClient.unmount()) - }), + { + provide: ENVIRONMENT_INITIALIZER, + multi: true, + useValue: () => { + queryClient.mount() + // Unmount the query client on application destroy + inject(DestroyRef).onDestroy(() => queryClient.unmount()) + }, + }, features.map((feature) => feature.ɵproviders), ]) } @@ -130,7 +132,7 @@ export function provideAngularQuery( */ export interface QueryFeature { ɵkind: TFeatureKind - ɵproviders: Providers + ɵproviders: Array } /** @@ -141,7 +143,7 @@ export interface QueryFeature { */ export function queryFeature( kind: TFeatureKind, - providers: Providers, + providers: Array, ): QueryFeature { return { ɵkind: kind, ɵproviders: providers } } @@ -248,89 +250,95 @@ export interface DevtoolsOptions { export function withDevtools( optionsFn?: () => DevtoolsOptions, ): DeveloperToolsFeature { - let providers: Providers = [] + let providers: Array = [] if (!isDevMode() && !optionsFn) { providers = [] } else { providers = [ - provideEnvironmentInitializer(() => { - if (!isPlatformBrowser(inject(PLATFORM_ID))) return noop - const injector = inject(Injector) - const options = computed(() => - runInInjectionContext(injector, () => optionsFn?.() ?? {}), - ) + { + provide: ENVIRONMENT_INITIALIZER, + multi: true, + useFactory: () => { + if (!isPlatformBrowser(inject(PLATFORM_ID))) return noop + const injector = inject(Injector) + const options = computed(() => + runInInjectionContext(injector, () => optionsFn?.() ?? {}), + ) - let devtools: TanstackQueryDevtools | null = null - let el: HTMLElement | null = null + let devtools: TanstackQueryDevtools | null = null + let el: HTMLElement | null = null - const shouldLoadToolsSignal = computed(() => { - const { loadDevtools } = options() - return typeof loadDevtools === 'boolean' ? loadDevtools : isDevMode() - }) + const shouldLoadToolsSignal = computed(() => { + const { loadDevtools } = options() + return typeof loadDevtools === 'boolean' + ? loadDevtools + : isDevMode() + }) - const destroyRef = inject(DestroyRef) + const destroyRef = inject(DestroyRef) - const getResolvedQueryClient = () => { - const injectedClient = injector.get(QueryClient, null) - const client = options().client ?? injectedClient - if (!client) { - throw new Error('No QueryClient found') + const getResolvedQueryClient = () => { + const injectedClient = injector.get(QueryClient, null) + const client = options().client ?? injectedClient + if (!client) { + throw new Error('No QueryClient found') + } + return client } - return client - } - const destroyDevtools = () => { - devtools?.unmount() - el?.remove() - devtools = null - } + const destroyDevtools = () => { + devtools?.unmount() + el?.remove() + devtools = null + } - return () => - effect(() => { - const shouldLoadTools = shouldLoadToolsSignal() - const { - client, - position, - errorTypes, - buttonPosition, - initialIsOpen, - } = options() + return () => + effect(() => { + const shouldLoadTools = shouldLoadToolsSignal() + const { + client, + position, + errorTypes, + buttonPosition, + initialIsOpen, + } = options() - if (devtools && !shouldLoadTools) { - destroyDevtools() - return - } else if (devtools && shouldLoadTools) { - client && devtools.setClient(client) - position && devtools.setPosition(position) - errorTypes && devtools.setErrorTypes(errorTypes) - buttonPosition && devtools.setButtonPosition(buttonPosition) - initialIsOpen && devtools.setInitialIsOpen(initialIsOpen) - return - } else if (!shouldLoadTools) { - return - } + if (devtools && !shouldLoadTools) { + destroyDevtools() + return + } else if (devtools && shouldLoadTools) { + client && devtools.setClient(client) + position && devtools.setPosition(position) + errorTypes && devtools.setErrorTypes(errorTypes) + buttonPosition && devtools.setButtonPosition(buttonPosition) + initialIsOpen && devtools.setInitialIsOpen(initialIsOpen) + return + } else if (!shouldLoadTools) { + return + } - el = document.body.appendChild(document.createElement('div')) - el.classList.add('tsqd-parent-container') + el = document.body.appendChild(document.createElement('div')) + el.classList.add('tsqd-parent-container') - import('@tanstack/query-devtools').then((queryDevtools) => - runInInjectionContext(injector, () => { - devtools = new queryDevtools.TanstackQueryDevtools({ - ...options(), - client: getResolvedQueryClient(), - queryFlavor: 'Angular Query', - version: '5', - onlineManager, - }) + import('@tanstack/query-devtools').then((queryDevtools) => + runInInjectionContext(injector, () => { + devtools = new queryDevtools.TanstackQueryDevtools({ + ...options(), + client: getResolvedQueryClient(), + queryFlavor: 'Angular Query', + version: '5', + onlineManager, + }) - el && devtools.mount(el) + el && devtools.mount(el) - // Unmount the devtools on application destroy - destroyRef.onDestroy(destroyDevtools) - }), - ) - }) - }), + // Unmount the devtools on application destroy + destroyRef.onDestroy(destroyDevtools) + }), + ) + }) + }, + }, ] } return queryFeature('DeveloperTools', providers) From 05848e24229b73c41d8f9f2048831dcda9b1fdde Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 13:25:26 +0200 Subject: [PATCH 14/35] fix(angular-query): only track the isRestoring in the effect --- .../src/create-base-query.ts | 54 ++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/packages/angular-query-experimental/src/create-base-query.ts b/packages/angular-query-experimental/src/create-base-query.ts index e78692ca2c..56883d9eaf 100644 --- a/packages/angular-query-experimental/src/create-base-query.ts +++ b/packages/angular-query-experimental/src/create-base-query.ts @@ -95,32 +95,36 @@ export function createBaseQuery< effect( () => { - // observer.trackResult is not used as this optimization is not needed for Angular - const unsubscribe = isRestoring() - ? () => undefined - : ngZone.runOutsideAngular(() => - observer.subscribe( - notifyManager.batchCalls( - (state: QueryObserverResult) => { - ngZone.run(() => { - if ( - state.isError && - !state.isFetching && - !isRestoring() && - shouldThrowError(observer.options.throwOnError, [ - state.error, - observer.getCurrentQuery(), - ]) - ) { - throw state.error - } - resultSignal.set(state) - }) - }, + const _isRestoring = isRestoring() + + untracked(() => { + const unsubscribe = _isRestoring + ? () => undefined + : ngZone.runOutsideAngular(() => + // observer.trackResult is not used as this optimization is not needed for Angular + observer.subscribe( + notifyManager.batchCalls( + (state: QueryObserverResult) => { + ngZone.run(() => { + if ( + state.isError && + !state.isFetching && + !_isRestoring && + shouldThrowError(observer.options.throwOnError, [ + state.error, + observer.getCurrentQuery(), + ]) + ) { + throw state.error + } + resultSignal.set(state) + }) + }, + ), ), - ), - ) - destroyRef.onDestroy(unsubscribe) + ) + destroyRef.onDestroy(unsubscribe) + }) }, { injector, From a0d31114d1b010ed45cc842784f2d14873627242 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 13:30:18 +0200 Subject: [PATCH 15/35] fix(angular-query): removed conditional _isRestoring --- packages/angular-query-experimental/src/create-base-query.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/angular-query-experimental/src/create-base-query.ts b/packages/angular-query-experimental/src/create-base-query.ts index 56883d9eaf..8f447207a0 100644 --- a/packages/angular-query-experimental/src/create-base-query.ts +++ b/packages/angular-query-experimental/src/create-base-query.ts @@ -109,7 +109,6 @@ export function createBaseQuery< if ( state.isError && !state.isFetching && - !_isRestoring && shouldThrowError(observer.options.throwOnError, [ state.error, observer.getCurrentQuery(), From e2f579ba4db17019c7d3f5962f28c68486248fd5 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:36:12 +0000 Subject: [PATCH 16/35] ci: apply automated fixes --- examples/angular/basic-persister/src/app/app.component.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/angular/basic-persister/src/app/app.component.html b/examples/angular/basic-persister/src/app/app.component.html index 5e11cadf9b..4c21f9e879 100644 --- a/examples/angular/basic-persister/src/app/app.component.html +++ b/examples/angular/basic-persister/src/app/app.component.html @@ -1,7 +1,7 @@

- Try to mock offline behavior with the button in the devtools. You can - navigate around as long as there is already data in the cache. You'll get - a refetch as soon as you go "online" again. + Try to mock offline behavior with the button in the devtools. You can navigate + around as long as there is already data in the cache. You'll get a refetch as + soon as you go "online" again.

@if (postId() > -1) { From 929b1140eba27527603a1467f734d8ff1bcb0eb5 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 29 Nov 2024 13:39:15 +0200 Subject: [PATCH 17/35] fix(angular-query): used effect onCleanup instead of destroy ref --- .../src/create-base-query.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/angular-query-experimental/src/create-base-query.ts b/packages/angular-query-experimental/src/create-base-query.ts index 8f447207a0..2174abf8e1 100644 --- a/packages/angular-query-experimental/src/create-base-query.ts +++ b/packages/angular-query-experimental/src/create-base-query.ts @@ -1,5 +1,4 @@ import { - DestroyRef, Injector, NgZone, computed, @@ -45,7 +44,6 @@ export function createBaseQuery< const injector = inject(Injector) return lazyInit(() => { const ngZone = injector.get(NgZone) - const destroyRef = injector.get(DestroyRef) const queryClient = injector.get(QueryClient) const isRestoring = injectIsRestoring(injector) @@ -94,11 +92,10 @@ export function createBaseQuery< ) effect( - () => { + (onCleanup) => { const _isRestoring = isRestoring() - - untracked(() => { - const unsubscribe = _isRestoring + const cleanup = untracked(() => + _isRestoring ? () => undefined : ngZone.runOutsideAngular(() => // observer.trackResult is not used as this optimization is not needed for Angular @@ -121,9 +118,9 @@ export function createBaseQuery< }, ), ), - ) - destroyRef.onDestroy(unsubscribe) - }) + ), + ) + onCleanup(cleanup) }, { injector, From 9dcdd1c183216f0c033f466c530d703784535fb8 Mon Sep 17 00:00:00 2001 From: Omer Gronich <59396491+OmerGronich@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:45:53 +0200 Subject: [PATCH 18/35] Update examples/angular/basic-persister/.devcontainer/devcontainer.json Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com> --- .../angular/basic-persister/.devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/angular/basic-persister/.devcontainer/devcontainer.json b/examples/angular/basic-persister/.devcontainer/devcontainer.json index 36f47d8762..365adf8f4c 100644 --- a/examples/angular/basic-persister/.devcontainer/devcontainer.json +++ b/examples/angular/basic-persister/.devcontainer/devcontainer.json @@ -1,4 +1,4 @@ { "name": "Node.js", - "image": "mcr.microsoft.com/devcontainers/javascript-node:18" + "image": "mcr.microsoft.com/devcontainers/javascript-node:22" } From f208029403322e6532158332a33a7d9e0488c576 Mon Sep 17 00:00:00 2001 From: Omer Gronich <59396491+OmerGronich@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:46:06 +0200 Subject: [PATCH 19/35] Update examples/angular/basic-persister/package.json Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com> --- examples/angular/basic-persister/package.json | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/examples/angular/basic-persister/package.json b/examples/angular/basic-persister/package.json index f31ac49a5e..ca30fcb104 100644 --- a/examples/angular/basic-persister/package.json +++ b/examples/angular/basic-persister/package.json @@ -9,14 +9,13 @@ }, "private": true, "dependencies": { - "@angular/common": "^19.0.1", - "@angular/compiler": "^19.0.1", - "@angular/core": "^19.0.1", - "@angular/platform-browser": "^19.0.1", - "@angular/platform-browser-dynamic": "^19.0.1", - "@tanstack/angular-query-experimental": "5.61.6", + "@angular/common": "^19.1.0-next.0", + "@angular/compiler": "^19.1.0-next.0", + "@angular/core": "^19.1.0-next.0", + "@angular/platform-browser": "^19.1.0-next.0", + "@angular/platform-browser-dynamic": "^19.1.0-next.0", + "@tanstack/angular-query-experimental": "^5.62.0", "@tanstack/angular-query-persist-client-experimental": "5.61.6", - "@tanstack/query-sync-storage-persister": "^5.60.6", "rxjs": "^7.8.1", "tslib": "^2.6.3", "zone.js": "^0.15.0" @@ -24,7 +23,7 @@ "devDependencies": { "@angular/build": "^19.0.2", "@angular/cli": "^19.0.2", - "@angular/compiler-cli": "^19.0.1", - "typescript": "5.5.4" + "@angular/compiler-cli": "^19.1.0-next.0", + "typescript": "5.7.2" } } From 1d3c67a7e083dce05d8e02df36d76463a8ced154 Mon Sep 17 00:00:00 2001 From: Omer Gronich <59396491+OmerGronich@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:46:29 +0200 Subject: [PATCH 20/35] Update examples/angular/basic-persister/src/index.html Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com> --- examples/angular/basic-persister/src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/angular/basic-persister/src/index.html b/examples/angular/basic-persister/src/index.html index 0ca80dd67a..2e262442e1 100644 --- a/examples/angular/basic-persister/src/index.html +++ b/examples/angular/basic-persister/src/index.html @@ -2,7 +2,7 @@ - TanStack Query Angular basic example + TanStack Query Angular basic persister example From db2b2a3d8cdd585e69034ce4e237f50811184a65 Mon Sep 17 00:00:00 2001 From: Omer Gronich <59396491+OmerGronich@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:46:45 +0200 Subject: [PATCH 21/35] Update examples/angular/basic-persister/tsconfig.json Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com> --- examples/angular/basic-persister/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/angular/basic-persister/tsconfig.json b/examples/angular/basic-persister/tsconfig.json index 82c63d482a..68dceba77b 100644 --- a/examples/angular/basic-persister/tsconfig.json +++ b/examples/angular/basic-persister/tsconfig.json @@ -9,6 +9,7 @@ "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "skipLibCheck": true, + "isolatedModules": true, "esModuleInterop": true, "sourceMap": true, "declaration": false, From de5b14f30471a6b71a75ec6c9ae7c082e183b9cd Mon Sep 17 00:00:00 2001 From: Omer Gronich <59396491+OmerGronich@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:46:58 +0200 Subject: [PATCH 22/35] Update examples/angular/basic-persister/tsconfig.json Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com> --- examples/angular/basic-persister/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/angular/basic-persister/tsconfig.json b/examples/angular/basic-persister/tsconfig.json index 68dceba77b..e916780df3 100644 --- a/examples/angular/basic-persister/tsconfig.json +++ b/examples/angular/basic-persister/tsconfig.json @@ -14,7 +14,7 @@ "sourceMap": true, "declaration": false, "experimentalDecorators": true, - "moduleResolution": "node", + "moduleResolution": "bundler", "importHelpers": true, "target": "ES2022", "module": "ES2022", From 03b9c02972151695b81aa2bb21bd91f8ee04802a Mon Sep 17 00:00:00 2001 From: Omer Gronich <59396491+OmerGronich@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:47:09 +0200 Subject: [PATCH 23/35] Update examples/angular/basic-persister/tsconfig.json Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com> --- examples/angular/basic-persister/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/angular/basic-persister/tsconfig.json b/examples/angular/basic-persister/tsconfig.json index e916780df3..d0d73c8beb 100644 --- a/examples/angular/basic-persister/tsconfig.json +++ b/examples/angular/basic-persister/tsconfig.json @@ -25,6 +25,7 @@ "enableI18nLegacyMessageIdFormat": false, "strictInjectionParameters": true, "strictInputAccessModifiers": true, + "strictStandalone": true, "strictTemplates": true } } From 67d3f38ba0b30a8be954beced6b597a694f8bd73 Mon Sep 17 00:00:00 2001 From: Omer Gronich <59396491+OmerGronich@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:47:17 +0200 Subject: [PATCH 24/35] Update packages/angular-query-experimental/src/inject-is-restoring.ts Co-authored-by: Arnoud <6420061+arnoud-dv@users.noreply.github.com> --- packages/angular-query-experimental/src/inject-is-restoring.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular-query-experimental/src/inject-is-restoring.ts b/packages/angular-query-experimental/src/inject-is-restoring.ts index a03a227562..56753a5485 100644 --- a/packages/angular-query-experimental/src/inject-is-restoring.ts +++ b/packages/angular-query-experimental/src/inject-is-restoring.ts @@ -19,7 +19,7 @@ export function injectIsRestoring(injector?: Injector): Signal { } /** - * Used by angular query persist client plugin to provide the signal that tracks the restore state + * Used by TanStack Query Angular persist client plugin to provide the signal that tracks the restore state * @param isRestoring - a readonly signal that returns a boolean * @returns Provider for the `isRestoring` signal * @public From b30b21b7e2888cad7b259580e80b0c1c878288f5 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 6 Dec 2024 22:02:14 +0200 Subject: [PATCH 25/35] fix(angular-query): fixed lock file --- pnpm-lock.yaml | 393 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 393 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 75b8109dc5..3bdd636fb6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -208,6 +208,52 @@ importers: specifier: 5.7.2 version: 5.7.2 + examples/angular/basic-persister: + dependencies: + '@angular/common': + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) + '@angular/compiler': + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) + '@angular/core': + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) + '@angular/platform-browser': + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) + '@angular/platform-browser-dynamic': + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))) + '@tanstack/angular-query-experimental': + specifier: ^5.62.0 + version: link:../../../packages/angular-query-experimental + '@tanstack/angular-query-persist-client-experimental': + specifier: 5.61.6 + version: link:../../../packages/angular-persist-query-client-experimental + rxjs: + specifier: ^7.8.1 + version: 7.8.1 + tslib: + specifier: ^2.6.3 + version: 2.8.1 + zone.js: + specifier: ^0.15.0 + version: 0.15.0 + devDependencies: + '@angular/build': + specifier: ^19.0.2 + version: 19.0.2(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@types/node@22.9.3)(chokidar@4.0.1)(less@4.2.1)(lightningcss@1.27.0)(postcss@8.4.49)(tailwindcss@3.4.7)(terser@5.31.6)(typescript@5.7.2) + '@angular/cli': + specifier: ^19.0.2 + version: 19.0.2(@types/node@22.9.3)(chokidar@4.0.1) + '@angular/compiler-cli': + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2) + typescript: + specifier: 5.7.2 + version: 5.7.2 + examples/angular/devtools-panel: dependencies: '@angular/common': @@ -2085,6 +2131,52 @@ importers: specifier: ^2.1.10 version: 2.1.10(typescript@5.6.3) + packages/angular-persist-query-client-experimental: + dependencies: + '@angular/common': + specifier: '>=16.0.0' + version: 17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) + '@tanstack/query-persist-client-core': + specifier: workspace:* + version: link:../query-persist-client-core + devDependencies: + '@analogjs/vite-plugin-angular': + specifier: ^1.6.4 + version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.3.3))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(typescript@5.3.3)(webpack@5.96.1(esbuild@0.24.0))) + '@angular/compiler': + specifier: ^19.0.0 + version: 19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) + '@angular/core': + specifier: ^19.0.0 + version: 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) + '@angular/platform-browser': + specifier: ^19.0.0 + version: 19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) + '@angular/platform-browser-dynamic': + specifier: ^19.0.0 + version: 19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))) + '@microsoft/api-extractor': + specifier: ^7.47.4 + version: 7.48.0(@types/node@22.9.3) + '@tanstack/angular-query-experimental': + specifier: workspace:* + version: link:../angular-query-experimental + '@testing-library/angular': + specifier: ^17.3.2 + version: 17.3.4(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/router@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1))(@testing-library/dom@10.4.0) + '@testing-library/dom': + specifier: ^10.4.0 + version: 10.4.0 + eslint-plugin-jsdoc: + specifier: ^50.2.2 + version: 50.5.0(eslint@9.15.0(jiti@2.4.0)) + tsup: + specifier: 8.0.2 + version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.49)(typescript@5.3.3) + typescript: + specifier: 5.3.3 + version: 5.3.3 + packages/angular-query-devtools-experimental: dependencies: '@angular/common': @@ -2865,6 +2957,15 @@ packages: '@angular/core': optional: true + '@angular/compiler@19.0.3': + resolution: {integrity: sha512-cxtK4SlHAPstcXfjwOaoR1dAszrzo2iDF8ZiihbZPgKUG3m27qIU3Lp5XBgxfZPlO4jh6TXkWznY7f6Tyxkb0Q==} + engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} + peerDependencies: + '@angular/core': 19.0.3 + peerDependenciesMeta: + '@angular/core': + optional: true + '@angular/compiler@19.1.0-next.0': resolution: {integrity: sha512-IJWMyzchAbvaeGLJlLhQpEzjQOsge4/hWs1ONzW98AzqeTtO3L7Bx9hch45egqX/UvrOhQKCYj6YaNJwmN/j3Q==} engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} @@ -2881,6 +2982,13 @@ packages: rxjs: ^6.5.3 || ^7.4.0 zone.js: ~0.14.0 + '@angular/core@19.0.3': + resolution: {integrity: sha512-WM844gDzrbHtcM2TJB9DmfCmenUYyNSI6h924CeppDW5oG8ShinQGiWNjF5oI6EZ4tG60uK3QvCm3kjr1dmbOA==} + engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} + peerDependencies: + rxjs: ^6.5.3 || ^7.4.0 + zone.js: ~0.15.0 + '@angular/core@19.1.0-next.0': resolution: {integrity: sha512-EyFu4Jki1QCzn/jqEoOZokwRyYyR4HABxbJIkxdiXVv/UaCYCZIRwCOjNAD0kmmFU0btm5UVJtoXSrTo3mQBBg==} engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} @@ -2906,6 +3014,15 @@ packages: '@angular/core': 17.3.12 '@angular/platform-browser': 17.3.12 + '@angular/platform-browser-dynamic@19.0.3': + resolution: {integrity: sha512-gFh+QN7JvepnD3mS0XmOtDmfY8h5sSkk2/guesE2A68Na8q+M3fGZlz7I37tCXToLth5us1X0Gi0UPCSESc4SA==} + engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} + peerDependencies: + '@angular/common': 19.0.3 + '@angular/compiler': 19.0.3 + '@angular/core': 19.0.3 + '@angular/platform-browser': 19.0.3 + '@angular/platform-browser-dynamic@19.1.0-next.0': resolution: {integrity: sha512-9+fcYtqWq3kwx8tIGSVnxHU9SX8wvJbKlD+9x73YCKstMjw3izSXVSDPGKY1JSdqne2L8PNafqOBGgE70Bk//A==} engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} @@ -2926,6 +3043,17 @@ packages: '@angular/animations': optional: true + '@angular/platform-browser@19.0.3': + resolution: {integrity: sha512-vggWHSzOsCpYqnGq5IIN+n7xdEvXfgUGaMdgzPhFMTsnlMTUs5+VEFl9tX9FANHkXKB5S1RttVyvEXRqJM9ncQ==} + engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} + peerDependencies: + '@angular/animations': 19.0.3 + '@angular/common': 19.0.3 + '@angular/core': 19.0.3 + peerDependenciesMeta: + '@angular/animations': + optional: true + '@angular/platform-browser@19.1.0-next.0': resolution: {integrity: sha512-SquzOLqNdAcW6ugLApMBMeGEjHGgVsua/jEYsKqVWSCG+kLm8I1pwVJDUWP/B4GnBK0P/38fsL9PPzY5gjpohA==} engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} @@ -7024,6 +7152,15 @@ packages: react: '>=16' react-dom: '>=16' + '@testing-library/angular@17.3.4': + resolution: {integrity: sha512-QqBcRaVb4VJO66/5oboJXaME1PugM+y/tOpSTpgB7QwjcWgvcW63CQsX8JbSJQPgthk7gwhhgiHJAqyDUITp6Q==} + peerDependencies: + '@angular/common': '>= 17.0.0' + '@angular/core': '>= 17.0.0' + '@angular/platform-browser': '>= 17.0.0' + '@angular/router': '>= 17.0.0' + '@testing-library/dom': ^10.0.0 + '@testing-library/dom@10.4.0': resolution: {integrity: sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==} engines: {node: '>=18'} @@ -16634,6 +16771,12 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 + '@analogjs/vite-plugin-angular@1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.3.3))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(typescript@5.3.3)(webpack@5.96.1(esbuild@0.24.0)))': + dependencies: + '@angular-devkit/build-angular': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.3.3) + '@ngtools/webpack': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(typescript@5.3.3)(webpack@5.96.1(esbuild@0.24.0)) + ts-morph: 21.0.1 + '@analogjs/vite-plugin-angular@1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0)))': dependencies: '@angular-devkit/build-angular': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2) @@ -16759,6 +16902,93 @@ snapshots: - utf-8-validate - webpack-cli + '@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.3.3)': + dependencies: + '@ampproject/remapping': 2.3.0 + '@angular-devkit/architect': 0.1802.12(chokidar@3.6.0) + '@angular-devkit/build-webpack': 0.1802.12(chokidar@3.6.0)(webpack-dev-server@5.0.4(webpack@5.94.0(esbuild@0.23.0)))(webpack@5.94.0(esbuild@0.23.0)) + '@angular-devkit/core': 18.2.12(chokidar@3.6.0) + '@angular/build': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(@types/node@22.9.3)(chokidar@3.6.0)(less@4.2.0)(lightningcss@1.27.0)(postcss@8.4.41)(tailwindcss@3.4.7)(terser@5.31.6)(typescript@5.3.3) + '@angular/compiler-cli': 19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3) + '@babel/core': 7.25.2 + '@babel/generator': 7.25.0 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-split-export-declaration': 7.24.7 + '@babel/plugin-transform-async-generator-functions': 7.25.0(@babel/core@7.25.2) + '@babel/plugin-transform-async-to-generator': 7.24.7(@babel/core@7.25.2) + '@babel/plugin-transform-runtime': 7.24.7(@babel/core@7.25.2) + '@babel/preset-env': 7.25.3(@babel/core@7.25.2) + '@babel/runtime': 7.25.0 + '@discoveryjs/json-ext': 0.6.1 + '@ngtools/webpack': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(typescript@5.3.3)(webpack@5.94.0(esbuild@0.23.0)) + '@vitejs/plugin-basic-ssl': 1.1.0(vite@5.4.6(@types/node@22.9.3)(less@4.2.0)(lightningcss@1.27.0)(sass@1.77.6)(terser@5.31.6)) + ansi-colors: 4.1.3 + autoprefixer: 10.4.20(postcss@8.4.41) + babel-loader: 9.1.3(@babel/core@7.25.2)(webpack@5.94.0(esbuild@0.23.0)) + browserslist: 4.24.2 + copy-webpack-plugin: 12.0.2(webpack@5.94.0(esbuild@0.23.0)) + critters: 0.0.24 + css-loader: 7.1.2(webpack@5.94.0(esbuild@0.23.0)) + esbuild-wasm: 0.23.0 + fast-glob: 3.3.2 + http-proxy-middleware: 3.0.3 + https-proxy-agent: 7.0.5 + istanbul-lib-instrument: 6.0.3 + jsonc-parser: 3.3.1 + karma-source-map-support: 1.4.0 + less: 4.2.0 + less-loader: 12.2.0(less@4.2.0)(webpack@5.94.0(esbuild@0.23.0)) + license-webpack-plugin: 4.0.2(webpack@5.94.0(esbuild@0.23.0)) + loader-utils: 3.3.1 + magic-string: 0.30.11 + mini-css-extract-plugin: 2.9.0(webpack@5.94.0(esbuild@0.23.0)) + mrmime: 2.0.0 + open: 10.1.0 + ora: 5.4.1 + parse5-html-rewriting-stream: 7.0.0 + picomatch: 4.0.2 + piscina: 4.6.1 + postcss: 8.4.41 + postcss-loader: 8.1.1(postcss@8.4.41)(typescript@5.3.3)(webpack@5.94.0(esbuild@0.23.0)) + resolve-url-loader: 5.0.0 + rxjs: 7.8.1 + sass: 1.77.6 + sass-loader: 16.0.0(sass@1.77.6)(webpack@5.94.0(esbuild@0.23.0)) + semver: 7.6.3 + source-map-loader: 5.0.0(webpack@5.94.0(esbuild@0.23.0)) + source-map-support: 0.5.21 + terser: 5.31.6 + tree-kill: 1.2.2 + tslib: 2.6.3 + typescript: 5.3.3 + vite: 5.4.6(@types/node@22.9.3)(less@4.2.0)(lightningcss@1.27.0)(sass@1.77.6)(terser@5.31.6) + watchpack: 2.4.1 + webpack: 5.94.0(esbuild@0.19.12) + webpack-dev-middleware: 7.4.2(webpack@5.94.0(esbuild@0.23.0)) + webpack-dev-server: 5.0.4(webpack@5.94.0(esbuild@0.23.0)) + webpack-merge: 6.0.1 + webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(webpack@5.94.0(esbuild@0.23.0)) + optionalDependencies: + esbuild: 0.23.0 + tailwindcss: 3.4.7 + transitivePeerDependencies: + - '@rspack/core' + - '@swc/core' + - '@types/node' + - bufferutil + - chokidar + - debug + - html-webpack-plugin + - lightningcss + - node-sass + - sass-embedded + - stylus + - sugarss + - supports-color + - uglify-js + - utf-8-validate + - webpack-cli + '@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2)': dependencies: '@ampproject/remapping': 2.3.0 @@ -17010,6 +17240,49 @@ snapshots: tslib: 2.8.1 optional: true + '@angular/build@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(@types/node@22.9.3)(chokidar@3.6.0)(less@4.2.0)(lightningcss@1.27.0)(postcss@8.4.41)(tailwindcss@3.4.7)(terser@5.31.6)(typescript@5.3.3)': + dependencies: + '@ampproject/remapping': 2.3.0 + '@angular-devkit/architect': 0.1802.12(chokidar@3.6.0) + '@angular/compiler-cli': 19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3) + '@babel/core': 7.25.2 + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-split-export-declaration': 7.24.7 + '@babel/plugin-syntax-import-attributes': 7.24.7(@babel/core@7.25.2) + '@inquirer/confirm': 3.1.22 + '@vitejs/plugin-basic-ssl': 1.1.0(vite@5.4.6(@types/node@22.9.3)(less@4.2.0)(lightningcss@1.27.0)(sass@1.77.6)(terser@5.31.6)) + browserslist: 4.24.2 + critters: 0.0.24 + esbuild: 0.23.0 + fast-glob: 3.3.2 + https-proxy-agent: 7.0.5 + listr2: 8.2.4 + lmdb: 3.0.13 + magic-string: 0.30.11 + mrmime: 2.0.0 + parse5-html-rewriting-stream: 7.0.0 + picomatch: 4.0.2 + piscina: 4.6.1 + rollup: 4.22.4 + sass: 1.77.6 + semver: 7.6.3 + typescript: 5.3.3 + vite: 5.4.6(@types/node@22.9.3)(less@4.2.0)(lightningcss@1.27.0)(sass@1.77.6)(terser@5.31.6) + watchpack: 2.4.1 + optionalDependencies: + less: 4.2.0 + postcss: 8.4.41 + tailwindcss: 3.4.7 + transitivePeerDependencies: + - '@types/node' + - chokidar + - lightningcss + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + '@angular/build@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(less@4.2.0)(lightningcss@1.27.0)(postcss@8.4.41)(tailwindcss@3.4.7)(terser@5.31.6)(typescript@5.7.2)': dependencies: '@ampproject/remapping': 2.3.0 @@ -17154,6 +17427,12 @@ snapshots: rxjs: 7.8.1 tslib: 2.8.1 + '@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1)': + dependencies: + '@angular/core': 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) + rxjs: 7.8.1 + tslib: 2.8.1 + '@angular/common@19.0.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1)': dependencies: '@angular/core': 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) @@ -17181,6 +17460,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3)': + dependencies: + '@angular/compiler': 19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) + '@babel/core': 7.26.0 + '@jridgewell/sourcemap-codec': 1.5.0 + chokidar: 4.0.1 + convert-source-map: 1.9.0 + reflect-metadata: 0.2.2 + semver: 7.6.3 + tslib: 2.8.1 + typescript: 5.3.3 + yargs: 17.7.2 + transitivePeerDependencies: + - supports-color + '@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2)': dependencies: '@angular/compiler': 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) @@ -17202,6 +17496,12 @@ snapshots: optionalDependencies: '@angular/core': 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) + '@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))': + dependencies: + tslib: 2.8.1 + optionalDependencies: + '@angular/core': 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) + '@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))': dependencies: tslib: 2.8.1 @@ -17214,6 +17514,12 @@ snapshots: tslib: 2.8.1 zone.js: 0.14.8 + '@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)': + dependencies: + rxjs: 7.8.1 + tslib: 2.8.1 + zone.js: 0.15.0 + '@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)': dependencies: rxjs: 7.8.1 @@ -17236,6 +17542,14 @@ snapshots: '@angular/platform-browser': 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) tslib: 2.8.1 + '@angular/platform-browser-dynamic@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))': + dependencies: + '@angular/common': 17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) + '@angular/compiler': 19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) + '@angular/core': 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) + '@angular/platform-browser': 19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) + tslib: 2.8.1 + '@angular/platform-browser-dynamic@19.1.0-next.0(@angular/common@19.0.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@19.0.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))': dependencies: '@angular/common': 19.0.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) @@ -17260,6 +17574,12 @@ snapshots: optionalDependencies: '@angular/animations': 17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) + '@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))': + dependencies: + '@angular/common': 17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) + '@angular/core': 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) + tslib: 2.8.1 + '@angular/platform-browser@19.1.0-next.0(@angular/common@19.0.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))': dependencies: '@angular/common': 19.0.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) @@ -17272,6 +17592,14 @@ snapshots: '@angular/core': 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) tslib: 2.8.1 + '@angular/router@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1)': + dependencies: + '@angular/common': 17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) + '@angular/core': 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) + '@angular/platform-browser': 19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) + rxjs: 7.8.1 + tslib: 2.8.1 + '@angular/router@19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1)': dependencies: '@angular/common': 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) @@ -21783,6 +22111,18 @@ snapshots: typescript: 5.4.5 webpack: 5.90.3(esbuild@0.24.0) + '@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(typescript@5.3.3)(webpack@5.94.0(esbuild@0.23.0))': + dependencies: + '@angular/compiler-cli': 19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3) + typescript: 5.3.3 + webpack: 5.94.0(esbuild@0.19.12) + + '@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(typescript@5.3.3)(webpack@5.96.1(esbuild@0.24.0))': + dependencies: + '@angular/compiler-cli': 19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3) + typescript: 5.3.3 + webpack: 5.96.1(esbuild@0.24.0) + '@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0))': dependencies: '@angular/compiler-cli': 19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2) @@ -22948,6 +23288,15 @@ snapshots: react: 19.0.0-rc-66855b96-20241106 react-dom: 19.0.0-rc-66855b96-20241106(react@19.0.0-rc-66855b96-20241106) + '@testing-library/angular@17.3.4(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/router@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1))(@testing-library/dom@10.4.0)': + dependencies: + '@angular/common': 17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) + '@angular/core': 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) + '@angular/platform-browser': 19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) + '@angular/router': 19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1) + '@testing-library/dom': 10.4.0 + tslib: 2.8.1 + '@testing-library/dom@10.4.0': dependencies: '@babel/code-frame': 7.26.2 @@ -25478,6 +25827,15 @@ snapshots: path-type: 4.0.0 yaml: 1.10.2 + cosmiconfig@9.0.0(typescript@5.3.3): + dependencies: + env-paths: 2.2.1 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + parse-json: 5.2.0 + optionalDependencies: + typescript: 5.3.3 + cosmiconfig@9.0.0(typescript@5.4.5): dependencies: env-paths: 2.2.1 @@ -31336,6 +31694,17 @@ snapshots: transitivePeerDependencies: - typescript + postcss-loader@8.1.1(postcss@8.4.41)(typescript@5.3.3)(webpack@5.94.0(esbuild@0.23.0)): + dependencies: + cosmiconfig: 9.0.0(typescript@5.3.3) + jiti: 1.21.6 + postcss: 8.4.41 + semver: 7.6.3 + optionalDependencies: + webpack: 5.94.0(esbuild@0.19.12) + transitivePeerDependencies: + - typescript + postcss-loader@8.1.1(postcss@8.4.41)(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0)): dependencies: cosmiconfig: 9.0.0(typescript@5.7.2) @@ -33651,6 +34020,30 @@ snapshots: - supports-color - ts-node + tsup@8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.49)(typescript@5.3.3): + dependencies: + bundle-require: 4.2.1(esbuild@0.19.12) + cac: 6.7.14 + chokidar: 3.6.0 + debug: 4.3.7 + esbuild: 0.19.12 + execa: 5.1.1 + globby: 11.1.0 + joycon: 3.1.1 + postcss-load-config: 4.0.2(postcss@8.4.49) + resolve-from: 5.0.0 + rollup: 4.27.4 + source-map: 0.8.0-beta.0 + sucrase: 3.35.0 + tree-kill: 1.2.2 + optionalDependencies: + '@microsoft/api-extractor': 7.48.0(@types/node@22.9.3) + postcss: 8.4.49 + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + - ts-node + tsup@8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.49)(typescript@5.7.2): dependencies: bundle-require: 4.2.1(esbuild@0.19.12) From c9ec26a50f5c3f600a4200e380ddda85ab70d963 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 6 Dec 2024 22:13:59 +0200 Subject: [PATCH 26/35] fix(angular-query): aligned package.json versions --- examples/angular/basic-persister/package.json | 4 +- .../package.json | 16 +- .../src/create-base-query.ts | 2 - pnpm-lock.yaml | 333 ++---------------- 4 files changed, 49 insertions(+), 306 deletions(-) diff --git a/examples/angular/basic-persister/package.json b/examples/angular/basic-persister/package.json index ca30fcb104..42d7604301 100644 --- a/examples/angular/basic-persister/package.json +++ b/examples/angular/basic-persister/package.json @@ -14,8 +14,8 @@ "@angular/core": "^19.1.0-next.0", "@angular/platform-browser": "^19.1.0-next.0", "@angular/platform-browser-dynamic": "^19.1.0-next.0", - "@tanstack/angular-query-experimental": "^5.62.0", - "@tanstack/angular-query-persist-client-experimental": "5.61.6", + "@tanstack/angular-query-experimental": "^5.62.3", + "@tanstack/angular-query-persist-client-experimental": "^5.62.3", "rxjs": "^7.8.1", "tslib": "^2.6.3", "zone.js": "^0.15.0" diff --git a/packages/angular-persist-query-client-experimental/package.json b/packages/angular-persist-query-client-experimental/package.json index cd3d6cb5e0..6f5f92bade 100644 --- a/packages/angular-persist-query-client-experimental/package.json +++ b/packages/angular-persist-query-client-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-persist-client-experimental", - "version": "5.61.6", + "version": "5.62.3", "description": "Angular bindings to work with persisters in TanStack/angular-query", "author": "Omer Gronich", "license": "MIT", @@ -53,17 +53,17 @@ }, "devDependencies": { "@analogjs/vite-plugin-angular": "^1.6.4", - "@angular/compiler": "^19.0.0", - "@angular/core": "^19.0.0", - "@angular/platform-browser": "^19.0.0", - "@angular/platform-browser-dynamic": "^19.0.0", - "@microsoft/api-extractor": "^7.47.4", + "@angular/compiler": "^19.1.0-next.0", + "@angular/core": "^19.1.0-next.0", + "@angular/platform-browser": "^19.1.0-next.0", + "@angular/platform-browser-dynamic": "^19.1.0-next.0", + "@microsoft/api-extractor": "^7.48.0", "@tanstack/angular-query-experimental": "workspace:*", "@testing-library/angular": "^17.3.2", "@testing-library/dom": "^10.4.0", - "eslint-plugin-jsdoc": "^50.2.2", + "eslint-plugin-jsdoc": "^50.5.0", "tsup": "8.0.2", - "typescript": "5.3.3" + "typescript": "5.7.2" }, "peerDependencies": { "@angular/common": ">=16.0.0", diff --git a/packages/angular-query-experimental/src/create-base-query.ts b/packages/angular-query-experimental/src/create-base-query.ts index 2174abf8e1..72eebe273f 100644 --- a/packages/angular-query-experimental/src/create-base-query.ts +++ b/packages/angular-query-experimental/src/create-base-query.ts @@ -22,8 +22,6 @@ import type { CreateBaseQueryOptions } from './types' /** * Base implementation for `injectQuery` and `injectInfiniteQuery`. - * @param optionsFn - * @param Observer */ export function createBaseQuery< TQueryFnData, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3bdd636fb6..cc18d53c8b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -226,10 +226,10 @@ importers: specifier: ^19.1.0-next.0 version: 19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))) '@tanstack/angular-query-experimental': - specifier: ^5.62.0 + specifier: ^5.62.3 version: link:../../../packages/angular-query-experimental '@tanstack/angular-query-persist-client-experimental': - specifier: 5.61.6 + specifier: ^5.62.3 version: link:../../../packages/angular-persist-query-client-experimental rxjs: specifier: ^7.8.1 @@ -2135,47 +2135,47 @@ importers: dependencies: '@angular/common': specifier: '>=16.0.0' - version: 17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) + version: 17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) '@tanstack/query-persist-client-core': specifier: workspace:* version: link:../query-persist-client-core devDependencies: '@analogjs/vite-plugin-angular': specifier: ^1.6.4 - version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.3.3))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(typescript@5.3.3)(webpack@5.96.1(esbuild@0.24.0))) + version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0))) '@angular/compiler': - specifier: ^19.0.0 - version: 19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) '@angular/core': - specifier: ^19.0.0 - version: 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) '@angular/platform-browser': - specifier: ^19.0.0 - version: 19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) '@angular/platform-browser-dynamic': - specifier: ^19.0.0 - version: 19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))) + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))) '@microsoft/api-extractor': - specifier: ^7.47.4 + specifier: ^7.48.0 version: 7.48.0(@types/node@22.9.3) '@tanstack/angular-query-experimental': specifier: workspace:* version: link:../angular-query-experimental '@testing-library/angular': specifier: ^17.3.2 - version: 17.3.4(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/router@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1))(@testing-library/dom@10.4.0) + version: 17.3.4(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/router@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1))(@testing-library/dom@10.4.0) '@testing-library/dom': specifier: ^10.4.0 version: 10.4.0 eslint-plugin-jsdoc: - specifier: ^50.2.2 + specifier: ^50.5.0 version: 50.5.0(eslint@9.15.0(jiti@2.4.0)) tsup: specifier: 8.0.2 - version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.49)(typescript@5.3.3) + version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.41)(typescript@5.7.2) typescript: - specifier: 5.3.3 - version: 5.3.3 + specifier: 5.7.2 + version: 5.7.2 packages/angular-query-devtools-experimental: dependencies: @@ -2188,7 +2188,7 @@ importers: devDependencies: '@analogjs/vite-plugin-angular': specifier: ^1.6.4 - version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0))) + version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.24.0))) '@angular/core': specifier: ^19.1.0-next.0 version: 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) @@ -2203,7 +2203,7 @@ importers: version: 50.5.0(eslint@9.15.0(jiti@2.4.0)) tsup: specifier: 8.0.2 - version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.41)(typescript@5.7.2) + version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.49)(typescript@5.7.2) typescript: specifier: 5.7.2 version: 5.7.2 @@ -2957,15 +2957,6 @@ packages: '@angular/core': optional: true - '@angular/compiler@19.0.3': - resolution: {integrity: sha512-cxtK4SlHAPstcXfjwOaoR1dAszrzo2iDF8ZiihbZPgKUG3m27qIU3Lp5XBgxfZPlO4jh6TXkWznY7f6Tyxkb0Q==} - engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} - peerDependencies: - '@angular/core': 19.0.3 - peerDependenciesMeta: - '@angular/core': - optional: true - '@angular/compiler@19.1.0-next.0': resolution: {integrity: sha512-IJWMyzchAbvaeGLJlLhQpEzjQOsge4/hWs1ONzW98AzqeTtO3L7Bx9hch45egqX/UvrOhQKCYj6YaNJwmN/j3Q==} engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} @@ -2982,13 +2973,6 @@ packages: rxjs: ^6.5.3 || ^7.4.0 zone.js: ~0.14.0 - '@angular/core@19.0.3': - resolution: {integrity: sha512-WM844gDzrbHtcM2TJB9DmfCmenUYyNSI6h924CeppDW5oG8ShinQGiWNjF5oI6EZ4tG60uK3QvCm3kjr1dmbOA==} - engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} - peerDependencies: - rxjs: ^6.5.3 || ^7.4.0 - zone.js: ~0.15.0 - '@angular/core@19.1.0-next.0': resolution: {integrity: sha512-EyFu4Jki1QCzn/jqEoOZokwRyYyR4HABxbJIkxdiXVv/UaCYCZIRwCOjNAD0kmmFU0btm5UVJtoXSrTo3mQBBg==} engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} @@ -3014,15 +2998,6 @@ packages: '@angular/core': 17.3.12 '@angular/platform-browser': 17.3.12 - '@angular/platform-browser-dynamic@19.0.3': - resolution: {integrity: sha512-gFh+QN7JvepnD3mS0XmOtDmfY8h5sSkk2/guesE2A68Na8q+M3fGZlz7I37tCXToLth5us1X0Gi0UPCSESc4SA==} - engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} - peerDependencies: - '@angular/common': 19.0.3 - '@angular/compiler': 19.0.3 - '@angular/core': 19.0.3 - '@angular/platform-browser': 19.0.3 - '@angular/platform-browser-dynamic@19.1.0-next.0': resolution: {integrity: sha512-9+fcYtqWq3kwx8tIGSVnxHU9SX8wvJbKlD+9x73YCKstMjw3izSXVSDPGKY1JSdqne2L8PNafqOBGgE70Bk//A==} engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} @@ -3043,17 +3018,6 @@ packages: '@angular/animations': optional: true - '@angular/platform-browser@19.0.3': - resolution: {integrity: sha512-vggWHSzOsCpYqnGq5IIN+n7xdEvXfgUGaMdgzPhFMTsnlMTUs5+VEFl9tX9FANHkXKB5S1RttVyvEXRqJM9ncQ==} - engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} - peerDependencies: - '@angular/animations': 19.0.3 - '@angular/common': 19.0.3 - '@angular/core': 19.0.3 - peerDependenciesMeta: - '@angular/animations': - optional: true - '@angular/platform-browser@19.1.0-next.0': resolution: {integrity: sha512-SquzOLqNdAcW6ugLApMBMeGEjHGgVsua/jEYsKqVWSCG+kLm8I1pwVJDUWP/B4GnBK0P/38fsL9PPzY5gjpohA==} engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} @@ -16771,12 +16735,6 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - '@analogjs/vite-plugin-angular@1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.3.3))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(typescript@5.3.3)(webpack@5.96.1(esbuild@0.24.0)))': - dependencies: - '@angular-devkit/build-angular': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.3.3) - '@ngtools/webpack': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(typescript@5.3.3)(webpack@5.96.1(esbuild@0.24.0)) - ts-morph: 21.0.1 - '@analogjs/vite-plugin-angular@1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0)))': dependencies: '@angular-devkit/build-angular': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2) @@ -16902,93 +16860,6 @@ snapshots: - utf-8-validate - webpack-cli - '@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.3.3)': - dependencies: - '@ampproject/remapping': 2.3.0 - '@angular-devkit/architect': 0.1802.12(chokidar@3.6.0) - '@angular-devkit/build-webpack': 0.1802.12(chokidar@3.6.0)(webpack-dev-server@5.0.4(webpack@5.94.0(esbuild@0.23.0)))(webpack@5.94.0(esbuild@0.23.0)) - '@angular-devkit/core': 18.2.12(chokidar@3.6.0) - '@angular/build': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(@types/node@22.9.3)(chokidar@3.6.0)(less@4.2.0)(lightningcss@1.27.0)(postcss@8.4.41)(tailwindcss@3.4.7)(terser@5.31.6)(typescript@5.3.3) - '@angular/compiler-cli': 19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3) - '@babel/core': 7.25.2 - '@babel/generator': 7.25.0 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 - '@babel/plugin-transform-async-generator-functions': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-transform-async-to-generator': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-runtime': 7.24.7(@babel/core@7.25.2) - '@babel/preset-env': 7.25.3(@babel/core@7.25.2) - '@babel/runtime': 7.25.0 - '@discoveryjs/json-ext': 0.6.1 - '@ngtools/webpack': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(typescript@5.3.3)(webpack@5.94.0(esbuild@0.23.0)) - '@vitejs/plugin-basic-ssl': 1.1.0(vite@5.4.6(@types/node@22.9.3)(less@4.2.0)(lightningcss@1.27.0)(sass@1.77.6)(terser@5.31.6)) - ansi-colors: 4.1.3 - autoprefixer: 10.4.20(postcss@8.4.41) - babel-loader: 9.1.3(@babel/core@7.25.2)(webpack@5.94.0(esbuild@0.23.0)) - browserslist: 4.24.2 - copy-webpack-plugin: 12.0.2(webpack@5.94.0(esbuild@0.23.0)) - critters: 0.0.24 - css-loader: 7.1.2(webpack@5.94.0(esbuild@0.23.0)) - esbuild-wasm: 0.23.0 - fast-glob: 3.3.2 - http-proxy-middleware: 3.0.3 - https-proxy-agent: 7.0.5 - istanbul-lib-instrument: 6.0.3 - jsonc-parser: 3.3.1 - karma-source-map-support: 1.4.0 - less: 4.2.0 - less-loader: 12.2.0(less@4.2.0)(webpack@5.94.0(esbuild@0.23.0)) - license-webpack-plugin: 4.0.2(webpack@5.94.0(esbuild@0.23.0)) - loader-utils: 3.3.1 - magic-string: 0.30.11 - mini-css-extract-plugin: 2.9.0(webpack@5.94.0(esbuild@0.23.0)) - mrmime: 2.0.0 - open: 10.1.0 - ora: 5.4.1 - parse5-html-rewriting-stream: 7.0.0 - picomatch: 4.0.2 - piscina: 4.6.1 - postcss: 8.4.41 - postcss-loader: 8.1.1(postcss@8.4.41)(typescript@5.3.3)(webpack@5.94.0(esbuild@0.23.0)) - resolve-url-loader: 5.0.0 - rxjs: 7.8.1 - sass: 1.77.6 - sass-loader: 16.0.0(sass@1.77.6)(webpack@5.94.0(esbuild@0.23.0)) - semver: 7.6.3 - source-map-loader: 5.0.0(webpack@5.94.0(esbuild@0.23.0)) - source-map-support: 0.5.21 - terser: 5.31.6 - tree-kill: 1.2.2 - tslib: 2.6.3 - typescript: 5.3.3 - vite: 5.4.6(@types/node@22.9.3)(less@4.2.0)(lightningcss@1.27.0)(sass@1.77.6)(terser@5.31.6) - watchpack: 2.4.1 - webpack: 5.94.0(esbuild@0.19.12) - webpack-dev-middleware: 7.4.2(webpack@5.94.0(esbuild@0.23.0)) - webpack-dev-server: 5.0.4(webpack@5.94.0(esbuild@0.23.0)) - webpack-merge: 6.0.1 - webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(webpack@5.94.0(esbuild@0.23.0)) - optionalDependencies: - esbuild: 0.23.0 - tailwindcss: 3.4.7 - transitivePeerDependencies: - - '@rspack/core' - - '@swc/core' - - '@types/node' - - bufferutil - - chokidar - - debug - - html-webpack-plugin - - lightningcss - - node-sass - - sass-embedded - - stylus - - sugarss - - supports-color - - uglify-js - - utf-8-validate - - webpack-cli - '@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2)': dependencies: '@ampproject/remapping': 2.3.0 @@ -17240,49 +17111,6 @@ snapshots: tslib: 2.8.1 optional: true - '@angular/build@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(@types/node@22.9.3)(chokidar@3.6.0)(less@4.2.0)(lightningcss@1.27.0)(postcss@8.4.41)(tailwindcss@3.4.7)(terser@5.31.6)(typescript@5.3.3)': - dependencies: - '@ampproject/remapping': 2.3.0 - '@angular-devkit/architect': 0.1802.12(chokidar@3.6.0) - '@angular/compiler-cli': 19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3) - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 - '@babel/plugin-syntax-import-attributes': 7.24.7(@babel/core@7.25.2) - '@inquirer/confirm': 3.1.22 - '@vitejs/plugin-basic-ssl': 1.1.0(vite@5.4.6(@types/node@22.9.3)(less@4.2.0)(lightningcss@1.27.0)(sass@1.77.6)(terser@5.31.6)) - browserslist: 4.24.2 - critters: 0.0.24 - esbuild: 0.23.0 - fast-glob: 3.3.2 - https-proxy-agent: 7.0.5 - listr2: 8.2.4 - lmdb: 3.0.13 - magic-string: 0.30.11 - mrmime: 2.0.0 - parse5-html-rewriting-stream: 7.0.0 - picomatch: 4.0.2 - piscina: 4.6.1 - rollup: 4.22.4 - sass: 1.77.6 - semver: 7.6.3 - typescript: 5.3.3 - vite: 5.4.6(@types/node@22.9.3)(less@4.2.0)(lightningcss@1.27.0)(sass@1.77.6)(terser@5.31.6) - watchpack: 2.4.1 - optionalDependencies: - less: 4.2.0 - postcss: 8.4.41 - tailwindcss: 3.4.7 - transitivePeerDependencies: - - '@types/node' - - chokidar - - lightningcss - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - '@angular/build@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(less@4.2.0)(lightningcss@1.27.0)(postcss@8.4.41)(tailwindcss@3.4.7)(terser@5.31.6)(typescript@5.7.2)': dependencies: '@ampproject/remapping': 2.3.0 @@ -17427,9 +17255,9 @@ snapshots: rxjs: 7.8.1 tslib: 2.8.1 - '@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1)': + '@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1)': dependencies: - '@angular/core': 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) + '@angular/core': 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) rxjs: 7.8.1 tslib: 2.8.1 @@ -17460,21 +17288,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3)': - dependencies: - '@angular/compiler': 19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) - '@babel/core': 7.26.0 - '@jridgewell/sourcemap-codec': 1.5.0 - chokidar: 4.0.1 - convert-source-map: 1.9.0 - reflect-metadata: 0.2.2 - semver: 7.6.3 - tslib: 2.8.1 - typescript: 5.3.3 - yargs: 17.7.2 - transitivePeerDependencies: - - supports-color - '@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2)': dependencies: '@angular/compiler': 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) @@ -17496,12 +17309,6 @@ snapshots: optionalDependencies: '@angular/core': 17.3.12(rxjs@7.8.1)(zone.js@0.14.8) - '@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))': - dependencies: - tslib: 2.8.1 - optionalDependencies: - '@angular/core': 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) - '@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))': dependencies: tslib: 2.8.1 @@ -17514,12 +17321,6 @@ snapshots: tslib: 2.8.1 zone.js: 0.14.8 - '@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)': - dependencies: - rxjs: 7.8.1 - tslib: 2.8.1 - zone.js: 0.15.0 - '@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)': dependencies: rxjs: 7.8.1 @@ -17542,12 +17343,12 @@ snapshots: '@angular/platform-browser': 17.3.12(@angular/animations@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(@angular/common@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8))(rxjs@7.8.1))(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) tslib: 2.8.1 - '@angular/platform-browser-dynamic@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))': + '@angular/platform-browser-dynamic@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))': dependencies: - '@angular/common': 17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) - '@angular/compiler': 19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) - '@angular/core': 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) - '@angular/platform-browser': 19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) + '@angular/common': 17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) + '@angular/compiler': 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) + '@angular/core': 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) + '@angular/platform-browser': 19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) tslib: 2.8.1 '@angular/platform-browser-dynamic@19.1.0-next.0(@angular/common@19.0.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@19.0.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))': @@ -17574,10 +17375,10 @@ snapshots: optionalDependencies: '@angular/animations': 17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)) - '@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))': + '@angular/platform-browser@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))': dependencies: - '@angular/common': 17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) - '@angular/core': 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) + '@angular/common': 17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) + '@angular/core': 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) tslib: 2.8.1 '@angular/platform-browser@19.1.0-next.0(@angular/common@19.0.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))': @@ -17592,11 +17393,11 @@ snapshots: '@angular/core': 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) tslib: 2.8.1 - '@angular/router@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1)': + '@angular/router@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1)': dependencies: - '@angular/common': 17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) - '@angular/core': 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) - '@angular/platform-browser': 19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) + '@angular/common': 17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) + '@angular/core': 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) + '@angular/platform-browser': 19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) rxjs: 7.8.1 tslib: 2.8.1 @@ -22111,18 +21912,6 @@ snapshots: typescript: 5.4.5 webpack: 5.90.3(esbuild@0.24.0) - '@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(typescript@5.3.3)(webpack@5.94.0(esbuild@0.23.0))': - dependencies: - '@angular/compiler-cli': 19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3) - typescript: 5.3.3 - webpack: 5.94.0(esbuild@0.19.12) - - '@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3))(typescript@5.3.3)(webpack@5.96.1(esbuild@0.24.0))': - dependencies: - '@angular/compiler-cli': 19.1.0-next.0(@angular/compiler@19.0.3(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.3.3) - typescript: 5.3.3 - webpack: 5.96.1(esbuild@0.24.0) - '@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0))': dependencies: '@angular/compiler-cli': 19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2) @@ -23288,12 +23077,12 @@ snapshots: react: 19.0.0-rc-66855b96-20241106 react-dom: 19.0.0-rc-66855b96-20241106(react@19.0.0-rc-66855b96-20241106) - '@testing-library/angular@17.3.4(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/router@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1))(@testing-library/dom@10.4.0)': + '@testing-library/angular@17.3.4(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/router@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1))(@testing-library/dom@10.4.0)': dependencies: - '@angular/common': 17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) - '@angular/core': 19.0.3(rxjs@7.8.1)(zone.js@0.15.0) - '@angular/platform-browser': 19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)) - '@angular/router': 19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.0.3(@angular/common@17.3.12(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.0.3(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1) + '@angular/common': 17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) + '@angular/core': 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) + '@angular/platform-browser': 19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) + '@angular/router': 19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@17.3.12(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(rxjs@7.8.1) '@testing-library/dom': 10.4.0 tslib: 2.8.1 @@ -25827,15 +25616,6 @@ snapshots: path-type: 4.0.0 yaml: 1.10.2 - cosmiconfig@9.0.0(typescript@5.3.3): - dependencies: - env-paths: 2.2.1 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - parse-json: 5.2.0 - optionalDependencies: - typescript: 5.3.3 - cosmiconfig@9.0.0(typescript@5.4.5): dependencies: env-paths: 2.2.1 @@ -31694,17 +31474,6 @@ snapshots: transitivePeerDependencies: - typescript - postcss-loader@8.1.1(postcss@8.4.41)(typescript@5.3.3)(webpack@5.94.0(esbuild@0.23.0)): - dependencies: - cosmiconfig: 9.0.0(typescript@5.3.3) - jiti: 1.21.6 - postcss: 8.4.41 - semver: 7.6.3 - optionalDependencies: - webpack: 5.94.0(esbuild@0.19.12) - transitivePeerDependencies: - - typescript - postcss-loader@8.1.1(postcss@8.4.41)(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0)): dependencies: cosmiconfig: 9.0.0(typescript@5.7.2) @@ -34020,30 +33789,6 @@ snapshots: - supports-color - ts-node - tsup@8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.49)(typescript@5.3.3): - dependencies: - bundle-require: 4.2.1(esbuild@0.19.12) - cac: 6.7.14 - chokidar: 3.6.0 - debug: 4.3.7 - esbuild: 0.19.12 - execa: 5.1.1 - globby: 11.1.0 - joycon: 3.1.1 - postcss-load-config: 4.0.2(postcss@8.4.49) - resolve-from: 5.0.0 - rollup: 4.27.4 - source-map: 0.8.0-beta.0 - sucrase: 3.35.0 - tree-kill: 1.2.2 - optionalDependencies: - '@microsoft/api-extractor': 7.48.0(@types/node@22.9.3) - postcss: 8.4.49 - typescript: 5.3.3 - transitivePeerDependencies: - - supports-color - - ts-node - tsup@8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.49)(typescript@5.7.2): dependencies: bundle-require: 4.2.1(esbuild@0.19.12) From b858927976a9d94e707924ef8a9e9d2ede0b6275 Mon Sep 17 00:00:00 2001 From: omergronich Date: Sat, 7 Dec 2024 00:15:52 +0200 Subject: [PATCH 27/35] added missing dep from basic-persister example --- examples/angular/basic-persister/package.json | 1 + pnpm-lock.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/examples/angular/basic-persister/package.json b/examples/angular/basic-persister/package.json index 42d7604301..5978ab10a0 100644 --- a/examples/angular/basic-persister/package.json +++ b/examples/angular/basic-persister/package.json @@ -16,6 +16,7 @@ "@angular/platform-browser-dynamic": "^19.1.0-next.0", "@tanstack/angular-query-experimental": "^5.62.3", "@tanstack/angular-query-persist-client-experimental": "^5.62.3", + "@tanstack/query-sync-storage-persister": "^5.62.3", "rxjs": "^7.8.1", "tslib": "^2.6.3", "zone.js": "^0.15.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc18d53c8b..4a7b3cb155 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -231,6 +231,9 @@ importers: '@tanstack/angular-query-persist-client-experimental': specifier: ^5.62.3 version: link:../../../packages/angular-persist-query-client-experimental + '@tanstack/query-sync-storage-persister': + specifier: ^5.62.3 + version: link:../../../packages/query-sync-storage-persister rxjs: specifier: ^7.8.1 version: 7.8.1 From 325b2a7f0f97acf0856b75d3091e04e37578313a Mon Sep 17 00:00:00 2001 From: omergronich Date: Sat, 7 Dec 2024 01:20:06 +0200 Subject: [PATCH 28/35] Added a more complex example for persistence. This examples demonstrates how to selectively persist queries to different persisters. --- .../.devcontainer/devcontainer.json | 4 + .../angular/multiple-persisters/.eslintrc.cjs | 6 + .../angular/multiple-persisters/README.md | 6 + .../angular/multiple-persisters/angular.json | 104 ++++++++++ .../angular/multiple-persisters/package.json | 33 +++ .../src/app/app.component.ts | 30 +++ .../multiple-persisters/src/app/app.config.ts | 60 ++++++ .../app/components/session-data.component.ts | 75 +++++++ .../components/user-preferences.component.ts | 73 +++++++ .../app/interceptor/mock-api.interceptor.ts | 43 ++++ .../multiple-persisters/src/favicon.ico | Bin 0 -> 15086 bytes .../multiple-persisters/src/index.html | 13 ++ .../angular/multiple-persisters/src/main.ts | 5 + .../multiple-persisters/src/styles.css | 3 + .../multiple-persisters/tailwind.config.js | 8 + .../multiple-persisters/tsconfig.app.json | 9 + .../angular/multiple-persisters/tsconfig.json | 31 +++ pnpm-lock.yaml | 194 ++++++++++++------ 18 files changed, 629 insertions(+), 68 deletions(-) create mode 100644 examples/angular/multiple-persisters/.devcontainer/devcontainer.json create mode 100644 examples/angular/multiple-persisters/.eslintrc.cjs create mode 100644 examples/angular/multiple-persisters/README.md create mode 100644 examples/angular/multiple-persisters/angular.json create mode 100644 examples/angular/multiple-persisters/package.json create mode 100644 examples/angular/multiple-persisters/src/app/app.component.ts create mode 100644 examples/angular/multiple-persisters/src/app/app.config.ts create mode 100644 examples/angular/multiple-persisters/src/app/components/session-data.component.ts create mode 100644 examples/angular/multiple-persisters/src/app/components/user-preferences.component.ts create mode 100644 examples/angular/multiple-persisters/src/app/interceptor/mock-api.interceptor.ts create mode 100644 examples/angular/multiple-persisters/src/favicon.ico create mode 100644 examples/angular/multiple-persisters/src/index.html create mode 100644 examples/angular/multiple-persisters/src/main.ts create mode 100644 examples/angular/multiple-persisters/src/styles.css create mode 100644 examples/angular/multiple-persisters/tailwind.config.js create mode 100644 examples/angular/multiple-persisters/tsconfig.app.json create mode 100644 examples/angular/multiple-persisters/tsconfig.json diff --git a/examples/angular/multiple-persisters/.devcontainer/devcontainer.json b/examples/angular/multiple-persisters/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..365adf8f4c --- /dev/null +++ b/examples/angular/multiple-persisters/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "Node.js", + "image": "mcr.microsoft.com/devcontainers/javascript-node:22" +} diff --git a/examples/angular/multiple-persisters/.eslintrc.cjs b/examples/angular/multiple-persisters/.eslintrc.cjs new file mode 100644 index 0000000000..cca134ce16 --- /dev/null +++ b/examples/angular/multiple-persisters/.eslintrc.cjs @@ -0,0 +1,6 @@ +// @ts-check + +/** @type {import('eslint').Linter.Config} */ +const config = {} + +module.exports = config diff --git a/examples/angular/multiple-persisters/README.md b/examples/angular/multiple-persisters/README.md new file mode 100644 index 0000000000..d0551cf9de --- /dev/null +++ b/examples/angular/multiple-persisters/README.md @@ -0,0 +1,6 @@ +# TanStack Query Angular multiple persisters example + +To run this example: + +- `npm install` or `yarn` or `pnpm i` or `bun i` +- `npm run start` or `yarn start` or `pnpm start` or `bun start` diff --git a/examples/angular/multiple-persisters/angular.json b/examples/angular/multiple-persisters/angular.json new file mode 100644 index 0000000000..e9ada92785 --- /dev/null +++ b/examples/angular/multiple-persisters/angular.json @@ -0,0 +1,104 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "cli": { + "packageManager": "pnpm", + "analytics": false, + "cache": { + "enabled": false + } + }, + "newProjectRoot": "projects", + "projects": { + "multiple-persisters": { + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "inlineTemplate": true, + "inlineStyle": true, + "skipTests": true + }, + "@schematics/angular:class": { + "skipTests": true + }, + "@schematics/angular:directive": { + "skipTests": true + }, + "@schematics/angular:guard": { + "skipTests": true + }, + "@schematics/angular:interceptor": { + "skipTests": true + }, + "@schematics/angular:pipe": { + "skipTests": true + }, + "@schematics/angular:resolver": { + "skipTests": true + }, + "@schematics/angular:service": { + "skipTests": true + } + }, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular/build:application", + "options": { + "outputPath": "dist/multiple-persisters", + "index": "src/index.html", + "browser": "src/main.ts", + "polyfills": ["zone.js"], + "tsConfig": "tsconfig.app.json", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.css"], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular/build:dev-server", + "configurations": { + "production": { + "buildTarget": "multiple-persisters:build:production" + }, + "development": { + "buildTarget": "multiple-persisters:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular/build:extract-i18n", + "options": { + "buildTarget": "multiple-persisters:build" + } + } + } + } + } +} diff --git a/examples/angular/multiple-persisters/package.json b/examples/angular/multiple-persisters/package.json new file mode 100644 index 0000000000..f4230fea7e --- /dev/null +++ b/examples/angular/multiple-persisters/package.json @@ -0,0 +1,33 @@ +{ + "name": "@tanstack/query-example-angular-multiple-persisters", + "type": "module", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "watch": "ng build --watch --configuration development" + }, + "private": true, + "dependencies": { + "@angular/common": "^19.1.0-next.0", + "@angular/compiler": "^19.1.0-next.0", + "@angular/core": "^19.1.0-next.0", + "@angular/platform-browser": "^19.1.0-next.0", + "@angular/platform-browser-dynamic": "^19.1.0-next.0", + "@tanstack/angular-query-experimental": "^5.62.3", + "@tanstack/angular-query-persist-client-experimental": "^5.62.3", + "@tanstack/query-sync-storage-persister": "^5.62.3", + "rxjs": "^7.8.1", + "tslib": "^2.6.3", + "zone.js": "^0.15.0" + }, + "devDependencies": { + "@angular/build": "^19.0.2", + "@angular/cli": "^19.0.2", + "@angular/compiler-cli": "^19.1.0-next.0", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.49", + "tailwindcss": "^3.4.7", + "typescript": "5.7.2" + } +} diff --git a/examples/angular/multiple-persisters/src/app/app.component.ts b/examples/angular/multiple-persisters/src/app/app.component.ts new file mode 100644 index 0000000000..9ad189c91b --- /dev/null +++ b/examples/angular/multiple-persisters/src/app/app.component.ts @@ -0,0 +1,30 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core' +import { UserPreferencesComponent } from './components/user-preferences.component' +import { SessionDataComponent } from './components/session-data.component' + +@Component({ + changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'app-root', + standalone: true, + template: ` +
+
+

+ TanStack Query Persistence Demo +

+

+ This demo illustrates how to selectively persist queries to different + persisters. By leveraging shouldDehydrateQuery, it is possible to + strategically cache data in multiple persisters based on specific + query requirements. +

+
+ + +
+
+
+ `, + imports: [UserPreferencesComponent, SessionDataComponent], +}) +export class AppComponent {} diff --git a/examples/angular/multiple-persisters/src/app/app.config.ts b/examples/angular/multiple-persisters/src/app/app.config.ts new file mode 100644 index 0000000000..544da92c30 --- /dev/null +++ b/examples/angular/multiple-persisters/src/app/app.config.ts @@ -0,0 +1,60 @@ +import { + provideHttpClient, + withFetch, + withInterceptors, +} from '@angular/common/http' +import { + QueryClient, + provideTanStackQuery, + withDevtools, +} from '@tanstack/angular-query-experimental' +import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister' +import { withPersistQueryClient } from '@tanstack/angular-query-persist-client-experimental' +import { mockInterceptor } from './interceptor/mock-api.interceptor' +import type { ApplicationConfig } from '@angular/core' + +const localStoragePersister = createSyncStoragePersister({ + storage: window.localStorage, +}) + +const sessionStoragePersister = createSyncStoragePersister({ + storage: window.sessionStorage, +}) + +export const appConfig: ApplicationConfig = { + providers: [ + provideHttpClient(withFetch(), withInterceptors([mockInterceptor])), + provideTanStackQuery( + new QueryClient({ + defaultOptions: { + queries: { + gcTime: 1000 * 60 * 60 * 24, // 24 hours + }, + }, + }), + withDevtools(), + withPersistQueryClient([ + { + persistOptions: { + persister: localStoragePersister, + dehydrateOptions: { + shouldDehydrateQuery: (query) => + query.state.status === 'success' && + query.queryKey[0] === 'preferences', + }, + }, + }, + { + persistOptions: { + persister: sessionStoragePersister, + dehydrateOptions: { + shouldDehydrateQuery: (query) => + query.state.status === 'success' && + query.queryKey[0] === 'session', + }, + }, + }, + ]), + ), + ], +} diff --git a/examples/angular/multiple-persisters/src/app/components/session-data.component.ts b/examples/angular/multiple-persisters/src/app/components/session-data.component.ts new file mode 100644 index 0000000000..88e9f85b6e --- /dev/null +++ b/examples/angular/multiple-persisters/src/app/components/session-data.component.ts @@ -0,0 +1,75 @@ +import { Component, inject } from '@angular/core' +import { injectQuery } from '@tanstack/angular-query-experimental' +import { HttpClient } from '@angular/common/http' +import { firstValueFrom } from 'rxjs' +import { DatePipe } from '@angular/common' + +interface SessionData { + lastActive: string + currentView: string + activeFilters: Array + temporaryNotes: string +} + +@Component({ + selector: 'session-data', + template: ` + @if (sessionData.isLoading()) { +
+
+
+
+ } @else if (sessionData.isError()) { +
+ Error loading session data: {{ sessionData.error() }} +
+ } @else { +
+
+ 🔑 +

+ Session Data + (stored in sessionStorage) +

+
+
+
+ Last Active: + + {{ sessionData.data()?.lastActive | date }} + +
+
+ Current View: + {{ + sessionData.data()?.currentView + }} +
+
+ Active Filters: + + {{ sessionData.data()?.activeFilters?.join(', ') }} + +
+
+ Temporary Notes: + {{ + sessionData.data()?.temporaryNotes + }} +
+
+
+ } + `, + standalone: true, + imports: [DatePipe], +}) +export class SessionDataComponent { + #http = inject(HttpClient) + + sessionData = injectQuery(() => ({ + queryKey: ['session'], + queryFn: () => firstValueFrom(this.#http.get('/session')), + staleTime: 1000 * 60 * 60, // 1 hour + })) +} diff --git a/examples/angular/multiple-persisters/src/app/components/user-preferences.component.ts b/examples/angular/multiple-persisters/src/app/components/user-preferences.component.ts new file mode 100644 index 0000000000..c499ccd27e --- /dev/null +++ b/examples/angular/multiple-persisters/src/app/components/user-preferences.component.ts @@ -0,0 +1,73 @@ +import { Component, inject } from '@angular/core' +import { injectQuery } from '@tanstack/angular-query-experimental' +import { HttpClient } from '@angular/common/http' +import { firstValueFrom } from 'rxjs' + +interface UserPreferences { + theme: string + language: string + notifications: boolean + fontSize: string +} + +@Component({ + selector: 'user-preferences', + template: ` + @if (userPreferences.isLoading()) { +
+
+
+
+ } @else if (userPreferences.isError()) { +
+ Error loading preferences: {{ userPreferences.error() }} +
+ } @else { +
+
+ ⚙️ +

+ User Preferences + (stored in localStorage) +

+
+
+
+ Theme: + {{ userPreferences.data()?.theme }} +
+
+ Language: + {{ + userPreferences.data()?.language + }} +
+
+ Notifications: + {{ + userPreferences.data()?.notifications ? 'Enabled' : 'Disabled' + }} +
+
+ Font Size: + {{ + userPreferences.data()?.fontSize + }} +
+
+
+ } + `, + standalone: true, + imports: [], +}) +export class UserPreferencesComponent { + #http = inject(HttpClient) + + userPreferences = injectQuery(() => ({ + queryKey: ['preferences'], + queryFn: () => + firstValueFrom(this.#http.get('/preferences')), + staleTime: 1000 * 60 * 60, // 1 hour + })) +} diff --git a/examples/angular/multiple-persisters/src/app/interceptor/mock-api.interceptor.ts b/examples/angular/multiple-persisters/src/app/interceptor/mock-api.interceptor.ts new file mode 100644 index 0000000000..74b3ee0e50 --- /dev/null +++ b/examples/angular/multiple-persisters/src/app/interceptor/mock-api.interceptor.ts @@ -0,0 +1,43 @@ +/** + * MockApiInterceptor is used to simulate API responses for `/api/tasks` endpoints. + * It handles the following operations: + * - GET: Fetches all tasks from localStorage. + * - POST: Adds a new task to localStorage. + * - DELETE: Clears all tasks from localStorage. + * Simulated responses include a delay to mimic network latency. + */ +import { HttpResponse } from '@angular/common/http' +import { delay, of } from 'rxjs' +import type { + HttpEvent, + HttpHandlerFn, + HttpInterceptorFn, + HttpRequest, +} from '@angular/common/http' +import type { Observable } from 'rxjs' + +export const mockInterceptor: HttpInterceptorFn = ( + req: HttpRequest, + next: HttpHandlerFn, +): Observable> => { + const respondWith = (status: number, body: any) => + of(new HttpResponse({ status, body })).pipe(delay(100)) + if (req.url === '/preferences') { + return respondWith(200, { + theme: 'dark', + language: 'en', + notifications: true, + fontSize: 'medium', + }) + } + + if (req.url === '/session') { + return respondWith(200, { + lastActive: '2024-02-28T12:00:00Z', + currentView: 'dashboard', + activeFilters: ['recent', 'important'], + temporaryNotes: 'Meeting at 3PM', + }) + } + return next(req) +} diff --git a/examples/angular/multiple-persisters/src/favicon.ico b/examples/angular/multiple-persisters/src/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..57614f9c967596fad0a3989bec2b1deff33034f6 GIT binary patch literal 15086 zcmd^G33O9Omi+`8$@{|M-I6TH3wzF-p5CV8o}7f~KxR60LK+ApEFB<$bcciv%@SmA zV{n>g85YMFFeU*Uvl=i4v)C*qgnb;$GQ=3XTe9{Y%c`mO%su)noNCCQ*@t1WXn|B(hQ7i~ zrUK8|pUkD6#lNo!bt$6)jR!&C?`P5G(`e((P($RaLeq+o0Vd~f11;qB05kdbAOm?r zXv~GYr_sibQO9NGTCdT;+G(!{4Xs@4fPak8#L8PjgJwcs-Mm#nR_Z0s&u?nDX5^~@ z+A6?}g0|=4e_LoE69pPFO`yCD@BCjgKpzMH0O4Xs{Ahc?K3HC5;l=f zg>}alhBXX&);z$E-wai+9TTRtBX-bWYY@cl$@YN#gMd~tM_5lj6W%8ah4;uZ;jP@Q zVbuel1rPA?2@x9Y+u?e`l{Z4ngfG5q5BLH5QsEu4GVpt{KIp1?U)=3+KQ;%7ec8l* zdV=zZgN5>O3G(3L2fqj3;oBbZZw$Ij@`Juz@?+yy#OPw)>#wsTewVgTK9BGt5AbZ&?K&B3GVF&yu?@(Xj3fR3n+ZP0%+wo)D9_xp>Z$`A4 zfV>}NWjO#3lqumR0`gvnffd9Ka}JJMuHS&|55-*mCD#8e^anA<+sFZVaJe7{=p*oX zE_Uv?1>e~ga=seYzh{9P+n5<+7&9}&(kwqSaz;1aD|YM3HBiy<))4~QJSIryyqp| z8nGc(8>3(_nEI4n)n7j(&d4idW1tVLjZ7QbNLXg;LB ziHsS5pXHEjGJZb59KcvS~wv;uZR-+4qEqow`;JCfB*+b^UL^3!?;-^F%yt=VjU|v z39SSqKcRu_NVvz!zJzL0CceJaS6%!(eMshPv_0U5G`~!a#I$qI5Ic(>IONej@aH=f z)($TAT#1I{iCS4f{D2+ApS=$3E7}5=+y(rA9mM#;Cky%b*Gi0KfFA`ofKTzu`AV-9 znW|y@19rrZ*!N2AvDi<_ZeR3O2R{#dh1#3-d%$k${Rx42h+i&GZo5!C^dSL34*AKp z27mTd>k>?V&X;Nl%GZ(>0s`1UN~Hfyj>KPjtnc|)xM@{H_B9rNr~LuH`Gr5_am&Ep zTjZA8hljNj5H1Ipm-uD9rC}U{-vR!eay5&6x6FkfupdpT*84MVwGpdd(}ib)zZ3Ky z7C$pnjc82(W_y_F{PhYj?o!@3__UUvpX)v69aBSzYj3 zdi}YQkKs^SyXyFG2LTRz9{(w}y~!`{EuAaUr6G1M{*%c+kP1olW9z23dSH!G4_HSK zzae-DF$OGR{ofP*!$a(r^5Go>I3SObVI6FLY)N@o<*gl0&kLo-OT{Tl*7nCz>Iq=? zcigIDHtj|H;6sR?or8Wd_a4996GI*CXGU}o;D9`^FM!AT1pBY~?|4h^61BY#_yIfO zKO?E0 zJ{Pc`9rVEI&$xxXu`<5E)&+m(7zX^v0rqofLs&bnQT(1baQkAr^kEsk)15vlzAZ-l z@OO9RF<+IiJ*O@HE256gCt!bF=NM*vh|WVWmjVawcNoksRTMvR03H{p@cjwKh(CL4 z7_PB(dM=kO)!s4fW!1p0f93YN@?ZSG` z$B!JaAJCtW$B97}HNO9(x-t30&E}Mo1UPi@Av%uHj~?T|!4JLwV;KCx8xO#b9IlUW zI6+{a@Wj|<2Y=U;a@vXbxqZNngH8^}LleE_4*0&O7#3iGxfJ%Id>+sb;7{L=aIic8 z|EW|{{S)J-wr@;3PmlxRXU8!e2gm_%s|ReH!reFcY8%$Hl4M5>;6^UDUUae?kOy#h zk~6Ee_@ZAn48Bab__^bNmQ~+k=02jz)e0d9Z3>G?RGG!65?d1>9}7iG17?P*=GUV-#SbLRw)Hu{zx*azHxWkGNTWl@HeWjA?39Ia|sCi{e;!^`1Oec zb>Z|b65OM*;eC=ZLSy?_fg$&^2xI>qSLA2G*$nA3GEnp3$N-)46`|36m*sc#4%C|h zBN<2U;7k>&G_wL4=Ve5z`ubVD&*Hxi)r@{4RCDw7U_D`lbC(9&pG5C*z#W>8>HU)h z!h3g?2UL&sS!oY5$3?VlA0Me9W5e~V;2jds*fz^updz#AJ%G8w2V}AEE?E^=MK%Xt z__Bx1cr7+DQmuHmzn*|hh%~eEc9@m05@clWfpEFcr+06%0&dZJH&@8^&@*$qR@}o3 z@Tuuh2FsLz^zH+dN&T&?0G3I?MpmYJ;GP$J!EzjeM#YLJ!W$}MVNb0^HfOA>5Fe~UNn%Zk(PT@~9}1dt)1UQ zU*B5K?Dl#G74qmg|2>^>0WtLX#Jz{lO4NT`NYB*(L#D|5IpXr9v&7a@YsGp3vLR7L zHYGHZg7{ie6n~2p$6Yz>=^cEg7tEgk-1YRl%-s7^cbqFb(U7&Dp78+&ut5!Tn(hER z|Gp4Ed@CnOPeAe|N>U(dB;SZ?NU^AzoD^UAH_vamp6Ws}{|mSq`^+VP1g~2B{%N-!mWz<`)G)>V-<`9`L4?3dM%Qh6<@kba+m`JS{Ya@9Fq*m6$$ zA1%Ogc~VRH33|S9l%CNb4zM%k^EIpqY}@h{w(aBcJ9c05oiZx#SK9t->5lSI`=&l~ z+-Ic)a{FbBhXV$Xt!WRd`R#Jk-$+_Z52rS>?Vpt2IK<84|E-SBEoIw>cs=a{BlQ7O z-?{Fy_M&84&9|KM5wt~)*!~i~E=(6m8(uCO)I=)M?)&sRbzH$9Rovzd?ZEY}GqX+~ zFbEbLz`BZ49=2Yh-|<`waK-_4!7`ro@zlC|r&I4fc4oyb+m=|c8)8%tZ-z5FwhzDt zL5kB@u53`d@%nHl0Sp)Dw`(QU&>vujEn?GPEXUW!Wi<+4e%BORl&BIH+SwRcbS}X@ z01Pk|vA%OdJKAs17zSXtO55k!;%m9>1eW9LnyAX4uj7@${O6cfii`49qTNItzny5J zH&Gj`e}o}?xjQ}r?LrI%FjUd@xflT3|7LA|ka%Q3i}a8gVm<`HIWoJGH=$EGClX^C0lysQJ>UO(q&;`T#8txuoQ_{l^kEV9CAdXuU1Ghg8 zN_6hHFuy&1x24q5-(Z7;!poYdt*`UTdrQOIQ!2O7_+AHV2hgXaEz7)>$LEdG z<8vE^Tw$|YwZHZDPM!SNOAWG$?J)MdmEk{U!!$M#fp7*Wo}jJ$Q(=8>R`Ats?e|VU?Zt7Cdh%AdnfyN3MBWw{ z$OnREvPf7%z6`#2##_7id|H%Y{vV^vWXb?5d5?a_y&t3@p9t$ncHj-NBdo&X{wrfJ zamN)VMYROYh_SvjJ=Xd!Ga?PY_$;*L=SxFte!4O6%0HEh%iZ4=gvns7IWIyJHa|hT z2;1+e)`TvbNb3-0z&DD_)Jomsg-7p_Uh`wjGnU1urmv1_oVqRg#=C?e?!7DgtqojU zWoAB($&53;TsXu^@2;8M`#z{=rPy?JqgYM0CDf4v@z=ZD|ItJ&8%_7A#K?S{wjxgd z?xA6JdJojrWpB7fr2p_MSsU4(R7=XGS0+Eg#xR=j>`H@R9{XjwBmqAiOxOL` zt?XK-iTEOWV}f>Pz3H-s*>W z4~8C&Xq25UQ^xH6H9kY_RM1$ch+%YLF72AA7^b{~VNTG}Tj#qZltz5Q=qxR`&oIlW Nr__JTFzvMr^FKp4S3v*( literal 0 HcmV?d00001 diff --git a/examples/angular/multiple-persisters/src/index.html b/examples/angular/multiple-persisters/src/index.html new file mode 100644 index 0000000000..94e60f2df0 --- /dev/null +++ b/examples/angular/multiple-persisters/src/index.html @@ -0,0 +1,13 @@ + + + + + TanStack Query Angular multiple persisters example + + + + + + + + diff --git a/examples/angular/multiple-persisters/src/main.ts b/examples/angular/multiple-persisters/src/main.ts new file mode 100644 index 0000000000..c3d8f9af99 --- /dev/null +++ b/examples/angular/multiple-persisters/src/main.ts @@ -0,0 +1,5 @@ +import { bootstrapApplication } from '@angular/platform-browser' +import { appConfig } from './app/app.config' +import { AppComponent } from './app/app.component' + +bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)) diff --git a/examples/angular/multiple-persisters/src/styles.css b/examples/angular/multiple-persisters/src/styles.css new file mode 100644 index 0000000000..b5c61c9567 --- /dev/null +++ b/examples/angular/multiple-persisters/src/styles.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/examples/angular/multiple-persisters/tailwind.config.js b/examples/angular/multiple-persisters/tailwind.config.js new file mode 100644 index 0000000000..7d52777e05 --- /dev/null +++ b/examples/angular/multiple-persisters/tailwind.config.js @@ -0,0 +1,8 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: ['./src/**/*.{html,ts}'], + theme: { + extend: {}, + }, + plugins: [], +} diff --git a/examples/angular/multiple-persisters/tsconfig.app.json b/examples/angular/multiple-persisters/tsconfig.app.json new file mode 100644 index 0000000000..5b9d3c5ecb --- /dev/null +++ b/examples/angular/multiple-persisters/tsconfig.app.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "types": [] + }, + "files": ["src/main.ts"], + "include": ["src/**/*.d.ts"] +} diff --git a/examples/angular/multiple-persisters/tsconfig.json b/examples/angular/multiple-persisters/tsconfig.json new file mode 100644 index 0000000000..d0d73c8beb --- /dev/null +++ b/examples/angular/multiple-persisters/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "isolatedModules": true, + "esModuleInterop": true, + "sourceMap": true, + "declaration": false, + "experimentalDecorators": true, + "moduleResolution": "bundler", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": ["ES2022", "dom"] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictStandalone": true, + "strictTemplates": true + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4a7b3cb155..06d0b69c5e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,7 +24,7 @@ importers: version: 1.17.1(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) '@tanstack/config': specifier: ^0.14.0 - version: 0.14.0(@types/node@22.9.3)(esbuild@0.24.0)(eslint@9.15.0(jiti@2.4.0))(rollup@4.27.4)(typescript@5.7.2)(vite@5.4.11(@types/node@22.9.3)(less@4.2.1)(lightningcss@1.27.0)(sass@1.81.0)(terser@5.31.6)) + version: 0.14.0(@types/node@22.9.3)(esbuild@0.19.12)(eslint@9.15.0(jiti@2.4.0))(rollup@4.27.4)(typescript@5.7.2)(vite@5.4.11(@types/node@22.9.3)(less@4.2.1)(lightningcss@1.27.0)(sass@1.81.0)(terser@5.31.6)) '@testing-library/jest-dom': specifier: ^6.6.3 version: 6.6.3 @@ -349,6 +349,64 @@ importers: specifier: 5.7.2 version: 5.7.2 + examples/angular/multiple-persisters: + dependencies: + '@angular/common': + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1) + '@angular/compiler': + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) + '@angular/core': + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) + '@angular/platform-browser': + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) + '@angular/platform-browser-dynamic': + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))) + '@tanstack/angular-query-experimental': + specifier: ^5.62.3 + version: link:../../../packages/angular-query-experimental + '@tanstack/angular-query-persist-client-experimental': + specifier: ^5.62.3 + version: link:../../../packages/angular-persist-query-client-experimental + '@tanstack/query-sync-storage-persister': + specifier: ^5.62.3 + version: link:../../../packages/query-sync-storage-persister + rxjs: + specifier: ^7.8.1 + version: 7.8.1 + tslib: + specifier: ^2.6.3 + version: 2.8.1 + zone.js: + specifier: ^0.15.0 + version: 0.15.0 + devDependencies: + '@angular/build': + specifier: ^19.0.2 + version: 19.0.2(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@types/node@22.9.3)(chokidar@4.0.1)(less@4.2.1)(lightningcss@1.27.0)(postcss@8.4.49)(tailwindcss@3.4.7)(terser@5.31.6)(typescript@5.7.2) + '@angular/cli': + specifier: ^19.0.2 + version: 19.0.2(@types/node@22.9.3)(chokidar@4.0.1) + '@angular/compiler-cli': + specifier: ^19.1.0-next.0 + version: 19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2) + autoprefixer: + specifier: ^10.4.20 + version: 10.4.20(postcss@8.4.49) + postcss: + specifier: ^8.4.49 + version: 8.4.49 + tailwindcss: + specifier: ^3.4.7 + version: 3.4.7 + typescript: + specifier: 5.7.2 + version: 5.7.2 + examples/angular/pagination: dependencies: '@angular/common': @@ -1905,7 +1963,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: ^17.3.8 - version: 17.3.8(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.20.1)))(lightningcss@1.27.0)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(tailwindcss@3.4.7)(tslib@2.8.1)(typescript@5.4.5))(tailwindcss@3.4.7)(typescript@5.4.5) + version: 17.3.8(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.19.12)))(lightningcss@1.27.0)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(tailwindcss@3.4.7)(tslib@2.8.1)(typescript@5.4.5))(tailwindcss@3.4.7)(typescript@5.4.5) '@angular/cli': specifier: ^17.3.8 version: 17.3.8(chokidar@3.6.0) @@ -2071,7 +2129,7 @@ importers: version: 5.6.3(webpack@5.96.1) webpack: specifier: ^5.96.1 - version: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) + version: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) webpack-cli: specifier: ^5.1.4 version: 5.1.4(webpack@5.96.1) @@ -2145,7 +2203,7 @@ importers: devDependencies: '@analogjs/vite-plugin-angular': specifier: ^1.6.4 - version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0))) + version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.19.12))) '@angular/compiler': specifier: ^19.1.0-next.0 version: 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) @@ -2175,7 +2233,7 @@ importers: version: 50.5.0(eslint@9.15.0(jiti@2.4.0)) tsup: specifier: 8.0.2 - version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.41)(typescript@5.7.2) + version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.49)(typescript@5.7.2) typescript: specifier: 5.7.2 version: 5.7.2 @@ -2191,7 +2249,7 @@ importers: devDependencies: '@analogjs/vite-plugin-angular': specifier: ^1.6.4 - version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.24.0))) + version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.19.12))) '@angular/core': specifier: ^19.1.0-next.0 version: 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) @@ -2225,7 +2283,7 @@ importers: devDependencies: '@analogjs/vite-plugin-angular': specifier: ^1.6.4 - version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.24.0))) + version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0))) '@angular/compiler': specifier: ^19.1.0-next.0 version: 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) @@ -2246,7 +2304,7 @@ importers: version: 50.5.0(eslint@9.15.0(jiti@2.4.0)) tsup: specifier: 8.0.2 - version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.49)(typescript@5.7.2) + version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.41)(typescript@5.7.2) typescript: specifier: 5.7.2 version: 5.7.2 @@ -16744,10 +16802,10 @@ snapshots: '@ngtools/webpack': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0)) ts-morph: 21.0.1 - '@analogjs/vite-plugin-angular@1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.24.0)))': + '@analogjs/vite-plugin-angular@1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.19.12)))': dependencies: - '@angular-devkit/build-angular': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2) - '@ngtools/webpack': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.24.0)) + '@angular-devkit/build-angular': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2) + '@ngtools/webpack': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.19.12)) ts-morph: 21.0.1 '@andrewbranch/untar.js@1.0.3': {} @@ -16773,7 +16831,7 @@ snapshots: transitivePeerDependencies: - chokidar - '@angular-devkit/build-angular@17.3.8(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.20.1)))(lightningcss@1.27.0)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(tailwindcss@3.4.7)(tslib@2.8.1)(typescript@5.4.5))(tailwindcss@3.4.7)(typescript@5.4.5)': + '@angular-devkit/build-angular@17.3.8(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.19.12)))(lightningcss@1.27.0)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(tailwindcss@3.4.7)(tslib@2.8.1)(typescript@5.4.5))(tailwindcss@3.4.7)(typescript@5.4.5)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1703.8(chokidar@3.6.0) @@ -16835,11 +16893,11 @@ snapshots: undici: 6.11.1 vite: 5.1.7(@types/node@22.9.3)(less@4.2.0)(lightningcss@1.27.0)(sass@1.71.1)(terser@5.29.1) watchpack: 2.4.0 - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) webpack-dev-middleware: 6.1.2(webpack@5.90.3(esbuild@0.20.1)) webpack-dev-server: 4.15.1(webpack@5.90.3(esbuild@0.20.1)) webpack-merge: 5.10.0 - webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.20.1)))(webpack@5.90.3(esbuild@0.20.1)) + webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.19.12)))(webpack@5.90.3(esbuild@0.20.1)) optionalDependencies: esbuild: 0.20.1 ng-packagr: 17.3.0(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(tailwindcss@3.4.7)(tslib@2.8.1)(typescript@5.4.5) @@ -16950,7 +17008,7 @@ snapshots: - utf-8-validate - webpack-cli - '@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2)': + '@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1802.12(chokidar@3.6.0) @@ -17015,7 +17073,7 @@ snapshots: webpack-dev-middleware: 7.4.2(webpack@5.94.0(esbuild@0.23.0)) webpack-dev-server: 5.0.4(webpack@5.94.0(esbuild@0.23.0)) webpack-merge: 6.0.1 - webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(webpack@5.94.0(esbuild@0.23.0)) + webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(webpack@5.94.0(esbuild@0.23.0)) optionalDependencies: esbuild: 0.23.0 tailwindcss: 3.4.7 @@ -17041,7 +17099,7 @@ snapshots: dependencies: '@angular-devkit/architect': 0.1703.8(chokidar@3.6.0) rxjs: 7.8.1 - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) webpack-dev-server: 4.15.1(webpack@5.90.3(esbuild@0.20.1)) transitivePeerDependencies: - chokidar @@ -21913,7 +21971,7 @@ snapshots: dependencies: '@angular/compiler-cli': 17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5) typescript: 5.4.5 - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) '@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0))': dependencies: @@ -21921,11 +21979,11 @@ snapshots: typescript: 5.7.2 webpack: 5.94.0(esbuild@0.19.12) - '@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.24.0))': + '@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.19.12))': dependencies: '@angular/compiler-cli': 19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2) typescript: 5.7.2 - webpack: 5.96.1(esbuild@0.24.0) + webpack: 5.96.1(esbuild@0.19.12) '@nodelib/fs.scandir@2.1.5': dependencies: @@ -23034,14 +23092,14 @@ snapshots: '@swc/counter': 0.1.3 tslib: 2.8.1 - '@tanstack/config@0.14.0(@types/node@22.9.3)(esbuild@0.24.0)(eslint@9.15.0(jiti@2.4.0))(rollup@4.27.4)(typescript@5.7.2)(vite@5.4.11(@types/node@22.9.3)(less@4.2.1)(lightningcss@1.27.0)(sass@1.81.0)(terser@5.31.6))': + '@tanstack/config@0.14.0(@types/node@22.9.3)(esbuild@0.19.12)(eslint@9.15.0(jiti@2.4.0))(rollup@4.27.4)(typescript@5.7.2)(vite@5.4.11(@types/node@22.9.3)(less@4.2.1)(lightningcss@1.27.0)(sass@1.81.0)(terser@5.31.6))': dependencies: '@commitlint/parse': 19.5.0 '@eslint/js': 9.15.0 '@stylistic/eslint-plugin-js': 2.11.0(eslint@9.15.0(jiti@2.4.0)) commander: 12.1.0 current-git-branch: 1.1.0 - esbuild-register: 3.6.0(esbuild@0.24.0) + esbuild-register: 3.6.0(esbuild@0.19.12) eslint-plugin-import-x: 4.4.3(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) eslint-plugin-n: 17.14.0(eslint@9.15.0(jiti@2.4.0)) globals: 15.12.0 @@ -24051,7 +24109,7 @@ snapshots: '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.96.1)': dependencies: - webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack@5.96.1) '@webpack-cli/info@1.5.0(webpack-cli@4.10.0)': @@ -24061,7 +24119,7 @@ snapshots: '@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.96.1)': dependencies: - webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack@5.96.1) '@webpack-cli/serve@1.7.0(webpack-cli@4.10.0)': @@ -24070,7 +24128,7 @@ snapshots: '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack@5.96.1)': dependencies: - webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack@5.96.1) '@xmldom/xmldom@0.7.13': {} @@ -24583,7 +24641,7 @@ snapshots: '@babel/core': 7.24.0 find-cache-dir: 4.0.0 schema-utils: 4.2.0 - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) babel-loader@9.1.3(@babel/core@7.25.2)(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -24597,7 +24655,7 @@ snapshots: '@babel/core': 7.26.0 find-cache-dir: 4.0.0 schema-utils: 4.2.0 - webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) babel-plugin-add-module-exports@0.2.1: {} @@ -25586,7 +25644,7 @@ snapshots: normalize-path: 3.0.0 schema-utils: 4.2.0 serialize-javascript: 6.0.2 - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) copy-webpack-plugin@12.0.2(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -25836,7 +25894,7 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.6.3 optionalDependencies: - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) css-loader@7.1.2(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -26376,10 +26434,10 @@ snapshots: transitivePeerDependencies: - supports-color - esbuild-register@3.6.0(esbuild@0.24.0): + esbuild-register@3.6.0(esbuild@0.19.12): dependencies: debug: 4.3.7 - esbuild: 0.24.0 + esbuild: 0.19.12 transitivePeerDependencies: - supports-color @@ -27997,7 +28055,7 @@ snapshots: util.promisify: 1.0.0 webpack: 4.44.2(webpack-cli@4.10.0) - html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.20.1)): + html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.19.12)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 @@ -28005,7 +28063,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.2.1 optionalDependencies: - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) optional: true html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)): @@ -28019,7 +28077,7 @@ snapshots: webpack: 5.94.0(esbuild@0.19.12) optional: true - html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)): + html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 @@ -28027,7 +28085,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.2.1 optionalDependencies: - webpack: 5.96.1(esbuild@0.24.0) + webpack: 5.96.1(esbuild@0.19.12) optional: true html-webpack-plugin@5.6.3(webpack@5.96.1): @@ -28038,7 +28096,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.2.1 optionalDependencies: - webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) htmlparser2@6.1.0: dependencies: @@ -28992,7 +29050,7 @@ snapshots: dependencies: klona: 2.0.6 less: 4.2.0 - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) less-loader@12.2.0(less@4.2.0)(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -29040,7 +29098,7 @@ snapshots: dependencies: webpack-sources: 3.2.3 optionalDependencies: - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) license-webpack-plugin@4.0.2(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -30050,7 +30108,7 @@ snapshots: dependencies: schema-utils: 4.2.0 tapable: 2.2.1 - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) mini-css-extract-plugin@2.9.0(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -31473,7 +31531,7 @@ snapshots: postcss: 8.4.35 semver: 7.6.3 optionalDependencies: - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) transitivePeerDependencies: - typescript @@ -32519,7 +32577,7 @@ snapshots: neo-async: 2.6.2 optionalDependencies: sass: 1.71.1 - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) sass-loader@16.0.0(sass@1.77.6)(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -33020,7 +33078,7 @@ snapshots: dependencies: iconv-lite: 0.6.3 source-map-js: 1.2.1 - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) source-map-loader@5.0.0(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -33521,49 +33579,49 @@ snapshots: webpack-sources: 1.4.3 worker-farm: 1.7.0 - terser-webpack-plugin@5.3.10(esbuild@0.19.12)(webpack@5.94.0(esbuild@0.23.0)): + terser-webpack-plugin@5.3.10(esbuild@0.19.12)(webpack@5.90.3(esbuild@0.20.1)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.31.6 - webpack: 5.94.0(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.19.12) optionalDependencies: esbuild: 0.19.12 - terser-webpack-plugin@5.3.10(esbuild@0.24.0)(webpack@5.90.3(esbuild@0.20.1)): + terser-webpack-plugin@5.3.10(esbuild@0.19.12)(webpack@5.94.0(esbuild@0.23.0)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.31.6 - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.94.0(esbuild@0.19.12) optionalDependencies: - esbuild: 0.24.0 + esbuild: 0.19.12 - terser-webpack-plugin@5.3.10(esbuild@0.24.0)(webpack@5.96.1(esbuild@0.24.0)): + terser-webpack-plugin@5.3.10(esbuild@0.19.12)(webpack@5.96.1(esbuild@0.19.12)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.31.6 - webpack: 5.96.1(esbuild@0.24.0) + webpack: 5.96.1(esbuild@0.19.12) optionalDependencies: - esbuild: 0.24.0 + esbuild: 0.19.12 - terser-webpack-plugin@5.3.10(esbuild@0.24.0)(webpack@5.96.1): + terser-webpack-plugin@5.3.10(esbuild@0.19.12)(webpack@5.96.1): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.31.6 - webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) optionalDependencies: - esbuild: 0.24.0 + esbuild: 0.19.12 terser@4.8.1: dependencies: @@ -34770,7 +34828,7 @@ snapshots: import-local: 3.2.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) webpack-merge: 5.10.0 webpack-dev-middleware@5.3.4(webpack@5.90.3(esbuild@0.20.1)): @@ -34780,7 +34838,7 @@ snapshots: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) webpack-dev-middleware@6.1.2(webpack@5.90.3(esbuild@0.20.1)): dependencies: @@ -34790,7 +34848,7 @@ snapshots: range-parser: 1.2.1 schema-utils: 4.2.0 optionalDependencies: - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) webpack-dev-middleware@7.4.2(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -34836,7 +34894,7 @@ snapshots: webpack-dev-middleware: 5.3.4(webpack@5.90.3(esbuild@0.20.1)) ws: 8.18.0 optionalDependencies: - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) transitivePeerDependencies: - bufferutil - debug @@ -34902,12 +34960,12 @@ snapshots: webpack-sources@3.2.3: {} - webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.20.1)))(webpack@5.90.3(esbuild@0.20.1)): + webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.19.12)))(webpack@5.90.3(esbuild@0.20.1)): dependencies: typed-assert: 1.0.9 - webpack: 5.90.3(esbuild@0.24.0) + webpack: 5.90.3(esbuild@0.19.12) optionalDependencies: - html-webpack-plugin: 5.6.3(webpack@5.90.3(esbuild@0.20.1)) + html-webpack-plugin: 5.6.3(webpack@5.90.3(esbuild@0.19.12)) webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -34916,12 +34974,12 @@ snapshots: optionalDependencies: html-webpack-plugin: 5.6.3(webpack@5.94.0(esbuild@0.19.12)) - webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(webpack@5.94.0(esbuild@0.23.0)): + webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(webpack@5.94.0(esbuild@0.23.0)): dependencies: typed-assert: 1.0.9 webpack: 5.94.0(esbuild@0.19.12) optionalDependencies: - html-webpack-plugin: 5.6.3(webpack@5.96.1(esbuild@0.24.0)) + html-webpack-plugin: 5.6.3(webpack@5.96.1(esbuild@0.19.12)) webpack-virtual-modules@0.6.2: {} @@ -34955,7 +35013,7 @@ snapshots: transitivePeerDependencies: - supports-color - webpack@5.90.3(esbuild@0.24.0): + webpack@5.90.3(esbuild@0.19.12): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.6 @@ -34978,7 +35036,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(esbuild@0.24.0)(webpack@5.90.3(esbuild@0.20.1)) + terser-webpack-plugin: 5.3.10(esbuild@0.19.12)(webpack@5.90.3(esbuild@0.20.1)) watchpack: 2.4.2 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -35016,7 +35074,7 @@ snapshots: - esbuild - uglify-js - webpack@5.96.1(esbuild@0.24.0): + webpack@5.96.1(esbuild@0.19.12): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.6 @@ -35038,7 +35096,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(esbuild@0.24.0)(webpack@5.96.1(esbuild@0.24.0)) + terser-webpack-plugin: 5.3.10(esbuild@0.19.12)(webpack@5.96.1(esbuild@0.19.12)) watchpack: 2.4.2 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -35046,7 +35104,7 @@ snapshots: - esbuild - uglify-js - webpack@5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4): + webpack@5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.6 @@ -35068,7 +35126,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(esbuild@0.24.0)(webpack@5.96.1) + terser-webpack-plugin: 5.3.10(esbuild@0.19.12)(webpack@5.96.1) watchpack: 2.4.2 webpack-sources: 3.2.3 optionalDependencies: From 5da9025fbf0bc87f08383ed154e626ebd4152dc6 Mon Sep 17 00:00:00 2001 From: omergronich Date: Sun, 8 Dec 2024 21:20:04 +0200 Subject: [PATCH 29/35] fix(angular-query) bumped versions to 5.62.4 --- examples/angular/basic-persister/package.json | 4 +- .../angular/multiple-persisters/package.json | 4 +- .../package.json | 2 +- pnpm-lock.yaml | 144 +++++++++--------- 4 files changed, 77 insertions(+), 77 deletions(-) diff --git a/examples/angular/basic-persister/package.json b/examples/angular/basic-persister/package.json index 5978ab10a0..1ea6b55554 100644 --- a/examples/angular/basic-persister/package.json +++ b/examples/angular/basic-persister/package.json @@ -14,8 +14,8 @@ "@angular/core": "^19.1.0-next.0", "@angular/platform-browser": "^19.1.0-next.0", "@angular/platform-browser-dynamic": "^19.1.0-next.0", - "@tanstack/angular-query-experimental": "^5.62.3", - "@tanstack/angular-query-persist-client-experimental": "^5.62.3", + "@tanstack/angular-query-experimental": "^5.62.4", + "@tanstack/angular-query-persist-client-experimental": "^5.62.4", "@tanstack/query-sync-storage-persister": "^5.62.3", "rxjs": "^7.8.1", "tslib": "^2.6.3", diff --git a/examples/angular/multiple-persisters/package.json b/examples/angular/multiple-persisters/package.json index f4230fea7e..595fac4c57 100644 --- a/examples/angular/multiple-persisters/package.json +++ b/examples/angular/multiple-persisters/package.json @@ -14,8 +14,8 @@ "@angular/core": "^19.1.0-next.0", "@angular/platform-browser": "^19.1.0-next.0", "@angular/platform-browser-dynamic": "^19.1.0-next.0", - "@tanstack/angular-query-experimental": "^5.62.3", - "@tanstack/angular-query-persist-client-experimental": "^5.62.3", + "@tanstack/angular-query-experimental": "^5.62.4", + "@tanstack/angular-query-persist-client-experimental": "^5.62.4", "@tanstack/query-sync-storage-persister": "^5.62.3", "rxjs": "^7.8.1", "tslib": "^2.6.3", diff --git a/packages/angular-persist-query-client-experimental/package.json b/packages/angular-persist-query-client-experimental/package.json index 6f5f92bade..e7d6c7e394 100644 --- a/packages/angular-persist-query-client-experimental/package.json +++ b/packages/angular-persist-query-client-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-persist-client-experimental", - "version": "5.62.3", + "version": "5.62.4", "description": "Angular bindings to work with persisters in TanStack/angular-query", "author": "Omer Gronich", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 10858040db..be2a005c7a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,7 +24,7 @@ importers: version: 1.17.1(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) '@tanstack/config': specifier: ^0.14.0 - version: 0.14.0(@types/node@22.9.3)(esbuild@0.19.12)(eslint@9.15.0(jiti@2.4.0))(rollup@4.27.4)(typescript@5.7.2)(vite@5.4.11(@types/node@22.9.3)(less@4.2.1)(lightningcss@1.27.0)(sass@1.81.0)(terser@5.31.6)) + version: 0.14.0(@types/node@22.9.3)(esbuild@0.24.0)(eslint@9.15.0(jiti@2.4.0))(rollup@4.27.4)(typescript@5.7.2)(vite@5.4.11(@types/node@22.9.3)(less@4.2.1)(lightningcss@1.27.0)(sass@1.81.0)(terser@5.31.6)) '@testing-library/jest-dom': specifier: ^6.6.3 version: 6.6.3 @@ -226,10 +226,10 @@ importers: specifier: ^19.1.0-next.0 version: 19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))) '@tanstack/angular-query-experimental': - specifier: ^5.62.3 + specifier: ^5.62.4 version: link:../../../packages/angular-query-experimental '@tanstack/angular-query-persist-client-experimental': - specifier: ^5.62.3 + specifier: ^5.62.4 version: link:../../../packages/angular-persist-query-client-experimental '@tanstack/query-sync-storage-persister': specifier: ^5.62.3 @@ -367,10 +367,10 @@ importers: specifier: ^19.1.0-next.0 version: 19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))) '@tanstack/angular-query-experimental': - specifier: ^5.62.3 + specifier: ^5.62.4 version: link:../../../packages/angular-query-experimental '@tanstack/angular-query-persist-client-experimental': - specifier: ^5.62.3 + specifier: ^5.62.4 version: link:../../../packages/angular-persist-query-client-experimental '@tanstack/query-sync-storage-persister': specifier: ^5.62.3 @@ -1963,7 +1963,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: ^17.3.8 - version: 17.3.8(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.19.12)))(lightningcss@1.27.0)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(tailwindcss@3.4.7)(tslib@2.8.1)(typescript@5.4.5))(tailwindcss@3.4.7)(typescript@5.4.5) + version: 17.3.8(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.20.1)))(lightningcss@1.27.0)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(tailwindcss@3.4.7)(tslib@2.8.1)(typescript@5.4.5))(tailwindcss@3.4.7)(typescript@5.4.5) '@angular/cli': specifier: ^17.3.8 version: 17.3.8(chokidar@3.6.0) @@ -2129,7 +2129,7 @@ importers: version: 5.6.3(webpack@5.96.1) webpack: specifier: ^5.96.1 - version: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) + version: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-cli: specifier: ^5.1.4 version: 5.1.4(webpack@5.96.1) @@ -2203,7 +2203,7 @@ importers: devDependencies: '@analogjs/vite-plugin-angular': specifier: ^1.6.4 - version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.19.12))) + version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0))) '@angular/compiler': specifier: ^19.1.0-next.0 version: 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) @@ -2233,7 +2233,7 @@ importers: version: 50.5.0(eslint@9.15.0(jiti@2.4.0)) tsup: specifier: 8.0.2 - version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.49)(typescript@5.7.2) + version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.41)(typescript@5.7.2) typescript: specifier: 5.7.2 version: 5.7.2 @@ -2249,7 +2249,7 @@ importers: devDependencies: '@analogjs/vite-plugin-angular': specifier: ^1.6.4 - version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.19.12))) + version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.24.0))) '@angular/core': specifier: ^19.1.0-next.0 version: 19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0) @@ -2283,7 +2283,7 @@ importers: devDependencies: '@analogjs/vite-plugin-angular': specifier: ^1.6.4 - version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0))) + version: 1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.24.0))) '@angular/compiler': specifier: ^19.1.0-next.0 version: 19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)) @@ -2304,7 +2304,7 @@ importers: version: 50.5.0(eslint@9.15.0(jiti@2.4.0)) tsup: specifier: 8.0.2 - version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.41)(typescript@5.7.2) + version: 8.0.2(@microsoft/api-extractor@7.48.0(@types/node@22.9.3))(postcss@8.4.49)(typescript@5.7.2) typescript: specifier: 5.7.2 version: 5.7.2 @@ -16802,10 +16802,10 @@ snapshots: '@ngtools/webpack': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0)) ts-morph: 21.0.1 - '@analogjs/vite-plugin-angular@1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.19.12)))': + '@analogjs/vite-plugin-angular@1.6.4(@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2))(@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.24.0)))': dependencies: - '@angular-devkit/build-angular': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2) - '@ngtools/webpack': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.19.12)) + '@angular-devkit/build-angular': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2) + '@ngtools/webpack': 18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.24.0)) ts-morph: 21.0.1 '@andrewbranch/untar.js@1.0.3': {} @@ -16831,7 +16831,7 @@ snapshots: transitivePeerDependencies: - chokidar - '@angular-devkit/build-angular@17.3.8(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.19.12)))(lightningcss@1.27.0)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(tailwindcss@3.4.7)(tslib@2.8.1)(typescript@5.4.5))(tailwindcss@3.4.7)(typescript@5.4.5)': + '@angular-devkit/build-angular@17.3.8(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(@types/express@4.17.21)(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.20.1)))(lightningcss@1.27.0)(ng-packagr@17.3.0(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(tailwindcss@3.4.7)(tslib@2.8.1)(typescript@5.4.5))(tailwindcss@3.4.7)(typescript@5.4.5)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1703.8(chokidar@3.6.0) @@ -16893,11 +16893,11 @@ snapshots: undici: 6.11.1 vite: 5.1.7(@types/node@22.9.3)(less@4.2.0)(lightningcss@1.27.0)(sass@1.71.1)(terser@5.29.1) watchpack: 2.4.0 - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) webpack-dev-middleware: 6.1.2(webpack@5.90.3(esbuild@0.20.1)) webpack-dev-server: 4.15.1(webpack@5.90.3(esbuild@0.20.1)) webpack-merge: 5.10.0 - webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.19.12)))(webpack@5.90.3(esbuild@0.20.1)) + webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.20.1)))(webpack@5.90.3(esbuild@0.20.1)) optionalDependencies: esbuild: 0.20.1 ng-packagr: 17.3.0(@angular/compiler-cli@17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5))(tailwindcss@3.4.7)(tslib@2.8.1)(typescript@5.4.5) @@ -17008,7 +17008,7 @@ snapshots: - utf-8-validate - webpack-cli - '@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2)': + '@angular-devkit/build-angular@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(@types/node@22.9.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(lightningcss@1.27.0)(tailwindcss@3.4.7)(typescript@5.7.2)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1802.12(chokidar@3.6.0) @@ -17073,7 +17073,7 @@ snapshots: webpack-dev-middleware: 7.4.2(webpack@5.94.0(esbuild@0.23.0)) webpack-dev-server: 5.0.4(webpack@5.94.0(esbuild@0.23.0)) webpack-merge: 6.0.1 - webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(webpack@5.94.0(esbuild@0.23.0)) + webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(webpack@5.94.0(esbuild@0.23.0)) optionalDependencies: esbuild: 0.23.0 tailwindcss: 3.4.7 @@ -17099,7 +17099,7 @@ snapshots: dependencies: '@angular-devkit/architect': 0.1703.8(chokidar@3.6.0) rxjs: 7.8.1 - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) webpack-dev-server: 4.15.1(webpack@5.90.3(esbuild@0.20.1)) transitivePeerDependencies: - chokidar @@ -21971,7 +21971,7 @@ snapshots: dependencies: '@angular/compiler-cli': 17.3.12(@angular/compiler@17.3.12(@angular/core@17.3.12(rxjs@7.8.1)(zone.js@0.14.8)))(typescript@5.4.5) typescript: 5.4.5 - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) '@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.94.0(esbuild@0.23.0))': dependencies: @@ -21979,11 +21979,11 @@ snapshots: typescript: 5.7.2 webpack: 5.94.0(esbuild@0.19.12) - '@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.19.12))': + '@ngtools/webpack@18.2.12(@angular/compiler-cli@19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2))(typescript@5.7.2)(webpack@5.96.1(esbuild@0.24.0))': dependencies: '@angular/compiler-cli': 19.1.0-next.0(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(typescript@5.7.2) typescript: 5.7.2 - webpack: 5.96.1(esbuild@0.19.12) + webpack: 5.96.1(esbuild@0.24.0) '@nodelib/fs.scandir@2.1.5': dependencies: @@ -23092,14 +23092,14 @@ snapshots: '@swc/counter': 0.1.3 tslib: 2.8.1 - '@tanstack/config@0.14.0(@types/node@22.9.3)(esbuild@0.19.12)(eslint@9.15.0(jiti@2.4.0))(rollup@4.27.4)(typescript@5.7.2)(vite@5.4.11(@types/node@22.9.3)(less@4.2.1)(lightningcss@1.27.0)(sass@1.81.0)(terser@5.31.6))': + '@tanstack/config@0.14.0(@types/node@22.9.3)(esbuild@0.24.0)(eslint@9.15.0(jiti@2.4.0))(rollup@4.27.4)(typescript@5.7.2)(vite@5.4.11(@types/node@22.9.3)(less@4.2.1)(lightningcss@1.27.0)(sass@1.81.0)(terser@5.31.6))': dependencies: '@commitlint/parse': 19.5.0 '@eslint/js': 9.15.0 '@stylistic/eslint-plugin-js': 2.11.0(eslint@9.15.0(jiti@2.4.0)) commander: 12.1.0 current-git-branch: 1.1.0 - esbuild-register: 3.6.0(esbuild@0.19.12) + esbuild-register: 3.6.0(esbuild@0.24.0) eslint-plugin-import-x: 4.4.3(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) eslint-plugin-n: 17.14.0(eslint@9.15.0(jiti@2.4.0)) globals: 15.12.0 @@ -24109,7 +24109,7 @@ snapshots: '@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.96.1)': dependencies: - webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack@5.96.1) '@webpack-cli/info@1.5.0(webpack-cli@4.10.0)': @@ -24119,7 +24119,7 @@ snapshots: '@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.96.1)': dependencies: - webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack@5.96.1) '@webpack-cli/serve@1.7.0(webpack-cli@4.10.0)': @@ -24128,7 +24128,7 @@ snapshots: '@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack@5.96.1)': dependencies: - webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack@5.96.1) '@xmldom/xmldom@0.7.13': {} @@ -24641,7 +24641,7 @@ snapshots: '@babel/core': 7.24.0 find-cache-dir: 4.0.0 schema-utils: 4.2.0 - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) babel-loader@9.1.3(@babel/core@7.25.2)(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -24655,7 +24655,7 @@ snapshots: '@babel/core': 7.26.0 find-cache-dir: 4.0.0 schema-utils: 4.2.0 - webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) babel-plugin-add-module-exports@0.2.1: {} @@ -25644,7 +25644,7 @@ snapshots: normalize-path: 3.0.0 schema-utils: 4.2.0 serialize-javascript: 6.0.2 - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) copy-webpack-plugin@12.0.2(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -25894,7 +25894,7 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.6.3 optionalDependencies: - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) css-loader@7.1.2(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -26434,10 +26434,10 @@ snapshots: transitivePeerDependencies: - supports-color - esbuild-register@3.6.0(esbuild@0.19.12): + esbuild-register@3.6.0(esbuild@0.24.0): dependencies: debug: 4.3.7 - esbuild: 0.19.12 + esbuild: 0.24.0 transitivePeerDependencies: - supports-color @@ -28055,7 +28055,7 @@ snapshots: util.promisify: 1.0.0 webpack: 4.44.2(webpack-cli@4.10.0) - html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.19.12)): + html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.20.1)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 @@ -28063,7 +28063,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.2.1 optionalDependencies: - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) optional: true html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)): @@ -28077,7 +28077,7 @@ snapshots: webpack: 5.94.0(esbuild@0.19.12) optional: true - html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)): + html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 @@ -28085,7 +28085,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.2.1 optionalDependencies: - webpack: 5.96.1(esbuild@0.19.12) + webpack: 5.96.1(esbuild@0.24.0) optional: true html-webpack-plugin@5.6.3(webpack@5.96.1): @@ -28096,7 +28096,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.2.1 optionalDependencies: - webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) htmlparser2@6.1.0: dependencies: @@ -29050,7 +29050,7 @@ snapshots: dependencies: klona: 2.0.6 less: 4.2.0 - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) less-loader@12.2.0(less@4.2.0)(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -29098,7 +29098,7 @@ snapshots: dependencies: webpack-sources: 3.2.3 optionalDependencies: - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) license-webpack-plugin@4.0.2(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -30108,7 +30108,7 @@ snapshots: dependencies: schema-utils: 4.2.0 tapable: 2.2.1 - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) mini-css-extract-plugin@2.9.0(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -31531,7 +31531,7 @@ snapshots: postcss: 8.4.35 semver: 7.6.3 optionalDependencies: - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) transitivePeerDependencies: - typescript @@ -32577,7 +32577,7 @@ snapshots: neo-async: 2.6.2 optionalDependencies: sass: 1.71.1 - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) sass-loader@16.0.0(sass@1.77.6)(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -33078,7 +33078,7 @@ snapshots: dependencies: iconv-lite: 0.6.3 source-map-js: 1.2.1 - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) source-map-loader@5.0.0(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -33579,49 +33579,49 @@ snapshots: webpack-sources: 1.4.3 worker-farm: 1.7.0 - terser-webpack-plugin@5.3.10(esbuild@0.19.12)(webpack@5.90.3(esbuild@0.20.1)): + terser-webpack-plugin@5.3.10(esbuild@0.19.12)(webpack@5.94.0(esbuild@0.23.0)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.31.6 - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.94.0(esbuild@0.19.12) optionalDependencies: esbuild: 0.19.12 - terser-webpack-plugin@5.3.10(esbuild@0.19.12)(webpack@5.94.0(esbuild@0.23.0)): + terser-webpack-plugin@5.3.10(esbuild@0.24.0)(webpack@5.90.3(esbuild@0.20.1)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.31.6 - webpack: 5.94.0(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) optionalDependencies: - esbuild: 0.19.12 + esbuild: 0.24.0 - terser-webpack-plugin@5.3.10(esbuild@0.19.12)(webpack@5.96.1(esbuild@0.19.12)): + terser-webpack-plugin@5.3.10(esbuild@0.24.0)(webpack@5.96.1(esbuild@0.24.0)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.31.6 - webpack: 5.96.1(esbuild@0.19.12) + webpack: 5.96.1(esbuild@0.24.0) optionalDependencies: - esbuild: 0.19.12 + esbuild: 0.24.0 - terser-webpack-plugin@5.3.10(esbuild@0.19.12)(webpack@5.96.1): + terser-webpack-plugin@5.3.10(esbuild@0.24.0)(webpack@5.96.1): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.31.6 - webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) optionalDependencies: - esbuild: 0.19.12 + esbuild: 0.24.0 terser@4.8.1: dependencies: @@ -34828,7 +34828,7 @@ snapshots: import-local: 3.2.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4) + webpack: 5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4) webpack-merge: 5.10.0 webpack-dev-middleware@5.3.4(webpack@5.90.3(esbuild@0.20.1)): @@ -34838,7 +34838,7 @@ snapshots: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) webpack-dev-middleware@6.1.2(webpack@5.90.3(esbuild@0.20.1)): dependencies: @@ -34848,7 +34848,7 @@ snapshots: range-parser: 1.2.1 schema-utils: 4.2.0 optionalDependencies: - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) webpack-dev-middleware@7.4.2(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -34894,7 +34894,7 @@ snapshots: webpack-dev-middleware: 5.3.4(webpack@5.90.3(esbuild@0.20.1)) ws: 8.18.0 optionalDependencies: - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) transitivePeerDependencies: - bufferutil - debug @@ -34960,12 +34960,12 @@ snapshots: webpack-sources@3.2.3: {} - webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.19.12)))(webpack@5.90.3(esbuild@0.20.1)): + webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.3(webpack@5.90.3(esbuild@0.20.1)))(webpack@5.90.3(esbuild@0.20.1)): dependencies: typed-assert: 1.0.9 - webpack: 5.90.3(esbuild@0.19.12) + webpack: 5.90.3(esbuild@0.24.0) optionalDependencies: - html-webpack-plugin: 5.6.3(webpack@5.90.3(esbuild@0.19.12)) + html-webpack-plugin: 5.6.3(webpack@5.90.3(esbuild@0.20.1)) webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.3(webpack@5.94.0(esbuild@0.19.12)))(webpack@5.94.0(esbuild@0.23.0)): dependencies: @@ -34974,12 +34974,12 @@ snapshots: optionalDependencies: html-webpack-plugin: 5.6.3(webpack@5.94.0(esbuild@0.19.12)) - webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.19.12)))(webpack@5.94.0(esbuild@0.23.0)): + webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.3(webpack@5.96.1(esbuild@0.24.0)))(webpack@5.94.0(esbuild@0.23.0)): dependencies: typed-assert: 1.0.9 webpack: 5.94.0(esbuild@0.19.12) optionalDependencies: - html-webpack-plugin: 5.6.3(webpack@5.96.1(esbuild@0.19.12)) + html-webpack-plugin: 5.6.3(webpack@5.96.1(esbuild@0.24.0)) webpack-virtual-modules@0.6.2: {} @@ -35013,7 +35013,7 @@ snapshots: transitivePeerDependencies: - supports-color - webpack@5.90.3(esbuild@0.19.12): + webpack@5.90.3(esbuild@0.24.0): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.6 @@ -35036,7 +35036,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(esbuild@0.19.12)(webpack@5.90.3(esbuild@0.20.1)) + terser-webpack-plugin: 5.3.10(esbuild@0.24.0)(webpack@5.90.3(esbuild@0.20.1)) watchpack: 2.4.2 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -35074,7 +35074,7 @@ snapshots: - esbuild - uglify-js - webpack@5.96.1(esbuild@0.19.12): + webpack@5.96.1(esbuild@0.24.0): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.6 @@ -35096,7 +35096,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(esbuild@0.19.12)(webpack@5.96.1(esbuild@0.19.12)) + terser-webpack-plugin: 5.3.10(esbuild@0.24.0)(webpack@5.96.1(esbuild@0.24.0)) watchpack: 2.4.2 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -35104,7 +35104,7 @@ snapshots: - esbuild - uglify-js - webpack@5.96.1(esbuild@0.19.12)(webpack-cli@5.1.4): + webpack@5.96.1(esbuild@0.24.0)(webpack-cli@5.1.4): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.6 @@ -35126,7 +35126,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(esbuild@0.19.12)(webpack@5.96.1) + terser-webpack-plugin: 5.3.10(esbuild@0.24.0)(webpack@5.96.1) watchpack: 2.4.2 webpack-sources: 3.2.3 optionalDependencies: From 36605e6c3acdc8937744f234ddc6f7bd9be3249f Mon Sep 17 00:00:00 2001 From: omergronich Date: Sun, 8 Dec 2024 21:28:47 +0200 Subject: [PATCH 30/35] refactor(angular-query) refactored to implicit return --- .../src/create-base-query.ts | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/packages/angular-query-experimental/src/create-base-query.ts b/packages/angular-query-experimental/src/create-base-query.ts index f9853af0c8..07c0ba387b 100644 --- a/packages/angular-query-experimental/src/create-base-query.ts +++ b/packages/angular-query-experimental/src/create-base-query.ts @@ -53,8 +53,8 @@ export function createBaseQuery< const options = runInInjectionContext(injector, () => optionsFn()) const defaultedOptions = queryClient.defaultQueryOptions(options) defaultedOptions._optimisticResults = isRestoring() - ? 'isRestoring' - : 'optimistic' + ? 'isRestoring' + : 'optimistic' return defaultedOptions }) @@ -105,27 +105,29 @@ export function createBaseQuery< effect((onCleanup) => { // observer.trackResult is not used as this optimization is not needed for Angular const observer = observerSignal() - const unsubscribe = isRestoring() ? () => undefined : untracked(() => { - return ngZone.runOutsideAngular(() => - observer.subscribe( - notifyManager.batchCalls((state) => { - ngZone.run(() => { - if ( - state.isError && - !state.isFetching && - shouldThrowError(observer.options.throwOnError, [ - state.error, - observer.getCurrentQuery(), - ]) - ) { - throw state.error - } - resultFromSubscriberSignal.set(state) - }) - }), - ), - ) - }) + const unsubscribe = isRestoring() + ? () => undefined + : untracked(() => + ngZone.runOutsideAngular(() => + observer.subscribe( + notifyManager.batchCalls((state) => { + ngZone.run(() => { + if ( + state.isError && + !state.isFetching && + shouldThrowError(observer.options.throwOnError, [ + state.error, + observer.getCurrentQuery(), + ]) + ) { + throw state.error + } + resultFromSubscriberSignal.set(state) + }) + }), + ), + ), + ) onCleanup(unsubscribe) }) From 5d803094ab9ff1f4c410d680ae996cf4d42b4ee6 Mon Sep 17 00:00:00 2001 From: omergronich Date: Tue, 10 Dec 2024 21:25:13 +0200 Subject: [PATCH 31/35] fix(angular-query) bump angular persister package and examples version --- examples/angular/basic-persister/package.json | 4 ++-- examples/angular/multiple-persisters/package.json | 4 ++-- .../package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/angular/basic-persister/package.json b/examples/angular/basic-persister/package.json index 1ea6b55554..aadaabaf0e 100644 --- a/examples/angular/basic-persister/package.json +++ b/examples/angular/basic-persister/package.json @@ -14,8 +14,8 @@ "@angular/core": "^19.1.0-next.0", "@angular/platform-browser": "^19.1.0-next.0", "@angular/platform-browser-dynamic": "^19.1.0-next.0", - "@tanstack/angular-query-experimental": "^5.62.4", - "@tanstack/angular-query-persist-client-experimental": "^5.62.4", + "@tanstack/angular-query-experimental": "^5.62.7", + "@tanstack/angular-query-persist-client-experimental": "^5.62.7", "@tanstack/query-sync-storage-persister": "^5.62.3", "rxjs": "^7.8.1", "tslib": "^2.6.3", diff --git a/examples/angular/multiple-persisters/package.json b/examples/angular/multiple-persisters/package.json index 595fac4c57..4a1d978ba4 100644 --- a/examples/angular/multiple-persisters/package.json +++ b/examples/angular/multiple-persisters/package.json @@ -14,8 +14,8 @@ "@angular/core": "^19.1.0-next.0", "@angular/platform-browser": "^19.1.0-next.0", "@angular/platform-browser-dynamic": "^19.1.0-next.0", - "@tanstack/angular-query-experimental": "^5.62.4", - "@tanstack/angular-query-persist-client-experimental": "^5.62.4", + "@tanstack/angular-query-experimental": "^5.62.7", + "@tanstack/angular-query-persist-client-experimental": "^5.62.7", "@tanstack/query-sync-storage-persister": "^5.62.3", "rxjs": "^7.8.1", "tslib": "^2.6.3", diff --git a/packages/angular-persist-query-client-experimental/package.json b/packages/angular-persist-query-client-experimental/package.json index e7d6c7e394..9c1a1c2e87 100644 --- a/packages/angular-persist-query-client-experimental/package.json +++ b/packages/angular-persist-query-client-experimental/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/angular-query-persist-client-experimental", - "version": "5.62.4", + "version": "5.62.7", "description": "Angular bindings to work with persisters in TanStack/angular-query", "author": "Omer Gronich", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 75bb188411..4cf33abcb2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -226,10 +226,10 @@ importers: specifier: ^19.1.0-next.0 version: 19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))) '@tanstack/angular-query-experimental': - specifier: ^5.62.4 + specifier: ^5.62.7 version: link:../../../packages/angular-query-experimental '@tanstack/angular-query-persist-client-experimental': - specifier: ^5.62.4 + specifier: ^5.62.7 version: link:../../../packages/angular-persist-query-client-experimental '@tanstack/query-sync-storage-persister': specifier: ^5.62.3 @@ -367,10 +367,10 @@ importers: specifier: ^19.1.0-next.0 version: 19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/compiler@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0)))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(@angular/platform-browser@19.1.0-next.0(@angular/common@19.1.0-next.0(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))(rxjs@7.8.1))(@angular/core@19.1.0-next.0(rxjs@7.8.1)(zone.js@0.15.0))) '@tanstack/angular-query-experimental': - specifier: ^5.62.4 + specifier: ^5.62.7 version: link:../../../packages/angular-query-experimental '@tanstack/angular-query-persist-client-experimental': - specifier: ^5.62.4 + specifier: ^5.62.7 version: link:../../../packages/angular-persist-query-client-experimental '@tanstack/query-sync-storage-persister': specifier: ^5.62.3 From ffa43a8fb461a67cdda695dd6f8faa7735fd7e75 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 13 Dec 2024 11:53:42 +0200 Subject: [PATCH 32/35] fix(angular-query) fixed eslint errors --- .../src/__tests__/utils.ts | 1 + .../with-persist-query-client.test.ts | 12 ++++---- .../src/with-persist-query-client.ts | 29 +++++++++---------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/angular-persist-query-client-experimental/src/__tests__/utils.ts b/packages/angular-persist-query-client-experimental/src/__tests__/utils.ts index c693697673..73fb0ed26f 100644 --- a/packages/angular-persist-query-client-experimental/src/__tests__/utils.ts +++ b/packages/angular-persist-query-client-experimental/src/__tests__/utils.ts @@ -1,4 +1,5 @@ let queryKeyCount = 0 + export function queryKey(): Array { queryKeyCount++ return [`query_${queryKeyCount}`] diff --git a/packages/angular-persist-query-client-experimental/src/__tests__/with-persist-query-client.test.ts b/packages/angular-persist-query-client-experimental/src/__tests__/with-persist-query-client.test.ts index c8c88b1129..8ffd261988 100644 --- a/packages/angular-persist-query-client-experimental/src/__tests__/with-persist-query-client.test.ts +++ b/packages/angular-persist-query-client-experimental/src/__tests__/with-persist-query-client.test.ts @@ -1,24 +1,24 @@ import { describe, expect, test, vi } from 'vitest' import { + QueryClient, injectQuery, provideTanStackQuery, - QueryClient, } from '@tanstack/angular-query-experimental' -import type { - PersistedClient, - Persister, -} from '@tanstack/query-persist-client-core' import { persistQueryClientSave } from '@tanstack/query-persist-client-core' import { Component, effect } from '@angular/core' import { render, screen, waitFor } from '@testing-library/angular' import { withPersistQueryClient } from '../with-persist-query-client' import { queryKey, sleep } from './utils' +import type { + PersistedClient, + Persister, +} from '@tanstack/query-persist-client-core' const createMockPersister = (): Persister => { let storedState: PersistedClient | undefined return { - async persistClient(persistClient: PersistedClient) { + persistClient(persistClient: PersistedClient) { storedState = persistClient }, async restoreClient() { diff --git a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts index cee649cdd6..671c69b2be 100644 --- a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts +++ b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts @@ -30,26 +30,25 @@ type PersistQueryClientOptions = { * * ```ts * const localStoragePersister = createSyncStoragePersister({ - * storage: window.localStorage, + * storage: window.localStorage, * }) * * export const appConfig: ApplicationConfig = { - * providers: [ - * provideTanStackQuery( - * new QueryClient(), - * withPersistQueryClient([ - * { - * persistOptions: { - * persister: localStoragePersister, - * }, - * onSuccess: () => console.log('Restoration completed successfully.'), - * }, - * ]) - * ) - * ] + * providers: [ + * provideTanStackQuery( + * new QueryClient(), + * withPersistQueryClient([ + * { + * persistOptions: { + * persister: localStoragePersister, + * }, + * onSuccess: () => console.log('Restoration completed successfully.'), + * }, + * ]) + * ) + * ] * } * ``` - * * @param persistQueryClientOptions - An array of objects containing persistOptions and an onSuccess callback which gets called when the restoration process is complete. * @returns A set of providers for use with `provideTanStackQuery`. * @public From 235bbabebf0dbc64d0b3eb767b2b858047c9929a Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 13 Dec 2024 11:58:06 +0200 Subject: [PATCH 33/35] refactor(angular-query) set initial `isRestoring` to true to match the React adapter logic --- .../src/with-persist-query-client.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts index 671c69b2be..20b8293558 100644 --- a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts +++ b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts @@ -56,7 +56,7 @@ type PersistQueryClientOptions = { export function withPersistQueryClient( persistQueryClientOptions: Array, ): PersistQueryClientFeature { - const isRestoring = signal(false) + const isRestoring = signal(true) const providers = [ provideIsRestoring(isRestoring.asReadonly()), { @@ -67,7 +67,6 @@ export function withPersistQueryClient( const destroyRef = inject(DestroyRef) const queryClient = injectQueryClient() - isRestoring.set(true) const restorations = persistQueryClientOptions.map( ({ onSuccess, persistOptions }) => { const options = { queryClient, ...persistOptions } From 1f33c28aa4a8d4264857e8e3b5b95784936e349e Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 13 Dec 2024 11:59:24 +0200 Subject: [PATCH 34/35] Revert "refactor(angular-query) set initial `isRestoring` to true to match the React adapter logic" This reverts commit 235bbabebf0dbc64d0b3eb767b2b858047c9929a. --- .../src/with-persist-query-client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts index 20b8293558..671c69b2be 100644 --- a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts +++ b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts @@ -56,7 +56,7 @@ type PersistQueryClientOptions = { export function withPersistQueryClient( persistQueryClientOptions: Array, ): PersistQueryClientFeature { - const isRestoring = signal(true) + const isRestoring = signal(false) const providers = [ provideIsRestoring(isRestoring.asReadonly()), { @@ -67,6 +67,7 @@ export function withPersistQueryClient( const destroyRef = inject(DestroyRef) const queryClient = injectQueryClient() + isRestoring.set(true) const restorations = persistQueryClientOptions.map( ({ onSuccess, persistOptions }) => { const options = { queryClient, ...persistOptions } From 23d6ee1bcf66c9c5655dd9878197e9e22e50d164 Mon Sep 17 00:00:00 2001 From: omergronich Date: Fri, 13 Dec 2024 12:05:07 +0200 Subject: [PATCH 35/35] fix(angular-query) fixed formatting of JSDOC comment ruined by eslint --- .../src/with-persist-query-client.ts | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts index 671c69b2be..049c05abf5 100644 --- a/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts +++ b/packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts @@ -30,23 +30,23 @@ type PersistQueryClientOptions = { * * ```ts * const localStoragePersister = createSyncStoragePersister({ - * storage: window.localStorage, + * storage: window.localStorage, * }) * * export const appConfig: ApplicationConfig = { - * providers: [ - * provideTanStackQuery( - * new QueryClient(), - * withPersistQueryClient([ - * { - * persistOptions: { - * persister: localStoragePersister, - * }, - * onSuccess: () => console.log('Restoration completed successfully.'), - * }, - * ]) - * ) - * ] + * providers: [ + * provideTanStackQuery( + * new QueryClient(), + * withPersistQueryClient([ + * { + * persistOptions: { + * persister: localStoragePersister, + * }, + * onSuccess: () => console.log('Restoration completed successfully.'), + * }, + * ]) + * ) + * ] * } * ``` * @param persistQueryClientOptions - An array of objects containing persistOptions and an onSuccess callback which gets called when the restoration process is complete.