-
Notifications
You must be signed in to change notification settings - Fork 847
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
chore: improve windows compatibility of update-ts-config #3475
Conversation
Change update-ts-config script to generate posix path also on windows to avoid that tsconfig.json files are wrongly modified.
2622466
to
1f869bd
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3475 +/- ##
==========================================
+ Coverage 93.68% 93.76% +0.07%
==========================================
Files 247 248 +1
Lines 7537 7566 +29
Branches 1575 1580 +5
==========================================
+ Hits 7061 7094 +33
+ Misses 476 472 -4
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing the windows compatibility!
writeJSON(tsconfigPath, tsconfig, dryRun); | ||
|
||
for (const tsconfigName of ['tsconfig.esm.json', 'tsconfig.esnext.json']) { | ||
const tsconfigPath = path.join(pkgRoot, tsconfigName); | ||
const tsconfig = readJSON(tsconfigPath); | ||
const references = Array.from(lernaProjects.values()) | ||
.filter(it => it.isTsProject && it.hasMultiTarget) | ||
.map(it => path.relative(pkgRoot, path.join(projectRoot, it.dir))).sort(); | ||
.map(it => toPosix(path.relative(pkgRoot, path.join(projectRoot, it.dir)))).sort(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicated with line 119.
.map(it => toPosix(path.relative(pkgRoot, path.join(projectRoot, it.dir)))).sort(); | |
.map(it => path.relative(pkgRoot, path.join(projectRoot, it.dir))).sort(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to late - @dyladan merged already...
@@ -99,23 +100,23 @@ function writeRootTsConfigJson(pkgRoot, projectRoot, lernaProjects) { | |||
const tsconfig = readJSON(tsconfigPath); | |||
const references = Array.from(lernaProjects.values()) | |||
.filter(it => it.isTsProject) | |||
.map(it => path.relative(pkgRoot, path.join(projectRoot, it.dir))).sort(); | |||
.map(it => toPosix(path.relative(pkgRoot, path.join(projectRoot, it.dir)))).sort(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicated with line 105:
.map(it => toPosix(path.relative(pkgRoot, path.join(projectRoot, it.dir)))).sort(); | |
.map(it => path.relative(pkgRoot, path.join(projectRoot, it.dir))).sort(); |
Change update-ts-config script to generate posix path also on windows to avoid that tsconfig.json files are wrongly modified.