Skip to content

fix(packages/nestjs-trpc): support superjson transformer#61

Closed
Mnigos wants to merge 2 commits intoKevinEdry:mainfrom
Mnigos:main
Closed

fix(packages/nestjs-trpc): support superjson transformer#61
Mnigos wants to merge 2 commits intoKevinEdry:mainfrom
Mnigos:main

Conversation

@Mnigos
Copy link
Contributor

@Mnigos Mnigos commented Jan 25, 2025

This PR aims to fix support for superjson transformer

How to test it?

Go to any nestjs example, install superjson@1.13.3 and apply it on TRPCModule.

@vercel
Copy link

vercel bot commented Jan 25, 2025

@Mnigos is attempting to deploy a commit to the Kevin's Projects Team on Vercel.

A member of the Team first needs to authorize it.

@process-pca
Copy link
Collaborator

@Mnigos

I think there is a file that got missed by chance ? I tested these changes this morning and I had to update

// lib/trpc.module.ts

    if (options.autoSchemaFile != null) {
      const fileScanner = new FileScanner();
      const callerFilePath = fileScanner.getCallerFilePath();
      imports.push(
        GeneratorModule.forRoot({
          outputDirPath: options.autoSchemaFile,
          rootModuleFilePath: callerFilePath,
          schemaFileImports: options.schemaFileImports,
          transformer: options.transformer,  /* <--- Added Line */
          context: options.context,
        }),
      );
      

to have things fully work correctly both generation side as well as module side

@vercel
Copy link

vercel bot commented Mar 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nestjs-trpc-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 28, 2025 10:07pm

@KevinEdry
Copy link
Owner

Closing in favor of #87 which implements transformer auto-detection with a more comprehensive approach, released in v2.5.0.

@KevinEdry KevinEdry closed this Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants