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

Always use POSIX path separator when printing types #8439

Merged
merged 3 commits into from
Mar 30, 2023
Merged

Conversation

borisno2
Copy link
Member

@borisno2 borisno2 commented Mar 29, 2023

#8381 added the ability to set an output path for Keystone types to be generated.
The generated types printed a relative path to the Prisma client when a prismaClientPath is provided.

On Windows, this would use \\ as the path separator, compared to / on POSIX operating systems.
Windows is interoperable with either. Using \\ resulted in unreadable path strings for Windows users.

This pull request changes the behaviour to always use a POSIX path separator (/), ensuring if types are committed to source control they are readable on both platforms, without any change in behaviour.

@changeset-bot

This comment was marked as resolved.

@borisno2 borisno2 force-pushed the always-print-posix branch 2 times, most recently from 2f7196d to 2c54760 Compare March 29, 2023 08:29
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 29, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7afa523:

Sandbox Source
@keystone-6/sandbox Configuration

@borisno2 borisno2 force-pushed the always-print-posix branch from e43f6d0 to 7afa523 Compare March 29, 2023 21:24
@borisno2 borisno2 marked this pull request as ready for review March 29, 2023 21:25
@borisno2 borisno2 changed the title Always use posix Path in Types Printer Always use posix Path Separator (/) in Types Printer Mar 29, 2023
@borisno2 borisno2 changed the title Always use posix Path Separator (/) in Types Printer Always use posix Path Separator in Types Printer Mar 29, 2023
@borisno2 borisno2 requested a review from dcousens March 30, 2023 00:12
@dcousens dcousens changed the title Always use posix Path Separator in Types Printer Always use POSIX path separator when printing types Mar 30, 2023
@dcousens dcousens merged commit 65254c5 into main Mar 30, 2023
@dcousens dcousens deleted the always-print-posix branch March 30, 2023 00:38
@dcousens dcousens added the 🐛 bug Unresolved bug label Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unresolved bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants