Comparing version 1.1.0 to 1.2.0
@@ -16,2 +16,3 @@ "use strict"; | ||
var make_error_1 = require('make-error'); | ||
var tsconfig_1 = require('tsconfig'); | ||
var pkg = require('../package.json'); | ||
@@ -176,25 +177,3 @@ var oldHandlers = {}; | ||
function readConfig(options, cwd, ts) { | ||
var project; | ||
if (options.project == null) { | ||
var path = ts.findConfigFile(cwd, options.fileExists); | ||
project = path ? path_1.resolve(path) : undefined; | ||
} | ||
else if (typeof options.project === 'string') { | ||
var path = path_1.resolve(options.project); | ||
if (options.fileExists(path)) { | ||
project = path; | ||
} | ||
else { | ||
project = path_1.join(path, 'tsconfig.json'); | ||
} | ||
} | ||
var result = project ? ts.readConfigFile(project, options.getFile) : { | ||
config: { | ||
files: [], | ||
compilerOptions: {} | ||
} | ||
}; | ||
if (result.error) { | ||
throw new TSError([formatDiagnostic(result.error, cwd, ts)]); | ||
} | ||
var result = tsconfig_1.loadSync(cwd, options.project); | ||
result.config.compilerOptions = extend({ | ||
@@ -213,7 +192,7 @@ target: 'es5', | ||
delete result.config.compilerOptions.outFile; | ||
var basePath = project ? path_1.dirname(project) : cwd; | ||
var basePath = result.path ? path_1.dirname(result.path) : cwd; | ||
if (typeof ts.parseConfigFile === 'function') { | ||
return ts.parseConfigFile(result.config, ts.sys, basePath); | ||
} | ||
return ts.parseJsonConfigFileContent(result.config, ts.sys, basePath, null, project); | ||
return ts.parseJsonConfigFileContent(result.config, ts.sys, basePath, null, result.path); | ||
} | ||
@@ -220,0 +199,0 @@ function readThrough(cachedir, options, project, compile) { |
{ | ||
"name": "ts-node", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"preferGlobal": true, | ||
@@ -54,4 +54,4 @@ "description": "TypeScript execution environment and REPL for node", | ||
"semver": "^5.1.0", | ||
"tslint": "^3.10.2", | ||
"tslint-config-standard": "^1.0.0", | ||
"tslint": "^3.13.0", | ||
"tslint-config-standard": "^1.3.0", | ||
"typescript": "^1.8.10", | ||
@@ -68,4 +68,5 @@ "typings": "^1.0.4" | ||
"source-map-support": "^0.4.0", | ||
"tsconfig": "^5.0.2", | ||
"xtend": "^4.0.0" | ||
} | ||
} |
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
97421
9
833
+ Addedtsconfig@^5.0.2
+ Addedany-promise@1.3.0(transitive)
+ Addederror-ex@1.3.2(transitive)
+ Addedis-arrayish@0.2.1(transitive)
+ Addedis-utf8@0.2.1(transitive)
+ Addedparse-json@2.2.0(transitive)
+ Addedstrip-bom@2.0.0(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedtsconfig@5.0.3(transitive)