jgoux
jgoux
Explore posts from servers
DDeno
Created by jgoux on 9/2/2024 in #help
Userland V8 snapshots
Hello Deno community 👋, Is there any way to take a v8 snapshot of a script using Deno (similar to node's --build-snapshot). I'm interested in using deno for this because of this PR: https://github.com/denoland/deno/pull/17460 Node.js snapshots doesn't support ES modules. 🙂 My goal is to speed up my script startup time which makes heavy operations during its initialization.
2 replies
TtRPC
Created by jgoux on 2/7/2024 in #❓-help
Private API, public clients
Hey everyone, we're about to OSS some good stuff at my company and I'm wondering what's the best approach to ship public libraries (like a CLI) which are communicating with a private tRPC powered API. It seems like today, trpc-openapi would be my best option? Like generating an openapi spec and using a typesafe openapi client generated with this spec?
2 replies
TtRPC
Created by jgoux on 10/18/2023 in #❓-help
tRPC and OpenTelemetry
Does anyone have experience with instrumenting tRPC with OTEL for tracing? It would be pretty neat to have an auto-instrumentation package like Prisma did : https://www.npmjs.com/package/@prisma/instrumentation
8 replies
TTCTheo's Typesafe Cult
Created by jgoux on 5/17/2023 in #questions
Making Next.js loves my custom conditional exports
Hello 👋, I'm trying to fiddle with the Next.js webpack config to have the resolution follow my custom condition in package.json#exports. Normally with webpack it would be as simple as putting the value in config.resolve.conditionNames, but it doesn't seem to work, my package is still not resolved. Does anyone has experience with this? The goal is to be able to load another package from my monorepo, I use the custom condition to point to the TS entry file instead of the dist one in dev. 👍 I'm already using transpilePackages.
6 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
Hello all, When using pnpm in a TypeScript monorepo without node-linker, I hit those errors:
web/src/lib/trpc.tsx:7:14 - error TS2742: The inferred type of 'trpc' cannot be named without a reference to '../../../api/node_modules/@snaplet/sdk/src'. This is likely not portable. A type annotation is necessary.

7 export const trpc = createReactQueryHooks<WebRouter>()
web/src/lib/trpc.tsx:7:14 - error TS2742: The inferred type of 'trpc' cannot be named without a reference to '../../../api/node_modules/@snaplet/sdk/src'. This is likely not portable. A type annotation is necessary.

7 export const trpc = createReactQueryHooks<WebRouter>()
Types sharing between packages when using pnpm + TypeScript is quite broken, and I'm not sure what's the best move to solve it. Ideally I shouldn't have to alter my compilerOptions.paths, or install extra deps in the root. 😅 I opened a discussion about it here if you want to participate: https://github.com/orgs/pnpm/discussions/6367
24 replies
TtRPC
Created by jgoux on 4/7/2023 in #❓-help
Codemod to v10 is not modifying any file
Hello 👋, I must be super dumb but running pnpm dlx trpc-v10-migrate-codemod in my project isn't applying any change. I see all the files listed as "migrated" but nothing is saved on disk?
1 replies
TtRPC
Created by jgoux on 4/7/2023 in #❓-help
No overload matches this call when outputting unions
14 replies