discord-questions.trpc.io/m/1035145791980970004

Preview meta tags from the discord-questions.trpc.io website.

Linked Hostnames

4

Thumbnail

Search Engine Appearance

Google

https://discord-questions.trpc.io/m/1035145791980970004

v10 migration using codemod - tRPC

So I've been looking at the codemod that helps with transition towards v10 and I haven't been able to get it to work, my setup (simplified): ```md // the following structure is inside /server/trpc/src ├── context.ts // createContext ├── index.ts // main router entry point, this mainly does .merge calls to subrouters (auth.router.ts) ├── middlewares │ └── meta-routers.ts // this is where I'm exporting createPrivateRouter ├── utils │ └── trpc.ts // this is where I'm calling initializing v10 stuff ( exporting mergeRouters, privateProcedure... ) ├── routers │ ├── auth │ │ ├── auth.router.ts // subrouter that merges every procedure in the subfolder (signin.ts) │ │ ├── auth.router.test.ts // tests for this specific router ( using .createCaller() calls ) │ │ ├── procedures │ │ │ └── signin.ts // this exports a single procedure using `export default createPrivateRouter.query('....')` ``` Running the following command while in `/server/trpc/` ``` npx trpc-v10-migrate-codemod \ --router-factory createPrivateRouter \ --base-procedure privateProcedure \ --import privateProcedure:~/src/utils/trpc ``` So after running this, every file in the project is printed to the console i.e. `migrated ...../server/trpc/src/routers/auth.router.ts`, however, the only files that are changed are the test files (the ones using `.createCaller()`), those are migrated correctly. Not sure what is wrong, maybe I'm overlooking something. Any help is greatly appreciated.



Bing

v10 migration using codemod - tRPC

https://discord-questions.trpc.io/m/1035145791980970004

So I've been looking at the codemod that helps with transition towards v10 and I haven't been able to get it to work, my setup (simplified): ```md // the following structure is inside /server/trpc/src ├── context.ts // createContext ├── index.ts // main router entry point, this mainly does .merge calls to subrouters (auth.router.ts) ├── middlewares │ └── meta-routers.ts // this is where I'm exporting createPrivateRouter ├── utils │ └── trpc.ts // this is where I'm calling initializing v10 stuff ( exporting mergeRouters, privateProcedure... ) ├── routers │ ├── auth │ │ ├── auth.router.ts // subrouter that merges every procedure in the subfolder (signin.ts) │ │ ├── auth.router.test.ts // tests for this specific router ( using .createCaller() calls ) │ │ ├── procedures │ │ │ └── signin.ts // this exports a single procedure using `export default createPrivateRouter.query('....')` ``` Running the following command while in `/server/trpc/` ``` npx trpc-v10-migrate-codemod \ --router-factory createPrivateRouter \ --base-procedure privateProcedure \ --import privateProcedure:~/src/utils/trpc ``` So after running this, every file in the project is printed to the console i.e. `migrated ...../server/trpc/src/routers/auth.router.ts`, however, the only files that are changed are the test files (the ones using `.createCaller()`), those are migrated correctly. Not sure what is wrong, maybe I'm overlooking something. Any help is greatly appreciated.



DuckDuckGo

https://discord-questions.trpc.io/m/1035145791980970004

v10 migration using codemod - tRPC

So I've been looking at the codemod that helps with transition towards v10 and I haven't been able to get it to work, my setup (simplified): ```md // the following structure is inside /server/trpc/src ├── context.ts // createContext ├── index.ts // main router entry point, this mainly does .merge calls to subrouters (auth.router.ts) ├── middlewares │ └── meta-routers.ts // this is where I'm exporting createPrivateRouter ├── utils │ └── trpc.ts // this is where I'm calling initializing v10 stuff ( exporting mergeRouters, privateProcedure... ) ├── routers │ ├── auth │ │ ├── auth.router.ts // subrouter that merges every procedure in the subfolder (signin.ts) │ │ ├── auth.router.test.ts // tests for this specific router ( using .createCaller() calls ) │ │ ├── procedures │ │ │ └── signin.ts // this exports a single procedure using `export default createPrivateRouter.query('....')` ``` Running the following command while in `/server/trpc/` ``` npx trpc-v10-migrate-codemod \ --router-factory createPrivateRouter \ --base-procedure privateProcedure \ --import privateProcedure:~/src/utils/trpc ``` So after running this, every file in the project is printed to the console i.e. `migrated ...../server/trpc/src/routers/auth.router.ts`, however, the only files that are changed are the test files (the ones using `.createCaller()`), those are migrated correctly. Not sure what is wrong, maybe I'm overlooking something. Any help is greatly appreciated.

  • General Meta Tags

    6
    • title
      v10 migration using codemod - tRPC
    • charset
      utf-8
    • viewport
      width=device-width, initial-scale=1
    • next-size-adjust
    • description
      So I've been looking at the codemod that helps with transition towards v10 and I haven't been able to get it to work, my setup (simplified): ```md // the following structure is inside /server/trpc/src ├── context.ts // createContext ├── index.ts // main router entry point, this mainly does .merge calls to subrouters (auth.router.ts) ├── middlewares │ └── meta-routers.ts // this is where I'm exporting createPrivateRouter ├── utils │ └── trpc.ts // this is where I'm calling initializing v10 stuff ( exporting mergeRouters, privateProcedure... ) ├── routers │ ├── auth │ │ ├── auth.router.ts // subrouter that merges every procedure in the subfolder (signin.ts) │ │ ├── auth.router.test.ts // tests for this specific router ( using .createCaller() calls ) │ │ ├── procedures │ │ │ └── signin.ts // this exports a single procedure using `export default createPrivateRouter.query('....')` ``` Running the following command while in `/server/trpc/` ``` npx trpc-v10-migrate-codemod \ --router-factory createPrivateRouter \ --base-procedure privateProcedure \ --import privateProcedure:~/src/utils/trpc ``` So after running this, every file in the project is printed to the console i.e. `migrated ...../server/trpc/src/routers/auth.router.ts`, however, the only files that are changed are the test files (the ones using `.createCaller()`), those are migrated correctly. Not sure what is wrong, maybe I'm overlooking something. Any help is greatly appreciated.
  • Open Graph Meta Tags

    3
    • og:title
      v10 migration using codemod - tRPC
    • og:description
      So I've been looking at the codemod that helps with transition towards v10 and I haven't been able to get it to work, my setup (simplified): ```md // the following structure is inside /server/trpc/src ├── context.ts // createContext ├── index.ts // main router entry point, this mainly does .merge calls to subrouters (auth.router.ts) ├── middlewares │ └── meta-routers.ts // this is where I'm exporting createPrivateRouter ├── utils │ └── trpc.ts // this is where I'm calling initializing v10 stuff ( exporting mergeRouters, privateProcedure... ) ├── routers │ ├── auth │ │ ├── auth.router.ts // subrouter that merges every procedure in the subfolder (signin.ts) │ │ ├── auth.router.test.ts // tests for this specific router ( using .createCaller() calls ) │ │ ├── procedures │ │ │ └── signin.ts // this exports a single procedure using `export default createPrivateRouter.query('....')` ``` Running the following command while in `/server/trpc/` ``` npx trpc-v10-migrate-codemod \ --router-factory createPrivateRouter \ --base-procedure privateProcedure \ --import privateProcedure:~/src/utils/trpc ``` So after running this, every file in the project is printed to the console i.e. `migrated ...../server/trpc/src/routers/auth.router.ts`, however, the only files that are changed are the test files (the ones using `.createCaller()`), those are migrated correctly. Not sure what is wrong, maybe I'm overlooking something. Any help is greatly appreciated.
    • og:image
      https://discord-questions.trpc.io/og/post?id=1035145791980970004
  • Twitter Meta Tags

    4
    • twitter:card
      summary_large_image
    • twitter:title
      v10 migration using codemod - tRPC
    • twitter:description
      So I've been looking at the codemod that helps with transition towards v10 and I haven't been able to get it to work, my setup (simplified): ```md // the following structure is inside /server/trpc/src ├── context.ts // createContext ├── index.ts // main router entry point, this mainly does .merge calls to subrouters (auth.router.ts) ├── middlewares │ └── meta-routers.ts // this is where I'm exporting createPrivateRouter ├── utils │ └── trpc.ts // this is where I'm calling initializing v10 stuff ( exporting mergeRouters, privateProcedure... ) ├── routers │ ├── auth │ │ ├── auth.router.ts // subrouter that merges every procedure in the subfolder (signin.ts) │ │ ├── auth.router.test.ts // tests for this specific router ( using .createCaller() calls ) │ │ ├── procedures │ │ │ └── signin.ts // this exports a single procedure using `export default createPrivateRouter.query('....')` ``` Running the following command while in `/server/trpc/` ``` npx trpc-v10-migrate-codemod \ --router-factory createPrivateRouter \ --base-procedure privateProcedure \ --import privateProcedure:~/src/utils/trpc ``` So after running this, every file in the project is printed to the console i.e. `migrated ...../server/trpc/src/routers/auth.router.ts`, however, the only files that are changed are the test files (the ones using `.createCaller()`), those are migrated correctly. Not sure what is wrong, maybe I'm overlooking something. Any help is greatly appreciated.
    • twitter:image
      https://discord-questions.trpc.io/og/post?id=1035145791980970004
  • Link Tags

    8
    • canonical
      https://discord-questions.trpc.io/m/1035145791980970004
    • icon
      https://cdn.answeroverflow.com/867764511159091230/6af104c7f0f39a12fcd55bd7bd28928f/icon.png
    • preload
      https://www.answeroverflow.com/_next/static/media/4f05ba3a6752a328-s.p.woff2
    • preload
      https://www.answeroverflow.com/_next/static/media/9cf9c6e84ed13b5e-s.p.woff2
    • preload
      /discord/4.png

Links

6