omar-dulaimi / prisma-zod-generator

Prisma 2+ generator to emit Zod schemas from your Prisma schema
MIT License
535 stars 45 forks source link

Fix broken prisma-client import on windows #10

Closed altarrok closed 2 years ago

altarrok commented 2 years ago

Description

Making sure relative path uses POSIX seperators

This PR fixes the issue where relative paths generated for prisma-client imports can include a backslash \ which is being ignored as a character and thus resulting in an unusable import. The change makes sure that relative path uses POSIX separators instead of Windows separators by removing the existing separators and replacing them with POSIX separators

References

Issue: #9

Also my first OSS PR, please give feedback if anything is missing/incomplete, thanks! :)

omar-dulaimi commented 2 years ago

Also my first OSS PR

You did great. Well done!