Closed zermelo-wisen closed 9 months ago
I'm very wary of pulling in whole typescript — it's quite large and will make the recommended usage with npx particularly more inconvenient. I'd look into other ways of parsing it — tsconfck looks promising.
BTW, any change like this should include test cases that didn't work before and now do.
I dropped typescript
and strip-json-comments
libraries and added json5
for parsing the tsconfig.json
.
For the test case, I added a trailing comma to the tsconfig.json
in test/typescript-esm
, since tsconfig parsing code path is covered with the "esm-loader is loaded when required"
integration test in typescript-esm.test.ts
.
:tada: This PR is included in version 2.16.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Fixes #91
tsconfig.json
cannot be parsed withJSON.parse
properly. It can have trailing comma which is not legal in JSON. Usetypescript.readConfigFile
instead.