Comparing version 0.4.0 to 0.4.1
@@ -18,3 +18,3 @@ "use strict"; | ||
const compilerOptions = (0, utils_1.resolveCompilerOptions)(testFilePath); | ||
const program = ts.createProgram([testFilePath], compilerOptions); | ||
const program = ts.createProgram([testFilePath], compilerOptions || {}); | ||
const syntacticDiagnostics = program.getSyntacticDiagnostics(); | ||
@@ -21,0 +21,0 @@ if (syntacticDiagnostics.length !== 0) { |
import * as ts from "@tsd/typescript"; | ||
export declare function resolveCompilerOptions(searchPath: string): ts.CompilerOptions; | ||
export declare function resolveCompilerOptions(searchPath: string): ts.CompilerOptions | undefined; |
@@ -10,3 +10,3 @@ "use strict"; | ||
if (configPath === undefined) { | ||
return { compilerOptions: {}, configDiagnostics: [] }; | ||
return; | ||
} | ||
@@ -13,0 +13,0 @@ const sourceFile = ts.readJsonConfigFile(configPath, ts.sys.readFile); |
@@ -5,2 +5,10 @@ # Changelog | ||
## [0.4.1](https://github.com/mrazauskas/tsd-lite/compare/v0.4.0...v0.4.1) (2022-01-17) | ||
### Bug Fixes | ||
- resolve compiler options correctly if `tsconfig.json` is not found. | ||
## [0.4.0](https://github.com/mrazauskas/tsd-lite/compare/v0.3.0...v0.4.0) (2022-01-17) | ||
### ⚠ BREAKING CHANGES | ||
@@ -7,0 +15,0 @@ |
{ | ||
"name": "tsd-lite", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Test your TypeScript types easily", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
29340