From 4b2c8c5a19d394a21725b2d4dd22528d4bc764b0 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 30 Aug 2024 22:19:21 +1000 Subject: [PATCH 1/3] chore(deps): update to @tanstack/config 0.13.1 (#7986) * chore(deps): update to @tanstack/config 0.13.1 * Fix types --- eslint.config.js | 2 +- package.json | 2 +- .../etc/angular-query-experimental.api.md | 4 +- .../src/__tests__/test-utils.ts | 8 +- .../src/inject-is-fetching.ts | 3 +- .../src/inject-is-mutating.ts | 3 +- packages/query-core/src/utils.ts | 1 + .../__tests__/infiniteQueryOptions.test-d.tsx | 4 +- .../__tests__/infiniteQueryOptions.test-d.tsx | 3 +- packages/solid-query/src/isRestoring.ts | 3 +- packages/vue-query/src/devtools/utils.ts | 1 - packages/vue-query/src/utils.ts | 1 + pnpm-lock.yaml | 490 ++++-------------- 13 files changed, 128 insertions(+), 397 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 27000af9d1..acd5e892a3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -36,8 +36,8 @@ export default [ }, }, ], - '@typescript-eslint/ban-types': 'off', '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/no-unsafe-function-type': 'off', 'no-case-declarations': 'off', }, }, diff --git a/package.json b/package.json index e40cb08696..4ffb16c049 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@cspell/eslint-plugin": "^8.14.2", "@eslint-react/eslint-plugin": "^1.12.3", "@solidjs/testing-library": "^0.8.9", - "@tanstack/config": "^0.11.1", + "@tanstack/config": "^0.13.1", "@testing-library/jest-dom": "^6.4.8", "@testing-library/react": "^16.0.0", "@types/eslint": "^9.6.1", diff --git a/packages/angular-query-experimental/etc/angular-query-experimental.api.md b/packages/angular-query-experimental/etc/angular-query-experimental.api.md index b58ce9d1da..93d21fb4c4 100644 --- a/packages/angular-query-experimental/etc/angular-query-experimental.api.md +++ b/packages/angular-query-experimental/etc/angular-query-experimental.api.md @@ -17,7 +17,7 @@ import { InjectOptions } from '@angular/core'; import { Injector } from '@angular/core'; import type { MutateFunction } from '@tanstack/query-core'; import type { Mutation } from '@tanstack/query-core'; -import { MutationFilters } from '@tanstack/query-core'; +import type { MutationFilters } from '@tanstack/query-core'; import type { MutationObserverOptions } from '@tanstack/query-core'; import type { MutationObserverResult } from '@tanstack/query-core'; import type { MutationState } from '@tanstack/query-core'; @@ -25,7 +25,7 @@ import type { OmitKeyof } from '@tanstack/query-core'; import { Provider } from '@angular/core'; import type { QueriesPlaceholderDataFunction } from '@tanstack/query-core'; import type { QueryClient } from '@tanstack/query-core'; -import { QueryFilters } from '@tanstack/query-core'; +import type { QueryFilters } from '@tanstack/query-core'; import type { QueryFunction } from '@tanstack/query-core'; import type { QueryKey } from '@tanstack/query-core'; import type { QueryObserverOptions } from '@tanstack/query-core'; diff --git a/packages/angular-query-experimental/src/__tests__/test-utils.ts b/packages/angular-query-experimental/src/__tests__/test-utils.ts index 3a465f8eb4..2edd689950 100644 --- a/packages/angular-query-experimental/src/__tests__/test-utils.ts +++ b/packages/angular-query-experimental/src/__tests__/test-utils.ts @@ -1,10 +1,6 @@ -import { - type InputSignal, - type Signal, - isSignal, - untracked, -} from '@angular/core' +import { isSignal, untracked } from '@angular/core' import { SIGNAL, signalSetFn } from '@angular/core/primitives/signals' +import type { InputSignal, Signal } from '@angular/core' import type { ComponentFixture } from '@angular/core/testing' let queryKeyCount = 0 diff --git a/packages/angular-query-experimental/src/inject-is-fetching.ts b/packages/angular-query-experimental/src/inject-is-fetching.ts index 2e7765af92..4ca715cee7 100644 --- a/packages/angular-query-experimental/src/inject-is-fetching.ts +++ b/packages/angular-query-experimental/src/inject-is-fetching.ts @@ -1,7 +1,8 @@ import { DestroyRef, NgZone, inject, signal } from '@angular/core' -import { type QueryFilters, notifyManager } from '@tanstack/query-core' +import { notifyManager } from '@tanstack/query-core' import { assertInjector } from './util/assert-injector/assert-injector' import { injectQueryClient } from './inject-query-client' +import type { QueryFilters } from '@tanstack/query-core' import type { Injector, Signal } from '@angular/core' /** diff --git a/packages/angular-query-experimental/src/inject-is-mutating.ts b/packages/angular-query-experimental/src/inject-is-mutating.ts index 833515654b..e71264df56 100644 --- a/packages/angular-query-experimental/src/inject-is-mutating.ts +++ b/packages/angular-query-experimental/src/inject-is-mutating.ts @@ -1,7 +1,8 @@ import { DestroyRef, NgZone, inject, signal } from '@angular/core' -import { type MutationFilters, notifyManager } from '@tanstack/query-core' +import { notifyManager } from '@tanstack/query-core' import { assertInjector } from './util/assert-injector/assert-injector' import { injectQueryClient } from './inject-query-client' +import type { MutationFilters } from '@tanstack/query-core' import type { Injector, Signal } from '@angular/core' /** diff --git a/packages/query-core/src/utils.ts b/packages/query-core/src/utils.ts index a33671c202..e23fca40e4 100644 --- a/packages/query-core/src/utils.ts +++ b/packages/query-core/src/utils.ts @@ -305,6 +305,7 @@ export function isPlainArray(value: unknown) { } // Copied from: https://github.com/jonschlinkert/is-plain-object +// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types export function isPlainObject(o: any): o is Object { if (!hasObjectPrototype(o)) { return false diff --git a/packages/react-query/src/__tests__/infiniteQueryOptions.test-d.tsx b/packages/react-query/src/__tests__/infiniteQueryOptions.test-d.tsx index cdd2dac0f2..1a147f9f82 100644 --- a/packages/react-query/src/__tests__/infiniteQueryOptions.test-d.tsx +++ b/packages/react-query/src/__tests__/infiniteQueryOptions.test-d.tsx @@ -1,9 +1,9 @@ import { describe, expectTypeOf, it } from 'vitest' -import { QueryClient } from '@tanstack/query-core' -import { type InfiniteData, dataTagSymbol } from '@tanstack/query-core' +import { QueryClient, dataTagSymbol } from '@tanstack/query-core' import { infiniteQueryOptions } from '../infiniteQueryOptions' import { useInfiniteQuery } from '../useInfiniteQuery' import { useSuspenseInfiniteQuery } from '../useSuspenseInfiniteQuery' +import type { InfiniteData } from '@tanstack/query-core' describe('queryOptions', () => { it('should not allow excess properties', () => { diff --git a/packages/solid-query/src/__tests__/infiniteQueryOptions.test-d.tsx b/packages/solid-query/src/__tests__/infiniteQueryOptions.test-d.tsx index b62b6d34fd..9adb4c341c 100644 --- a/packages/solid-query/src/__tests__/infiniteQueryOptions.test-d.tsx +++ b/packages/solid-query/src/__tests__/infiniteQueryOptions.test-d.tsx @@ -1,7 +1,8 @@ import { describe, expectTypeOf, it } from 'vitest' -import { type InfiniteData, dataTagSymbol } from '@tanstack/query-core' +import { dataTagSymbol } from '@tanstack/query-core' import { createInfiniteQuery } from '../createInfiniteQuery' import { infiniteQueryOptions } from '../infiniteQueryOptions' +import type { InfiniteData } from '@tanstack/query-core' import type { DefinedInitialDataInfiniteOptions, UndefinedInitialDataInfiniteOptions, diff --git a/packages/solid-query/src/isRestoring.ts b/packages/solid-query/src/isRestoring.ts index f222636571..fbeceafd02 100644 --- a/packages/solid-query/src/isRestoring.ts +++ b/packages/solid-query/src/isRestoring.ts @@ -1,4 +1,5 @@ -import { type Accessor, createContext, useContext } from 'solid-js' +import { createContext, useContext } from 'solid-js' +import type { Accessor } from 'solid-js' const IsRestoringContext = createContext>(() => false) diff --git a/packages/vue-query/src/devtools/utils.ts b/packages/vue-query/src/devtools/utils.ts index ec5c2fb212..cd3bc4e07e 100644 --- a/packages/vue-query/src/devtools/utils.ts +++ b/packages/vue-query/src/devtools/utils.ts @@ -2,7 +2,6 @@ import type { Query } from '@tanstack/query-core' type SortFn = (a: Query, b: Query) => number -// eslint-disable-next-line no-shadow enum QueryState { Fetching = 0, Fresh, diff --git a/packages/vue-query/src/utils.ts b/packages/vue-query/src/utils.ts index df68e966cd..0f25d0ffda 100644 --- a/packages/vue-query/src/utils.ts +++ b/packages/vue-query/src/utils.ts @@ -96,6 +96,7 @@ export function cloneDeepUnref( }) } +// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types function isPlainObject(value: unknown): value is Object { if (Object.prototype.toString.call(value) !== '[object Object]') { return false diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c55c823355..6cfa07fc16 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,8 +28,8 @@ importers: specifier: ^0.8.9 version: 0.8.9(@solidjs/router@0.14.1(solid-js@1.8.19))(solid-js@1.8.19) '@tanstack/config': - specifier: ^0.11.1 - version: 0.11.1(@types/node@20.14.13)(esbuild@0.19.12)(eslint@9.9.1(jiti@1.21.6))(rollup@4.19.1)(typescript@5.3.3)(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3)) + specifier: ^0.13.1 + version: 0.13.1(@types/node@20.14.13)(esbuild@0.19.12)(eslint@9.9.1(jiti@1.21.6))(rollup@4.19.1)(typescript@5.3.3)(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3)) '@testing-library/jest-dom': specifier: ^6.4.8 version: 6.4.8 @@ -4400,10 +4400,6 @@ packages: resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@8.57.0': - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.9.1': resolution: {integrity: sha512-xIDQRsfg5hNBqHz04H1R3scSVwmI+KUbqjsQKHKQ1DAUSaUjYPReZZmS/5PNiKu1fUvzDd6H7DEDKACSEhu+TQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -4765,29 +4761,16 @@ packages: resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} hasBin: true - '@microsoft/api-extractor-model@7.28.13': - resolution: {integrity: sha512-39v/JyldX4MS9uzHcdfmjjfS6cYGAoXV+io8B5a338pkHiSt+gy2eXQ0Q7cGFJ7quSa1VqqlMdlPrB6sLR/cAw==} - '@microsoft/api-extractor-model@7.29.4': resolution: {integrity: sha512-LHOMxmT8/tU1IiiiHOdHFF83Qsi+V8d0kLfscG4EvQE9cafiR8blOYr8SfkQKWB1wgEilQgXJX3MIA4vetDLZw==} - '@microsoft/api-extractor@7.43.0': - resolution: {integrity: sha512-GFhTcJpB+MI6FhvXEI9b2K0snulNLWHqC/BbcJtyNYcKUiw7l3Lgis5ApsYncJ0leALX7/of4XfmXk+maT111w==} - hasBin: true - '@microsoft/api-extractor@7.47.4': resolution: {integrity: sha512-HKm+P4VNzWwvq1Ey+Jfhhj/3MjsD+ka2hbt8L5AcRM95lu1MFOYnz3XlU7Gr79Q/ZhOb7W/imAKeYrOI0bFydg==} hasBin: true - '@microsoft/tsdoc-config@0.16.2': - resolution: {integrity: sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==} - '@microsoft/tsdoc-config@0.17.0': resolution: {integrity: sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==} - '@microsoft/tsdoc@0.14.2': - resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} - '@microsoft/tsdoc@0.15.0': resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} @@ -5677,14 +5660,6 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - '@rushstack/node-core-library@4.0.2': - resolution: {integrity: sha512-hyES82QVpkfQMeBMteQUnrhASL/KHPhd7iJ8euduwNJG4mu2GSOKybf0rOEjOm1Wz7CwJEUm9y0yD7jg2C1bfg==} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true - '@rushstack/node-core-library@5.5.1': resolution: {integrity: sha512-ZutW56qIzH8xIOlfyaLQJFx+8IBqdbVCZdnj+XT1MorQ1JqqxHse8vbCpEM+2MjsrqcbxcgDIbfggB1ZSQ2A3g==} peerDependencies: @@ -5693,20 +5668,9 @@ packages: '@types/node': optional: true - '@rushstack/rig-package@0.5.2': - resolution: {integrity: sha512-mUDecIJeH3yYGZs2a48k+pbhM6JYwWlgjs2Ca5f2n1G2/kgdgP9D/07oglEGf6mRyXEnazhEENeYTSNDRCwdqA==} - '@rushstack/rig-package@0.5.3': resolution: {integrity: sha512-olzSSjYrvCNxUFZowevC3uz8gvKr3WTpHQ7BkpjtRpA3wK+T0ybep/SRUMfr195gBzJm5gaXw0ZMgjIyHqJUow==} - '@rushstack/terminal@0.10.0': - resolution: {integrity: sha512-UbELbXnUdc7EKwfH2sb8ChqNgapUOdqcCIdQP4NGxBpTZV2sQyeekuK3zmfQSa/MN+/7b4kBogl2wq0vpkpYGw==} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true - '@rushstack/terminal@0.13.3': resolution: {integrity: sha512-fc3zjXOw8E0pXS5t9vTiIPx9gHA0fIdTXsu9mT4WbH+P3mYvnrX0iAQ5a6NvyK1+CqYWBTw/wVNx7SDJkI+WYQ==} peerDependencies: @@ -5715,9 +5679,6 @@ packages: '@types/node': optional: true - '@rushstack/ts-command-line@4.19.1': - resolution: {integrity: sha512-J7H768dgcpG60d7skZ5uSSwyCZs/S2HrWP1Ds8d1qYAyaaeJmpmmLr9BVw97RjFzmQPOYnoXcKA4GkqDCkduQg==} - '@rushstack/ts-command-line@4.22.3': resolution: {integrity: sha512-edMpWB3QhFFZ4KtSzS8WNjBgR4PXPPOVrOHMbb7kNpmQ1UFS9HdVtjCXg1H5fG+xYAbeE+TMPcVPUyX2p84STA==} @@ -5874,8 +5835,8 @@ packages: '@solidjs/router': optional: true - '@stylistic/eslint-plugin-js@2.6.0': - resolution: {integrity: sha512-6oN0Djdy8gTRhx2qS1m4P+CeDKqmZZwc4ibgzzJS+8iBW3Ts1c2mAvi+OH6TN4bt0AHm0FnDv2+KtTqqueMATw==} + '@stylistic/eslint-plugin-js@2.7.1': + resolution: {integrity: sha512-4YgqaPhPV8nMAMWnRz+RB7S/CQh/ximISMj2QJ8HPveUzCqUBkeNV7iB4cggr4pkalcDCsIu0y4LhmrlS1yAgA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^9.9.1 @@ -5990,8 +5951,8 @@ packages: '@swc/helpers@0.5.5': resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} - '@tanstack/config@0.11.1': - resolution: {integrity: sha512-P/U2ANQZMGpd6uBiVarY+SEVzCM50BOBV+C9c2pUZbMm3gtZN0a2LzX0fT0DutkeX3TsR5ogCw0ohxGzE4GcWw==} + '@tanstack/config@0.13.1': + resolution: {integrity: sha512-p8K5lrwZPGjvfPuvP1UxHyucDmdADrHOqzpO/zRAhjqV6uBZBatZ2CTKR8Zlvekmb2bdXKjqBGoiyIuLiT0xTA==} engines: {node: '>=18'} hasBin: true @@ -6291,20 +6252,20 @@ packages: '@types/yargs@17.0.32': resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} - '@typescript-eslint/eslint-plugin@7.18.0': - resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/eslint-plugin@8.3.0': + resolution: {integrity: sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^7.0.0 + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^9.9.1 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/parser@7.18.0': - resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/parser@8.3.0': + resolution: {integrity: sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^9.9.1 typescript: '*' @@ -6318,24 +6279,10 @@ packages: peerDependencies: eslint: ^9.9.1 - '@typescript-eslint/scope-manager@7.18.0': - resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/scope-manager@8.3.0': resolution: {integrity: sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@7.18.0': - resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^9.9.1 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/type-utils@8.3.0': resolution: {integrity: sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6345,23 +6292,10 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.18.0': - resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/types@8.3.0': resolution: {integrity: sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@7.18.0': - resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.3.0': resolution: {integrity: sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6371,22 +6305,12 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.18.0': - resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^9.9.1 - '@typescript-eslint/utils@8.3.0': resolution: {integrity: sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^9.9.1 - '@typescript-eslint/visitor-keys@7.18.0': - resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/visitor-keys@8.3.0': resolution: {integrity: sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6509,12 +6433,12 @@ packages: peerDependencies: typescript: '*' - '@volar/language-core@1.11.1': - resolution: {integrity: sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==} - '@volar/language-core@2.4.0-alpha.18': resolution: {integrity: sha512-JAYeJvYQQROmVRtSBIczaPjP3DX4QW1fOqW1Ebs0d3Y3EwSNRglz03dSv0Dm61dzd0Yx3WgTW3hndDnTQqgmyg==} + '@volar/language-core@2.4.1': + resolution: {integrity: sha512-9AKhC7Qn2mQYxj7Dz3bVxeOk7gGJladhWixUYKef/o0o7Bm4an+A3XvmcTHVqZ8stE6lBVH++g050tBtJ4TZPQ==} + '@volar/language-server@2.4.0-alpha.18': resolution: {integrity: sha512-dciHEE/R5kzI0bY71QfkoCVQ3cQI6g9MHfA4oIP6UhnJy0CdleUalWSygOXoD3Nq7Yk6wn2BRrb1PP5MsadY/Q==} @@ -6524,18 +6448,18 @@ packages: '@volar/snapshot-document@2.4.0-alpha.18': resolution: {integrity: sha512-JAeclEly/wnILhR4Pu9MpgBLInZJH49O1zoy8fU+pk5I+zpv7JIEby5z2UFAS60+sIDnxBdAGd7rZ5VibE70vg==} - '@volar/source-map@1.11.1': - resolution: {integrity: sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==} - '@volar/source-map@2.4.0-alpha.18': resolution: {integrity: sha512-MTeCV9MUwwsH0sNFiZwKtFrrVZUK6p8ioZs3xFzHc2cvDXHWlYN3bChdQtwKX+FY2HG6H3CfAu1pKijolzIQ8g==} - '@volar/typescript@1.11.1': - resolution: {integrity: sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==} + '@volar/source-map@2.4.1': + resolution: {integrity: sha512-Xq6ep3OZg9xUqN90jEgB9ztX5SsTz1yiV8wiQbcYNjWkek+Ie3dc8l7AVt3EhDm9mSIR58oWczHkzM2H6HIsmQ==} '@volar/typescript@2.4.0-alpha.18': resolution: {integrity: sha512-sXh5Y8sqGUkgxpMWUGvRXggxYHAVxg0Pa1C42lQZuPDrW6vHJPR0VCK8Sr7WJsAW530HuNQT/ZIskmXtxjybMQ==} + '@volar/typescript@2.4.1': + resolution: {integrity: sha512-UoRzC0PXcwajFQTu8XxKSYNsWNBtVja6Y9gC8eLv7kYm+UEKJCcZ8g7dialsOYA0HKs3Vpg57MeCsawFLC6m9Q==} + '@vscode/emmet-helper@2.9.3': resolution: {integrity: sha512-rB39LHWWPQYYlYfpv9qCoZOVioPCftKXXqrsyqN1mTWZM6dTnONT63Db+03vgrBbHzJN45IrgS/AGxw9iiqfEw==} @@ -6568,14 +6492,6 @@ packages: '@vue/devtools-api@6.6.3': resolution: {integrity: sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==} - '@vue/language-core@1.8.27': - resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@vue/language-core@2.0.29': resolution: {integrity: sha512-o2qz9JPjhdoVj8D2+9bDXbaI4q2uZTHQA/dbyZT4Bj1FR9viZxDJnLcKVHfxdn6wsOzRgpqIzJEEmSSvgMvDTQ==} peerDependencies: @@ -7883,6 +7799,9 @@ packages: compare-func@2.0.0: resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} + compare-versions@6.1.1: + resolution: {integrity: sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==} + component-emitter@1.3.1: resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==} @@ -8985,9 +8904,9 @@ packages: peerDependencies: eslint: ^9.9.1 - eslint-plugin-import-x@3.1.0: - resolution: {integrity: sha512-/UbPA+bYY7nIxcjL3kpcDY3UNdoLHFhyBFzHox2M0ypcUoueTn6woZUUmzzi5et/dXChksasYYFeKE2wshOrhg==} - engines: {node: '>=16'} + eslint-plugin-import-x@4.1.1: + resolution: {integrity: sha512-dBEM8fACIFNt4H7GoOaRmnH6evJW6JSTJTYYgmRd3vI4geBTjgDM/JyUDKUwIw0HDSyI+u7Vs3vFRXUo/BOAtA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^9.9.1 @@ -8997,8 +8916,8 @@ packages: peerDependencies: eslint: ^9.9.1 - eslint-plugin-n@17.10.1: - resolution: {integrity: sha512-hm/q37W6efDptJXdwirsm6A257iY6ZNtpoSG0wEzFzjJ3AhL7OhEIhdSR2e4OdYfHO5EDeqlCfFrjf9q208IPw==} + eslint-plugin-n@17.10.2: + resolution: {integrity: sha512-e+s4eAf5NtJaxPhTNu3qMO0Iz40WANS93w9LQgYcvuljgvDmWi/a3rh+OrNyMHeng6aOWGJO0rCg5lH4zi8yTw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^9.9.1 @@ -9823,8 +9742,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.8.0: - resolution: {integrity: sha512-VZAJ4cewHTExBWDHR6yptdIBlx9YSSZuwojj9Nt5mBRXQzrKakDsVKQ1J63sklLvzAJm0X5+RpO4i3Y2hcOnFw==} + globals@15.9.0: + resolution: {integrity: sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==} engines: {node: '>=18'} globalthis@1.0.4: @@ -11285,15 +11204,9 @@ packages: lodash.defaults@4.2.0: resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==} - lodash.get@4.4.2: - resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} - lodash.isarguments@3.1.0: resolution: {integrity: sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==} - lodash.isequal@4.5.0: - resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - lodash.ismatch@4.4.0: resolution: {integrity: sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==} @@ -11914,9 +11827,6 @@ packages: typescript: optional: true - muggle-string@0.3.1: - resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==} - muggle-string@0.4.1: resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} @@ -14235,9 +14145,6 @@ packages: resolve@1.18.1: resolution: {integrity: sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==} - resolve@1.19.0: - resolution: {integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==} - resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -15836,14 +15743,14 @@ packages: peerDependencies: typedoc-plugin-markdown: '>=4.0.0' - typedoc-plugin-markdown@4.2.3: - resolution: {integrity: sha512-esucQj79SFYOv0f5XVha7QWdLUH5C5HRlDf7Z8CXzHedmVPn7jox6Gt7FdoBXN8AFxyHpa3Lbuxu65Dobwt+4Q==} + typedoc-plugin-markdown@4.2.6: + resolution: {integrity: sha512-k33o2lZSGpL3GjH28eW+RsujzCYFP0L5GNqpK+wa4CBcMOxpj8WV7SydNRLS6eSa2UvaPvNVJTaAZ6Tm+8GXoA==} engines: {node: '>= 18'} peerDependencies: typedoc: 0.26.x - typedoc@0.26.5: - resolution: {integrity: sha512-Vn9YKdjKtDZqSk+by7beZ+xzkkr8T8CYoiasqyt4TTRFy5+UHzL/mF/o4wGBjRF+rlWQHDb0t6xCpA3JNL5phg==} + typedoc@0.26.6: + resolution: {integrity: sha512-SfEU3SH3wHNaxhFPjaZE2kNl/NFtLNW5c1oHsg7mti7GjmUj1Roq6osBQeMd+F4kL0BoRBBr8gQAuqBlfFu8LA==} engines: {node: '>= 18'} hasBin: true peerDependencies: @@ -15861,11 +15768,10 @@ packages: typescript-auto-import-cache@0.3.3: resolution: {integrity: sha512-ojEC7+Ci1ij9eE6hp8Jl9VUNnsEKzztktP5gtYNRMrTmfXVwA1PITYYAkpxCvvupdSYa/Re51B6KMcv1CTZEUA==} - typescript-eslint@7.18.0: - resolution: {integrity: sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==} - engines: {node: ^18.18.0 || >=20.0.0} + typescript-eslint@8.3.0: + resolution: {integrity: sha512-EvWjwWLwwKDIJuBjk2I6UkV8KEQcwZ0VM10nR1rIunRDIP67QJTZAHBXTX0HW/oI1H10YESF8yWie8fRQxjvFA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^9.9.1 typescript: '*' peerDependenciesMeta: typescript: @@ -16251,10 +16157,6 @@ packages: resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - validator@13.12.0: - resolution: {integrity: sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==} - engines: {node: '>= 0.10'} - vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} @@ -16280,8 +16182,8 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-plugin-dts@3.9.1: - resolution: {integrity: sha512-rVp2KM9Ue22NGWB8dNtWEr+KekN3rIgz1tWD050QnRGlriUCmaDwa7qA5zDEjbXg5lAXhYMSBJtx3q3hQIJZSg==} + vite-plugin-dts@4.0.3: + resolution: {integrity: sha512-+xnTsaONwU2kV6zhRjtbRJSGN41uFR/whqmcb4k4fftLFDJElxthp0PP5Fq8gMeM9ytWMt1yk5gGgekLREWYQQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -16315,8 +16217,8 @@ packages: '@testing-library/jest-dom': optional: true - vite-tsconfig-paths@4.3.2: - resolution: {integrity: sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==} + vite-tsconfig-paths@5.0.1: + resolution: {integrity: sha512-yqwv+LstU7NwPeNqajZzLEBVpUFU6Dugtb2P84FXuvaoYA+/70l9MHE+GYfYAycVyPSDYZ7mjOFuYBRqlEpTig==} peerDependencies: vite: '*' peerDependenciesMeta: @@ -16521,12 +16423,6 @@ packages: vue-template-compiler@2.7.16: resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} - vue-tsc@1.8.27: - resolution: {integrity: sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==} - hasBin: true - peerDependencies: - typescript: '*' - vue-tsc@2.0.29: resolution: {integrity: sha512-MHhsfyxO3mYShZCGYNziSbc63x7cQ5g9kvijV7dRe1TTXBRLxXyL0FnXWpUF1xII2mJ86mwYpYsUmMwkmerq7Q==} hasBin: true @@ -17104,11 +17000,6 @@ packages: resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} engines: {node: '>=18'} - z-schema@5.0.5: - resolution: {integrity: sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q==} - engines: {node: '>=8.0.0'} - hasBin: true - zip-stream@6.0.1: resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} engines: {node: '>= 14'} @@ -17514,10 +17405,10 @@ snapshots: '@astrojs/compiler': 2.10.1 '@jridgewell/sourcemap-codec': 1.5.0 '@volar/kit': 2.4.0-alpha.18(typescript@5.3.3) - '@volar/language-core': 2.4.0-alpha.18 + '@volar/language-core': 2.4.1 '@volar/language-server': 2.4.0-alpha.18 '@volar/language-service': 2.4.0-alpha.18 - '@volar/typescript': 2.4.0-alpha.18 + '@volar/typescript': 2.4.1 fast-glob: 3.3.2 muggle-string: 0.4.1 volar-service-css: 0.0.59(@volar/language-service@2.4.0-alpha.18) @@ -20224,8 +20115,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.0': {} - '@eslint/js@9.9.1': {} '@eslint/object-schema@2.1.4': {} @@ -20813,14 +20702,6 @@ snapshots: - encoding - supports-color - '@microsoft/api-extractor-model@7.28.13(@types/node@20.14.13)': - dependencies: - '@microsoft/tsdoc': 0.14.2 - '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 4.0.2(@types/node@20.14.13) - transitivePeerDependencies: - - '@types/node' - '@microsoft/api-extractor-model@7.29.4(@types/node@20.14.13)': dependencies: '@microsoft/tsdoc': 0.15.0 @@ -20828,7 +20709,6 @@ snapshots: '@rushstack/node-core-library': 5.5.1(@types/node@20.14.13) transitivePeerDependencies: - '@types/node' - optional: true '@microsoft/api-extractor-model@7.29.4(@types/node@22.0.2)': dependencies: @@ -20838,24 +20718,6 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@microsoft/api-extractor@7.43.0(@types/node@20.14.13)': - dependencies: - '@microsoft/api-extractor-model': 7.28.13(@types/node@20.14.13) - '@microsoft/tsdoc': 0.14.2 - '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 4.0.2(@types/node@20.14.13) - '@rushstack/rig-package': 0.5.2 - '@rushstack/terminal': 0.10.0(@types/node@20.14.13) - '@rushstack/ts-command-line': 4.19.1(@types/node@20.14.13) - lodash: 4.17.21 - minimatch: 3.0.8 - resolve: 1.22.8 - semver: 7.5.4 - source-map: 0.6.1 - typescript: 5.4.2 - transitivePeerDependencies: - - '@types/node' - '@microsoft/api-extractor@7.47.4(@types/node@20.14.13)': dependencies: '@microsoft/api-extractor-model': 7.29.4(@types/node@20.14.13) @@ -20873,7 +20735,6 @@ snapshots: typescript: 5.4.2 transitivePeerDependencies: - '@types/node' - optional: true '@microsoft/api-extractor@7.47.4(@types/node@22.0.2)': dependencies: @@ -20893,13 +20754,6 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@microsoft/tsdoc-config@0.16.2': - dependencies: - '@microsoft/tsdoc': 0.14.2 - ajv: 6.12.6 - jju: 1.4.0 - resolve: 1.19.0 - '@microsoft/tsdoc-config@0.17.0': dependencies: '@microsoft/tsdoc': 0.15.0 @@ -20907,8 +20761,6 @@ snapshots: jju: 1.4.0 resolve: 1.22.8 - '@microsoft/tsdoc@0.14.2': {} - '@microsoft/tsdoc@0.15.0': {} '@molt/command@0.9.0': @@ -21985,17 +21837,6 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - '@rushstack/node-core-library@4.0.2(@types/node@20.14.13)': - dependencies: - fs-extra: 7.0.1 - import-lazy: 4.0.0 - jju: 1.4.0 - resolve: 1.22.8 - semver: 7.5.4 - z-schema: 5.0.5 - optionalDependencies: - '@types/node': 20.14.13 - '@rushstack/node-core-library@5.5.1(@types/node@20.14.13)': dependencies: ajv: 8.13.0 @@ -22008,7 +21849,6 @@ snapshots: semver: 7.5.4 optionalDependencies: '@types/node': 20.14.13 - optional: true '@rushstack/node-core-library@5.5.1(@types/node@22.0.2)': dependencies: @@ -22023,30 +21863,17 @@ snapshots: optionalDependencies: '@types/node': 22.0.2 - '@rushstack/rig-package@0.5.2': - dependencies: - resolve: 1.22.8 - strip-json-comments: 3.1.1 - '@rushstack/rig-package@0.5.3': dependencies: resolve: 1.22.8 strip-json-comments: 3.1.1 - '@rushstack/terminal@0.10.0(@types/node@20.14.13)': - dependencies: - '@rushstack/node-core-library': 4.0.2(@types/node@20.14.13) - supports-color: 8.1.1 - optionalDependencies: - '@types/node': 20.14.13 - '@rushstack/terminal@0.13.3(@types/node@20.14.13)': dependencies: '@rushstack/node-core-library': 5.5.1(@types/node@20.14.13) supports-color: 8.1.1 optionalDependencies: '@types/node': 20.14.13 - optional: true '@rushstack/terminal@0.13.3(@types/node@22.0.2)': dependencies: @@ -22055,15 +21882,6 @@ snapshots: optionalDependencies: '@types/node': 22.0.2 - '@rushstack/ts-command-line@4.19.1(@types/node@20.14.13)': - dependencies: - '@rushstack/terminal': 0.10.0(@types/node@20.14.13) - '@types/argparse': 1.0.38 - argparse: 1.0.10 - string-argv: 0.3.2 - transitivePeerDependencies: - - '@types/node' - '@rushstack/ts-command-line@4.22.3(@types/node@20.14.13)': dependencies: '@rushstack/terminal': 0.13.3(@types/node@20.14.13) @@ -22072,7 +21890,6 @@ snapshots: string-argv: 0.3.2 transitivePeerDependencies: - '@types/node' - optional: true '@rushstack/ts-command-line@4.22.3(@types/node@22.0.2)': dependencies: @@ -22269,10 +22086,9 @@ snapshots: optionalDependencies: '@solidjs/router': 0.14.1(solid-js@1.8.19) - '@stylistic/eslint-plugin-js@2.6.0(eslint@9.9.1(jiti@1.21.6))': + '@stylistic/eslint-plugin-js@2.7.1(eslint@9.9.1(jiti@1.21.6))': dependencies: '@types/eslint': 9.6.1 - acorn: 8.12.1 eslint: 9.9.1(jiti@1.21.6) eslint-visitor-keys: 4.0.0 espree: 10.1.0 @@ -22428,17 +22244,17 @@ snapshots: '@swc/counter': 0.1.3 tslib: 2.6.3 - '@tanstack/config@0.11.1(@types/node@20.14.13)(esbuild@0.19.12)(eslint@9.9.1(jiti@1.21.6))(rollup@4.19.1)(typescript@5.3.3)(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3))': + '@tanstack/config@0.13.1(@types/node@20.14.13)(esbuild@0.19.12)(eslint@9.9.1(jiti@1.21.6))(rollup@4.19.1)(typescript@5.3.3)(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3))': dependencies: '@commitlint/parse': 19.0.3 - '@eslint/js': 8.57.0 - '@stylistic/eslint-plugin-js': 2.6.0(eslint@9.9.1(jiti@1.21.6)) + '@eslint/js': 9.9.1 + '@stylistic/eslint-plugin-js': 2.7.1(eslint@9.9.1(jiti@1.21.6)) commander: 12.1.0 current-git-branch: 1.1.0 esbuild-register: 3.6.0(esbuild@0.19.12) - eslint-plugin-import-x: 3.1.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) - eslint-plugin-n: 17.10.1(eslint@9.9.1(jiti@1.21.6)) - globals: 15.8.0 + eslint-plugin-import-x: 4.1.1(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) + eslint-plugin-n: 17.10.2(eslint@9.9.1(jiti@1.21.6)) + globals: 15.9.0 interpret: 3.1.1 jsonfile: 6.1.0 liftoff: 5.0.0 @@ -22446,14 +22262,14 @@ snapshots: rollup-plugin-preserve-directives: 0.4.0(rollup@4.19.1) semver: 7.6.3 simple-git: 3.25.0 - typedoc: 0.26.5(typescript@5.3.3) - typedoc-plugin-frontmatter: 1.0.0(typedoc-plugin-markdown@4.2.3(typedoc@0.26.5(typescript@5.3.3))) - typedoc-plugin-markdown: 4.2.3(typedoc@0.26.5(typescript@5.3.3)) - typescript-eslint: 7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) + typedoc: 0.26.6(typescript@5.3.3) + typedoc-plugin-frontmatter: 1.0.0(typedoc-plugin-markdown@4.2.6(typedoc@0.26.6(typescript@5.3.3))) + typedoc-plugin-markdown: 4.2.6(typedoc@0.26.6(typescript@5.3.3)) + typescript-eslint: 8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) v8flags: 4.0.1 - vite-plugin-dts: 3.9.1(@types/node@20.14.13)(rollup@4.19.1)(typescript@5.3.3)(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3)) + vite-plugin-dts: 4.0.3(@types/node@20.14.13)(rollup@4.19.1)(typescript@5.3.3)(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3)) vite-plugin-externalize-deps: 0.8.0(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3)) - vite-tsconfig-paths: 4.3.2(typescript@5.3.3)(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3)) + vite-tsconfig-paths: 5.0.1(typescript@5.3.3)(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3)) transitivePeerDependencies: - '@types/node' - esbuild @@ -22803,14 +22619,14 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3))(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3)': + '@typescript-eslint/eslint-plugin@8.3.0(@typescript-eslint/parser@8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3))(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) - '@typescript-eslint/utils': 7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) - '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/parser': 8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) + '@typescript-eslint/scope-manager': 8.3.0 + '@typescript-eslint/type-utils': 8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) + '@typescript-eslint/utils': 8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 8.3.0 eslint: 9.9.1(jiti@1.21.6) graphemer: 1.4.0 ignore: 5.3.1 @@ -22821,12 +22637,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3)': + '@typescript-eslint/parser@8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3)': dependencies: - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.3.3) - '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/scope-manager': 8.3.0 + '@typescript-eslint/types': 8.3.0 + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 8.3.0 debug: 4.3.6(supports-color@6.1.0) eslint: 9.9.1(jiti@1.21.6) optionalDependencies: @@ -22847,28 +22663,11 @@ snapshots: - supports-color - typescript - '@typescript-eslint/scope-manager@7.18.0': - dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - '@typescript-eslint/scope-manager@8.3.0': dependencies: '@typescript-eslint/types': 8.3.0 '@typescript-eslint/visitor-keys': 8.3.0 - '@typescript-eslint/type-utils@7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3)': - dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.3.3) - '@typescript-eslint/utils': 7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) - debug: 4.3.6(supports-color@6.1.0) - eslint: 9.9.1(jiti@1.21.6) - ts-api-utils: 1.3.0(typescript@5.3.3) - optionalDependencies: - typescript: 5.3.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/type-utils@8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3)': dependencies: '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.3.3) @@ -22881,25 +22680,8 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@7.18.0': {} - '@typescript-eslint/types@8.3.0': {} - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.3.3)': - dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.3.6(supports-color@6.1.0) - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.3.3) - optionalDependencies: - typescript: 5.3.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.3.0(typescript@5.3.3)': dependencies: '@typescript-eslint/types': 8.3.0 @@ -22930,17 +22712,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1(jiti@1.21.6)) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.3.3) - eslint: 9.9.1(jiti@1.21.6) - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1(jiti@1.21.6)) @@ -22963,11 +22734,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.18.0': - dependencies: - '@typescript-eslint/types': 7.18.0 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.3.0': dependencies: '@typescript-eslint/types': 8.3.0 @@ -23180,14 +22946,14 @@ snapshots: vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 - '@volar/language-core@1.11.1': - dependencies: - '@volar/source-map': 1.11.1 - '@volar/language-core@2.4.0-alpha.18': dependencies: '@volar/source-map': 2.4.0-alpha.18 + '@volar/language-core@2.4.1': + dependencies: + '@volar/source-map': 2.4.1 + '@volar/language-server@2.4.0-alpha.18': dependencies: '@volar/language-core': 2.4.0-alpha.18 @@ -23213,16 +22979,9 @@ snapshots: vscode-languageserver-protocol: 3.17.5 vscode-languageserver-textdocument: 1.0.12 - '@volar/source-map@1.11.1': - dependencies: - muggle-string: 0.3.1 - '@volar/source-map@2.4.0-alpha.18': {} - '@volar/typescript@1.11.1': - dependencies: - '@volar/language-core': 1.11.1 - path-browserify: 1.0.1 + '@volar/source-map@2.4.1': {} '@volar/typescript@2.4.0-alpha.18': dependencies: @@ -23230,6 +22989,12 @@ snapshots: path-browserify: 1.0.1 vscode-uri: 3.0.8 + '@volar/typescript@2.4.1': + dependencies: + '@volar/language-core': 2.4.1 + path-browserify: 1.0.1 + vscode-uri: 3.0.8 + '@vscode/emmet-helper@2.9.3': dependencies: emmet: 2.4.7 @@ -23289,23 +23054,9 @@ snapshots: '@vue/devtools-api@6.6.3': {} - '@vue/language-core@1.8.27(typescript@5.3.3)': - dependencies: - '@volar/language-core': 1.11.1 - '@volar/source-map': 1.11.1 - '@vue/compiler-dom': 3.4.35 - '@vue/shared': 3.4.35 - computeds: 0.0.1 - minimatch: 9.0.5 - muggle-string: 0.3.1 - path-browserify: 1.0.1 - vue-template-compiler: 2.7.16 - optionalDependencies: - typescript: 5.3.3 - '@vue/language-core@2.0.29(typescript@5.3.3)': dependencies: - '@volar/language-core': 2.4.0-alpha.18 + '@volar/language-core': 2.4.1 '@vue/compiler-dom': 3.4.35 '@vue/compiler-vue2': 2.7.16 '@vue/shared': 3.4.35 @@ -23318,7 +23069,7 @@ snapshots: '@vue/language-core@2.0.29(typescript@5.4.2)': dependencies: - '@volar/language-core': 2.4.0-alpha.18 + '@volar/language-core': 2.4.1 '@vue/compiler-dom': 3.4.35 '@vue/compiler-vue2': 2.7.16 '@vue/shared': 3.4.35 @@ -24948,6 +24699,8 @@ snapshots: array-ify: 1.0.0 dot-prop: 5.3.0 + compare-versions@6.1.1: {} + component-emitter@1.3.1: {} component-type@1.2.2: {} @@ -26295,9 +26048,10 @@ snapshots: eslint: 9.9.1(jiti@1.21.6) eslint-compat-utils: 0.5.1(eslint@9.9.1(jiti@1.21.6)) - eslint-plugin-import-x@3.1.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3): + eslint-plugin-import-x@4.1.1(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3): dependencies: - '@typescript-eslint/utils': 7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.3.3) + '@typescript-eslint/utils': 8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) debug: 4.3.6(supports-color@6.1.0) doctrine: 3.0.0 eslint: 9.9.1(jiti@1.21.6) @@ -26329,14 +26083,14 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-n@17.10.1(eslint@9.9.1(jiti@1.21.6)): + eslint-plugin-n@17.10.2(eslint@9.9.1(jiti@1.21.6)): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1(jiti@1.21.6)) enhanced-resolve: 5.17.1 eslint: 9.9.1(jiti@1.21.6) eslint-plugin-es-x: 7.8.0(eslint@9.9.1(jiti@1.21.6)) get-tsconfig: 4.7.6 - globals: 15.8.0 + globals: 15.9.0 ignore: 5.3.1 minimatch: 9.0.5 semver: 7.6.3 @@ -27444,7 +27198,7 @@ snapshots: globals@14.0.0: {} - globals@15.8.0: {} + globals@15.9.0: {} globalthis@1.0.4: dependencies: @@ -29089,12 +28843,8 @@ snapshots: lodash.defaults@4.2.0: {} - lodash.get@4.4.2: {} - lodash.isarguments@3.1.0: {} - lodash.isequal@4.5.0: {} - lodash.ismatch@4.4.0: {} lodash.memoize@4.1.2: {} @@ -30042,8 +29792,6 @@ snapshots: optionalDependencies: typescript: 5.3.3 - muggle-string@0.3.1: {} - muggle-string@0.4.1: {} multicast-dns-service-types@1.1.0: {} @@ -33083,11 +32831,6 @@ snapshots: is-core-module: 2.15.0 path-parse: 1.0.7 - resolve@1.19.0: - dependencies: - is-core-module: 2.15.0 - path-parse: 1.0.7 - resolve@1.22.8: dependencies: is-core-module: 2.15.0 @@ -34865,16 +34608,16 @@ snapshots: typedarray@0.0.6: {} - typedoc-plugin-frontmatter@1.0.0(typedoc-plugin-markdown@4.2.3(typedoc@0.26.5(typescript@5.3.3))): + typedoc-plugin-frontmatter@1.0.0(typedoc-plugin-markdown@4.2.6(typedoc@0.26.6(typescript@5.3.3))): dependencies: - typedoc-plugin-markdown: 4.2.3(typedoc@0.26.5(typescript@5.3.3)) + typedoc-plugin-markdown: 4.2.6(typedoc@0.26.6(typescript@5.3.3)) yaml: 2.5.0 - typedoc-plugin-markdown@4.2.3(typedoc@0.26.5(typescript@5.3.3)): + typedoc-plugin-markdown@4.2.6(typedoc@0.26.6(typescript@5.3.3)): dependencies: - typedoc: 0.26.5(typescript@5.3.3) + typedoc: 0.26.6(typescript@5.3.3) - typedoc@0.26.5(typescript@5.3.3): + typedoc@0.26.6(typescript@5.3.3): dependencies: lunr: 2.3.9 markdown-it: 14.1.0 @@ -34897,15 +34640,15 @@ snapshots: dependencies: semver: 7.6.3 - typescript-eslint@7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3): + typescript-eslint@8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3): dependencies: - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3))(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) - '@typescript-eslint/parser': 7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) - '@typescript-eslint/utils': 7.18.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) - eslint: 9.9.1(jiti@1.21.6) + '@typescript-eslint/eslint-plugin': 8.3.0(@typescript-eslint/parser@8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3))(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) + '@typescript-eslint/parser': 8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) + '@typescript-eslint/utils': 8.3.0(eslint@9.9.1(jiti@1.21.6))(typescript@5.3.3) optionalDependencies: typescript: 5.3.3 transitivePeerDependencies: + - eslint - supports-color typescript@4.7.4: {} @@ -35253,8 +34996,6 @@ snapshots: validate-npm-package-name@5.0.1: {} - validator@13.12.0: {} - vary@1.1.2: {} vendors@1.0.4: {} @@ -35377,16 +35118,19 @@ snapshots: - terser optional: true - vite-plugin-dts@3.9.1(@types/node@20.14.13)(rollup@4.19.1)(typescript@5.3.3)(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3)): + vite-plugin-dts@4.0.3(@types/node@20.14.13)(rollup@4.19.1)(typescript@5.3.3)(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3)): dependencies: - '@microsoft/api-extractor': 7.43.0(@types/node@20.14.13) + '@microsoft/api-extractor': 7.47.4(@types/node@20.14.13) '@rollup/pluginutils': 5.1.0(rollup@4.19.1) - '@vue/language-core': 1.8.27(typescript@5.3.3) + '@volar/typescript': 2.4.1 + '@vue/language-core': 2.0.29(typescript@5.3.3) + compare-versions: 6.1.1 debug: 4.3.6(supports-color@6.1.0) kolorist: 1.8.0 + local-pkg: 0.5.0 magic-string: 0.30.11 typescript: 5.3.3 - vue-tsc: 1.8.27(typescript@5.3.3) + vue-tsc: 2.0.29(typescript@5.3.3) optionalDependencies: vite: 5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3) transitivePeerDependencies: @@ -35428,7 +35172,7 @@ snapshots: transitivePeerDependencies: - supports-color - vite-tsconfig-paths@4.3.2(typescript@5.3.3)(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3)): + vite-tsconfig-paths@5.0.1(typescript@5.3.3)(vite@5.3.5(@types/node@20.14.13)(less@4.2.0)(sass@1.77.8)(terser@5.31.3)): dependencies: debug: 4.3.6(supports-color@6.1.0) globrex: 0.1.2 @@ -35657,24 +35401,18 @@ snapshots: dependencies: de-indent: 1.0.2 he: 1.2.0 - - vue-tsc@1.8.27(typescript@5.3.3): - dependencies: - '@volar/typescript': 1.11.1 - '@vue/language-core': 1.8.27(typescript@5.3.3) - semver: 7.6.3 - typescript: 5.3.3 + optional: true vue-tsc@2.0.29(typescript@5.3.3): dependencies: - '@volar/typescript': 2.4.0-alpha.18 + '@volar/typescript': 2.4.1 '@vue/language-core': 2.0.29(typescript@5.3.3) semver: 7.6.3 typescript: 5.3.3 vue-tsc@2.0.29(typescript@5.4.2): dependencies: - '@volar/typescript': 2.4.0-alpha.18 + '@volar/typescript': 2.4.1 '@vue/language-core': 2.0.29(typescript@5.4.2) semver: 7.6.3 typescript: 5.4.2 @@ -36551,14 +36289,6 @@ snapshots: yoctocolors-cjs@2.1.2: {} - z-schema@5.0.5: - dependencies: - lodash.get: 4.4.2 - lodash.isequal: 4.5.0 - validator: 13.12.0 - optionalDependencies: - commander: 9.5.0 - zip-stream@6.0.1: dependencies: archiver-utils: 5.0.2 From cc20045eca3f2ab6f6c45649aecb0d6c3aa23a03 Mon Sep 17 00:00:00 2001 From: Arnoud <6420061+arnoud-dv@users.noreply.github.com> Date: Sat, 31 Aug 2024 00:09:27 +0200 Subject: [PATCH 2/3] chore(angular-query): add injection context tests (#7993) --- .../__tests__/inject-infinite-query.test.ts | 28 ++++++++++++++++ .../src/__tests__/inject-is-fetching.test.ts | 15 +++++++++ .../src/__tests__/inject-is-mutating.test.ts | 15 +++++++++ .../__tests__/inject-mutation-state.test.ts | 19 ++++++++++- .../src/__tests__/inject-mutation.test.ts | 32 ++++++++++++++++++- .../src/__tests__/inject-query.test.ts | 23 +++++++++++++ 6 files changed, 130 insertions(+), 2 deletions(-) diff --git a/packages/angular-query-experimental/src/__tests__/inject-infinite-query.test.ts b/packages/angular-query-experimental/src/__tests__/inject-infinite-query.test.ts index ccfd7a16dc..4948e57eb3 100644 --- a/packages/angular-query-experimental/src/__tests__/inject-infinite-query.test.ts +++ b/packages/angular-query-experimental/src/__tests__/inject-infinite-query.test.ts @@ -1,5 +1,6 @@ import { TestBed } from '@angular/core/testing' import { afterEach } from 'vitest' +import { Injector } from '@angular/core' import { QueryClient, injectInfiniteQuery, provideAngularQuery } from '..' import { expectSignals, infiniteFetcher } from './test-utils' @@ -59,4 +60,31 @@ describe('injectInfiniteQuery', () => { status: 'success', }) }) + + describe('injection context', () => { + test('throws NG0203 with descriptive error outside injection context', () => { + expect(() => { + injectInfiniteQuery(() => ({ + queryKey: ['injectionContextError'], + queryFn: infiniteFetcher, + initialPageParam: 0, + getNextPageParam: () => 12, + })) + }).toThrowError(/NG0203(.*?)injectInfiniteQuery/) + }) + + test('can be used outside injection context when passing an injector', () => { + const query = injectInfiniteQuery( + () => ({ + queryKey: ['manualInjector'], + queryFn: infiniteFetcher, + initialPageParam: 0, + getNextPageParam: () => 12, + }), + TestBed.inject(Injector), + ) + + expect(query.status()).toBe('pending') + }) + }) }) diff --git a/packages/angular-query-experimental/src/__tests__/inject-is-fetching.test.ts b/packages/angular-query-experimental/src/__tests__/inject-is-fetching.test.ts index 6949800ea9..db75cba557 100644 --- a/packages/angular-query-experimental/src/__tests__/inject-is-fetching.test.ts +++ b/packages/angular-query-experimental/src/__tests__/inject-is-fetching.test.ts @@ -1,5 +1,6 @@ import { TestBed, fakeAsync, flush, tick } from '@angular/core/testing' import { beforeEach, describe, expect } from 'vitest' +import { Injector } from '@angular/core' import { QueryClient, injectIsFetching, @@ -34,4 +35,18 @@ describe('injectIsFetching', () => { flush() expect(isFetching()).toStrictEqual(0) })) + + describe('injection context', () => { + test('throws NG0203 with descriptive error outside injection context', () => { + expect(() => { + injectIsFetching() + }).toThrowError(/NG0203(.*?)injectIsFetching/) + }) + + test('can be used outside injection context when passing an injector', () => { + expect( + injectIsFetching(undefined, TestBed.inject(Injector)), + ).not.toThrow() + }) + }) }) diff --git a/packages/angular-query-experimental/src/__tests__/inject-is-mutating.test.ts b/packages/angular-query-experimental/src/__tests__/inject-is-mutating.test.ts index c8e381f592..e6d1f775eb 100644 --- a/packages/angular-query-experimental/src/__tests__/inject-is-mutating.test.ts +++ b/packages/angular-query-experimental/src/__tests__/inject-is-mutating.test.ts @@ -1,5 +1,6 @@ import { beforeEach, describe } from 'vitest' import { TestBed, fakeAsync, tick } from '@angular/core/testing' +import { Injector } from '@angular/core' import { QueryClient, injectIsMutating, @@ -38,4 +39,18 @@ describe('injectIsMutating', () => { expect(isMutating()).toBe(1) }) })) + + describe('injection context', () => { + test('throws NG0203 with descriptive error outside injection context', () => { + expect(() => { + injectIsMutating() + }).toThrowError(/NG0203(.*?)injectIsMutating/) + }) + + test('can be used outside injection context when passing an injector', () => { + expect( + injectIsMutating(undefined, TestBed.inject(Injector)), + ).not.toThrow() + }) + }) }) diff --git a/packages/angular-query-experimental/src/__tests__/inject-mutation-state.test.ts b/packages/angular-query-experimental/src/__tests__/inject-mutation-state.test.ts index 856d643dd1..07e4ae4ae3 100644 --- a/packages/angular-query-experimental/src/__tests__/inject-mutation-state.test.ts +++ b/packages/angular-query-experimental/src/__tests__/inject-mutation-state.test.ts @@ -1,4 +1,4 @@ -import { Component, input, signal } from '@angular/core' +import { Component, Injector, input, signal } from '@angular/core' import { TestBed } from '@angular/core/testing' import { describe, expect, test, vi } from 'vitest' import { By } from '@angular/platform-browser' @@ -173,5 +173,22 @@ describe('injectMutationState', () => { expect(spans).toEqual(['success', 'error']) }) + + describe('injection context', () => { + test('throws NG0203 with descriptive error outside injection context', () => { + expect(() => { + injectMutationState() + }).toThrowError(/NG0203(.*?)injectMutationState/) + }) + + test('can be used outside injection context when passing an injector', () => { + const injector = TestBed.inject(Injector) + expect( + injectMutationState(undefined, { + injector, + }), + ).not.toThrow() + }) + }) }) }) diff --git a/packages/angular-query-experimental/src/__tests__/inject-mutation.test.ts b/packages/angular-query-experimental/src/__tests__/inject-mutation.test.ts index ad9dc3305d..aee351baf9 100644 --- a/packages/angular-query-experimental/src/__tests__/inject-mutation.test.ts +++ b/packages/angular-query-experimental/src/__tests__/inject-mutation.test.ts @@ -1,4 +1,11 @@ -import { Component, Injectable, inject, input, signal } from '@angular/core' +import { + Component, + Injectable, + Injector, + inject, + input, + signal, +} from '@angular/core' import { TestBed } from '@angular/core/testing' import { describe, expect, vi } from 'vitest' import { By } from '@angular/platform-browser' @@ -494,4 +501,27 @@ describe('injectMutation', () => { ).toEqual('test') expect(errorSpy).not.toHaveBeenCalled() }) + + describe('injection context', () => { + test('throws NG0203 with descriptive error outside injection context', () => { + expect(() => { + injectMutation(() => ({ + mutationKey: ['injectionContextError'], + mutationFn: () => Promise.resolve(), + })) + }).toThrowError(/NG0203(.*?)injectMutation/) + }) + + test('can be used outside injection context when passing an injector', () => { + expect(() => { + injectMutation( + () => ({ + mutationKey: ['injectionContextError'], + mutationFn: () => Promise.resolve(), + }), + TestBed.inject(Injector), + ) + }).not.toThrow() + }) + }) }) diff --git a/packages/angular-query-experimental/src/__tests__/inject-query.test.ts b/packages/angular-query-experimental/src/__tests__/inject-query.test.ts index f70c30f2ff..94f1f1bc87 100644 --- a/packages/angular-query-experimental/src/__tests__/inject-query.test.ts +++ b/packages/angular-query-experimental/src/__tests__/inject-query.test.ts @@ -618,4 +618,27 @@ describe('injectQuery', () => { expect(fixture.componentInstance.query.data()).toEqual('test name 2') })) + + describe('injection context', () => { + test('throws NG0203 with descriptive error outside injection context', () => { + expect(() => { + injectQuery(() => ({ + queryKey: ['injectionContextError'], + queryFn: simpleFetcher, + })) + }).toThrowError(/NG0203(.*?)injectQuery/) + }) + + test('can be used outside injection context when passing an injector', () => { + const query = injectQuery( + () => ({ + queryKey: ['manualInjector'], + queryFn: simpleFetcher, + }), + TestBed.inject(Injector), + ) + + expect(query.status()).toBe('pending') + }) + }) }) From 4977296fe907311885389190edbc34a24ea535b1 Mon Sep 17 00:00:00 2001 From: Arnoud <6420061+arnoud-dv@users.noreply.github.com> Date: Sat, 31 Aug 2024 02:13:26 +0200 Subject: [PATCH 3/3] docs(angular-query): update overview and readme (#7994) --- docs/framework/angular/overview.md | 6 +- .../src/app/components/post.component.ts | 6 +- packages/angular-query-experimental/README.md | 150 ++++++++++-------- 3 files changed, 88 insertions(+), 74 deletions(-) diff --git a/docs/framework/angular/overview.md b/docs/framework/angular/overview.md index 06aa5e89f9..73eed6987c 100644 --- a/docs/framework/angular/overview.md +++ b/docs/framework/angular/overview.md @@ -23,7 +23,7 @@ Most core web frameworks **do not** come with an opinionated way of fetching or While most traditional state management libraries are great for working with client state, they are **not so great at working with async or server state**. This is because **server state is totally different**. For starters, server state: -- Is persisted remotely in a location you do not control or own +- Is persisted remotely in a location you may not control or own - Requires asynchronous APIs for fetching and updating - Implies shared ownership and can be changed by other people without your knowledge - Can potentially become "out of date" in your applications if you're not careful @@ -58,7 +58,7 @@ On a more technical note, Angular Query will likely: In the example below, you can see Angular Query in its most basic and simple form being used to fetch the GitHub stats for the TanStack Query GitHub project itself: -[Open in CodeSandbox](https://codesandbox.io/s/github/tanstack/query/tree/main/examples/angular/simple) +[Open in StackBlitz](https://stackblitz.com/github/TanStack/query/tree/main/examples/angular/simple) ```angular-ts import { AngularQueryDevtools } from '@tanstack/angular-query-devtools-experimental' @@ -114,4 +114,4 @@ type Response = { ## You talked me into it, so what now? -- Learn Angular Query at your own pace with our amazingly thorough [Walkthrough Guide](../installation) and [API Reference](../reference/injectQuery) +- Learn Angular Query at your own pace with our amazingly thorough [Walkthrough Guide](../installation) and [API Reference](../reference/functions/injectquery) diff --git a/examples/angular/router/src/app/components/post.component.ts b/examples/angular/router/src/app/components/post.component.ts index 76a70d54ae..a8a2196798 100644 --- a/examples/angular/router/src/app/components/post.component.ts +++ b/examples/angular/router/src/app/components/post.component.ts @@ -6,10 +6,7 @@ import { numberAttribute, } from '@angular/core' import { RouterLink } from '@angular/router' -import { - injectQuery, - injectQueryClient, -} from '@tanstack/angular-query-experimental' +import { injectQuery } from '@tanstack/angular-query-experimental' import { lastValueFrom } from 'rxjs' import { PostsService } from '../services/posts-service' @@ -22,7 +19,6 @@ import { PostsService } from '../services/posts-service' }) export default class PostComponent { #postsService = inject(PostsService) - queryClient = injectQueryClient() postId = input.required({ transform: numberAttribute, diff --git a/packages/angular-query-experimental/README.md b/packages/angular-query-experimental/README.md index a6dc6ac070..1d8eb4497a 100644 --- a/packages/angular-query-experimental/README.md +++ b/packages/angular-query-experimental/README.md @@ -7,7 +7,7 @@ # Angular Query -> IMPORTANT: This library is currently in an experimental stage. This means that breaking changes will happen in minor AND patch releases. Upgrade carefully. If you use this in production while in experimental stage, please lock your version to a patch-level version to avoid unexpected breaking changes. +> IMPORTANT: This library is currently in an experimental stage. This means that breaking changes may happen in minor AND patch releases. Upgrade carefully. If you use this in production while in experimental stage, please lock your version to a patch-level version to avoid unexpected breaking changes. Functions for fetching, caching and updating asynchronous data in Angular @@ -29,87 +29,105 @@ Visit https://tanstack.com/query/latest/docs/framework/angular/overview # Quick Start -> Angular Query requires Angular 16. +> Angular Query requires Angular 16 or higher. 1. Install `angular-query` - ```bash - $ npm i @tanstack/angular-query-experimental - ``` +```bash +$ npm i @tanstack/angular-query-experimental +``` - or +or - ```bash - $ pnpm add @tanstack/angular-query-experimental - ``` +```bash +$ pnpm add @tanstack/angular-query-experimental +``` - or +or - ```bash - $ yarn add @tanstack/angular-query-experimental - ``` +```bash +$ yarn add @tanstack/angular-query-experimental +``` - or +or - ```bash - $ bun add @tanstack/angular-query-experimental - ``` +```bash +$ bun add @tanstack/angular-query-experimental +``` 2. Initialize **Angular Query** by adding **provideAngularQuery** to your application - ```ts - import { provideAngularQuery } from '@tanstack/angular-query-experimental' - import { QueryClient } from '@tanstack/angular-query-experimental' +```ts +import { provideAngularQuery } from '@tanstack/angular-query-experimental' +import { QueryClient } from '@tanstack/angular-query-experimental' - bootstrapApplication(AppComponent, { - providers: [provideAngularQuery(new QueryClient())], - }) - ``` +bootstrapApplication(AppComponent, { + providers: [provideAngularQuery(new QueryClient())], +}) +``` - or in a NgModule-based app +or in a NgModule-based app - ```ts - import { provideHttpClient } from '@angular/common/http' - import { - provideAngularQuery, - QueryClient, - } from '@tanstack/angular-query-experimental' +```ts +import { provideHttpClient } from '@angular/common/http' +import { + provideAngularQuery, + QueryClient, +} from '@tanstack/angular-query-experimental' - @NgModule({ - declarations: [AppComponent], - imports: [BrowserModule], - providers: [provideAngularQuery(new QueryClient())], - bootstrap: [AppComponent], - }) - ``` +@NgModule({ + declarations: [AppComponent], + imports: [BrowserModule], + providers: [provideAngularQuery(new QueryClient())], + bootstrap: [AppComponent], +}) +``` 3. Inject query - ```ts - import { injectQuery } from '@tanstack/angular-query-experimental' - import { Component } from '@angular/core' - - @Component({...}) - export class TodosComponent { - info = injectQuery(() => ({ queryKey: ['todos'], queryFn: fetchTodoList })) - } - ``` - -4. If you need to update options on your query dynamically, make sure to pass them as signals - - ```ts - import { injectQuery } from '@tanstack/angular-query-experimental' - import { signal, Component } from '@angular/core' - - @Component({...}) - export class TodosComponent { - id = signal(1) - enabled = signal(false) - - info = injectQuery(() => ({ - queryKey: ['todos', this.id()], - queryFn: fetchTodoList, - enabled: this.enabled(), - })) - } - ``` +```ts +import { injectQuery } from '@tanstack/angular-query-experimental' +import { Component } from '@angular/core' + +@Component({...}) +export class TodosComponent { + info = injectQuery(() => ({ queryKey: ['todos'], queryFn: fetchTodoList })) +} +``` + +4. If you need to update options on your query dynamically, make sure to pass them as signals. The query will refetch automatically if data for an updated query key is stale or not present. + +[Open in StackBlitz](https://stackblitz.com/github/TanStack/query/tree/main/examples/angular/router) + +```ts +@Component({}) +export class PostComponent { + #postsService = inject(PostsService) + postId = input.required({ + transform: numberAttribute, + }) + + postQuery = injectQuery(() => ({ + queryKey: ['post', this.postId()], + queryFn: () => { + return lastValueFrom(this.#postsService.postById$(this.postId())) + }, + })) +} + +@Injectable({ + providedIn: 'root', +}) +export class PostsService { + #http = inject(HttpClient) + + postById$ = (postId: number) => + this.#http.get(`https://jsonplaceholder.typicode.com/posts/${postId}`) +} + +export interface Post { + id: number + title: string + body: string +} +```