Merge branch 'transforms' into transforms-fixMoreSourceMaps

This commit is contained in:
Ron Buckton
2016-05-09 17:00:53 -07:00
24 changed files with 476 additions and 27 deletions
+12 -10
View File
@@ -423,10 +423,10 @@ namespace ts {
createVariableDeclarationList([
createVariableDeclaration(
generatedName,
createRequireCall(node),
/*location*/ node
createRequireCall(node)
)
])
]),
/*location*/ node
)
);
}
@@ -523,10 +523,15 @@ namespace ts {
}
}
function addExportImportAssignments(statements: Statement[], node: Node) {
const names = reduceEachChild(node, collectExportMembers, []);
for (const name of names) {
addExportMemberAssignments(statements, name);
function addExportImportAssignments(statements: Statement[], node: ImportEqualsDeclaration | ImportDeclaration) {
if (isImportEqualsDeclaration(node)) {
addExportMemberAssignments(statements, node.name);
}
else {
const names = reduceEachChild(node, collectExportMembers, []);
for (const name of names) {
addExportMemberAssignments(statements, name);
}
}
}
@@ -739,9 +744,6 @@ namespace ts {
addExportMemberAssignments(statements, classDecl.name);
if (statements.length > 1) {
Debug.assert(!!classDecl.decorators, "Expression statements should only have an export member assignment when decorated.")
}
return statements;
}
}
+1 -1
View File
@@ -2750,7 +2750,7 @@ namespace ts {
*/
function isNamedExternalModuleExport(node: Node) {
return isExternalModuleExport(node)
&& hasModifier(node, ModifierFlags.Default);
&& !hasModifier(node, ModifierFlags.Default);
}
/**
+3 -2
View File
@@ -190,8 +190,9 @@ namespace RWC {
if (compilerResult.errors.length === 0) {
return null;
}
return Harness.Compiler.getErrorBaseline(inputFiles.concat(otherFiles), compilerResult.errors);
// Do not include the library in the baselines to avoid noise
const baselineFiles = inputFiles.concat(otherFiles).filter(f => !Harness.isDefaultLibraryFile(f.unitName));
return Harness.Compiler.getErrorBaseline(baselineFiles, compilerResult.errors);
}, false, baselineOpts);
});