tsconfig-paths
Advanced tools
Comparing version 3.3.1 to 3.3.2
@@ -9,2 +9,6 @@ # Change Log | ||
## [3.3.2] - 2018-05-07 | ||
### Fixed | ||
- Adding json file extention to extends property, [#40](https://github.com/dividab/tsconfig-paths/pull/37). Thanks to [@cwhite-connectfirst](https://github.com/cwhite-connectfirst) for this fixing this! | ||
## [3.3.1] - 2018-04-17 | ||
@@ -161,3 +165,5 @@ ### Fixed | ||
[Unreleased]: https://github.com/dividab/tsconfig-paths/compare/3.3.0...master | ||
[Unreleased]: https://github.com/dividab/tsconfig-paths/compare/3.3.2...master | ||
[3.3.2]: https://github.com/dividab/tsconfig-paths/compare/3.3.1...3.3.2 | ||
[3.3.1]: https://github.com/dividab/tsconfig-paths/compare/3.3.0...3.3.1 | ||
[3.3.0]: https://github.com/dividab/tsconfig-paths/compare/3.2.0...3.3.0 | ||
@@ -164,0 +170,0 @@ [3.2.0]: https://github.com/dividab/tsconfig-paths/compare/3.1.3...3.2.0 |
@@ -73,9 +73,14 @@ "use strict"; | ||
var config = JSON.parse(cleanedJson); | ||
if (config.extends) { | ||
var extendedConfig = config.extends; | ||
if (extendedConfig) { | ||
if (typeof extendedConfig === "string" && | ||
extendedConfig.indexOf(".json") === -1) { | ||
extendedConfig += ".json"; | ||
} | ||
var currentDir = path.dirname(configFilePath); | ||
var base = loadTsconfig(path.join(currentDir, config.extends), existsSync, readFileSync) || {}; | ||
var base = loadTsconfig(path.join(currentDir, extendedConfig), existsSync, readFileSync) || {}; | ||
// baseUrl should be interpreted as relative to the base tsconfig, | ||
// but we need to update it so it is relative to the original tsconfig being loaded | ||
if (base && base.compilerOptions && base.compilerOptions.baseUrl) { | ||
var extendsDir = path.dirname(config.extends); | ||
var extendsDir = path.dirname(extendedConfig); | ||
base.compilerOptions.baseUrl = path.join(extendsDir, base.compilerOptions.baseUrl); | ||
@@ -82,0 +87,0 @@ } |
{ | ||
"name": "tsconfig-paths", | ||
"version": "3.3.1", | ||
"version": "3.3.2", | ||
"description": "Load node modules according to tsconfig paths, in run-time or via API.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
149791
1552