New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@trpc/react-query

Package Overview
Dependencies
Maintainers
3
Versions
747
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trpc/react-query - npm Package Compare versions

Comparing version 11.0.0-alpha-tmp-01-21-trpc-monorepo-prebuilt.739 to 11.0.0-alpha-tmp-01-22-fix.719

26

dist/bundle-analysis.json
{
"bundleSize": 43968,
"bundleOrigSize": 92427,
"bundleReduction": 52.43,
"bundleOrigSize": 92111,
"bundleReduction": 52.27,
"modules": [

@@ -38,3 +38,3 @@ {

"size": 3969,
"origSize": 6145,
"origSize": 6126,
"renderedExports": [

@@ -48,3 +48,3 @@ "createServerSideHelpers"

"percent": 9.03,
"reduction": 35.41
"reduction": 35.21
},

@@ -54,3 +54,3 @@ {

"size": 3628,
"origSize": 16684,
"origSize": 16612,
"renderedExports": [

@@ -66,3 +66,3 @@ "getQueryType",

"percent": 8.25,
"reduction": 78.25
"reduction": 78.16
},

@@ -72,3 +72,3 @@ {

"size": 3230,
"origSize": 5453,
"origSize": 5362,
"renderedExports": [

@@ -80,3 +80,3 @@ "createHydrationHelpers"

"percent": 7.35,
"reduction": 40.77
"reduction": 39.76
},

@@ -95,4 +95,4 @@ {

"dependents": [
"/src/rsc.tsx",
"/src/index.ts",
"/src/rsc.tsx",
"/src/server/ssgProxy.ts",

@@ -109,3 +109,3 @@ "/src/shared/proxy/utilsProxy.ts",

"size": 875,
"origSize": 13895,
"origSize": 13853,
"renderedExports": [

@@ -120,3 +120,3 @@ "createHooksInternal",

"percent": 1.99,
"reduction": 93.7
"reduction": 93.68
},

@@ -157,3 +157,3 @@ {

"size": 697,
"origSize": 3496,
"origSize": 3404,
"renderedExports": [

@@ -168,3 +168,3 @@ "createUseQueries"

"percent": 1.59,
"reduction": 80.06
"reduction": 79.52
},

@@ -171,0 +171,0 @@ {

import type { DefinedInitialDataInfiniteOptions, DefinedUseInfiniteQueryResult, InfiniteData, SkipToken, UndefinedInitialDataInfiniteOptions, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseSuspenseInfiniteQueryOptions, UseSuspenseInfiniteQueryResult, UseSuspenseQueryResult } from '@tanstack/react-query';
import type { createTRPCClient, TRPCClientErrorLike } from '@trpc/client';
import type { AnyProcedure, AnyRootTypes, AnyRouter, coerceToRouterRecord, inferAsyncIterableYield, inferProcedureInput, inferTransformedProcedureOutput, ProcedureType, ProtectedIntersection, RouterRecord, Simplify } from '@trpc/server/unstable-core-do-not-import';
import type { AnyProcedure, AnyRootTypes, AnyRouter, inferAsyncIterableYield, inferProcedureInput, inferTransformedProcedureOutput, ProcedureType, ProtectedIntersection, RouterRecord, Simplify } from '@trpc/server/unstable-core-do-not-import';
import type { TRPCUseQueries, TRPCUseSuspenseQueries } from './internals/useQueries';

@@ -118,3 +118,3 @@ import type { CreateReactUtils, TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions } from './shared';

export type DecorateRouterRecord<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyProcedure ? DecorateProcedure<$Value['_def']['type'], {
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? DecorateRouterRecord<TRoot, $Value> : $Value extends AnyProcedure ? DecorateProcedure<$Value['_def']['type'], {
input: inferProcedureInput<$Value>;

@@ -124,3 +124,3 @@ output: inferTransformedProcedureOutput<TRoot, $Value>;

errorShape: TRoot['errorShape'];
}> : $Value extends RouterRecord | AnyRouter ? DecorateRouterRecord<TRoot, coerceToRouterRecord<$Value>> : never : never;
}> : never : never;
};

@@ -127,0 +127,0 @@ /**

@@ -5,3 +5,3 @@ import { type QueryClient } from '@tanstack/react-query';

import { type AnyRouter, type inferProcedureInput, type RouterRecord } from '@trpc/server/unstable-core-do-not-import';
import type { AnyProcedure, AnyRootTypes, coerceToRouterRecord, inferProcedureOutput, inferRouterRootTypes, RouterCaller, TypeError } from '@trpc/server/unstable-core-do-not-import';
import type { AnyProcedure, AnyRootTypes, inferProcedureOutput, inferRouterRootTypes, RouterCaller, TypeError } from '@trpc/server/unstable-core-do-not-import';
import * as React from 'react';

@@ -15,3 +15,3 @@ import type { TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions } from './shared';

type DecorateRouterRecord<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyProcedure ? DecorateProcedure<TRoot, $Value> : $Value extends RouterRecord | AnyRouter ? DecorateRouterRecord<TRoot, coerceToRouterRecord<$Value>> : never : never;
[TKey in keyof TRecord]: TRecord[TKey] extends AnyProcedure ? DecorateProcedure<TRoot, TRecord[TKey]> : TRecord[TKey] extends RouterRecord ? DecorateRouterRecord<TRoot, TRecord[TKey]> : never;
};

@@ -18,0 +18,0 @@ type Caller<TRouter extends AnyRouter> = ReturnType<RouterCaller<inferRouterRootTypes<TRouter>, TRouter['_def']['record']>>;

@@ -5,3 +5,3 @@ import type { DehydratedState, DehydrateOptions, QueryClient } from '@tanstack/react-query';

import { type TransformerOptions } from '@trpc/client/unstable-internals';
import type { AnyQueryProcedure, AnyRootTypes, AnyRouter, coerceToRouterRecord, inferClientTypes, inferRouterContext, ProtectedIntersection, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
import type { AnyQueryProcedure, AnyRootTypes, AnyRouter, inferClientTypes, inferRouterContext, ProtectedIntersection, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
import type { CreateTRPCReactQueryClientConfig, DecorateQueryProcedure } from '../shared';

@@ -21,3 +21,3 @@ type CreateSSGHelpersInternal<TRouter extends AnyRouter> = {

type DecoratedProcedureSSGRecord<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyQueryProcedure ? Pick<DecorateQueryProcedure<TRoot, $Value>, SSGFns> : $Value extends RouterRecord | AnyRouter ? DecoratedProcedureSSGRecord<TRoot, coerceToRouterRecord<$Value>> : never : never;
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? DecoratedProcedureSSGRecord<TRoot, $Value> : $Value extends AnyQueryProcedure ? Pick<DecorateQueryProcedure<TRoot, $Value>, SSGFns> : never : never;
};

@@ -24,0 +24,0 @@ /**

@@ -1,2 +0,2 @@

import type { AnyMutationProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, coerceToRouterRecord, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
import type { AnyMutationProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
import type { MutationLike } from './mutationLike';

@@ -9,4 +9,4 @@ import type { QueryLike } from './queryLike';

export type RouterLikeInner<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyMutationProcedure ? MutationLike<TRoot, $Value> : $Value extends AnyQueryProcedure ? QueryLike<TRoot, $Value> : $Value extends RouterRecord | AnyRouter ? RouterLikeInner<TRoot, coerceToRouterRecord<$Value>> : never : never;
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? RouterLikeInner<TRoot, $Value> : $Value extends AnyQueryProcedure ? QueryLike<TRoot, $Value> : $Value extends AnyMutationProcedure ? MutationLike<TRoot, $Value> : never : never;
};
//# sourceMappingURL=routerLike.d.ts.map
import { TRPCUntypedClient, type inferRouterClient, type TRPCClientError } from '@trpc/client';
import type { AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, coerceToRouterRecord, inferProcedureInput, inferTransformedProcedureOutput, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
import type { AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, inferProcedureInput, inferTransformedProcedureOutput, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
import type { TrpcQueryOptionsForUseQueries, TrpcQueryOptionsForUseSuspenseQueries } from '../../internals/useQueries';

@@ -9,3 +9,3 @@ type GetQueryOptions<TRoot extends AnyRootTypes, TProcedure extends AnyProcedure> = <TData = inferTransformedProcedureOutput<TRoot, TProcedure>>(input: inferProcedureInput<TProcedure>, opts?: TrpcQueryOptionsForUseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>) => TrpcQueryOptionsForUseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>;

export type UseQueriesProcedureRecord<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyQueryProcedure ? GetQueryOptions<TRoot, $Value> : $Value extends RouterRecord | AnyRouter ? UseQueriesProcedureRecord<TRoot, coerceToRouterRecord<$Value>> : never : never;
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? UseQueriesProcedureRecord<TRoot, $Value> : $Value extends AnyQueryProcedure ? GetQueryOptions<TRoot, $Value> : never : never;
};

@@ -17,3 +17,3 @@ type GetSuspenseQueryOptions<TRoot extends AnyRootTypes, TProcedure extends AnyQueryProcedure> = <TData = inferTransformedProcedureOutput<TRoot, TProcedure>>(input: inferProcedureInput<TProcedure>, opts?: TrpcQueryOptionsForUseSuspenseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>) => TrpcQueryOptionsForUseSuspenseQueries<inferTransformedProcedureOutput<TRoot, TProcedure>, TData, TRPCClientError<TRoot>>;

export type UseSuspenseQueriesProcedureRecord<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyQueryProcedure ? GetSuspenseQueryOptions<TRoot, $Value> : $Value extends RouterRecord | AnyRouter ? UseSuspenseQueriesProcedureRecord<TRoot, coerceToRouterRecord<$Value>> : never : never;
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? UseSuspenseQueriesProcedureRecord<TRoot, $Value> : $Value extends AnyQueryProcedure ? GetSuspenseQueryOptions<TRoot, $Value> : never : never;
};

@@ -20,0 +20,0 @@ /**

import type { CancelOptions, InfiniteData, InvalidateOptions, InvalidateQueryFilters, Query, QueryFilters, QueryKey, RefetchOptions, RefetchQueryFilters, ResetOptions, SetDataOptions, SkipToken, Updater } from '@tanstack/react-query';
import type { TRPCClientError } from '@trpc/client';
import type { AnyMutationProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, coerceToRouterRecord, DeepPartial, inferProcedureInput, inferProcedureOutput, inferTransformedProcedureOutput, ProtectedIntersection, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
import type { AnyMutationProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, DeepPartial, inferProcedureInput, inferProcedureOutput, inferTransformedProcedureOutput, ProtectedIntersection, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
import type { DecoratedTRPCContextProps, TRPCContextState, TRPCFetchInfiniteQueryOptions, TRPCFetchQueryOptions, TRPCQueryUtils } from '../../internals/context';

@@ -126,3 +126,3 @@ import type { QueryKeyKnown, QueryType } from '../../internals/getQueryKey';

export type DecoratedProcedureUtilsRecord<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = DecorateRouter & {
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyMutationProcedure ? DecorateMutationProcedure<TRoot, $Value> : $Value extends AnyQueryProcedure ? DecorateQueryProcedure<TRoot, $Value> : $Value extends RouterRecord | AnyRouter ? DecoratedProcedureUtilsRecord<TRoot, coerceToRouterRecord<$Value>> & DecorateRouter : never : never;
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? DecoratedProcedureUtilsRecord<TRoot, $Value> & DecorateRouter : $Value extends AnyQueryProcedure ? DecorateQueryProcedure<TRoot, $Value> : $Value extends AnyMutationProcedure ? DecorateMutationProcedure<TRoot, $Value> : never : never;
};

@@ -129,0 +129,0 @@ type AnyDecoratedProcedure = DecorateQueryProcedure<any, any> & DecorateMutationProcedure<any, any>;

import type { TRPCClientErrorLike } from '@trpc/client';
import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, coerceToRouterRecord, inferProcedureInput, inferTransformedProcedureOutput, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootTypes, AnyRouter, inferProcedureInput, inferTransformedProcedureOutput, RouterRecord } from '@trpc/server/unstable-core-do-not-import';
import type { UseTRPCMutationOptions, UseTRPCMutationResult, UseTRPCQueryOptions, UseTRPCQueryResult } from '../shared';

@@ -21,3 +21,3 @@ /**

type inferReactQueryProcedureOptionsInner<TRoot extends AnyRootTypes, TRecord extends RouterRecord> = {
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyQueryProcedure ? InferQueryOptions<TRoot, $Value> : $Value extends AnyMutationProcedure ? InferMutationOptions<TRoot, $Value> : $Value extends RouterRecord | AnyRouter ? inferReactQueryProcedureOptionsInner<TRoot, coerceToRouterRecord<$Value>> : never : never;
[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends RouterRecord ? inferReactQueryProcedureOptionsInner<TRoot, $Value> : $Value extends AnyMutationProcedure ? InferMutationOptions<TRoot, $Value> : $Value extends AnyQueryProcedure ? InferQueryOptions<TRoot, $Value> : never : never;
};

@@ -24,0 +24,0 @@ export type inferReactQueryProcedureOptions<TRouter extends AnyRouter> = inferReactQueryProcedureOptionsInner<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>;

{
"name": "@trpc/react-query",
"version": "11.0.0-alpha-tmp-01-21-trpc-monorepo-prebuilt.739+b648648f8",
"version": "11.0.0-alpha-tmp-01-22-fix.719+3aba9dfa0",
"description": "The tRPC React library",

@@ -68,4 +68,4 @@ "author": "KATT",

"@tanstack/react-query": "^5.62.8",
"@trpc/client": "11.0.0-alpha-tmp-01-21-trpc-monorepo-prebuilt.739+b648648f8",
"@trpc/server": "11.0.0-alpha-tmp-01-21-trpc-monorepo-prebuilt.739+b648648f8",
"@trpc/client": "11.0.0-alpha-tmp-01-22-fix.719+3aba9dfa0",
"@trpc/server": "11.0.0-alpha-tmp-01-22-fix.719+3aba9dfa0",
"react": ">=18.2.0",

@@ -77,4 +77,4 @@ "react-dom": ">=18.2.0",

"@tanstack/react-query": "^5.62.8",
"@trpc/client": "11.0.0-alpha-tmp-01-21-trpc-monorepo-prebuilt.739+b648648f8",
"@trpc/server": "11.0.0-alpha-tmp-01-21-trpc-monorepo-prebuilt.739+b648648f8",
"@trpc/client": "11.0.0-alpha-tmp-01-22-fix.719+3aba9dfa0",
"@trpc/server": "11.0.0-alpha-tmp-01-22-fix.719+3aba9dfa0",
"@types/express": "^4.17.17",

@@ -100,3 +100,3 @@ "@types/node": "^22.9.0",

],
"gitHead": "b648648f888f5f458d32402ef006787616c1b080"
"gitHead": "3aba9dfa047316926e28ad9b8bca5c95bb939812"
}

@@ -18,3 +18,2 @@ import type {

AnyRouter,
coerceToRouterRecord,
inferClientTypes,

@@ -69,6 +68,7 @@ inferRouterContext,

[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
? $Value extends AnyQueryProcedure
? Pick<DecorateQueryProcedure<TRoot, $Value>, SSGFns>
: $Value extends RouterRecord | AnyRouter
? DecoratedProcedureSSGRecord<TRoot, coerceToRouterRecord<$Value>>
? $Value extends RouterRecord
? DecoratedProcedureSSGRecord<TRoot, $Value>
: // utils only apply to queries
$Value extends AnyQueryProcedure
? Pick<DecorateQueryProcedure<TRoot, $Value>, SSGFns>
: never

@@ -75,0 +75,0 @@ : never;

@@ -6,3 +6,2 @@ import type {

AnyRouter,
coerceToRouterRecord,
RouterRecord,

@@ -25,8 +24,8 @@ } from '@trpc/server/unstable-core-do-not-import';

[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
? $Value extends AnyMutationProcedure
? MutationLike<TRoot, $Value>
? $Value extends RouterRecord
? RouterLikeInner<TRoot, $Value>
: $Value extends AnyQueryProcedure
? QueryLike<TRoot, $Value>
: $Value extends RouterRecord | AnyRouter
? RouterLikeInner<TRoot, coerceToRouterRecord<$Value>>
: $Value extends AnyMutationProcedure
? MutationLike<TRoot, $Value>
: never

@@ -33,0 +32,0 @@ : never;

@@ -13,3 +13,2 @@ import type { QueryOptions } from '@tanstack/react-query';

AnyRouter,
coerceToRouterRecord,
inferProcedureInput,

@@ -51,6 +50,6 @@ inferTransformedProcedureOutput,

[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
? $Value extends AnyQueryProcedure
? GetQueryOptions<TRoot, $Value>
: $Value extends RouterRecord | AnyRouter
? UseQueriesProcedureRecord<TRoot, coerceToRouterRecord<$Value>>
? $Value extends RouterRecord
? UseQueriesProcedureRecord<TRoot, $Value>
: $Value extends AnyQueryProcedure
? GetQueryOptions<TRoot, $Value>
: never

@@ -84,6 +83,6 @@ : never;

[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
? $Value extends AnyQueryProcedure
? GetSuspenseQueryOptions<TRoot, $Value>
: $Value extends RouterRecord | AnyRouter
? UseSuspenseQueriesProcedureRecord<TRoot, coerceToRouterRecord<$Value>>
? $Value extends RouterRecord
? UseSuspenseQueriesProcedureRecord<TRoot, $Value>
: $Value extends AnyQueryProcedure
? GetSuspenseQueryOptions<TRoot, $Value>
: never

@@ -90,0 +89,0 @@ : never;

@@ -23,3 +23,2 @@ import type {

AnyRouter,
coerceToRouterRecord,
DeepPartial,

@@ -403,9 +402,8 @@ inferProcedureInput,

[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
? $Value extends AnyMutationProcedure
? DecorateMutationProcedure<TRoot, $Value>
? $Value extends RouterRecord
? DecoratedProcedureUtilsRecord<TRoot, $Value> & DecorateRouter
: $Value extends AnyQueryProcedure
? DecorateQueryProcedure<TRoot, $Value>
: $Value extends RouterRecord | AnyRouter
? DecoratedProcedureUtilsRecord<TRoot, coerceToRouterRecord<$Value>> &
DecorateRouter
: $Value extends AnyMutationProcedure
? DecorateMutationProcedure<TRoot, $Value>
: never

@@ -412,0 +410,0 @@ : never;

@@ -8,3 +8,2 @@ import type { TRPCClientErrorLike } from '@trpc/client';

AnyRouter,
coerceToRouterRecord,
inferProcedureInput,

@@ -82,11 +81,8 @@ inferTransformedProcedureOutput,

[TKey in keyof TRecord]: TRecord[TKey] extends infer $Value
? $Value extends AnyQueryProcedure
? InferQueryOptions<TRoot, $Value>
? $Value extends RouterRecord
? inferReactQueryProcedureOptionsInner<TRoot, $Value>
: $Value extends AnyMutationProcedure
? InferMutationOptions<TRoot, $Value>
: $Value extends RouterRecord | AnyRouter
? inferReactQueryProcedureOptionsInner<
TRoot,
coerceToRouterRecord<$Value>
>
: $Value extends AnyQueryProcedure
? InferQueryOptions<TRoot, $Value>
: never

@@ -93,0 +89,0 @@ : never;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc