Comparing version 1.8.5 to 1.8.6
import { IConfig, IOutput, ITSConfig, ReplaceTscAliasPathsOptions } from '../interfaces'; | ||
export declare function prepareConfig(options: ReplaceTscAliasPathsOptions): Promise<IConfig>; | ||
export declare const loadConfig: (file: string, output: IOutput) => ITSConfig; | ||
export declare function normalizeTsConfigExtendsOption(ext: string | string[], file: string): string[]; | ||
export declare function resolveTsConfigExtendsPath(ext: string, file: string): string; |
@@ -12,3 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveTsConfigExtendsPath = exports.loadConfig = exports.prepareConfig = void 0; | ||
exports.resolveTsConfigExtendsPath = exports.normalizeTsConfigExtendsOption = exports.loadConfig = exports.prepareConfig = void 0; | ||
const fs_1 = require("fs"); | ||
@@ -114,5 +114,3 @@ const mylas_1 = require("mylas"); | ||
if (ext) { | ||
return Object.assign(Object.assign({}, (ext.startsWith('.') | ||
? (0, exports.loadConfig)((0, path_1.join)(configDir, ext.endsWith('.json') ? ext : `${ext}.json`), output) | ||
: (0, exports.loadConfig)(resolveTsConfigExtendsPath(ext, file), output))), config); | ||
return Object.assign(Object.assign({}, normalizeTsConfigExtendsOption(ext, file).reduce((pre, ext) => (Object.assign(Object.assign({}, pre), (0, exports.loadConfig)(ext, output))), {})), config); | ||
} | ||
@@ -122,2 +120,12 @@ return config; | ||
exports.loadConfig = loadConfig; | ||
function normalizeTsConfigExtendsOption(ext, file) { | ||
if (!ext) | ||
return []; | ||
const configDir = (0, path_1.dirname)(file); | ||
const normExts = (Array.isArray(ext) ? ext : [ext]).map((e) => e.startsWith('.') | ||
? (0, path_1.join)(configDir, e.endsWith('.json') ? e : `${e}.json`) | ||
: resolveTsConfigExtendsPath(e, file)); | ||
return normExts; | ||
} | ||
exports.normalizeTsConfigExtendsOption = normalizeTsConfigExtendsOption; | ||
function resolveTsConfigExtendsPath(ext, file) { | ||
@@ -124,0 +132,0 @@ const tsConfigDir = (0, path_1.dirname)(file); |
{ | ||
"name": "tsc-alias", | ||
"version": "1.8.5", | ||
"version": "1.8.6", | ||
"description": "Replace alias paths with relative paths after typescript compilation.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128736
1045