Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types are not replaced in generated files. #166

Closed
ness-IgorsShestiperov opened this issue Oct 6, 2023 · 5 comments
Closed

Types are not replaced in generated files. #166

ness-IgorsShestiperov opened this issue Oct 6, 2023 · 5 comments
Labels
invalid This doesn't seem right question Further information is requested

Comments

@ness-IgorsShestiperov
Copy link

Hi,

I am using:

    "prisma": "^5.2.0",
    "prisma-json-types-generator": "^3.0.1",
    "typescript": "^5.2.2",

on mac. After build the result is still:

  /**
   * [VehicleLoanApplicationEntityPayload]
   */
  jsonData: Prisma.JsonValue

But that only happens on my machine. But other devs don't experience that issue. Maybe you have an idea of what can be the reason.

@arthurfiorette arthurfiorette added invalid This doesn't seem right question Further information is requested labels Oct 6, 2023
@arthurfiorette

This comment was marked as resolved.

@ness-IgorsShestiperov
Copy link
Author

ness-IgorsShestiperov commented Oct 9, 2023

Hi, sorry, was collecting info to add later.
I have found the problem. The bug is in source-path.ts:

 return path.resolve(
    // Complete filename?
    clientOutput.match(/\.(d?\.?t|j|)sx?/g)
      ? // dirname
        path.dirname(clientOutput)
      : // filename
        clientOutput,
    'index.d.ts'
  );

The path I have contains my name: /.../igors.shestiperov/.../

Regex is triggered and returns: Match: .s
clientOutput.match(/.(d?.?t|j|)sx?/g)

That result in wrong subfolder search : ../src/generated/prisma/index.d.ts'
instead of : ../src/generated/prisma/custom_folder

@arthurfiorette
Copy link
Owner

Thanks! I'll release a fix for it asap 👍🏻

@arthurfiorette
Copy link
Owner

Hey @ness-IgorsShestiperov I released v3.0.2, would you mind trying it out?

@ness-IgorsShestiperov
Copy link
Author

It works now, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants