diff --git a/Development.md b/Development.md index f608081d..b6a437b6 100644 --- a/Development.md +++ b/Development.md @@ -41,6 +41,7 @@ First, make sure you are on the main branch and have no dirty changes. Next, run the `dev/bump-version` script to bump the version in package.json and push a git tag to trigger a CI job. + ``` ./dev/bump-version VERSION_TO_RELEASE # example: ./dev/bump-version 2.3.1 diff --git a/src/main.ts b/src/main.ts index abf9dd7a..cee9dbd7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -132,7 +132,10 @@ function indexSingleProject(options: ProjectOptions, cache: GlobalCache): void { return } } - config = loadConfigFile(tsconfigFileName) + const loadedConfig = loadConfigFile(tsconfigFileName) + if (loadedConfig !== undefined) { + config = loadedConfig + } } for (const projectReference of config.projectReferences || []) { @@ -155,7 +158,7 @@ if (require.main === module) { main() } -function loadConfigFile(file: string): ts.ParsedCommandLine { +function loadConfigFile(file: string): ts.ParsedCommandLine | undefined { const absolute = path.resolve(file) const readResult = ts.readConfigFile(absolute, path => ts.sys.readFile(path)) @@ -193,8 +196,8 @@ function loadConfigFile(file: string): ts.ParsedCommandLine { errors.push(error) } if (errors.length > 0) { - console.log({ absolute }) - throw new Error(ts.formatDiagnostics(errors, ts.createCompilerHost({}))) + console.log(ts.formatDiagnostics(errors, ts.createCompilerHost({}))) + return undefined } return result }