{"id":15641767,"url":"https://github.com/sachinraja/trpc-v10-migrate-codemod","last_synced_at":"2025-10-07T09:53:45.499Z","repository":{"id":59863895,"uuid":"532788310","full_name":"sachinraja/trpc-v10-migrate-codemod","owner":"sachinraja","description":"codemod to migrate your tRPC codebase from v9 to v10","archived":false,"fork":false,"pushed_at":"2025-05-19T22:53:42.000Z","size":138,"stargazers_count":69,"open_issues_count":9,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-21T04:58:07.806Z","etag":null,"topics":["codemod","trpc"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sachinraja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"sachinraja"}},"created_at":"2022-09-05T07:23:22.000Z","updated_at":"2024-09-12T14:33:04.000Z","dependencies_parsed_at":"2022-09-23T20:50:37.488Z","dependency_job_id":"70eb50a8-21e6-41c3-b557-e2a2a2c5f4f9","html_url":"https://github.com/sachinraja/trpc-v10-migrate-codemod","commit_stats":{"total_commits":115,"total_committers":5,"mean_commits":23.0,"dds":0.3913043478260869,"last_synced_commit":"44e4a4f8722de75d346402f69bd58ce79c329011"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/sachinraja/trpc-v10-migrate-codemod","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachinraja%2Ftrpc-v10-migrate-codemod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachinraja%2Ftrpc-v10-migrate-codemod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachinraja%2Ftrpc-v10-migrate-codemod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachinraja%2Ftrpc-v10-migrate-codemod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sachinraja","download_url":"https://codeload.github.com/sachinraja/trpc-v10-migrate-codemod/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachinraja%2Ftrpc-v10-migrate-codemod/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278755164,"owners_count":26040034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codemod","trpc"],"created_at":"2024-10-03T11:45:01.323Z","updated_at":"2025-10-07T09:53:45.483Z","avatar_url":"https://github.com/sachinraja.png","language":"TypeScript","funding_links":["https://github.com/sponsors/sachinraja"],"categories":[],"sub_categories":[],"readme":"# trpc-v10-migrate-codemod\n\ncodemod to migrate your tRPC codebase from v9 to v10\n\nThis codemod **will not** perform a complete transformation. Rather, it is meant to help you with the most straightforward changes. Additionally, please examine the transformed code to ensure that it is correct.\n\n## Usage\n\n```sh\nnpx trpc-v10-migrate-codemod\n```\n\n\u003e **Warning**\n\u003e It is recommended to run this codemod on a clean branch to ensure your changes are not lost.\n\nThis command will migrate all files included in your `tsconfig.json` to v10.\n\nCurrent transformations:\n\n- v9 router to v10 router\n- v9 React client to v10 proxy React client\n- `createCaller` to proxy caller\n\n### Options\n\nRun `npx trpc-v10-migrate-codemod --help` to see all options.\n\n`--tsconfig-path` - path to your `tsconfig.json` file (default = 'tsconfig.json')\n\n`--react-namespace` - namespace of your tRPC React hooks (can be specified multiple times) (default = 'trpc')\n\n- setting this to an empty string (`--react-namespace=''`) will match hooks without a namespace like `useQuery()` and `useMutation()`\n\n`--caller-namespace` - namespace of your tRPC `createCaller`s (i.e. `const caller = appRouter.createCaller()`) (can be specified multiple times) (default = 'caller')\n\n`--context-namespace` - namespace of your tRPC context helpers (i.e. `const utils = trpc.useContext()`) (can be specified multiple times) (default = 'utils')\n\n`--router-factory` - the function you use to create your routers (i.e. `createRouter`, `createProtectedRouter`) (can be specified multiple times) (default = ['router'])\n\n`--base-procedure` - the base procedure unit for v10 (i.e. `adminProcedure`) (default = 't.procedure')\n\n`--import` - named import to add to the top of every file with a transformed router (can be specified multiple times)\n\n- structure is [named import]:[module specifier]\n- example: `--import t:~/server/trpc --import adminProcedure:~/server/trpc`\n\n`--remove-import` - named import to remove from every file with a transformed router (can be specified multiple times)\n\n- structure is [named import]:[module specifier]\n- example: `--remove-import createRouter:~/server/trpc`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsachinraja%2Ftrpc-v10-migrate-codemod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsachinraja%2Ftrpc-v10-migrate-codemod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsachinraja%2Ftrpc-v10-migrate-codemod/lists"}