@fimbul/wotan
Advanced tools
Comparing version 0.20.0-dev.20190201 to 0.20.0-dev.20190203
{ | ||
"name": "@fimbul/wotan", | ||
"version": "0.20.0-dev.20190201", | ||
"version": "0.20.0-dev.20190203", | ||
"description": "Pluggable TypeScript and JavaScript linter", | ||
@@ -47,3 +47,3 @@ "bin": "bin/main.js", | ||
"dependencies": { | ||
"@fimbul/mimir": "0.20.0-dev.20190201", | ||
"@fimbul/mimir": "0.20.0-dev.20190203", | ||
"@fimbul/ymir": "0.18.0", | ||
@@ -50,0 +50,0 @@ "bind-decorator": "^1.0.11", |
@@ -168,12 +168,14 @@ "use strict"; | ||
} | ||
updateSourceFile(sourceFile, program, newContent, _changeRange) { | ||
const newSourceFile = ts.createSourceFile(sourceFile.fileName, newContent, sourceFile.languageVersion, true); | ||
if (utils_1.hasParseErrors(newSourceFile)) { | ||
updateSourceFile(sourceFile, program, newContent, changeRange) { | ||
let error = false; | ||
const oldContent = sourceFile.text; | ||
sourceFile = ts.updateSourceFile(sourceFile, newContent, changeRange); | ||
if (utils_1.hasParseErrors(sourceFile)) { | ||
log("Not using updated content of '%s' because of syntax errors", sourceFile.fileName); | ||
return { program, sourceFile, error: true }; | ||
sourceFile = ts.updateSourceFile(sourceFile, oldContent, utils_1.invertChangeRange(changeRange)); | ||
error = true; | ||
} | ||
sourceFile = newSourceFile; | ||
this.sourceFileCache.set(sourceFile.fileName, sourceFile); | ||
program = this.createProgram(program.getRootFileNames(), program.getCompilerOptions(), program, getReferencesOfProgram(program)); | ||
return { sourceFile, program, error: false }; | ||
program = this.createProgram(program.getRootFileNames(), program.getCompilerOptions(), program, program.getProjectReferences()); | ||
return { sourceFile, program, error }; | ||
} | ||
@@ -195,10 +197,2 @@ onReleaseOldSourceFile(sourceFile) { | ||
exports.ProjectHost = ProjectHost; | ||
function getReferencesOfProgram(program) { | ||
const references = program.getProjectReferences(); | ||
if (references === undefined) | ||
return; | ||
if (program.getResolvedProjectReferences === undefined) | ||
return utils_1.mapDefined(references, (ref) => ref && { path: ref.sourceFile.fileName }); | ||
return references; | ||
} | ||
//# sourceMappingURL=project-host.js.map |
@@ -225,9 +225,4 @@ "use strict"; | ||
} | ||
if (commandLine.errors.length !== 0) { | ||
let { errors } = commandLine; | ||
if (commandLine.projectReferences !== undefined && commandLine.projectReferences.length !== 0) | ||
errors = errors.filter((e) => e.code !== 18002); | ||
if (errors.length !== 0) | ||
this.logger.warn(ts.formatDiagnostics(commandLine.errors, host)); | ||
} | ||
if (commandLine.errors.length !== 0) | ||
this.logger.warn(ts.formatDiagnostics(commandLine.errors, host)); | ||
if (commandLine.fileNames.length !== 0) { | ||
@@ -239,5 +234,3 @@ if (!commandLine.options.composite || commandLine.fileNames.some((file) => isFileIncluded(host.getFileSystemFile(file)))) { | ||
if (references) { | ||
const resolvedReferences = program.getResolvedProjectReferences === undefined | ||
? program.getProjectReferences() | ||
: program.getResolvedProjectReferences(); | ||
const resolvedReferences = program.getResolvedProjectReferences(); | ||
if (resolvedReferences !== undefined) { | ||
@@ -244,0 +237,0 @@ program = undefined; |
@@ -55,5 +55,3 @@ "use strict"; | ||
function getOutputsOfProjectReferences(program, host) { | ||
const references = program.getResolvedProjectReferences === undefined | ||
? program.getProjectReferences() | ||
: program.getResolvedProjectReferences(); | ||
const references = program.getResolvedProjectReferences(); | ||
if (references === undefined) | ||
@@ -92,3 +90,3 @@ return []; | ||
function getOutputFileNamesOfProjectReferenceRecursive(reference, seen, host) { | ||
const referencePath = ts.resolveProjectReferencePath(host, reference); | ||
const referencePath = ts.resolveProjectReferencePath(reference); | ||
if (!utils_1.addUnique(seen, referencePath)) | ||
@@ -95,0 +93,0 @@ return []; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
321144
3965
+ Added@fimbul/mimir@0.20.0-dev.20190203(transitive)
- Removed@fimbul/mimir@0.20.0-dev.20190201(transitive)