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 new typescript projects with special characters in path #14093

Merged
merged 4 commits into from
Aug 18, 2022

Conversation

innerdvations
Copy link
Contributor

What does it do?

Fixes the problem with new typescript projects having a period or space in the path not working by changing the included files in the .tsconfig for new typescript projects

Why is it needed?

New typescript projects in paths with a period (.) or a space currently fail to build.

npx create-strapi-app foo.bar --typescript
npx create-strapi-app "bar foo" --typescript
both have a problem when Strapi attempts to run tsc.

I'm actually uncertain exactly why this change is needed because it shouldn't be; it doesn't seem to be an issue with Strapi, it seems to be an issue with tsc because tsc itself is throwing the error only when the path has special characters, but this workaround seems to fix it.

How to test it?

Use this branch and run either of these commands:

npx create-strapi-app foo.bar --typescript
npx create-strapi-app "bar foo" --typescript

Related issue(s)/PR(s)

Paths with periods:
#13237

I have seen other issues regarding spaces in the path, but couldn't find them

This PR fixes a separate issue with paths on Windows:
#14088

@codecov
Copy link

codecov bot commented Aug 12, 2022

Codecov Report

Merging #14093 (1e3144b) into main (fc863ac) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main   #14093   +/-   ##
=======================================
  Coverage   55.58%   55.58%           
=======================================
  Files        1275     1275           
  Lines       31829    31829           
  Branches     5733     5733           
=======================================
  Hits        17692    17692           
  Misses      12323    12323           
  Partials     1814     1814           
Flag Coverage Δ
front 58.13% <ø> (ø)
unit 49.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Bassel17 Bassel17 added pr: fix This PR is fixing a bug source: typescript Source is related to TypeScript (typings, tooling, ...) labels Aug 16, 2022
@innerdvations innerdvations merged commit d980dbf into main Aug 18, 2022
@innerdvations innerdvations deleted the fix/typescript-special-char-path branch August 18, 2022 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix This PR is fixing a bug source: typescript Source is related to TypeScript (typings, tooling, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants