Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: pnpm version upgrade and fix some fixme comments #5642

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodejs 20.10.0
pnpm 8.15.5
pnpm 9.0.4
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"private": true,
"engines": {
"node": "^20.10.0",
"pnpm": ">=8.15.5"
"pnpm": ">=9.0.0"
},
"packageManager": "pnpm@8.15.5",
"packageManager": "pnpm@9.0.4",
"scripts": {
"clean-dev": "pnpm clean && pnpm install && pnpm build && pnpm dev",
"build": "turbo --filter=\"@trpc/*\" --filter=\"!@trpc/tests\" build",
Expand Down
2 changes: 2 additions & 0 deletions packages/server/src/@trpc/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export {
type RouterRecord as TRPCRouterRecord,
type AnySubscriptionProcedure as AnyTRPCSubscriptionProcedure,
type ProcedureOptions as TRPCProcedureOptions,
type ErrorHandlerOptions as TRPCErrorHandlerOptions,
type CallerOverride as TRPCCallerOverride,
type MutationProcedure as TRPCMutationProcedure,
type QueryProcedure as TRPCQueryProcedure,
type SubscriptionProcedure as TRPCSubscriptionProcedure,
Expand Down
20 changes: 7 additions & 13 deletions packages/server/src/adapters/next-app-dir/nextAppDirCaller.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import type {
TRPCCallerOverride,
TRPCErrorHandlerOptions,
} from '../../@trpc/server';
import { getTRPCErrorFromUnknown, TRPCError } from '../../@trpc/server';
// FIXME: fix lint rule, this is ok
// eslint-disable-next-line no-restricted-imports
import type { ErrorHandlerOptions } from '../../unstable-core-do-not-import/procedure';
// FIXME: fix lint rule, this is ok
// eslint-disable-next-line no-restricted-imports
import type { CallerOverride } from '../../unstable-core-do-not-import/procedureBuilder';
// FIXME: fix lint rule, this is ok
// eslint-disable-next-line no-restricted-imports
import type {
MaybePromise,
Simplify,
} from '../../unstable-core-do-not-import/types';
import type { MaybePromise, Simplify } from '../../unstable-core-do-not-import';
import { formDataToObject } from './formDataToObject';
import { TRPCRedirectError } from './redirect';
import { rethrowNextErrors } from './rethrowNextErrors';
Expand All @@ -37,10 +31,10 @@ export function nextAppDirCaller<TContext>(
/**
* Called when an error occurs in the handler
*/
onError?: (opts: ErrorHandlerOptions<TContext>) => void;
onError?: (opts: TRPCErrorHandlerOptions<TContext>) => void;
} & ContextCallback<TContext>
>,
): CallerOverride<TContext> {
): TRPCCallerOverride<TContext> {
const {
normalizeFormData = true,

Expand Down