@trpc/upgrade
v11.32.2
Published
Upgrade scripts for tRPC
Readme
@trpc/upgrade
Moves an app from @trpc/react-query (and @trpc/next's createTRPCNext) to @trpc/tanstack-react-query:
npx @trpc/upgrade --yesSee the migration guide.
Development
run locally with source files
DEV=1 pnpx tsx path/to/bin/index.ts
# example
cd examples/minimal-react/client && DEV=1 pnpx tsx ../../../packages/upgrade/src/bin/index.ts --force --skipTanstackQuery --verboseor compiled
cd packages/upgrade
pnpm build && pnpm link .
# in an app somewhere
pnpm link @trpc/upgrade && pnpm trpc-upgradeUpgrade Testing 101
A test is a composite of up to 4 files:
myTest.tsxdefines a component to transformmyTest.snap.tsxstores the output of the transform using standard vitest snapshot testingmyTest.trpc.tsx(Optional) stores your trpc appRouter config and test servermyTest.spec.tsx(Optional but recommended) a function which will test both the input and transformed components
Sponsors
If you enjoy working with tRPC and want to support us, consider giving a token appreciation by GitHub Sponsors!
