kist 0.1.42 → 0.1.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,13 +43,14 @@ class TypeScriptCompilerAction extends Action_1.Action {
|
|
|
43
43
|
// **Properly Parse tsconfig.json**
|
|
44
44
|
const parsedConfig = this.loadAndParseTsConfig(resolvedTsconfigPath);
|
|
45
45
|
// Merge custom compiler options
|
|
46
|
-
const mergedCompilerOptions =
|
|
46
|
+
const mergedCompilerOptions = typescript_1.default.convertCompilerOptionsFromJson(compilerOptions, path_1.default.dirname(resolvedTsconfigPath)).options;
|
|
47
|
+
const finalCompilerOptions = Object.assign(Object.assign({}, parsedConfig.options), mergedCompilerOptions);
|
|
47
48
|
// Set output directory if specified
|
|
48
49
|
if (outputDir) {
|
|
49
50
|
mergedCompilerOptions.outDir = outputDir;
|
|
50
51
|
}
|
|
51
52
|
// **Create a TypeScript Program**
|
|
52
|
-
const program = typescript_1.default.createProgram(filePaths !== null && filePaths !== void 0 ? filePaths : parsedConfig.fileNames,
|
|
53
|
+
const program = typescript_1.default.createProgram(filePaths !== null && filePaths !== void 0 ? filePaths : parsedConfig.fileNames, finalCompilerOptions);
|
|
53
54
|
// **Create a TypeScript Program**
|
|
54
55
|
// const program = ts.createProgram(
|
|
55
56
|
// parsedConfig.fileNames,
|
package/package.json
CHANGED
|
@@ -44,9 +44,14 @@ export class TypeScriptCompilerAction extends Action {
|
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
// Merge custom compiler options
|
|
47
|
-
const mergedCompilerOptions =
|
|
47
|
+
const mergedCompilerOptions = ts.convertCompilerOptionsFromJson(
|
|
48
|
+
compilerOptions,
|
|
49
|
+
path.dirname(resolvedTsconfigPath),
|
|
50
|
+
).options;
|
|
51
|
+
|
|
52
|
+
const finalCompilerOptions = {
|
|
48
53
|
...parsedConfig.options,
|
|
49
|
-
...
|
|
54
|
+
...mergedCompilerOptions,
|
|
50
55
|
};
|
|
51
56
|
|
|
52
57
|
// Set output directory if specified
|
|
@@ -57,7 +62,7 @@ export class TypeScriptCompilerAction extends Action {
|
|
|
57
62
|
// **Create a TypeScript Program**
|
|
58
63
|
const program = ts.createProgram(
|
|
59
64
|
filePaths ?? parsedConfig.fileNames,
|
|
60
|
-
|
|
65
|
+
finalCompilerOptions,
|
|
61
66
|
);
|
|
62
67
|
|
|
63
68
|
// **Create a TypeScript Program**
|