feat: Add support for Custom tsconfig.json, Resolve extended configs
This addresses both https://github.com/oclif/oclif/issues/299 and https://github.com/oclif/oclif/issues/488
loadTSConfig() in src/ts-node.ts was not properly resolving extended configuration files, because while parseConfigFileTextToJson will load and parse a given tsconfig.json file, it does not merge compilerOptions from configs specified in the extends option.
This implementation is based on the solutions suggested in https://github.com/microsoft/TypeScript/issues/5276
and https://stackoverflow.com/questions/53804566/how-to-get-compileroptions-from-tsconfig-json which rely on Typescript's utilities for loading and parsing tsconfig.json files.
Specifically, by adding a call to parseJsonConfigFileContent(), the merged compilerOptions will be resolved as expected.
Additionally, this adds support for user-defined tsconfig files through the tsConfig option under oclif key in their package.json.
Thanks for the contribution! Before we can merge this, we need @Saeris to sign the Salesforce.com Contributor License Agreement.
I'm not sure what is causing the tests in https://github.com/oclif/config/blob/master/test/typescript.test.ts to fail. Some guidance here would be appreciated.
Should also be noted that I bumped typescript up to the latest version. This facilitates importing the official CompilerOptions type definition. It should also allow for ts-node to compile the latest supported syntax/typescript features. In my own development with Oclif I've noticed that it won't compile commands that use Optional Chaining syntax. I haven't tested whether this change resolves that specific issue.
Is oclif actively maintained?