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

fix: generate POSIX paths in typesOverrides imports #533

Merged
merged 3 commits into from
Jul 18, 2023

Conversation

lucas-gregoire
Copy link
Contributor

@lucas-gregoire lucas-gregoire commented Jun 28, 2023

Describe the bug

Generated imports for typesOverrides contain backslashes instead of slashes on Windows.

image

Relates to #519

Expected behavior

Backslashes are invalid in TypeScript imports, so I expect it to generate the same import (with slashes) on both Unix systems and Windows.

Test case

  • CLI v2.2.1 on a Win 11
  • Add a typesOverrides configuration in your project
  • Then run pgtyped build.
  • You will see broken imports on top of generated TypeScript files

@lucas-gregoire
Copy link
Contributor Author

Hey @adelsz, do you think you could review and merge this PR ?

packages/cli/src/types.ts Outdated Show resolved Hide resolved
@adelsz adelsz merged commit 6c20fcb into adelsz:master Jul 18, 2023
@lucas-gregoire lucas-gregoire deleted the patch-1 branch July 25, 2023 16:12
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.

2 participants