From e97368bb3f01c1cfa314e7546b1794efa5b095e8 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 13 Oct 2016 17:53:44 -0700 Subject: [PATCH 01/18] Adds ES5 to ES3 transformer for reserved words --- Jakefile.js | 13 +- src/compiler/transformer.ts | 5 + src/compiler/transformers/es5.ts | 83 ++++++++++ src/compiler/transformers/module/module.ts | 53 ++----- src/compiler/transformers/module/system.ts | 8 +- src/compiler/tsconfig.json | 1 + src/harness/tsconfig.json | 1 + src/services/tsconfig.json | 1 + .../allowSyntheticDefaultImports10.js | 4 +- .../baselines/reference/bluebirdStaticThis.js | 6 +- .../reference/classMethodWithKeywordName1.js | 2 +- ...constructorWithIncompleteTypeAnnotation.js | 10 +- .../baselines/reference/convertKeywordsYes.js | 144 +++++++++--------- .../destructuringParameterDeclaration6.js | 8 +- tests/baselines/reference/es6ClassTest5.js | 2 +- .../reference/fatarrowfunctionsErrors.js | 2 +- tests/baselines/reference/keywordField.js | 6 +- .../reference/keywordInJsxIdentifier.js | 4 +- .../reference/nestedClassDeclaration.js | 2 +- ...bjectBindingPatternKeywordIdentifiers01.js | 2 +- ...bjectBindingPatternKeywordIdentifiers02.js | 2 +- ...bjectBindingPatternKeywordIdentifiers03.js | 2 +- ...bjectBindingPatternKeywordIdentifiers04.js | 2 +- ...ndPropertiesErrorFromNotUsingIdentifier.js | 12 +- ...ctTypesIdentityWithConstructSignatures2.js | 2 +- ...ConstructSignaturesDifferingParamCounts.js | 2 +- ...nstructSignaturesDifferingByConstraints.js | 2 +- ...structSignaturesDifferingByConstraints2.js | 2 +- ...structSignaturesDifferingByConstraints3.js | 2 +- ...onstructSignaturesDifferingByReturnType.js | 2 +- ...nstructSignaturesDifferingByReturnType2.js | 2 +- ...tSignaturesDifferingTypeParameterCounts.js | 2 +- ...ctSignaturesDifferingTypeParameterNames.js | 2 +- ...enericConstructSignaturesOptionalParams.js | 2 +- ...nericConstructSignaturesOptionalParams2.js | 2 +- ...nericConstructSignaturesOptionalParams3.js | 2 +- .../parserErrorRecovery_ObjectLiteral2.js | 2 +- .../parserErrorRecovery_ObjectLiteral3.js | 2 +- .../parserErrorRecovery_ObjectLiteral4.js | 2 +- .../parserErrorRecovery_ObjectLiteral5.js | 2 +- .../parserExportAsFunctionIdentifier.js | 2 +- .../parserKeywordsAsIdentifierName1.js | 6 +- .../parserShorthandPropertyAssignment2.js | 2 +- .../reference/parserSuperExpression3.js | 2 +- .../prototypeOnConstructorFunctions.js | 2 +- tests/baselines/reference/reservedWords.js | 18 +-- tests/baselines/reference/reservedWords2.js | 4 +- tests/baselines/reference/super1.js | 2 +- .../reference/tsxReactEmitNesting.js | 24 +-- .../reference/typeQueryWithReservedWords.js | 4 +- 50 files changed, 267 insertions(+), 206 deletions(-) create mode 100644 src/compiler/transformers/es5.ts diff --git a/Jakefile.js b/Jakefile.js index 76ac1b19b2c82..c561b72f472b6 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -70,14 +70,15 @@ var compilerSources = [ "visitor.ts", "transformers/destructuring.ts", "transformers/ts.ts", - "transformers/module/es2015.ts", - "transformers/module/system.ts", - "transformers/module/module.ts", "transformers/jsx.ts", "transformers/es2017.ts", "transformers/es2016.ts", "transformers/es2015.ts", + "transformers/es5.ts", "transformers/generators.ts", + "transformers/module/es2015.ts", + "transformers/module/system.ts", + "transformers/module/module.ts", "transformer.ts", "sourcemap.ts", "comments.ts", @@ -105,14 +106,14 @@ var servicesSources = [ "visitor.ts", "transformers/destructuring.ts", "transformers/ts.ts", - "transformers/module/es2015.ts", - "transformers/module/system.ts", - "transformers/module/module.ts", "transformers/jsx.ts", "transformers/es2017.ts", "transformers/es2016.ts", "transformers/es2015.ts", "transformers/generators.ts", + "transformers/module/es2015.ts", + "transformers/module/system.ts", + "transformers/module/module.ts", "transformer.ts", "sourcemap.ts", "comments.ts", diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index fc656e08bf9ae..82e1843b70bbe 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -4,6 +4,7 @@ /// /// /// +/// /// /// /// @@ -129,6 +130,10 @@ namespace ts { transformers.push(transformGenerators); } + if (languageVersion < ScriptTarget.ES5) { + transformers.push(transformES5); + } + return transformers; } diff --git a/src/compiler/transformers/es5.ts b/src/compiler/transformers/es5.ts new file mode 100644 index 0000000000000..9e5a72c2bad6f --- /dev/null +++ b/src/compiler/transformers/es5.ts @@ -0,0 +1,83 @@ +/// +/// + +/*@internal*/ +namespace ts { + /** + * Transforms ES5 syntax into ES3 syntax. + * + * @param context Context and state information for the transformation. + */ + export function transformES5(context: TransformationContext) { + const previousOnSubstituteNode = context.onSubstituteNode; + context.onSubstituteNode = onSubstituteNode; + context.enableSubstitution(SyntaxKind.PropertyAccessExpression); + context.enableSubstitution(SyntaxKind.PropertyAssignment); + return transformSourceFile; + + /** + * Transforms an ES5 source file to ES3. + * + * @param node A SourceFile + */ + function transformSourceFile(node: SourceFile) { + return node; + } + + /** + * Hooks node substitutions. + * + * @param emitContext The context for the emitter. + * @param node The node to substitute. + */ + function onSubstituteNode(emitContext: EmitContext, node: Node) { + node = previousOnSubstituteNode(emitContext, node); + if (isPropertyAccessExpression(node)) { + return substitutePropertyAccessExpression(node); + } + else if (isPropertyAssignment(node)) { + return substitutePropertyAssignment(node); + } + return node; + } + + /** + * Substitutes a PropertyAccessExpression whose name is a reserved word. + * + * @param node A PropertyAccessExpression + */ + function substitutePropertyAccessExpression(node: PropertyAccessExpression): Expression { + const literalName = trySubstituteReservedName(node.name); + if (literalName) { + return createElementAccess(node.expression, literalName, /*location*/ node); + } + return node; + } + + /** + * Substitutes a PropertyAssignment whose name is a reserved word. + * + * @param node A PropertyAssignment + */ + function substitutePropertyAssignment(node: PropertyAssignment): PropertyAssignment { + const literalName = isIdentifier(node.name) && trySubstituteReservedName(node.name); + if (literalName) { + return updatePropertyAssignment(node, literalName, node.initializer); + } + return node; + } + + /** + * If an identifier name is a reserved word, returns a string literal for the name. + * + * @param name An Identifier + */ + function trySubstituteReservedName(name: Identifier) { + const token = name.originalKeywordKind || (nodeIsSynthesized(name) ? stringToToken(name.text) : undefined); + if (token >= SyntaxKind.FirstReservedWord && token <= SyntaxKind.LastReservedWord) { + return createLiteral(name, /*location*/ name); + } + return undefined; + } + } +} \ No newline at end of file diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index b91f67382cd1f..1cca7a21777f5 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -958,39 +958,19 @@ namespace ts { const declaration = resolver.getReferencedImportDeclaration(node); if (declaration) { if (isImportClause(declaration)) { - if (languageVersion >= ScriptTarget.ES5) { - return createPropertyAccess( - getGeneratedNameForNode(declaration.parent), - createIdentifier("default"), - /*location*/ node - ); - } - else { - // TODO: ES3 transform to handle x.default -> x["default"] - return createElementAccess( - getGeneratedNameForNode(declaration.parent), - createLiteral("default"), - /*location*/ node - ); - } + return createPropertyAccess( + getGeneratedNameForNode(declaration.parent), + createIdentifier("default"), + /*location*/ node + ); } else if (isImportSpecifier(declaration)) { const name = declaration.propertyName || declaration.name; - if (name.originalKeywordKind === SyntaxKind.DefaultKeyword && languageVersion <= ScriptTarget.ES3) { - // TODO: ES3 transform to handle x.default -> x["default"] - return createElementAccess( - getGeneratedNameForNode(declaration.parent.parent.parent), - createLiteral(name.text), - /*location*/ node - ); - } - else { - return createPropertyAccess( - getGeneratedNameForNode(declaration.parent.parent.parent), - getSynthesizedClone(name), - /*location*/ node - ); - } + return createPropertyAccess( + getGeneratedNameForNode(declaration.parent.parent.parent), + getSynthesizedClone(name), + /*location*/ node + ); } } } @@ -1027,15 +1007,10 @@ namespace ts { function createExportAssignment(name: Identifier, value: Expression) { return createAssignment( - name.originalKeywordKind === SyntaxKind.DefaultKeyword && languageVersion === ScriptTarget.ES3 - ? createElementAccess( - createIdentifier("exports"), - createLiteral(name.text) - ) - : createPropertyAccess( - createIdentifier("exports"), - getSynthesizedClone(name) - ), + createPropertyAccess( + createIdentifier("exports"), + getSynthesizedClone(name) + ), value ); } diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index b33b3058f8caf..775d8fc34f9b5 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -19,7 +19,6 @@ namespace ts { const compilerOptions = context.getCompilerOptions(); const resolver = context.getEmitResolver(); const host = context.getEmitHost(); - const languageVersion = getEmitScriptTarget(compilerOptions); const previousOnSubstituteNode = context.onSubstituteNode; const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; @@ -1317,12 +1316,7 @@ namespace ts { return undefined; } - if (name.originalKeywordKind && languageVersion === ScriptTarget.ES3) { - return createElementAccess(importAlias, createLiteral(name.text)); - } - else { - return createPropertyAccess(importAlias, getSynthesizedClone(name)); - } + return createPropertyAccess(importAlias, getSynthesizedClone(name)); } function collectDependencyGroups(externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]) { diff --git a/src/compiler/tsconfig.json b/src/compiler/tsconfig.json index da356c0b4d327..cc1f3125166eb 100644 --- a/src/compiler/tsconfig.json +++ b/src/compiler/tsconfig.json @@ -27,6 +27,7 @@ "transformers/es2017.ts", "transformers/es2016.ts", "transformers/es2015.ts", + "transformers/es5.ts", "transformers/generators.ts", "transformers/destructuring.ts", "transformers/module/module.ts", diff --git a/src/harness/tsconfig.json b/src/harness/tsconfig.json index 5d7a81d1a7447..e5e14266ec740 100644 --- a/src/harness/tsconfig.json +++ b/src/harness/tsconfig.json @@ -29,6 +29,7 @@ "../compiler/transformers/es2017.ts", "../compiler/transformers/es2016.ts", "../compiler/transformers/es2015.ts", + "../compiler/transformers/es5.ts", "../compiler/transformers/generators.ts", "../compiler/transformers/destructuring.ts", "../compiler/transformers/module/module.ts", diff --git a/src/services/tsconfig.json b/src/services/tsconfig.json index 03d04935068c0..1033a3aa55390 100644 --- a/src/services/tsconfig.json +++ b/src/services/tsconfig.json @@ -28,6 +28,7 @@ "../compiler/transformers/es2017.ts", "../compiler/transformers/es2016.ts", "../compiler/transformers/es2015.ts", + "../compiler/transformers/es5.ts", "../compiler/transformers/generators.ts", "../compiler/transformers/destructuring.ts", "../compiler/transformers/module/module.ts", diff --git a/tests/baselines/reference/allowSyntheticDefaultImports10.js b/tests/baselines/reference/allowSyntheticDefaultImports10.js index 746997c4c8941..396cd75b57461 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports10.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports10.js @@ -13,5 +13,5 @@ Foo.default.default.foo(); //// [a.js] "use strict"; var Foo = require("./b"); -Foo.default.bar(); -Foo.default.default.foo(); +Foo["default"].bar(); +Foo["default"]["default"].foo(); diff --git a/tests/baselines/reference/bluebirdStaticThis.js b/tests/baselines/reference/bluebirdStaticThis.js index 301f32319a7b4..606f778323fdb 100644 --- a/tests/baselines/reference/bluebirdStaticThis.js +++ b/tests/baselines/reference/bluebirdStaticThis.js @@ -146,12 +146,12 @@ var x; var arr; var foo; var fooProm; -fooProm = Promise.try(Promise, function () { +fooProm = Promise["try"](Promise, function () { return foo; }); -fooProm = Promise.try(Promise, function () { +fooProm = Promise["try"](Promise, function () { return foo; }, arr); -fooProm = Promise.try(Promise, function () { +fooProm = Promise["try"](Promise, function () { return foo; }, arr, x); diff --git a/tests/baselines/reference/classMethodWithKeywordName1.js b/tests/baselines/reference/classMethodWithKeywordName1.js index 6e1faee005cc0..a7cb994bfb397 100644 --- a/tests/baselines/reference/classMethodWithKeywordName1.js +++ b/tests/baselines/reference/classMethodWithKeywordName1.js @@ -7,6 +7,6 @@ class C { var C = (function () { function C() { } - C.try = function () { }; + C["try"] = function () { }; return C; }()); diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index 2e3190c15c825..1ee309b0eb424 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -292,7 +292,7 @@ var TypeScriptAllInOne; (function (TypeScriptAllInOne) { var Program = (function () { function Program() { - this.case = bfs.STATEMENTS(4); + this["case"] = bfs.STATEMENTS(4); } Program.Main = function () { var args = []; @@ -305,13 +305,13 @@ var TypeScriptAllInOne; retValue = bfs.VARIABLES(); if (retValue != 0) ^= { - return: 1 + "return": 1 }; } finally { } }; - Program.prototype.if = function (retValue) { + Program.prototype["if"] = function (retValue) { if (retValue === void 0) { retValue = != 0; } return 1; ^ @@ -327,7 +327,7 @@ var TypeScriptAllInOne; return 1; } }; - Program.prototype.catch = function (e) { + Program.prototype["catch"] = function (e) { console.log(e); }; return Program; @@ -364,7 +364,7 @@ var BasicFeatures = (function () { ; var quoted = '"', quoted2 = "'"; var reg = /\w*/; - var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof: function () { return 'objLit{42}'; } }; + var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, "instanceof": function () { return 'objLit{42}'; } }; var weekday = Weekdays.Monday; var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; // diff --git a/tests/baselines/reference/convertKeywordsYes.js b/tests/baselines/reference/convertKeywordsYes.js index ba3c661d1d031..b7bd60e4a9535 100644 --- a/tests/baselines/reference/convertKeywordsYes.js +++ b/tests/baselines/reference/convertKeywordsYes.js @@ -344,43 +344,43 @@ var bigObject = { string: 0, get: 0, yield: 0, - break: 0, - case: 0, - catch: 0, - class: 0, - continue: 0, - const: 0, - debugger: 0, + "break": 0, + "case": 0, + "catch": 0, + "class": 0, + "continue": 0, + "const": 0, + "debugger": 0, declare: 0, - default: 0, - delete: 0, - do: 0, - else: 0, - enum: 0, - export: 0, - extends: 0, - false: 0, - finally: 0, - for: 0, - function: 0, - if: 0, - import: 0, - in: 0, - instanceof: 0, - new: 0, - null: 0, - return: 0, - super: 0, - switch: 0, - this: 0, - throw: 0, - true: 0, - try: 0, - typeof: 0, - var: 0, - void: 0, - while: 0, - with: 0 + "default": 0, + "delete": 0, + "do": 0, + "else": 0, + "enum": 0, + "export": 0, + "extends": 0, + "false": 0, + "finally": 0, + "for": 0, + "function": 0, + "if": 0, + "import": 0, + "in": 0, + "instanceof": 0, + "new": 0, + "null": 0, + "return": 0, + "super": 0, + "switch": 0, + "this": 0, + "throw": 0, + "true": 0, + "try": 0, + "typeof": 0, + "var": 0, + "void": 0, + "while": 0, + "with": 0 }; var bigClass = (function () { function bigClass() { @@ -401,43 +401,43 @@ var bigClass = (function () { this.string = 0; this.get = 0; this.yield = 0; - this.break = 0; - this.case = 0; - this.catch = 0; - this.class = 0; - this.continue = 0; - this.const = 0; - this.debugger = 0; + this["break"] = 0; + this["case"] = 0; + this["catch"] = 0; + this["class"] = 0; + this["continue"] = 0; + this["const"] = 0; + this["debugger"] = 0; this.declare = 0; - this.default = 0; - this.delete = 0; - this.do = 0; - this.else = 0; - this.enum = 0; - this.export = 0; - this.extends = 0; - this.false = 0; - this.finally = 0; - this.for = 0; - this.function = 0; - this.if = 0; - this.import = 0; - this.in = 0; - this.instanceof = 0; - this.new = 0; - this.null = 0; - this.return = 0; - this.super = 0; - this.switch = 0; - this.this = 0; - this.throw = 0; - this.true = 0; - this.try = 0; - this.typeof = 0; - this.var = 0; - this.void = 0; - this.while = 0; - this.with = 0; + this["default"] = 0; + this["delete"] = 0; + this["do"] = 0; + this["else"] = 0; + this["enum"] = 0; + this["export"] = 0; + this["extends"] = 0; + this["false"] = 0; + this["finally"] = 0; + this["for"] = 0; + this["function"] = 0; + this["if"] = 0; + this["import"] = 0; + this["in"] = 0; + this["instanceof"] = 0; + this["new"] = 0; + this["null"] = 0; + this["return"] = 0; + this["super"] = 0; + this["switch"] = 0; + this["this"] = 0; + this["throw"] = 0; + this["true"] = 0; + this["try"] = 0; + this["typeof"] = 0; + this["var"] = 0; + this["void"] = 0; + this["while"] = 0; + this["with"] = 0; } return bigClass; }()); diff --git a/tests/baselines/reference/destructuringParameterDeclaration6.js b/tests/baselines/reference/destructuringParameterDeclaration6.js index ad86b2983b3c3..03307415b6514 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration6.js +++ b/tests/baselines/reference/destructuringParameterDeclaration6.js @@ -27,7 +27,7 @@ b2({ while: 1 }); "use strict"; // Error function a(_a) { - var = _a.while; + var = _a["while"]; } function a1(_a) { var public = _a.public; @@ -56,13 +56,13 @@ function a7() { a[_i - 0] = arguments[_i]; } } -a({ while: 1 }); +a({ "while": 1 }); // No Error function b1(_a) { var x = _a.public; } function b2(_a) { - var y = _a.while; + var y = _a["while"]; } b1({ public: 1 }); -b2({ while: 1 }); +b2({ "while": 1 }); diff --git a/tests/baselines/reference/es6ClassTest5.js b/tests/baselines/reference/es6ClassTest5.js index b909fac58b50f..7d4238fda65b1 100644 --- a/tests/baselines/reference/es6ClassTest5.js +++ b/tests/baselines/reference/es6ClassTest5.js @@ -23,7 +23,7 @@ var C1T5 = (function () { }()); var bigClass = (function () { function bigClass() { - this.break = 1; + this["break"] = 1; } return bigClass; }()); diff --git a/tests/baselines/reference/fatarrowfunctionsErrors.js b/tests/baselines/reference/fatarrowfunctionsErrors.js index 2ac20f1966ade..ced4660d8d10b 100644 --- a/tests/baselines/reference/fatarrowfunctionsErrors.js +++ b/tests/baselines/reference/fatarrowfunctionsErrors.js @@ -20,7 +20,7 @@ foo(function () { } return 0; }); -foo((1), { return: 0 }); +foo((1), { "return": 0 }); foo(function (x) { return x; }); foo(function (x) { if (x === void 0) { x = 0; } diff --git a/tests/baselines/reference/keywordField.js b/tests/baselines/reference/keywordField.js index 581d5afa14a38..a146cffade84f 100644 --- a/tests/baselines/reference/keywordField.js +++ b/tests/baselines/reference/keywordField.js @@ -12,7 +12,7 @@ var q = a["if"]; //// [keywordField.js] var obj = {}; -obj.if = 1; -var a = { if: "test" }; -var n = a.if; +obj["if"] = 1; +var a = { "if": "test" }; +var n = a["if"]; var q = a["if"]; diff --git a/tests/baselines/reference/keywordInJsxIdentifier.js b/tests/baselines/reference/keywordInJsxIdentifier.js index 6009e1980e639..d9c3b51e9a30b 100644 --- a/tests/baselines/reference/keywordInJsxIdentifier.js +++ b/tests/baselines/reference/keywordInJsxIdentifier.js @@ -9,6 +9,6 @@ declare var React: any; //// [keywordInJsxIdentifier.js] React.createElement("foo", { "class-id": true }); -React.createElement("foo", { class: true }); +React.createElement("foo", { "class": true }); React.createElement("foo", { "class-id": "1" }); -React.createElement("foo", { class: "1" }); +React.createElement("foo", { "class": "1" }); diff --git a/tests/baselines/reference/nestedClassDeclaration.js b/tests/baselines/reference/nestedClassDeclaration.js index 04e2f6348efb6..cc300ec75a31c 100644 --- a/tests/baselines/reference/nestedClassDeclaration.js +++ b/tests/baselines/reference/nestedClassDeclaration.js @@ -38,5 +38,5 @@ function foo() { }()); } var x = { - class: C4 + "class": C4 }, _a = void 0; diff --git a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers01.js b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers01.js index cd339bb590716..a905e53f22122 100644 --- a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers01.js +++ b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers01.js @@ -3,4 +3,4 @@ var { while } = { while: 1 } //// [objectBindingPatternKeywordIdentifiers01.js] -var = { while: 1 }.while; +var = { "while": 1 }["while"]; diff --git a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers02.js b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers02.js index 0286a78ba8227..5bc6e1f996367 100644 --- a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers02.js +++ b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers02.js @@ -3,4 +3,4 @@ var { while: while } = { while: 1 } //// [objectBindingPatternKeywordIdentifiers02.js] -var _a = { while: 1 }, = _a.while, = _a.while; +var _a = { "while": 1 }, = _a["while"], = _a["while"]; diff --git a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers03.js b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers03.js index 4bbb1afb4cb5b..3d8643d63ce28 100644 --- a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers03.js +++ b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers03.js @@ -3,4 +3,4 @@ var { "while" } = { while: 1 } //// [objectBindingPatternKeywordIdentifiers03.js] -var = { while: 1 }["while"]; +var = { "while": 1 }["while"]; diff --git a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers04.js b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers04.js index 4e53b13c0a6ba..de7608a77d22d 100644 --- a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers04.js +++ b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers04.js @@ -3,4 +3,4 @@ var { "while": while } = { while: 1 } //// [objectBindingPatternKeywordIdentifiers04.js] -var _a = { while: 1 }, = _a["while"], = _a.while; +var _a = { "while": 1 }, = _a["while"], = _a["while"]; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js index b72f0351b9c82..7b9c9f5d32850 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js @@ -27,15 +27,15 @@ var y = { 42: , get e() { }, set f() { }, - this: , - super: , - var: , - class: , - typeof: + "this": , + "super": , + "var": , + "class": , + "typeof": }; var x = { a: .b, a: ["ss"], a: [1] }; -var v = { class: }; // error +var v = { "class": }; // error diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js index 315e079d429bf..0a422dbda6f0f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js @@ -91,7 +91,7 @@ var C = (function () { return C; }()); var a; -var b = { new: function (x) { return ''; } }; // not a construct signature, function called new +var b = { "new": function (x) { return ''; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js index a61bedfd52f23..5fa148b541d45 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js @@ -91,7 +91,7 @@ var C = (function () { return C; }()); var a; -var b = { new: function (x) { return ''; } }; // not a construct signature, function called new +var b = { "new": function (x) { return ''; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js index c15c53b9bf80d..6a66e8bbda3b9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js @@ -92,7 +92,7 @@ var C = (function () { return C; }()); var a; -var b = { new: function (x) { return ''; } }; // not a construct signature, function called new +var b = { "new": function (x) { return ''; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js index f8aff596dc9c5..e19837a9f7f2c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js @@ -109,7 +109,7 @@ var D = (function () { return D; }()); var a; -var b = { new: function (x, y) { return ''; } }; // not a construct signature, function called new +var b = { "new": function (x, y) { return ''; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js index 141aa86823b27..735c5bdc2d69c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js @@ -128,7 +128,7 @@ var D = (function () { return D; }()); var a; -var b = { new: function (x, y) { return ''; } }; // not a construct signature, function called new +var b = { "new": function (x, y) { return ''; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js index b651d368f334b..6eab84a49ddb4 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js @@ -99,7 +99,7 @@ var C = (function () { return C; }()); var a; -var b = { new: function (x) { return null; } }; // not a construct signature, function called new +var b = { "new": function (x) { return null; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js index ff7095c4ea1a1..d927a8e082a22 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js @@ -95,7 +95,7 @@ var C = (function () { return C; }()); var a; -var b = { new: function (x) { return null; } }; // not a construct signature, function called new +var b = { "new": function (x) { return null; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js index 314eb700c4b19..512bebb3b0e8d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js @@ -87,7 +87,7 @@ var C = (function () { return C; }()); var a; -var b = { new: function (x) { return x; } }; +var b = { "new": function (x) { return x; } }; function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js index 182cf8263b779..80cfcd23ec9c3 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js @@ -87,7 +87,7 @@ var C = (function () { return C; }()); var a; -var b = { new: function (x) { return new C(x); } }; +var b = { "new": function (x) { return new C(x); } }; function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js index 5c5dd26c33171..87cb0b33531e5 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js @@ -91,7 +91,7 @@ var C = (function () { return C; }()); var a; -var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new +var b = { "new": function (x, y) { return new C(x, y); } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js index 14b2ec3c0ca0a..6b0e91f817ff9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js @@ -91,7 +91,7 @@ var C = (function () { return C; }()); var a; -var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new +var b = { "new": function (x, y) { return new C(x, y); } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js index ffc238cacae09..55f2a0217e934 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js @@ -91,7 +91,7 @@ var C = (function () { return C; }()); var a; -var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new +var b = { "new": function (x, y) { return new C(x, y); } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js index 6a703759fff75..c206a30237a5e 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js @@ -4,4 +4,4 @@ return; //// [parserErrorRecovery_ObjectLiteral2.js] var v = { a: , - return: }; + "return": }; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js index eecf45fea4fa0..6cee2b4272519 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js @@ -4,4 +4,4 @@ return; //// [parserErrorRecovery_ObjectLiteral3.js] var v = { a: , - return: }; + "return": }; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js index 87a1a31437ef7..23d17c8047b5c 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js @@ -4,4 +4,4 @@ return; //// [parserErrorRecovery_ObjectLiteral4.js] var v = { a: 1, - return: }; + "return": }; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js index 97e618946a0e2..7b83132bf0fb4 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js @@ -4,4 +4,4 @@ return; //// [parserErrorRecovery_ObjectLiteral5.js] var v = { a: 1, - return: }; + "return": }; diff --git a/tests/baselines/reference/parserExportAsFunctionIdentifier.js b/tests/baselines/reference/parserExportAsFunctionIdentifier.js index 7ed76bb87d945..62429c76855c7 100644 --- a/tests/baselines/reference/parserExportAsFunctionIdentifier.js +++ b/tests/baselines/reference/parserExportAsFunctionIdentifier.js @@ -9,4 +9,4 @@ var x = f.export(); //// [parserExportAsFunctionIdentifier.js] var f; -var x = f.export(); +var x = f["export"](); diff --git a/tests/baselines/reference/parserKeywordsAsIdentifierName1.js b/tests/baselines/reference/parserKeywordsAsIdentifierName1.js index c0c8c8443647f..a717abcc08ba0 100644 --- a/tests/baselines/reference/parserKeywordsAsIdentifierName1.js +++ b/tests/baselines/reference/parserKeywordsAsIdentifierName1.js @@ -8,7 +8,7 @@ var big = { //// [parserKeywordsAsIdentifierName1.js] var big = { - break: 0, - super: 0, - const: 0 + "break": 0, + "super": 0, + "const": 0 }; diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment2.js b/tests/baselines/reference/parserShorthandPropertyAssignment2.js index 0de0fa3829fc6..95d2f32ffad0e 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment2.js +++ b/tests/baselines/reference/parserShorthandPropertyAssignment2.js @@ -2,4 +2,4 @@ var v = { class }; //// [parserShorthandPropertyAssignment2.js] -var v = { class: }; +var v = { "class": }; diff --git a/tests/baselines/reference/parserSuperExpression3.js b/tests/baselines/reference/parserSuperExpression3.js index f311efcd0f6a8..064353669c80c 100644 --- a/tests/baselines/reference/parserSuperExpression3.js +++ b/tests/baselines/reference/parserSuperExpression3.js @@ -10,7 +10,7 @@ var C = (function () { function C() { } C.prototype.M = function () { - this.super(0); + this["super"](0); }; return C; }()); diff --git a/tests/baselines/reference/prototypeOnConstructorFunctions.js b/tests/baselines/reference/prototypeOnConstructorFunctions.js index d2e5ddde9251f..de1fec1f7e8ac 100644 --- a/tests/baselines/reference/prototypeOnConstructorFunctions.js +++ b/tests/baselines/reference/prototypeOnConstructorFunctions.js @@ -12,4 +12,4 @@ i.const.prototype.prop = "yo"; //// [prototypeOnConstructorFunctions.js] var i; -i.const.prototype.prop = "yo"; +i["const"].prototype.prop = "yo"; diff --git a/tests/baselines/reference/reservedWords.js b/tests/baselines/reference/reservedWords.js index 12fbcae0c651e..3424c05418175 100644 --- a/tests/baselines/reference/reservedWords.js +++ b/tests/baselines/reference/reservedWords.js @@ -19,16 +19,16 @@ var obj2 = { //// [reservedWords.js] var obj = { - if: 0, - debugger: 2, - break: 3, - function: 4 + "if": 0, + "debugger": 2, + "break": 3, + "function": 4 }; //This compiles. var obj2 = { - if: 0, - while: 1, - debugger: 2, - break: 3, - function: 4 + "if": 0, + "while": 1, + "debugger": 2, + "break": 3, + "function": 4 }; diff --git a/tests/baselines/reference/reservedWords2.js b/tests/baselines/reference/reservedWords2.js index a79a0564c788d..d9c8105c35f5b 100644 --- a/tests/baselines/reference/reservedWords2.js +++ b/tests/baselines/reference/reservedWords2.js @@ -27,8 +27,8 @@ function () { } throw function () { }; module; void {}; -var _a = { while: 1, return: 2 }, = _a.while, = _a.return; -var _b = { this: 1, switch: { continue: 2 } }, = _b.this, = _b.switch.continue; +var _a = { "while": 1, "return": 2 }, = _a["while"], = _a["return"]; +var _b = { "this": 1, "switch": { "continue": 2 } }, = _b["this"], = _b["switch"]["continue"]; var _c = void 0; debugger; if () diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index 9f1289dce554c..0094f696fafb5 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -97,7 +97,7 @@ var SubSub1 = (function (_super) { return _super.apply(this, arguments) || this; } SubSub1.prototype.bar = function () { - return _super.prototype.super.foo; + return _super.prototype["super"].foo; }; return SubSub1; }(Sub1)); diff --git a/tests/baselines/reference/tsxReactEmitNesting.js b/tests/baselines/reference/tsxReactEmitNesting.js index 29e948f687b32..eaee315c340cb 100644 --- a/tests/baselines/reference/tsxReactEmitNesting.js +++ b/tests/baselines/reference/tsxReactEmitNesting.js @@ -38,21 +38,21 @@ let render = (ctrl, model) => //// [file.js] // A simple render function with nesting and control statements var render = function (ctrl, model) { - return vdom.createElement("section", { class: "todoapp" }, - vdom.createElement("header", { class: "header" }, + return vdom.createElement("section", { "class": "todoapp" }, + vdom.createElement("header", { "class": "header" }, vdom.createElement("h1", null, "todos "), - vdom.createElement("input", { class: "new-todo", autofocus: true, autocomplete: "off", placeholder: "What needs to be done?", value: model.newTodo, onKeyup: ctrl.addTodo.bind(ctrl, model) })), - vdom.createElement("section", { class: "main", style: { display: (model.todos && model.todos.length) ? "block" : "none" } }, - vdom.createElement("input", { class: "toggle-all", type: "checkbox", onChange: ctrl.toggleAll.bind(ctrl) }), - vdom.createElement("ul", { class: "todo-list" }, model.filteredTodos.map(function (todo) { - return vdom.createElement("li", { class: { todo: true, completed: todo.completed, editing: todo == model.editedTodo } }, - vdom.createElement("div", { class: "view" }, + vdom.createElement("input", { "class": "new-todo", autofocus: true, autocomplete: "off", placeholder: "What needs to be done?", value: model.newTodo, onKeyup: ctrl.addTodo.bind(ctrl, model) })), + vdom.createElement("section", { "class": "main", style: { display: (model.todos && model.todos.length) ? "block" : "none" } }, + vdom.createElement("input", { "class": "toggle-all", type: "checkbox", onChange: ctrl.toggleAll.bind(ctrl) }), + vdom.createElement("ul", { "class": "todo-list" }, model.filteredTodos.map(function (todo) { + return vdom.createElement("li", { "class": { todo: true, completed: todo.completed, editing: todo == model.editedTodo } }, + vdom.createElement("div", { "class": "view" }, (!todo.editable) ? - vdom.createElement("input", { class: "toggle", type: "checkbox" }) + vdom.createElement("input", { "class": "toggle", type: "checkbox" }) : null, vdom.createElement("label", { onDoubleClick: function () { ctrl.editTodo(todo); } }, todo.title), - vdom.createElement("button", { class: "destroy", onClick: ctrl.removeTodo.bind(ctrl, todo) }), - vdom.createElement("div", { class: "iconBorder" }, - vdom.createElement("div", { class: "icon" })))); + vdom.createElement("button", { "class": "destroy", onClick: ctrl.removeTodo.bind(ctrl, todo) }), + vdom.createElement("div", { "class": "iconBorder" }, + vdom.createElement("div", { "class": "icon" })))); })))); }; diff --git a/tests/baselines/reference/typeQueryWithReservedWords.js b/tests/baselines/reference/typeQueryWithReservedWords.js index 7561eeddb7528..09c3b642a36d0 100644 --- a/tests/baselines/reference/typeQueryWithReservedWords.js +++ b/tests/baselines/reference/typeQueryWithReservedWords.js @@ -21,9 +21,9 @@ var Controller = (function () { } Controller.prototype.create = function () { }; - Controller.prototype.delete = function () { + Controller.prototype["delete"] = function () { }; - Controller.prototype.var = function () { + Controller.prototype["var"] = function () { }; return Controller; }()); From f025e0caede7f9d2891c0e98c6e171c45864195e Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Sun, 16 Oct 2016 15:19:02 -0700 Subject: [PATCH 02/18] Minor cleanup --- src/compiler/factory.ts | 62 +++------- src/compiler/transformers/es2015.ts | 17 ++- src/compiler/transformers/generators.ts | 6 +- src/compiler/transformers/module/module.ts | 25 ++--- src/compiler/transformers/module/system.ts | 125 +++++++++------------ src/compiler/transformers/ts.ts | 51 ++++----- src/compiler/types.ts | 8 ++ src/compiler/utilities.ts | 2 +- src/compiler/visitor.ts | 2 +- 9 files changed, 136 insertions(+), 162 deletions(-) diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 4194b7aaf5f4e..c42b16c5b8f3f 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -109,12 +109,12 @@ namespace ts { export function createLiteral(value: string | number | boolean, location?: TextRange): PrimaryExpression; export function createLiteral(value: string | number | boolean | StringLiteral | Identifier, location?: TextRange): PrimaryExpression { if (typeof value === "number") { - const node = createNode(SyntaxKind.NumericLiteral, location, /*flags*/ undefined); + const node = createNode(SyntaxKind.NumericLiteral, location, /*flags*/ undefined); node.text = value.toString(); return node; } else if (typeof value === "boolean") { - return createNode(value ? SyntaxKind.TrueKeyword : SyntaxKind.FalseKeyword, location, /*flags*/ undefined); + return createNode(value ? SyntaxKind.TrueKeyword : SyntaxKind.FalseKeyword, location, /*flags*/ undefined); } else if (typeof value === "string") { const node = createNode(SyntaxKind.StringLiteral, location, /*flags*/ undefined); @@ -226,20 +226,7 @@ namespace ts { // Signature elements - export function createParameter(name: string | Identifier | BindingPattern, initializer?: Expression, location?: TextRange) { - return createParameterDeclaration( - /*decorators*/ undefined, - /*modifiers*/ undefined, - /*dotDotDotToken*/ undefined, - name, - /*questionToken*/ undefined, - /*type*/ undefined, - initializer, - location - ); - } - - export function createParameterDeclaration(decorators: Decorator[], modifiers: Modifier[], dotDotDotToken: DotDotDotToken, name: string | Identifier | BindingPattern, questionToken: QuestionToken, type: TypeNode, initializer: Expression, location?: TextRange, flags?: NodeFlags) { + export function createParameter(decorators: Decorator[], modifiers: Modifier[], dotDotDotToken: DotDotDotToken, name: string | Identifier | BindingPattern, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression, location?: TextRange, flags?: NodeFlags) { const node = createNode(SyntaxKind.Parameter, location, flags); node.decorators = decorators ? createNodeArray(decorators) : undefined; node.modifiers = modifiers ? createNodeArray(modifiers) : undefined; @@ -251,9 +238,9 @@ namespace ts { return node; } - export function updateParameterDeclaration(node: ParameterDeclaration, decorators: Decorator[], modifiers: Modifier[], name: BindingName, type: TypeNode, initializer: Expression) { + export function updateParameter(node: ParameterDeclaration, decorators: Decorator[], modifiers: Modifier[], name: BindingName, type: TypeNode, initializer: Expression) { if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.type !== type || node.initializer !== initializer) { - return updateNode(createParameterDeclaration(decorators, modifiers, node.dotDotDotToken, name, node.questionToken, type, initializer, /*location*/ node, /*flags*/ node.flags), node); + return updateNode(createParameter(decorators, modifiers, node.dotDotDotToken, name, node.questionToken, type, initializer, /*location*/ node, /*flags*/ node.flags), node); } return node; @@ -1557,18 +1544,6 @@ namespace ts { } } - export function createRestParameter(name: string | Identifier) { - return createParameterDeclaration( - /*decorators*/ undefined, - /*modifiers*/ undefined, - createToken(SyntaxKind.DotDotDotToken), - name, - /*questionToken*/ undefined, - /*type*/ undefined, - /*initializer*/ undefined - ); - } - export function createFunctionCall(func: Expression, thisArg: Expression, argumentsList: Expression[], location?: TextRange) { return createCall( createPropertyAccess(func, "call"), @@ -1781,13 +1756,10 @@ namespace ts { return createArrowFunction( /*modifiers*/ undefined, /*typeParameters*/ undefined, - [createParameter("name")], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "name")], /*type*/ undefined, - /*equalsGreaterThanToken*/ undefined, - createElementAccess( - target, - createIdentifier("name") - ) + createToken(SyntaxKind.EqualsGreaterThanToken), + createElementAccess(target, createIdentifier("name")) ); } @@ -1797,11 +1769,11 @@ namespace ts { /*modifiers*/ undefined, /*typeParameters*/ undefined, [ - createParameter("name"), - createParameter("value") + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "name"), + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "value") ], /*type*/ undefined, - /*equalsGreaterThanToken*/ undefined, + createToken(SyntaxKind.EqualsGreaterThanToken), createAssignment( createElementAccess( target, @@ -1853,7 +1825,7 @@ namespace ts { /*decorators*/ undefined, /*modifiers*/ undefined, "value", - [createParameter("v")], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "v")], createBlock([ createStatement( createCall( @@ -1873,9 +1845,9 @@ namespace ts { createArrowFunction( /*modifiers*/ undefined, /*typeParameters*/ undefined, - [createParameter("name")], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "name")], /*type*/ undefined, - /*equalsGreaterThanToken*/ undefined, + createToken(SyntaxKind.EqualsGreaterThanToken), createLogicalOr( createElementAccess( createIdentifier("cache"), @@ -1915,8 +1887,8 @@ namespace ts { /*name*/ undefined, /*typeParameters*/ undefined, [ - createParameter("geti"), - createParameter("seti") + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "geti"), + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "seti") ], /*type*/ undefined, createBlock([ @@ -2246,7 +2218,7 @@ namespace ts { /** * Ensures "use strict" directive is added - * + * * @param node source file */ export function ensureUseStrict(node: SourceFile): SourceFile { diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index bb2e8ac2aa501..22203876df400 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -685,7 +685,7 @@ namespace ts { /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, - extendsClauseElement ? [createParameter("_super")] : [], + extendsClauseElement ? [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "_super")] : [], /*type*/ undefined, transformClassBody(node, extendsClauseElement) ); @@ -1035,7 +1035,12 @@ namespace ts { // evaluated inside the function body. return setOriginalNode( createParameter( + /*decorators*/ undefined, + /*modifiers*/ undefined, + /*dotDotDotToken*/ undefined, getGeneratedNameForNode(node), + /*questionToken*/ undefined, + /*type*/ undefined, /*initializer*/ undefined, /*location*/ node ), @@ -1046,7 +1051,12 @@ namespace ts { // Initializers are elided return setOriginalNode( createParameter( + /*decorators*/ undefined, + /*modifiers*/ undefined, + /*dotDotDotToken*/ undefined, node.name, + /*questionToken*/ undefined, + /*type*/ undefined, /*initializer*/ undefined, /*location*/ node ), @@ -2506,7 +2516,7 @@ namespace ts { } } else { - loopParameters.push(createParameter(name)); + loopParameters.push(createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, name)); if (resolver.getNodeCheckFlags(decl) & NodeCheckFlags.NeedsLoopOutParameter) { const outParamName = createUniqueName("out_" + name.text); loopOutParameters.push({ originalName: name, outParamName }); @@ -3081,9 +3091,8 @@ namespace ts { /** * Hooks node substitutions. * + * @param emitContext The context for the emitter. * @param node The node to substitute. - * @param isExpression A value indicating whether the node is to be used in an expression - * position. */ function onSubstituteNode(emitContext: EmitContext, node: Node) { node = previousOnSubstituteNode(emitContext, node); diff --git a/src/compiler/transformers/generators.ts b/src/compiler/transformers/generators.ts index aaf9014c5cc6a..46c8ef5b7a32e 100644 --- a/src/compiler/transformers/generators.ts +++ b/src/compiler/transformers/generators.ts @@ -2369,7 +2369,7 @@ namespace ts { labelExpressions = []; } - const expression = createSynthesizedNode(SyntaxKind.NumericLiteral); + const expression = createLiteral(-1); if (labelExpressions[label] === undefined) { labelExpressions[label] = [expression]; } @@ -2380,7 +2380,7 @@ namespace ts { return expression; } - return createNode(SyntaxKind.OmittedExpression); + return createOmittedExpression(); } /** @@ -2596,7 +2596,7 @@ namespace ts { /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, - [createParameter(state)], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, state)], /*type*/ undefined, createBlock( buildResult, diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index 1cca7a21777f5..f551f44dad168 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -91,7 +91,7 @@ namespace ts { addRange(statements, endLexicalEnvironment()); addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false); - const updated = updateSourceFile(node, statements); + const updated = updateSourceFileNode(node, createNodeArray(statements, node.statements)); if (hasExportStarsToExportValues) { setEmitFlags(updated, EmitFlags.EmitExportStar | getEmitFlags(node)); } @@ -156,7 +156,8 @@ namespace ts { // Create an updated SourceFile: // // define(moduleName?, ["module1", "module2"], function ... - return updateSourceFile(node, [ + return updateSourceFileNode(node, createNodeArray( + [ createStatement( createCall( define, @@ -184,8 +185,8 @@ namespace ts { /*name*/ undefined, /*typeParameters*/ undefined, [ - createParameter("require"), - createParameter("exports"), + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"), + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports"), ...importAliasNames ], /*type*/ undefined, @@ -194,7 +195,9 @@ namespace ts { ] ) ) - ]); + ], + /*location*/ node.statements) + ); } /** @@ -988,7 +991,7 @@ namespace ts { function createRequireCall(importNode: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration) { const moduleName = getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions); const args: Expression[] = []; - if (isDefined(moduleName)) { + if (moduleName) { args.push(moduleName); } @@ -1037,7 +1040,7 @@ namespace ts { for (const amdDependency of node.amdDependencies) { if (amdDependency.name) { aliasedModuleNames.push(createLiteral(amdDependency.path)); - importAliasNames.push(createParameter(amdDependency.name)); + importAliasNames.push(createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, amdDependency.name)); } else { unaliasedModuleNames.push(createLiteral(amdDependency.path)); @@ -1055,7 +1058,7 @@ namespace ts { // This is so that when printer will not substitute the identifier setEmitFlags(importAliasName, EmitFlags.NoSubstitution); aliasedModuleNames.push(externalModuleName); - importAliasNames.push(createParameter(importAliasName)); + importAliasNames.push(createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, importAliasName)); } else { unaliasedModuleNames.push(externalModuleName); @@ -1064,11 +1067,5 @@ namespace ts { return { aliasedModuleNames, unaliasedModuleNames, importAliasNames }; } - - function updateSourceFile(node: SourceFile, statements: Statement[]) { - const updated = getMutableClone(node); - updated.statements = createNodeArray(statements, node.statements); - return updated; - } } } diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index 775d8fc34f9b5..d2903ba927aac 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -114,8 +114,8 @@ namespace ts { /*name*/ undefined, /*typeParameters*/ undefined, [ - createParameter(exportFunctionForFile), - createParameter(contextObjectForFile) + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, exportFunctionForFile), + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, contextObjectForFile) ], /*type*/ undefined, setEmitFlags( @@ -435,7 +435,7 @@ namespace ts { /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, - [createParameter(parameterName)], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)], /*type*/ undefined, createBlock(statements, /*location*/ undefined, /*multiLine*/ true) ) @@ -771,7 +771,7 @@ namespace ts { return createFor( expressions.length ? inlineExpressions(expressions) - : createSynthesizedNode(SyntaxKind.OmittedExpression), + : createOmittedExpression(), node.condition, node.incrementor, visitNode(node.statement, visitNestedNode, isStatement), @@ -806,10 +806,12 @@ namespace ts { function visitForInStatement(node: ForInStatement): ForInStatement { const initializer = node.initializer; if (shouldHoistLoopInitializer(initializer)) { - const updated = getMutableClone(node); - updated.initializer = transformForBinding(initializer); - updated.statement = visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock); - return updated; + return updateForIn( + node, + transformForBinding(initializer), + node.expression, + visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock) + ); } else { return visitEachChild(node, visitNestedNode, context); @@ -824,10 +826,12 @@ namespace ts { function visitForOfStatement(node: ForOfStatement): ForOfStatement { const initializer = node.initializer; if (shouldHoistLoopInitializer(initializer)) { - const updated = getMutableClone(node); - updated.initializer = transformForBinding(initializer); - updated.statement = visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock); - return updated; + return updateForOf( + node, + transformForBinding(initializer), + node.expression, + visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock) + ); } else { return visitEachChild(node, visitNestedNode, context); @@ -840,14 +844,12 @@ namespace ts { * @param node The statement to visit. */ function visitDoStatement(node: DoStatement) { - const statement = visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock); - if (statement !== node.statement) { - const updated = getMutableClone(node); - updated.statement = statement; - return updated; + return updateDo( + node, + visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock), + node.expression + ); } - return node; - } /** * Visits the body of a WhileStatement to hoist declarations. @@ -855,14 +857,12 @@ namespace ts { * @param node The statement to visit. */ function visitWhileStatement(node: WhileStatement) { - const statement = visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock); - if (statement !== node.statement) { - const updated = getMutableClone(node); - updated.statement = statement; - return updated; + return updateWhile( + node, + node.expression, + visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock) + ); } - return node; - } /** * Visits the body of a LabeledStatement to hoist declarations. @@ -870,13 +870,11 @@ namespace ts { * @param node The statement to visit. */ function visitLabeledStatement(node: LabeledStatement) { - const statement = visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock); - if (statement !== node.statement) { - const updated = getMutableClone(node); - updated.statement = statement; - return updated; - } - return node; + return updateLabel( + node, + node.label, + visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock) + ); } /** @@ -885,13 +883,11 @@ namespace ts { * @param node The statement to visit. */ function visitWithStatement(node: WithStatement) { - const statement = visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock); - if (statement !== node.statement) { - const updated = getMutableClone(node); - updated.statement = statement; - return updated; - } - return node; + return updateWith( + node, + node.expression, + visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock) + ); } /** @@ -900,13 +896,11 @@ namespace ts { * @param node The statement to visit. */ function visitSwitchStatement(node: SwitchStatement) { - const caseBlock = visitNode(node.caseBlock, visitNestedNode, isCaseBlock); - if (caseBlock !== node.caseBlock) { - const updated = getMutableClone(node); - updated.caseBlock = caseBlock; - return updated; - } - return node; + return updateSwitch( + node, + node.expression, + visitNode(node.caseBlock, visitNestedNode, isCaseBlock) + ); } /** @@ -915,13 +909,10 @@ namespace ts { * @param node The node to visit. */ function visitCaseBlock(node: CaseBlock) { - const clauses = visitNodes(node.clauses, visitNestedNode, isCaseOrDefaultClause); - if (clauses !== node.clauses) { - const updated = getMutableClone(node); - updated.clauses = clauses; - return updated; - } - return node; + return updateCaseBlock( + node, + visitNodes(node.clauses, visitNestedNode, isCaseOrDefaultClause) + ); } /** @@ -930,13 +921,11 @@ namespace ts { * @param node The clause to visit. */ function visitCaseClause(node: CaseClause) { - const statements = visitNodes(node.statements, visitNestedNode, isStatement); - if (statements !== node.statements) { - const updated = getMutableClone(node); - updated.statements = statements; - return updated; - } - return node; + return updateCaseClause( + node, + node.expression, + visitNodes(node.statements, visitNestedNode, isStatement) + ); } /** @@ -963,13 +952,11 @@ namespace ts { * @param node The clause to visit. */ function visitCatchClause(node: CatchClause) { - const block = visitNode(node.block, visitNestedNode, isBlock); - if (block !== node.block) { - const updated = getMutableClone(node); - updated.block = block; - return updated; - } - return node; + return updateCatchClause( + node, + node.variableDeclaration, + visitNode(node.block, visitNestedNode, isBlock) + ); } /** @@ -1223,7 +1210,7 @@ namespace ts { /*asteriskToken*/ undefined, exportStarFunction, /*typeParameters*/ undefined, - [createParameter(m)], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, m)], /*type*/ undefined, createBlock([ createVariableStatement( diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 1d930c3c21e6e..55e35106189ba 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -48,7 +48,7 @@ namespace ts { let currentNamespaceContainerName: Identifier; let currentScope: SourceFile | Block | ModuleBlock | CaseBlock; let currentScopeFirstDeclarationsOfName: Map; - let currentSourceFileExternalHelpersModuleName: Identifier; + let currentExternalHelpersModuleName: Identifier; /** * Keeps track of whether expression substitution has been enabled for specific edge cases. @@ -475,16 +475,16 @@ namespace ts { /*decorators*/ undefined, /*modifiers*/ undefined, createImportClause(/*name*/ undefined, createNamespaceImport(externalHelpersModuleName)), - createLiteral(externalHelpersModuleNameText) - ); + createLiteral(externalHelpersModuleNameText)); + externalHelpersModuleImport.parent = node; externalHelpersModuleImport.flags &= ~NodeFlags.Synthesized; statements.push(externalHelpersModuleImport); - currentSourceFileExternalHelpersModuleName = externalHelpersModuleName; + currentExternalHelpersModuleName = externalHelpersModuleName; addRange(statements, visitNodes(node.statements, sourceElementVisitor, isStatement, statementOffset)); addRange(statements, endLexicalEnvironment()); - currentSourceFileExternalHelpersModuleName = undefined; + currentExternalHelpersModuleName = undefined; node = updateSourceFileNode(node, createNodeArray(statements, node.statements)); node.externalHelpersModuleName = externalHelpersModuleName; @@ -614,9 +614,10 @@ namespace ts { * Transforms a decorated class declaration and appends the resulting statements. If * the class requires an alias to avoid issues with double-binding, the alias is returned. * + * @param statements A statement list to which to add the declaration. * @param node A ClassDeclaration node. * @param name The name of the class. - * @param hasExtendsClause A value indicating whether + * @param hasExtendsClause A value indicating whether the class has an extends clause. */ function addClassDeclarationHeadWithDecorators(statements: Statement[], node: ClassDeclaration, name: Identifier, hasExtendsClause: boolean) { // When we emit an ES6 class that has a class decorator, we must tailor the @@ -1454,7 +1455,7 @@ namespace ts { : undefined; const helper = createDecorateHelper( - currentSourceFileExternalHelpersModuleName, + currentExternalHelpersModuleName, decoratorExpressions, prefix, memberName, @@ -1504,7 +1505,7 @@ namespace ts { const expression = createAssignment( decoratedClassAlias, createDecorateHelper( - currentSourceFileExternalHelpersModuleName, + currentExternalHelpersModuleName, decoratorExpressions, getDeclarationName(node) ) @@ -1528,7 +1529,7 @@ namespace ts { const result = createAssignment( getDeclarationName(node), createDecorateHelper( - currentSourceFileExternalHelpersModuleName, + currentExternalHelpersModuleName, decoratorExpressions, getDeclarationName(node) ), @@ -1561,7 +1562,7 @@ namespace ts { expressions = []; for (const decorator of decorators) { const helper = createParamHelper( - currentSourceFileExternalHelpersModuleName, + currentExternalHelpersModuleName, transformDecorator(decorator), parameterOffset, /*location*/ decorator.expression); @@ -1591,13 +1592,13 @@ namespace ts { function addOldTypeMetadata(node: Declaration, decoratorExpressions: Expression[]) { if (compilerOptions.emitDecoratorMetadata) { if (shouldAddTypeMetadata(node)) { - decoratorExpressions.push(createMetadataHelper(currentSourceFileExternalHelpersModuleName, "design:type", serializeTypeOfNode(node))); + decoratorExpressions.push(createMetadataHelper(currentExternalHelpersModuleName, "design:type", serializeTypeOfNode(node))); } if (shouldAddParamTypesMetadata(node)) { - decoratorExpressions.push(createMetadataHelper(currentSourceFileExternalHelpersModuleName, "design:paramtypes", serializeParameterTypesOfNode(node))); + decoratorExpressions.push(createMetadataHelper(currentExternalHelpersModuleName, "design:paramtypes", serializeParameterTypesOfNode(node))); } if (shouldAddReturnTypeMetadata(node)) { - decoratorExpressions.push(createMetadataHelper(currentSourceFileExternalHelpersModuleName, "design:returntype", serializeReturnTypeOfNode(node))); + decoratorExpressions.push(createMetadataHelper(currentExternalHelpersModuleName, "design:returntype", serializeReturnTypeOfNode(node))); } } } @@ -1606,16 +1607,16 @@ namespace ts { if (compilerOptions.emitDecoratorMetadata) { let properties: ObjectLiteralElementLike[]; if (shouldAddTypeMetadata(node)) { - (properties || (properties = [])).push(createPropertyAssignment("type", createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, /*equalsGreaterThanToken*/ undefined, serializeTypeOfNode(node)))); + (properties || (properties = [])).push(createPropertyAssignment("type", createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, createToken(SyntaxKind.EqualsGreaterThanToken), serializeTypeOfNode(node)))); } if (shouldAddParamTypesMetadata(node)) { - (properties || (properties = [])).push(createPropertyAssignment("paramTypes", createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, /*equalsGreaterThanToken*/ undefined, serializeParameterTypesOfNode(node)))); + (properties || (properties = [])).push(createPropertyAssignment("paramTypes", createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, createToken(SyntaxKind.EqualsGreaterThanToken), serializeParameterTypesOfNode(node)))); } if (shouldAddReturnTypeMetadata(node)) { - (properties || (properties = [])).push(createPropertyAssignment("returnType", createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, /*equalsGreaterThanToken*/ undefined, serializeReturnTypeOfNode(node)))); + (properties || (properties = [])).push(createPropertyAssignment("returnType", createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, createToken(SyntaxKind.EqualsGreaterThanToken), serializeReturnTypeOfNode(node)))); } if (properties) { - decoratorExpressions.push(createMetadataHelper(currentSourceFileExternalHelpersModuleName, "design:typeinfo", createObjectLiteral(properties, /*location*/ undefined, /*multiLine*/ true))); + decoratorExpressions.push(createMetadataHelper(currentExternalHelpersModuleName, "design:typeinfo", createObjectLiteral(properties, /*location*/ undefined, /*multiLine*/ true))); } } } @@ -2188,9 +2189,9 @@ namespace ts { // While we emit the source map for the node after skipping decorators and modifiers, // we need to emit the comments for the original range. + setOriginalNode(accessor, node); setCommentRange(accessor, node); setSourceMapRange(accessor, moveRangePastDecorators(node)); - setOriginalNode(accessor, node); return accessor; } @@ -2220,9 +2221,9 @@ namespace ts { // While we emit the source map for the node after skipping decorators and modifiers, // we need to emit the comments for the original range. + setOriginalNode(accessor, node); setCommentRange(accessor, node); setSourceMapRange(accessor, moveRangePastDecorators(node)); - setOriginalNode(accessor, node); return accessor; } @@ -2372,7 +2373,7 @@ namespace ts { return undefined; } - const parameter = createParameterDeclaration( + const parameter = createParameter( /*decorators*/ undefined, /*modifiers*/ undefined, node.dotDotDotToken, @@ -2590,7 +2591,7 @@ namespace ts { /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, - [createParameter(parameterName)], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)], /*type*/ undefined, transformEnumBody(node, containerName) ), @@ -2758,7 +2759,7 @@ namespace ts { ] ); - setOriginalNode(statement, /*original*/ node); + setOriginalNode(statement, node); // Adjust the source map emit to match the old emitter. if (node.kind === SyntaxKind.EnumDeclaration) { @@ -2862,7 +2863,7 @@ namespace ts { /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, - [createParameter(parameterName)], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)], /*type*/ undefined, transformModuleBody(node, containerName) ), @@ -3387,6 +3388,7 @@ namespace ts { /** * Hook for node emit. * + * @param emitContext A context hint for the emitter. * @param node The node to emit. * @param emit A callback used to emit the node in the printer. */ @@ -3409,9 +3411,8 @@ namespace ts { /** * Hooks node substitutions. * + * @param emitContext A context hint for the emitter. * @param node The node to substitute. - * @param isExpression A value indicating whether the node is to be used in an expression - * position. */ function onSubstituteNode(emitContext: EmitContext, node: Node) { node = previousOnSubstituteNode(emitContext, node); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 3840401daca60..d031188571db6 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -552,6 +552,14 @@ namespace ts { resolvedSymbol: Symbol; } + /*@internal*/ + export interface GeneratedIdentifier extends Identifier { + autoGenerateKind: GeneratedIdentifierKind.Auto + | GeneratedIdentifierKind.Loop + | GeneratedIdentifierKind.Unique + | GeneratedIdentifierKind.Node; + } + export interface QualifiedName extends Node { kind: SyntaxKind.QualifiedName; left: EntityName; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 7d4a144407462..c4e6712015cb9 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -3646,7 +3646,7 @@ namespace ts { return node.kind === SyntaxKind.Identifier; } - export function isGeneratedIdentifier(node: Node): boolean { + export function isGeneratedIdentifier(node: Node): node is GeneratedIdentifier { // Using `>` here catches both `GeneratedIdentifierKind.None` and `undefined`. return isIdentifier(node) && node.autoGenerateKind > GeneratedIdentifierKind.None; } diff --git a/src/compiler/visitor.ts b/src/compiler/visitor.ts index 8dca78fec9794..0155e1b1511aa 100644 --- a/src/compiler/visitor.ts +++ b/src/compiler/visitor.ts @@ -692,7 +692,7 @@ namespace ts { // Signature elements case SyntaxKind.Parameter: - return updateParameterDeclaration(node, + return updateParameter(node, visitNodes((node).decorators, visitor, isDecorator), visitNodes((node).modifiers, visitor, isModifier), visitNode((node).name, visitor, isBindingName), From bb8a3c41dbaf49008d375753233da11529a819f7 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 17 Oct 2016 00:43:02 -0700 Subject: [PATCH 03/18] Cleaned up emit of enum declaration --- src/compiler/transformers/module/module.ts | 6 -- src/compiler/transformers/module/system.ts | 10 +-- src/compiler/transformers/ts.ts | 63 +++++++------------ .../ModuleWithExportedAndNonExportedEnums.js | 4 +- .../reference/amdImportAsPrimaryExpression.js | 4 +- .../amdImportNotAsPrimaryExpression.js | 4 +- .../collisionExportsRequireAndEnum.js | 24 +++---- .../commentOnExportEnumDeclaration.js | 4 +- .../commonJSImportNotAsPrimaryExpression.js | 4 +- .../declFileTypeofInAnonymousType.js | 4 +- .../declarationEmitNameConflicts2.js | 4 +- .../declarationEmitNameConflicts3.js | 4 +- .../disallowLineTerminatorBeforeArrow.js | 4 +- .../reference/enumAssignmentCompat3.js | 35 +++++------ .../reference/enumAssignmentCompat4.js | 8 +-- .../reference/enumFromExternalModule.js | 4 +- .../enumLiteralAssignableToEnumInsideUnion.js | 16 ++--- tests/baselines/reference/enumMerging.js | 30 +++++---- .../baselines/reference/enumMergingErrors.js | 60 +++++++++--------- .../es5ModuleInternalNamedImports.js | 4 +- .../es6ModuleConstEnumDeclaration2.js | 8 +-- .../reference/es6ModuleEnumDeclaration.js | 8 +-- .../es6ModuleInternalNamedImports.js | 4 +- .../es6ModuleInternalNamedImports2.js | 4 +- .../exportAssignmentAndDeclaration.js | 4 +- tests/baselines/reference/exportCodeGen.js | 4 +- .../reference/exportsAndImports3-amd.js | 4 +- .../reference/exportsAndImports3-es6.js | 4 +- .../baselines/reference/exportsAndImports3.js | 4 +- ...ericRecursiveImplicitConstructorErrors2.js | 4 +- .../baselines/reference/instantiatedModule.js | 4 +- .../reference/interfaceAssignmentCompat.js | 4 +- .../baselines/reference/internalAliasEnum.js | 4 +- ...nalAliasEnumInsideLocalModuleWithExport.js | 4 +- ...AliasEnumInsideLocalModuleWithoutExport.js | 4 +- ...sideLocalModuleWithoutExportAccessError.js | 4 +- ...AliasEnumInsideTopLevelModuleWithExport.js | 4 +- ...asEnumInsideTopLevelModuleWithoutExport.js | 4 +- .../reference/localImportNameVsGlobalName.js | 4 +- .../reference/mergeWithImportedType.js | 4 +- .../reference/mergedDeclarations3.js | 4 +- .../mergedModuleDeclarationCodeGen5.js | 4 +- .../baselines/reference/moduleCodeGenTest5.js | 4 +- .../reference/moduleDuplicateIdentifiers.js | 6 +- ...duleSameValueDuplicateExportedBindings2.js | 4 +- .../reference/moduleVisibilityTest1.js | 4 +- .../moduleWithStatementsOfEveryKind.js | 4 +- tests/baselines/reference/nameCollision.js | 4 +- tests/baselines/reference/parserEnum1.js | 4 +- tests/baselines/reference/parserEnum2.js | 4 +- tests/baselines/reference/parserEnum3.js | 4 +- tests/baselines/reference/parserEnum4.js | 4 +- .../baselines/reference/parserRealSource10.js | 16 ++--- .../baselines/reference/parserRealSource14.js | 4 +- .../baselines/reference/parserRealSource2.js | 56 ++++++++--------- .../baselines/reference/parserRealSource3.js | 4 +- ...yLocalInternalReferenceImportWithExport.js | 8 +-- ...calInternalReferenceImportWithoutExport.js | 8 +-- ...pLevelInternalReferenceImportWithExport.js | 8 +-- ...velInternalReferenceImportWithoutExport.js | 8 +-- tests/baselines/reference/scannerEnum1.js | 4 +- ...stemModuleConstEnumsSeparateCompilation.js | 4 +- .../systemModuleDeclarationMerging.js | 2 +- .../systemModuleNonTopLevelModuleMembers.js | 6 +- .../reference/typeofAnExportedType.js | 4 +- 65 files changed, 266 insertions(+), 300 deletions(-) diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index f551f44dad168..51b03b43c94da 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -792,12 +792,6 @@ namespace ts { function visitExpressionStatementForEnumOrNamespaceDeclaration(node: ExpressionStatement, original: EnumDeclaration | ModuleDeclaration): VisitResult { const statements: Statement[] = [node]; - // Preserve old behavior for enums in which a variable statement is emitted after the body itself. - if (hasModifier(original, ModifierFlags.Export) && - original.kind === SyntaxKind.EnumDeclaration && - isFirstDeclarationOfKind(original, SyntaxKind.EnumDeclaration)) { - addVarForExportedEnumOrNamespaceDeclaration(statements, original); - } addExportMemberAssignments(statements, original.name); diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index d2903ba927aac..acd25a41a090f 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -692,12 +692,6 @@ namespace ts { const originalNode = getOriginalNode(node); if ((originalNode.kind === SyntaxKind.ModuleDeclaration || originalNode.kind === SyntaxKind.EnumDeclaration) && hasModifier(originalNode, ModifierFlags.Export)) { const name = getDeclarationName(originalNode); - // We only need to hoistVariableDeclaration for EnumDeclaration - // as ModuleDeclaration is already hoisted when the transformer call visitVariableStatement - // which then call transformsVariable for each declaration in declarationList - if (originalNode.kind === SyntaxKind.EnumDeclaration) { - hoistVariableDeclaration(name); - } return [ node, createExportStatement(name, name) @@ -849,7 +843,7 @@ namespace ts { visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock), node.expression ); - } + } /** * Visits the body of a WhileStatement to hoist declarations. @@ -862,7 +856,7 @@ namespace ts { node.expression, visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock) ); - } + } /** * Visits the body of a LabeledStatement to hoist declarations. diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 55e35106189ba..fdb3f7b208d9a 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -2517,29 +2517,6 @@ namespace ts { || compilerOptions.isolatedModules; } - function shouldEmitVarForEnumDeclaration(node: EnumDeclaration | ModuleDeclaration) { - return isFirstEmittedDeclarationInScope(node) - && (!hasModifier(node, ModifierFlags.Export) - || isES6ExportedDeclaration(node)); - } - - - /* - * Adds a trailing VariableStatement for an enum or module declaration. - */ - function addVarForEnumExportedFromNamespace(statements: Statement[], node: EnumDeclaration | ModuleDeclaration) { - const statement = createVariableStatement( - /*modifiers*/ undefined, - [createVariableDeclaration( - getDeclarationName(node), - /*type*/ undefined, - getExportName(node) - )] - ); - setSourceMapRange(statement, node); - statements.push(statement); - } - /** * Visits an enum declaration. * @@ -2562,7 +2539,7 @@ namespace ts { // a leading variable declaration, we should not emit leading comments for the // enum body. recordEmittedDeclarationInScope(node); - if (shouldEmitVarForEnumDeclaration(node)) { + if (isFirstEmittedDeclarationInScope(node)) { addVarForEnumOrModuleDeclaration(statements, node); // We should still emit the comments if we are emitting a system module. @@ -2580,6 +2557,25 @@ namespace ts { // `exportName` is the expression used within this node's container for any exported references. const exportName = getExportName(node); + // x || (x = {}) + // exports.x || (exports.x = {}) + let moduleArg = + createLogicalOr( + exportName, + createAssignment( + exportName, + createObjectLiteral() + ) + ); + + if (hasModifier(node, ModifierFlags.Export) && !isES6ExportedDeclaration(node)) { + // `localName` is the expression used within this node's containing scope for any local references. + const localName = getLocalName(node); + + // x = (exports.x || (exports.x = {})) + moduleArg = createAssignment(localName, moduleArg); + } + // (function (x) { // x[x["y"] = 0] = "y"; // ... @@ -2596,13 +2592,7 @@ namespace ts { transformEnumBody(node, containerName) ), /*typeArguments*/ undefined, - [createLogicalOr( - exportName, - createAssignment( - exportName, - createObjectLiteral() - ) - )] + [moduleArg] ), /*location*/ node ); @@ -2610,11 +2600,6 @@ namespace ts { setOriginalNode(enumStatement, node); setEmitFlags(enumStatement, emitFlags); statements.push(enumStatement); - - if (isNamespaceExport(node)) { - addVarForEnumExportedFromNamespace(statements, node); - } - return statements; } @@ -2739,10 +2724,6 @@ namespace ts { return false; } - function shouldEmitVarForModuleDeclaration(node: ModuleDeclaration) { - return isFirstEmittedDeclarationInScope(node); - } - /** * Adds a leading VariableStatement for a enum or module declaration. */ @@ -2817,7 +2798,7 @@ namespace ts { // a leading variable declaration, we should not emit leading comments for the // module body. recordEmittedDeclarationInScope(node); - if (shouldEmitVarForModuleDeclaration(node)) { + if (isFirstEmittedDeclarationInScope(node)) { addVarForEnumOrModuleDeclaration(statements, node); // We should still emit the comments if we are emitting a system module. if (moduleKind !== ModuleKind.System || currentScope !== currentSourceFile) { diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.js b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.js index 3cd522d3c2c2f..713d2ac7f1870 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.js +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.js @@ -14,11 +14,11 @@ var b = A.Day.Monday; //// [ModuleWithExportedAndNonExportedEnums.js] var A; (function (A) { + var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Blue"] = 1] = "Blue"; - })(A.Color || (A.Color = {})); - var Color = A.Color; + })(Color = A.Color || (A.Color = {})); var Day; (function (Day) { Day[Day["Monday"] = 0] = "Monday"; diff --git a/tests/baselines/reference/amdImportAsPrimaryExpression.js b/tests/baselines/reference/amdImportAsPrimaryExpression.js index 1281b7f7f4757..3c2e9c041fac0 100644 --- a/tests/baselines/reference/amdImportAsPrimaryExpression.js +++ b/tests/baselines/reference/amdImportAsPrimaryExpression.js @@ -15,12 +15,12 @@ if(foo.E1.A === 0){ //// [foo_0.js] define(["require", "exports"], function (require, exports) { "use strict"; + var E1; (function (E1) { E1[E1["A"] = 0] = "A"; E1[E1["B"] = 1] = "B"; E1[E1["C"] = 2] = "C"; - })(exports.E1 || (exports.E1 = {})); - var E1 = exports.E1; + })(E1 = exports.E1 || (exports.E1 = {})); }); //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { diff --git a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js index b8e9f5346b07e..efd1c2aa909fa 100644 --- a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js @@ -42,12 +42,12 @@ define(["require", "exports"], function (require, exports) { }()); exports.C1 = C1; C1.s1 = true; + var E1; (function (E1) { E1[E1["A"] = 0] = "A"; E1[E1["B"] = 1] = "B"; E1[E1["C"] = 2] = "C"; - })(exports.E1 || (exports.E1 = {})); - var E1 = exports.E1; + })(E1 = exports.E1 || (exports.E1 = {})); }); //// [foo_1.js] define(["require", "exports"], function (require, exports) { diff --git a/tests/baselines/reference/collisionExportsRequireAndEnum.js b/tests/baselines/reference/collisionExportsRequireAndEnum.js index 3935ee312fb73..47d127e8a67f7 100644 --- a/tests/baselines/reference/collisionExportsRequireAndEnum.js +++ b/tests/baselines/reference/collisionExportsRequireAndEnum.js @@ -63,16 +63,16 @@ module m4 { //// [collisionExportsRequireAndEnum_externalmodule.js] define(["require", "exports"], function (require, exports) { "use strict"; + var require; (function (require) { require[require["_thisVal1"] = 0] = "_thisVal1"; require[require["_thisVal2"] = 1] = "_thisVal2"; - })(exports.require || (exports.require = {})); - var require = exports.require; + })(require = exports.require || (exports.require = {})); + var exports; (function (exports) { exports[exports["_thisVal1"] = 0] = "_thisVal1"; exports[exports["_thisVal2"] = 1] = "_thisVal2"; - })(exports.exports || (exports.exports = {})); - var exports = exports.exports; + })(exports = exports.exports || (exports.exports = {})); var m1; (function (m1) { var require; @@ -88,16 +88,16 @@ define(["require", "exports"], function (require, exports) { })(m1 || (m1 = {})); var m2; (function (m2) { + var require; (function (require) { require[require["_thisVal1"] = 0] = "_thisVal1"; require[require["_thisVal2"] = 1] = "_thisVal2"; - })(m2.require || (m2.require = {})); - var require = m2.require; + })(require = m2.require || (m2.require = {})); + var exports; (function (exports) { exports[exports["_thisVal1"] = 0] = "_thisVal1"; exports[exports["_thisVal2"] = 1] = "_thisVal2"; - })(m2.exports || (m2.exports = {})); - var exports = m2.exports; + })(exports = m2.exports || (m2.exports = {})); })(m2 || (m2 = {})); }); //// [collisionExportsRequireAndEnum_globalFile.js] @@ -126,14 +126,14 @@ var m3; })(m3 || (m3 = {})); var m4; (function (m4) { + var require; (function (require) { require[require["_thisVal1"] = 0] = "_thisVal1"; require[require["_thisVal2"] = 1] = "_thisVal2"; - })(m4.require || (m4.require = {})); - var require = m4.require; + })(require = m4.require || (m4.require = {})); + var exports; (function (exports) { exports[exports["_thisVal1"] = 0] = "_thisVal1"; exports[exports["_thisVal2"] = 1] = "_thisVal2"; - })(m4.exports || (m4.exports = {})); - var exports = m4.exports; + })(exports = m4.exports || (m4.exports = {})); })(m4 || (m4 = {})); diff --git a/tests/baselines/reference/commentOnExportEnumDeclaration.js b/tests/baselines/reference/commentOnExportEnumDeclaration.js index 6ded51456d881..61307b95b1c91 100644 --- a/tests/baselines/reference/commentOnExportEnumDeclaration.js +++ b/tests/baselines/reference/commentOnExportEnumDeclaration.js @@ -11,9 +11,9 @@ export enum Color { /** * comment */ +var Color; (function (Color) { Color[Color["r"] = 0] = "r"; Color[Color["g"] = 1] = "g"; Color[Color["b"] = 2] = "b"; -})(exports.Color || (exports.Color = {})); -var Color = exports.Color; +})(Color = exports.Color || (exports.Color = {})); diff --git a/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js b/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js index e7496f3445fc9..a66d04a2ddedb 100644 --- a/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js @@ -41,12 +41,12 @@ var C1 = (function () { }()); exports.C1 = C1; C1.s1 = true; +var E1; (function (E1) { E1[E1["A"] = 0] = "A"; E1[E1["B"] = 1] = "B"; E1[E1["C"] = 2] = "C"; -})(exports.E1 || (exports.E1 = {})); -var E1 = exports.E1; +})(E1 = exports.E1 || (exports.E1 = {})); //// [foo_1.js] "use strict"; var i; diff --git a/tests/baselines/reference/declFileTypeofInAnonymousType.js b/tests/baselines/reference/declFileTypeofInAnonymousType.js index 68db3d120cdfa..656cd49ebfaea 100644 --- a/tests/baselines/reference/declFileTypeofInAnonymousType.js +++ b/tests/baselines/reference/declFileTypeofInAnonymousType.js @@ -31,12 +31,12 @@ var m1; return c; }()); m1.c = c; + var e; (function (e) { e[e["weekday"] = 0] = "weekday"; e[e["weekend"] = 1] = "weekend"; e[e["holiday"] = 2] = "holiday"; - })(m1.e || (m1.e = {})); - var e = m1.e; + })(e = m1.e || (m1.e = {})); })(m1 || (m1 = {})); var a; var b = { diff --git a/tests/baselines/reference/declarationEmitNameConflicts2.js b/tests/baselines/reference/declarationEmitNameConflicts2.js index 41dcec4690f2a..05529fbf5befe 100644 --- a/tests/baselines/reference/declarationEmitNameConflicts2.js +++ b/tests/baselines/reference/declarationEmitNameConflicts2.js @@ -33,9 +33,9 @@ var X; var M; (function (M) { })(M = base.M || (base.M = {})); + var E; (function (E) { - })(base.E || (base.E = {})); - var E = base.E; + })(E = base.E || (base.E = {})); })(base = Y.base || (Y.base = {})); })(Y = X.Y || (X.Y = {})); })(X || (X = {})); diff --git a/tests/baselines/reference/declarationEmitNameConflicts3.js b/tests/baselines/reference/declarationEmitNameConflicts3.js index b0a87e6448338..ffcfead83bf0f 100644 --- a/tests/baselines/reference/declarationEmitNameConflicts3.js +++ b/tests/baselines/reference/declarationEmitNameConflicts3.js @@ -68,10 +68,10 @@ var M; return E; }(C)); P.E = E; + var D; (function (D) { D[D["f"] = 0] = "f"; - })(P.D || (P.D = {})); - var D = P.D; + })(D = P.D || (P.D = {})); P.w = M.D.f; // error, should be typeof M.D.f P.x = M.C.f; // error, should be typeof M.C.f P.x = M.E.f; // error, should be typeof M.E.f diff --git a/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js b/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js index 1044146ccd0c2..0c6b98def4fd1 100644 --- a/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js +++ b/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js @@ -138,9 +138,9 @@ var m; } return City; }()); + var Enum; (function (Enum) { Enum[Enum["claw"] = (function () { return 10; })()] = "claw"; - })(m.Enum || (m.Enum = {})); - var Enum = m.Enum; + })(Enum = m.Enum || (m.Enum = {})); m.v = function (x) { return new City(Enum.claw); }; })(m || (m = {})); diff --git a/tests/baselines/reference/enumAssignmentCompat3.js b/tests/baselines/reference/enumAssignmentCompat3.js index 62f05c18b5fff..accaaa7a99e20 100644 --- a/tests/baselines/reference/enumAssignmentCompat3.js +++ b/tests/baselines/reference/enumAssignmentCompat3.js @@ -92,78 +92,77 @@ merged2 = abc; // ok //// [enumAssignmentCompat3.js] var First; (function (First) { + var E; (function (E) { E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; E[E["c"] = 2] = "c"; - })(First.E || (First.E = {})); - var E = First.E; + })(E = First.E || (First.E = {})); })(First || (First = {})); var Abc; (function (Abc) { + var E; (function (E) { E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; E[E["c"] = 2] = "c"; - })(Abc.E || (Abc.E = {})); - var E = Abc.E; + })(E = Abc.E || (Abc.E = {})); + var Nope; (function (Nope) { Nope[Nope["a"] = 0] = "a"; Nope[Nope["b"] = 1] = "b"; Nope[Nope["c"] = 2] = "c"; - })(Abc.Nope || (Abc.Nope = {})); - var Nope = Abc.Nope; + })(Nope = Abc.Nope || (Abc.Nope = {})); })(Abc || (Abc = {})); var Abcd; (function (Abcd) { + var E; (function (E) { E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; E[E["c"] = 2] = "c"; E[E["d"] = 3] = "d"; - })(Abcd.E || (Abcd.E = {})); - var E = Abcd.E; + })(E = Abcd.E || (Abcd.E = {})); })(Abcd || (Abcd = {})); var Ab; (function (Ab) { + var E; (function (E) { E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; - })(Ab.E || (Ab.E = {})); - var E = Ab.E; + })(E = Ab.E || (Ab.E = {})); })(Ab || (Ab = {})); var Cd; (function (Cd) { + var E; (function (E) { E[E["c"] = 0] = "c"; E[E["d"] = 1] = "d"; - })(Cd.E || (Cd.E = {})); - var E = Cd.E; + })(E = Cd.E || (Cd.E = {})); })(Cd || (Cd = {})); var Decl; (function (Decl) { })(Decl || (Decl = {})); var Merged; (function (Merged) { + var E; (function (E) { E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; - })(Merged.E || (Merged.E = {})); - var E = Merged.E; + })(E = Merged.E || (Merged.E = {})); (function (E) { E[E["c"] = 3] = "c"; E[E["d"] = 4] = "d"; - })(Merged.E || (Merged.E = {})); - var E = Merged.E; + })(E = Merged.E || (Merged.E = {})); })(Merged || (Merged = {})); var Merged2; (function (Merged2) { + var E; (function (E) { E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; E[E["c"] = 2] = "c"; - })(Merged2.E || (Merged2.E = {})); - var E = Merged2.E; + })(E = Merged2.E || (Merged2.E = {})); (function (E) { E.d = 5; })(E = Merged2.E || (Merged2.E = {})); diff --git a/tests/baselines/reference/enumAssignmentCompat4.js b/tests/baselines/reference/enumAssignmentCompat4.js index ad28324ce0fe1..35bc9319ce9c3 100644 --- a/tests/baselines/reference/enumAssignmentCompat4.js +++ b/tests/baselines/reference/enumAssignmentCompat4.js @@ -26,20 +26,20 @@ let broken = [ //// [enumAssignmentCompat4.js] var M; (function (M) { + var MyEnum; (function (MyEnum) { MyEnum[MyEnum["BAR"] = 0] = "BAR"; - })(M.MyEnum || (M.MyEnum = {})); - var MyEnum = M.MyEnum; + })(MyEnum = M.MyEnum || (M.MyEnum = {})); M.object2 = { foo: MyEnum.BAR }; })(M || (M = {})); var N; (function (N) { + var MyEnum; (function (MyEnum) { MyEnum[MyEnum["FOO"] = 0] = "FOO"; - })(N.MyEnum || (N.MyEnum = {})); - var MyEnum = N.MyEnum; + })(MyEnum = N.MyEnum || (N.MyEnum = {})); ; N.object1 = { foo: MyEnum.FOO diff --git a/tests/baselines/reference/enumFromExternalModule.js b/tests/baselines/reference/enumFromExternalModule.js index 77f0e643969cc..a6e9f6b60762e 100644 --- a/tests/baselines/reference/enumFromExternalModule.js +++ b/tests/baselines/reference/enumFromExternalModule.js @@ -12,10 +12,10 @@ var x = f.Mode.Open; //// [enumFromExternalModule_0.js] "use strict"; +var Mode; (function (Mode) { Mode[Mode["Open"] = 0] = "Open"; -})(exports.Mode || (exports.Mode = {})); -var Mode = exports.Mode; +})(Mode = exports.Mode || (exports.Mode = {})); //// [enumFromExternalModule_1.js] "use strict"; /// diff --git a/tests/baselines/reference/enumLiteralAssignableToEnumInsideUnion.js b/tests/baselines/reference/enumLiteralAssignableToEnumInsideUnion.js index 8786745a5044d..077e5690dd84d 100644 --- a/tests/baselines/reference/enumLiteralAssignableToEnumInsideUnion.js +++ b/tests/baselines/reference/enumLiteralAssignableToEnumInsideUnion.js @@ -32,35 +32,35 @@ const e5: Ka.Foo | boolean = Z.Foo.A; // ok //// [enumLiteralAssignableToEnumInsideUnion.js] var X; (function (X) { + var Foo; (function (Foo) { Foo[Foo["A"] = 0] = "A"; Foo[Foo["B"] = 1] = "B"; - })(X.Foo || (X.Foo = {})); - var Foo = X.Foo; + })(Foo = X.Foo || (X.Foo = {})); })(X || (X = {})); var Y; (function (Y) { + var Foo; (function (Foo) { Foo[Foo["A"] = 0] = "A"; Foo[Foo["B"] = 1] = "B"; - })(Y.Foo || (Y.Foo = {})); - var Foo = Y.Foo; + })(Foo = Y.Foo || (Y.Foo = {})); })(Y || (Y = {})); var Z; (function (Z) { + var Foo; (function (Foo) { Foo[Foo["A"] = 2] = "A"; Foo[Foo["B"] = 4] = "B"; - })(Z.Foo || (Z.Foo = {})); - var Foo = Z.Foo; + })(Foo = Z.Foo || (Z.Foo = {})); })(Z || (Z = {})); var Ka; (function (Ka) { + var Foo; (function (Foo) { Foo[Foo["A"] = 1024] = "A"; Foo[Foo["B"] = 2048] = "B"; - })(Ka.Foo || (Ka.Foo = {})); - var Foo = Ka.Foo; + })(Foo = Ka.Foo || (Ka.Foo = {})); })(Ka || (Ka = {})); var e0 = Y.Foo.A; // ok var e1 = Z.Foo.A; // not legal, Z is computed diff --git a/tests/baselines/reference/enumMerging.js b/tests/baselines/reference/enumMerging.js index d830b03cac997..c3fa7fffeb30e 100644 --- a/tests/baselines/reference/enumMerging.js +++ b/tests/baselines/reference/enumMerging.js @@ -82,35 +82,33 @@ var M1; EImpl1[EImpl1["E"] = 2] = "E"; EImpl1[EImpl1["F"] = 3] = "F"; })(EImpl1 || (EImpl1 = {})); + var EConst1; (function (EConst1) { EConst1[EConst1["A"] = 3] = "A"; EConst1[EConst1["B"] = 2] = "B"; EConst1[EConst1["C"] = 1] = "C"; - })(M1.EConst1 || (M1.EConst1 = {})); - var EConst1 = M1.EConst1; + })(EConst1 = M1.EConst1 || (M1.EConst1 = {})); (function (EConst1) { EConst1[EConst1["D"] = 7] = "D"; EConst1[EConst1["E"] = 9] = "E"; EConst1[EConst1["F"] = 8] = "F"; - })(M1.EConst1 || (M1.EConst1 = {})); - var EConst1 = M1.EConst1; + })(EConst1 = M1.EConst1 || (M1.EConst1 = {})); var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; })(M1 || (M1 = {})); // Enum with only computed members across 2 declarations with the same root module var M2; (function (M2) { + var EComp2; (function (EComp2) { EComp2[EComp2["A"] = 'foo'.length] = "A"; EComp2[EComp2["B"] = 'foo'.length] = "B"; EComp2[EComp2["C"] = 'foo'.length] = "C"; - })(M2.EComp2 || (M2.EComp2 = {})); - var EComp2 = M2.EComp2; + })(EComp2 = M2.EComp2 || (M2.EComp2 = {})); (function (EComp2) { EComp2[EComp2["D"] = 'foo'.length] = "D"; EComp2[EComp2["E"] = 'foo'.length] = "E"; EComp2[EComp2["F"] = 'foo'.length] = "F"; - })(M2.EComp2 || (M2.EComp2 = {})); - var EComp2 = M2.EComp2; + })(EComp2 = M2.EComp2 || (M2.EComp2 = {})); var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; })(M2 || (M2 = {})); // Enum with initializer in only one of two declarations with constant members with the same root module @@ -130,41 +128,41 @@ var M3; // Enums with same name but different root module var M4; (function (M4) { + var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Green"] = 1] = "Green"; Color[Color["Blue"] = 2] = "Blue"; - })(M4.Color || (M4.Color = {})); - var Color = M4.Color; + })(Color = M4.Color || (M4.Color = {})); })(M4 || (M4 = {})); var M5; (function (M5) { + var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Green"] = 1] = "Green"; Color[Color["Blue"] = 2] = "Blue"; - })(M5.Color || (M5.Color = {})); - var Color = M5.Color; + })(Color = M5.Color || (M5.Color = {})); })(M5 || (M5 = {})); var M6; (function (M6) { var A; (function (A) { + var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Green"] = 1] = "Green"; Color[Color["Blue"] = 2] = "Blue"; - })(A.Color || (A.Color = {})); - var Color = A.Color; + })(Color = A.Color || (A.Color = {})); })(A = M6.A || (M6.A = {})); })(M6 || (M6 = {})); (function (M6) { var A; (function (A) { + var Color; (function (Color) { Color[Color["Yellow"] = 1] = "Yellow"; - })(A.Color || (A.Color = {})); - var Color = A.Color; + })(Color = A.Color || (A.Color = {})); })(A = M6.A || (M6.A = {})); var t = A.Color.Yellow; t = A.Color.Red; diff --git a/tests/baselines/reference/enumMergingErrors.js b/tests/baselines/reference/enumMergingErrors.js index c9b4aaef75417..05482f48377d9 100644 --- a/tests/baselines/reference/enumMergingErrors.js +++ b/tests/baselines/reference/enumMergingErrors.js @@ -46,84 +46,84 @@ module M2 { // Enum with constant, computed, constant members split across 3 declarations with the same root module var M; (function (M) { + var E1; (function (E1) { E1[E1["A"] = 0] = "A"; - })(M.E1 || (M.E1 = {})); - var E1 = M.E1; + })(E1 = M.E1 || (M.E1 = {})); + var E2; (function (E2) { E2[E2["C"] = 0] = "C"; - })(M.E2 || (M.E2 = {})); - var E2 = M.E2; + })(E2 = M.E2 || (M.E2 = {})); + var E3; (function (E3) { E3[E3["A"] = 0] = "A"; - })(M.E3 || (M.E3 = {})); - var E3 = M.E3; + })(E3 = M.E3 || (M.E3 = {})); })(M || (M = {})); (function (M) { + var E1; (function (E1) { E1[E1["B"] = 'foo'.length] = "B"; - })(M.E1 || (M.E1 = {})); - var E1 = M.E1; + })(E1 = M.E1 || (M.E1 = {})); + var E2; (function (E2) { E2[E2["B"] = 'foo'.length] = "B"; - })(M.E2 || (M.E2 = {})); - var E2 = M.E2; + })(E2 = M.E2 || (M.E2 = {})); + var E3; (function (E3) { E3[E3["C"] = 0] = "C"; - })(M.E3 || (M.E3 = {})); - var E3 = M.E3; + })(E3 = M.E3 || (M.E3 = {})); })(M || (M = {})); (function (M) { + var E1; (function (E1) { E1[E1["C"] = 0] = "C"; - })(M.E1 || (M.E1 = {})); - var E1 = M.E1; + })(E1 = M.E1 || (M.E1 = {})); + var E2; (function (E2) { E2[E2["A"] = 0] = "A"; - })(M.E2 || (M.E2 = {})); - var E2 = M.E2; + })(E2 = M.E2 || (M.E2 = {})); + var E3; (function (E3) { E3[E3["B"] = 'foo'.length] = "B"; - })(M.E3 || (M.E3 = {})); - var E3 = M.E3; + })(E3 = M.E3 || (M.E3 = {})); })(M || (M = {})); // Enum with no initializer in either declaration with constant members with the same root module var M1; (function (M1) { + var E1; (function (E1) { E1[E1["A"] = 0] = "A"; - })(M1.E1 || (M1.E1 = {})); - var E1 = M1.E1; + })(E1 = M1.E1 || (M1.E1 = {})); })(M1 || (M1 = {})); (function (M1) { + var E1; (function (E1) { E1[E1["B"] = 0] = "B"; - })(M1.E1 || (M1.E1 = {})); - var E1 = M1.E1; + })(E1 = M1.E1 || (M1.E1 = {})); })(M1 || (M1 = {})); (function (M1) { + var E1; (function (E1) { E1[E1["C"] = 0] = "C"; - })(M1.E1 || (M1.E1 = {})); - var E1 = M1.E1; + })(E1 = M1.E1 || (M1.E1 = {})); })(M1 || (M1 = {})); // Enum with initializer in only one of three declarations with constant members with the same root module var M2; (function (M2) { + var E1; (function (E1) { E1[E1["A"] = 0] = "A"; - })(M2.E1 || (M2.E1 = {})); - var E1 = M2.E1; + })(E1 = M2.E1 || (M2.E1 = {})); })(M2 || (M2 = {})); (function (M2) { + var E1; (function (E1) { E1[E1["B"] = 0] = "B"; - })(M2.E1 || (M2.E1 = {})); - var E1 = M2.E1; + })(E1 = M2.E1 || (M2.E1 = {})); })(M2 || (M2 = {})); (function (M2) { + var E1; (function (E1) { E1[E1["C"] = 0] = "C"; - })(M2.E1 || (M2.E1 = {})); - var E1 = M2.E1; + })(E1 = M2.E1 || (M2.E1 = {})); })(M2 || (M2 = {})); diff --git a/tests/baselines/reference/es5ModuleInternalNamedImports.js b/tests/baselines/reference/es5ModuleInternalNamedImports.js index 2fcbd5a53d885..cc596980889f2 100644 --- a/tests/baselines/reference/es5ModuleInternalNamedImports.js +++ b/tests/baselines/reference/es5ModuleInternalNamedImports.js @@ -59,9 +59,9 @@ define(["require", "exports"], function (require, exports) { function M_F() { } M.M_F = M_F; // enum + var M_E; (function (M_E) { - })(M.M_E || (M.M_E = {})); - var M_E = M.M_E; + })(M_E = M.M_E || (M.M_E = {})); // alias M.M_A = M_M; })(M = exports.M || (exports.M = {})); diff --git a/tests/baselines/reference/es6ModuleConstEnumDeclaration2.js b/tests/baselines/reference/es6ModuleConstEnumDeclaration2.js index 539ec121b6b57..3e4475f2ffa2c 100644 --- a/tests/baselines/reference/es6ModuleConstEnumDeclaration2.js +++ b/tests/baselines/reference/es6ModuleConstEnumDeclaration2.js @@ -63,12 +63,12 @@ var x = 0 /* a */; var y = 0 /* x */; export var m1; (function (m1) { + var e3; (function (e3) { e3[e3["a"] = 0] = "a"; e3[e3["b"] = 1] = "b"; e3[e3["c"] = 2] = "c"; - })(m1.e3 || (m1.e3 = {})); - var e3 = m1.e3; + })(e3 = m1.e3 || (m1.e3 = {})); var e4; (function (e4) { e4[e4["x"] = 0] = "x"; @@ -82,12 +82,12 @@ export var m1; })(m1 || (m1 = {})); var m2; (function (m2) { + var e5; (function (e5) { e5[e5["a"] = 0] = "a"; e5[e5["b"] = 1] = "b"; e5[e5["c"] = 2] = "c"; - })(m2.e5 || (m2.e5 = {})); - var e5 = m2.e5; + })(e5 = m2.e5 || (m2.e5 = {})); var e6; (function (e6) { e6[e6["x"] = 0] = "x"; diff --git a/tests/baselines/reference/es6ModuleEnumDeclaration.js b/tests/baselines/reference/es6ModuleEnumDeclaration.js index 30c382a4508bc..91ba2efe8d386 100644 --- a/tests/baselines/reference/es6ModuleEnumDeclaration.js +++ b/tests/baselines/reference/es6ModuleEnumDeclaration.js @@ -62,12 +62,12 @@ var x = e1.a; var y = e2.x; export var m1; (function (m1) { + var e3; (function (e3) { e3[e3["a"] = 0] = "a"; e3[e3["b"] = 1] = "b"; e3[e3["c"] = 2] = "c"; - })(m1.e3 || (m1.e3 = {})); - var e3 = m1.e3; + })(e3 = m1.e3 || (m1.e3 = {})); var e4; (function (e4) { e4[e4["x"] = 0] = "x"; @@ -81,12 +81,12 @@ export var m1; })(m1 || (m1 = {})); var m2; (function (m2) { + var e5; (function (e5) { e5[e5["a"] = 0] = "a"; e5[e5["b"] = 1] = "b"; e5[e5["c"] = 2] = "c"; - })(m2.e5 || (m2.e5 = {})); - var e5 = m2.e5; + })(e5 = m2.e5 || (m2.e5 = {})); var e6; (function (e6) { e6[e6["x"] = 0] = "x"; diff --git a/tests/baselines/reference/es6ModuleInternalNamedImports.js b/tests/baselines/reference/es6ModuleInternalNamedImports.js index 22d15b9fd61b3..fe2e0217795c2 100644 --- a/tests/baselines/reference/es6ModuleInternalNamedImports.js +++ b/tests/baselines/reference/es6ModuleInternalNamedImports.js @@ -50,9 +50,9 @@ export var M; function M_F() { } M.M_F = M_F; // enum + var M_E; (function (M_E) { - })(M.M_E || (M.M_E = {})); - var M_E = M.M_E; + })(M_E = M.M_E || (M.M_E = {})); // alias M.M_A = M_M; })(M || (M = {})); diff --git a/tests/baselines/reference/es6ModuleInternalNamedImports2.js b/tests/baselines/reference/es6ModuleInternalNamedImports2.js index 35eabc9a65e02..93d8f40c1d272 100644 --- a/tests/baselines/reference/es6ModuleInternalNamedImports2.js +++ b/tests/baselines/reference/es6ModuleInternalNamedImports2.js @@ -52,9 +52,9 @@ export var M; function M_F() { } M.M_F = M_F; // enum + var M_E; (function (M_E) { - })(M.M_E || (M.M_E = {})); - var M_E = M.M_E; + })(M_E = M.M_E || (M.M_E = {})); // alias M.M_A = M_M; })(M || (M = {})); diff --git a/tests/baselines/reference/exportAssignmentAndDeclaration.js b/tests/baselines/reference/exportAssignmentAndDeclaration.js index 9e87d733c6be0..df1f2ef0d0add 100644 --- a/tests/baselines/reference/exportAssignmentAndDeclaration.js +++ b/tests/baselines/reference/exportAssignmentAndDeclaration.js @@ -13,12 +13,12 @@ export = C1; //// [foo_0.js] define(["require", "exports"], function (require, exports) { "use strict"; + var E1; (function (E1) { E1[E1["A"] = 0] = "A"; E1[E1["B"] = 1] = "B"; E1[E1["C"] = 2] = "C"; - })(exports.E1 || (exports.E1 = {})); - var E1 = exports.E1; + })(E1 = exports.E1 || (exports.E1 = {})); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/exportCodeGen.js b/tests/baselines/reference/exportCodeGen.js index 41564c35d1a68..d72c633731df5 100644 --- a/tests/baselines/reference/exportCodeGen.js +++ b/tests/baselines/reference/exportCodeGen.js @@ -90,10 +90,10 @@ var D; // validate all exportable statements var E; (function (E) { + var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; - })(E.Color || (E.Color = {})); - var Color = E.Color; + })(Color = E.Color || (E.Color = {})); function fn() { } E.fn = fn; var C = (function () { diff --git a/tests/baselines/reference/exportsAndImports3-amd.js b/tests/baselines/reference/exportsAndImports3-amd.js index 0e315f1f18b23..cbf30735182db 100644 --- a/tests/baselines/reference/exportsAndImports3-amd.js +++ b/tests/baselines/reference/exportsAndImports3-amd.js @@ -49,12 +49,12 @@ define(["require", "exports"], function (require, exports) { }()); exports.C = C; exports.C1 = C; + var E; (function (E) { E[E["A"] = 0] = "A"; E[E["B"] = 1] = "B"; E[E["C"] = 2] = "C"; - })(exports.E || (exports.E = {})); - var E = exports.E; + })(E = exports.E || (exports.E = {})); exports.E1 = E; var M; (function (M) { diff --git a/tests/baselines/reference/exportsAndImports3-es6.js b/tests/baselines/reference/exportsAndImports3-es6.js index ea16836b1f202..85daa3f0f5ccd 100644 --- a/tests/baselines/reference/exportsAndImports3-es6.js +++ b/tests/baselines/reference/exportsAndImports3-es6.js @@ -45,12 +45,12 @@ class C { } exports.C = C; exports.C1 = C; +var E; (function (E) { E[E["A"] = 0] = "A"; E[E["B"] = 1] = "B"; E[E["C"] = 2] = "C"; -})(exports.E || (exports.E = {})); -var E = exports.E; +})(E = exports.E || (exports.E = {})); exports.E1 = E; var M; (function (M) { diff --git a/tests/baselines/reference/exportsAndImports3.js b/tests/baselines/reference/exportsAndImports3.js index 16115a192da28..dbcd94862153c 100644 --- a/tests/baselines/reference/exportsAndImports3.js +++ b/tests/baselines/reference/exportsAndImports3.js @@ -48,12 +48,12 @@ var C = (function () { }()); exports.C = C; exports.C1 = C; +var E; (function (E) { E[E["A"] = 0] = "A"; E[E["B"] = 1] = "B"; E[E["C"] = 2] = "C"; -})(exports.E || (exports.E = {})); -var E = exports.E; +})(E = exports.E || (exports.E = {})); exports.E1 = E; var M; (function (M) { diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index 6d65ee5531b6d..401a2e94b6819 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -37,11 +37,11 @@ var TypeScript2; ; ; ; + var PullSymbolVisibility; (function (PullSymbolVisibility) { PullSymbolVisibility[PullSymbolVisibility["Private"] = 0] = "Private"; PullSymbolVisibility[PullSymbolVisibility["Public"] = 1] = "Public"; - })(TypeScript2.PullSymbolVisibility || (TypeScript2.PullSymbolVisibility = {})); - var PullSymbolVisibility = TypeScript2.PullSymbolVisibility; + })(PullSymbolVisibility = TypeScript2.PullSymbolVisibility || (TypeScript2.PullSymbolVisibility = {})); var PullSymbol = (function () { function PullSymbol(name, declKind) { } diff --git a/tests/baselines/reference/instantiatedModule.js b/tests/baselines/reference/instantiatedModule.js index d8ef427619ab1..8e7027d5fd7a9 100644 --- a/tests/baselines/reference/instantiatedModule.js +++ b/tests/baselines/reference/instantiatedModule.js @@ -101,11 +101,11 @@ var p2 = new m2.Point(); var p2 = new M2.Point(); var M3; (function (M3) { + var Color; (function (Color) { Color[Color["Blue"] = 0] = "Blue"; Color[Color["Red"] = 1] = "Red"; - })(M3.Color || (M3.Color = {})); - var Color = M3.Color; + })(Color = M3.Color || (M3.Color = {})); })(M3 || (M3 = {})); var m3; var m3 = M3; diff --git a/tests/baselines/reference/interfaceAssignmentCompat.js b/tests/baselines/reference/interfaceAssignmentCompat.js index edaebbd38a25b..98586da24e5a9 100644 --- a/tests/baselines/reference/interfaceAssignmentCompat.js +++ b/tests/baselines/reference/interfaceAssignmentCompat.js @@ -55,12 +55,12 @@ M.test(); //// [interfaceAssignmentCompat.js] var M; (function (M) { + var Color; (function (Color) { Color[Color["Green"] = 0] = "Green"; Color[Color["Blue"] = 1] = "Blue"; Color[Color["Brown"] = 2] = "Brown"; - })(M.Color || (M.Color = {})); - var Color = M.Color; + })(Color = M.Color || (M.Color = {})); function CompareEyes(a, b) { return a.color - b.color; } diff --git a/tests/baselines/reference/internalAliasEnum.js b/tests/baselines/reference/internalAliasEnum.js index 6400cf26ddcff..40fac82eb4d46 100644 --- a/tests/baselines/reference/internalAliasEnum.js +++ b/tests/baselines/reference/internalAliasEnum.js @@ -16,12 +16,12 @@ module c { //// [internalAliasEnum.js] var a; (function (a) { + var weekend; (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; weekend[weekend["Saturday"] = 1] = "Saturday"; weekend[weekend["Sunday"] = 2] = "Sunday"; - })(a.weekend || (a.weekend = {})); - var weekend = a.weekend; + })(weekend = a.weekend || (a.weekend = {})); })(a || (a = {})); var c; (function (c) { diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js index dd30dc814aed3..c7b8bf2cacc32 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js @@ -17,12 +17,12 @@ export module c { "use strict"; var a; (function (a) { + var weekend; (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; weekend[weekend["Saturday"] = 1] = "Saturday"; weekend[weekend["Sunday"] = 2] = "Sunday"; - })(a.weekend || (a.weekend = {})); - var weekend = a.weekend; + })(weekend = a.weekend || (a.weekend = {})); })(a = exports.a || (exports.a = {})); var c; (function (c) { diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js index 7f00d69a8d6f9..267fffc7b7098 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js @@ -17,12 +17,12 @@ export module c { "use strict"; var a; (function (a) { + var weekend; (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; weekend[weekend["Saturday"] = 1] = "Saturday"; weekend[weekend["Sunday"] = 2] = "Sunday"; - })(a.weekend || (a.weekend = {})); - var weekend = a.weekend; + })(weekend = a.weekend || (a.weekend = {})); })(a = exports.a || (exports.a = {})); var c; (function (c) { diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js index 8612e74f82955..a44298b6864ba 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js @@ -18,12 +18,12 @@ var happyFriday = c.b.Friday; "use strict"; var a; (function (a) { + var weekend; (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; weekend[weekend["Saturday"] = 1] = "Saturday"; weekend[weekend["Sunday"] = 2] = "Sunday"; - })(a.weekend || (a.weekend = {})); - var weekend = a.weekend; + })(weekend = a.weekend || (a.weekend = {})); })(a = exports.a || (exports.a = {})); var c; (function (c) { diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js index c7396fded2ac2..8e11f60dcc71c 100644 --- a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js @@ -16,12 +16,12 @@ define(["require", "exports"], function (require, exports) { "use strict"; var a; (function (a) { + var weekend; (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; weekend[weekend["Saturday"] = 1] = "Saturday"; weekend[weekend["Sunday"] = 2] = "Sunday"; - })(a.weekend || (a.weekend = {})); - var weekend = a.weekend; + })(weekend = a.weekend || (a.weekend = {})); })(a = exports.a || (exports.a = {})); exports.b = a.weekend; exports.bVal = exports.b.Sunday; diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js index 1cf1b0b8b1633..8ec0dcea81575 100644 --- a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js @@ -16,12 +16,12 @@ define(["require", "exports"], function (require, exports) { "use strict"; var a; (function (a) { + var weekend; (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; weekend[weekend["Saturday"] = 1] = "Saturday"; weekend[weekend["Sunday"] = 2] = "Sunday"; - })(a.weekend || (a.weekend = {})); - var weekend = a.weekend; + })(weekend = a.weekend || (a.weekend = {})); })(a = exports.a || (exports.a = {})); var b = a.weekend; exports.bVal = b.Sunday; diff --git a/tests/baselines/reference/localImportNameVsGlobalName.js b/tests/baselines/reference/localImportNameVsGlobalName.js index 45ecdc4745e36..916bdcc296050 100644 --- a/tests/baselines/reference/localImportNameVsGlobalName.js +++ b/tests/baselines/reference/localImportNameVsGlobalName.js @@ -16,13 +16,13 @@ module App { //// [localImportNameVsGlobalName.js] var Keyboard; (function (Keyboard) { + var Key; (function (Key) { Key[Key["UP"] = 0] = "UP"; Key[Key["DOWN"] = 1] = "DOWN"; Key[Key["LEFT"] = 2] = "LEFT"; Key[Key["RIGHT"] = 3] = "RIGHT"; - })(Keyboard.Key || (Keyboard.Key = {})); - var Key = Keyboard.Key; + })(Key = Keyboard.Key || (Keyboard.Key = {})); })(Keyboard || (Keyboard = {})); var App; (function (App) { diff --git a/tests/baselines/reference/mergeWithImportedType.js b/tests/baselines/reference/mergeWithImportedType.js index 89fc353d395da..e8dc5a3c2f37b 100644 --- a/tests/baselines/reference/mergeWithImportedType.js +++ b/tests/baselines/reference/mergeWithImportedType.js @@ -10,9 +10,9 @@ export type E = E; //// [f1.js] "use strict"; +var E; (function (E) { E[E["X"] = 0] = "X"; -})(exports.E || (exports.E = {})); -var E = exports.E; +})(E = exports.E || (exports.E = {})); //// [f2.js] "use strict"; diff --git a/tests/baselines/reference/mergedDeclarations3.js b/tests/baselines/reference/mergedDeclarations3.js index ddf94b46e81c9..d3b4e8fc9d579 100644 --- a/tests/baselines/reference/mergedDeclarations3.js +++ b/tests/baselines/reference/mergedDeclarations3.js @@ -42,11 +42,11 @@ M.foo.z // error //// [mergedDeclarations3.js] var M; (function (M) { + var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Green"] = 1] = "Green"; - })(M.Color || (M.Color = {})); - var Color = M.Color; + })(Color = M.Color || (M.Color = {})); })(M || (M = {})); (function (M) { var Color; diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js index 11a4773d63a50..8891dbf61e22c 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js @@ -45,9 +45,9 @@ var M; return fudge; }()); plop_1.fudge = fudge; + var plop; (function (plop) { - })(plop_1.plop || (plop_1.plop = {})); - var plop = plop_1.plop; + })(plop = plop_1.plop || (plop_1.plop = {})); // Emit these references as follows var v1 = gunk; // gunk var v2 = buz; // buz diff --git a/tests/baselines/reference/moduleCodeGenTest5.js b/tests/baselines/reference/moduleCodeGenTest5.js index fa09b432ab7ac..6a7113c03688e 100644 --- a/tests/baselines/reference/moduleCodeGenTest5.js +++ b/tests/baselines/reference/moduleCodeGenTest5.js @@ -43,10 +43,10 @@ var C2 = (function () { C2.prototype.p2 = function () { }; return C2; }()); +var E1; (function (E1) { E1[E1["A"] = 0] = "A"; -})(exports.E1 || (exports.E1 = {})); -var E1 = exports.E1; +})(E1 = exports.E1 || (exports.E1 = {})); var u = E1.A; var E2; (function (E2) { diff --git a/tests/baselines/reference/moduleDuplicateIdentifiers.js b/tests/baselines/reference/moduleDuplicateIdentifiers.js index 097192ac73c79..64b82f82500ee 100644 --- a/tests/baselines/reference/moduleDuplicateIdentifiers.js +++ b/tests/baselines/reference/moduleDuplicateIdentifiers.js @@ -67,12 +67,12 @@ var Kettle = (function () { exports.Kettle = Kettle; exports.Pot = 2; exports.Pot = 42; // Shouldn't error +var Utensils; (function (Utensils) { Utensils[Utensils["Spoon"] = 0] = "Spoon"; Utensils[Utensils["Fork"] = 1] = "Fork"; Utensils[Utensils["Knife"] = 2] = "Knife"; -})(exports.Utensils || (exports.Utensils = {})); -var Utensils = exports.Utensils; +})(Utensils = exports.Utensils || (exports.Utensils = {})); (function (Utensils) { Utensils[Utensils["Spork"] = 3] = "Spork"; -})(exports.Utensils || (exports.Utensils = {})); +})(Utensils = exports.Utensils || (exports.Utensils = {})); diff --git a/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js b/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js index 99a09af149ada..208e90c69d8c8 100644 --- a/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js +++ b/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js @@ -15,11 +15,11 @@ export enum Animals { //// [c.js] "use strict"; +var Animals; (function (Animals) { Animals[Animals["Cat"] = 0] = "Cat"; Animals[Animals["Dog"] = 1] = "Dog"; -})(exports.Animals || (exports.Animals = {})); -var Animals = exports.Animals; +})(Animals = exports.Animals || (exports.Animals = {})); ; //// [b.js] "use strict"; diff --git a/tests/baselines/reference/moduleVisibilityTest1.js b/tests/baselines/reference/moduleVisibilityTest1.js index 52afcf169d91b..537ec23b3937c 100644 --- a/tests/baselines/reference/moduleVisibilityTest1.js +++ b/tests/baselines/reference/moduleVisibilityTest1.js @@ -86,12 +86,12 @@ var M; function someExportedInnerFunc() { return -2; } InnerMod.someExportedInnerFunc = someExportedInnerFunc; })(InnerMod = M.InnerMod || (M.InnerMod = {})); + var E; (function (E) { E[E["A"] = 0] = "A"; E[E["B"] = 1] = "B"; E[E["C"] = 2] = "C"; - })(M.E || (M.E = {})); - var E = M.E; + })(E = M.E || (M.E = {})); M.x = 5; var y = M.x + M.x; var B = (function () { diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 1558ef742ab14..4243c9849cf7f 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -151,11 +151,11 @@ var Y; return A; }()); })(Module = Y.Module || (Y.Module = {})); + var Color; (function (Color) { Color[Color["Blue"] = 0] = "Blue"; Color[Color["Red"] = 1] = "Red"; - })(Y.Color || (Y.Color = {})); - var Color = Y.Color; + })(Color = Y.Color || (Y.Color = {})); Y.x = 12; function F(s) { return 2; diff --git a/tests/baselines/reference/nameCollision.js b/tests/baselines/reference/nameCollision.js index e51bd5e7c6904..bb4f4a092f9d7 100644 --- a/tests/baselines/reference/nameCollision.js +++ b/tests/baselines/reference/nameCollision.js @@ -85,11 +85,11 @@ var Y; (function (Y_2) { var Y; (function (Y_3) { + var Y; (function (Y) { Y[Y["Red"] = 0] = "Red"; Y[Y["Blue"] = 1] = "Blue"; - })(Y_3.Y || (Y_3.Y = {})); - var Y = Y_3.Y; + })(Y = Y_3.Y || (Y_3.Y = {})); })(Y = Y_2.Y || (Y_2.Y = {})); })(Y || (Y = {})); // no collision, since interface doesn't diff --git a/tests/baselines/reference/parserEnum1.js b/tests/baselines/reference/parserEnum1.js index e54fff50c7392..d2c29d847cd79 100644 --- a/tests/baselines/reference/parserEnum1.js +++ b/tests/baselines/reference/parserEnum1.js @@ -10,10 +10,10 @@ //// [parserEnum1.js] "use strict"; +var SignatureFlags; (function (SignatureFlags) { SignatureFlags[SignatureFlags["None"] = 0] = "None"; SignatureFlags[SignatureFlags["IsIndexer"] = 1] = "IsIndexer"; SignatureFlags[SignatureFlags["IsStringIndexer"] = 2] = "IsStringIndexer"; SignatureFlags[SignatureFlags["IsNumberIndexer"] = 4] = "IsNumberIndexer"; -})(exports.SignatureFlags || (exports.SignatureFlags = {})); -var SignatureFlags = exports.SignatureFlags; +})(SignatureFlags = exports.SignatureFlags || (exports.SignatureFlags = {})); diff --git a/tests/baselines/reference/parserEnum2.js b/tests/baselines/reference/parserEnum2.js index 8e7da5c73cd8d..f5888addf7539 100644 --- a/tests/baselines/reference/parserEnum2.js +++ b/tests/baselines/reference/parserEnum2.js @@ -10,10 +10,10 @@ //// [parserEnum2.js] "use strict"; +var SignatureFlags; (function (SignatureFlags) { SignatureFlags[SignatureFlags["None"] = 0] = "None"; SignatureFlags[SignatureFlags["IsIndexer"] = 1] = "IsIndexer"; SignatureFlags[SignatureFlags["IsStringIndexer"] = 2] = "IsStringIndexer"; SignatureFlags[SignatureFlags["IsNumberIndexer"] = 4] = "IsNumberIndexer"; -})(exports.SignatureFlags || (exports.SignatureFlags = {})); -var SignatureFlags = exports.SignatureFlags; +})(SignatureFlags = exports.SignatureFlags || (exports.SignatureFlags = {})); diff --git a/tests/baselines/reference/parserEnum3.js b/tests/baselines/reference/parserEnum3.js index 1d0c445d3a0d0..602171e8d9449 100644 --- a/tests/baselines/reference/parserEnum3.js +++ b/tests/baselines/reference/parserEnum3.js @@ -6,6 +6,6 @@ //// [parserEnum3.js] "use strict"; +var SignatureFlags; (function (SignatureFlags) { -})(exports.SignatureFlags || (exports.SignatureFlags = {})); -var SignatureFlags = exports.SignatureFlags; +})(SignatureFlags = exports.SignatureFlags || (exports.SignatureFlags = {})); diff --git a/tests/baselines/reference/parserEnum4.js b/tests/baselines/reference/parserEnum4.js index 1a207960714a3..6af07b0a1c79a 100644 --- a/tests/baselines/reference/parserEnum4.js +++ b/tests/baselines/reference/parserEnum4.js @@ -7,6 +7,6 @@ //// [parserEnum4.js] "use strict"; +var SignatureFlags; (function (SignatureFlags) { -})(exports.SignatureFlags || (exports.SignatureFlags = {})); -var SignatureFlags = exports.SignatureFlags; +})(SignatureFlags = exports.SignatureFlags || (exports.SignatureFlags = {})); diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index 253f856a9900f..11cfbdfa1f21e 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -466,6 +466,7 @@ var __extends = (this && this.__extends) || function (d, b) { /// var TypeScript; (function (TypeScript) { + var TokenID; (function (TokenID) { // Keywords TokenID[TokenID["Any"] = 0] = "Any"; @@ -584,8 +585,7 @@ var TypeScript; TokenID[TokenID["Lim"] = 112] = "Lim"; TokenID[TokenID["LimFixed"] = 105] = "LimFixed"; TokenID[TokenID["LimKeyword"] = 53] = "LimKeyword"; - })(TypeScript.TokenID || (TypeScript.TokenID = {})); - var TokenID = TypeScript.TokenID; + })(TokenID = TypeScript.TokenID || (TypeScript.TokenID = {})); TypeScript.tokenTable = new TokenInfo[]; TypeScript.nodeTypeTable = new string[]; TypeScript.nodeTypeToTokTable = new number[]; @@ -602,6 +602,7 @@ var TypeScript; TypeScript.noRegexTable[TokenID.CloseBrace] = true; TypeScript.noRegexTable[TokenID.True] = true; TypeScript.noRegexTable[TokenID.False] = true; + var OperatorPrecedence; (function (OperatorPrecedence) { OperatorPrecedence[OperatorPrecedence["None"] = 0] = "None"; OperatorPrecedence[OperatorPrecedence["Comma"] = 1] = "Comma"; @@ -619,8 +620,8 @@ var TypeScript; OperatorPrecedence[OperatorPrecedence["Multiplicative"] = 13] = "Multiplicative"; OperatorPrecedence[OperatorPrecedence["Unary"] = 14] = "Unary"; OperatorPrecedence[OperatorPrecedence["Lim"] = 15] = "Lim"; - })(TypeScript.OperatorPrecedence || (TypeScript.OperatorPrecedence = {})); - var OperatorPrecedence = TypeScript.OperatorPrecedence; + })(OperatorPrecedence = TypeScript.OperatorPrecedence || (TypeScript.OperatorPrecedence = {})); + var Reservation; (function (Reservation) { Reservation[Reservation["None"] = 0] = "None"; Reservation[Reservation["Javascript"] = 1] = "Javascript"; @@ -630,8 +631,7 @@ var TypeScript; Reservation[Reservation["TypeScriptAndJS"] = 5] = "TypeScriptAndJS"; Reservation[Reservation["TypeScriptAndJSFuture"] = 6] = "TypeScriptAndJSFuture"; Reservation[Reservation["TypeScriptAndJSFutureStrict"] = 12] = "TypeScriptAndJSFutureStrict"; - })(TypeScript.Reservation || (TypeScript.Reservation = {})); - var Reservation = TypeScript.Reservation; + })(Reservation = TypeScript.Reservation || (TypeScript.Reservation = {})); var TokenInfo = (function () { function TokenInfo(tokenId, reservation, binopPrecedence, binopNodeType, unopPrecedence, unopNodeType, text, ers) { this.tokenId = tokenId; @@ -773,6 +773,7 @@ var TypeScript; return TypeScript.tokenTable[tokenId]; } TypeScript.lookupToken = lookupToken; + var TokenClass; (function (TokenClass) { TokenClass[TokenClass["Punctuation"] = 0] = "Punctuation"; TokenClass[TokenClass["Keyword"] = 1] = "Keyword"; @@ -781,8 +782,7 @@ var TypeScript; TokenClass[TokenClass["Whitespace"] = 4] = "Whitespace"; TokenClass[TokenClass["Identifier"] = 5] = "Identifier"; TokenClass[TokenClass["Literal"] = 6] = "Literal"; - })(TypeScript.TokenClass || (TypeScript.TokenClass = {})); - var TokenClass = TypeScript.TokenClass; + })(TokenClass = TypeScript.TokenClass || (TypeScript.TokenClass = {})); var SavedToken = (function () { function SavedToken(tok, minChar, limChar) { this.tok = tok; diff --git a/tests/baselines/reference/parserRealSource14.js b/tests/baselines/reference/parserRealSource14.js index c31a9dd6c7244..907efc6f26a1e 100644 --- a/tests/baselines/reference/parserRealSource14.js +++ b/tests/baselines/reference/parserRealSource14.js @@ -957,6 +957,7 @@ var TypeScript; return AstPathContext; }()); TypeScript.AstPathContext = AstPathContext; + var GetAstPathOptions; (function (GetAstPathOptions) { GetAstPathOptions[GetAstPathOptions["Default"] = 0] = "Default"; GetAstPathOptions[GetAstPathOptions["EdgeInclusive"] = 1] = "EdgeInclusive"; @@ -968,8 +969,7 @@ var TypeScript; // we don't find the "precomment" attached to the errorneous empty stmt. //TODO: It would be nice to be able to get rid of this. GetAstPathOptions[GetAstPathOptions["DontPruneSearchBasedOnPosition"] = 2] = "DontPruneSearchBasedOnPosition"; - })(TypeScript.GetAstPathOptions || (TypeScript.GetAstPathOptions = {})); - var GetAstPathOptions = TypeScript.GetAstPathOptions; + })(GetAstPathOptions = TypeScript.GetAstPathOptions || (TypeScript.GetAstPathOptions = {})); /// /// Return the stack of AST nodes containing "position" /// diff --git a/tests/baselines/reference/parserRealSource2.js b/tests/baselines/reference/parserRealSource2.js index c41f88bc9c20c..2028cbd4efe35 100644 --- a/tests/baselines/reference/parserRealSource2.js +++ b/tests/baselines/reference/parserRealSource2.js @@ -281,6 +281,7 @@ var TypeScript; return (val & flag) != 0; } TypeScript.hasFlag = hasFlag; + var ErrorRecoverySet; (function (ErrorRecoverySet) { ErrorRecoverySet[ErrorRecoverySet["None"] = 0] = "None"; ErrorRecoverySet[ErrorRecoverySet["Comma"] = 1] = "Comma"; @@ -320,8 +321,8 @@ var TypeScript; ErrorRecoverySet[ErrorRecoverySet["ExprStart"] = 520158210] = "ExprStart"; ErrorRecoverySet[ErrorRecoverySet["StmtStart"] = 1608580098] = "StmtStart"; ErrorRecoverySet[ErrorRecoverySet["Postfix"] = 49280] = "Postfix"; - })(TypeScript.ErrorRecoverySet || (TypeScript.ErrorRecoverySet = {})); - var ErrorRecoverySet = TypeScript.ErrorRecoverySet; + })(ErrorRecoverySet = TypeScript.ErrorRecoverySet || (TypeScript.ErrorRecoverySet = {})); + var AllowedElements; (function (AllowedElements) { AllowedElements[AllowedElements["None"] = 0] = "None"; AllowedElements[AllowedElements["ModuleDeclarations"] = 4] = "ModuleDeclarations"; @@ -331,8 +332,8 @@ var TypeScript; AllowedElements[AllowedElements["Properties"] = 2048] = "Properties"; AllowedElements[AllowedElements["Global"] = 1052] = "Global"; AllowedElements[AllowedElements["QuickParse"] = 3100] = "QuickParse"; - })(TypeScript.AllowedElements || (TypeScript.AllowedElements = {})); - var AllowedElements = TypeScript.AllowedElements; + })(AllowedElements = TypeScript.AllowedElements || (TypeScript.AllowedElements = {})); + var Modifiers; (function (Modifiers) { Modifiers[Modifiers["None"] = 0] = "None"; Modifiers[Modifiers["Private"] = 1] = "Private"; @@ -343,8 +344,8 @@ var TypeScript; Modifiers[Modifiers["Getter"] = 32] = "Getter"; Modifiers[Modifiers["Setter"] = 64] = "Setter"; Modifiers[Modifiers["Static"] = 128] = "Static"; - })(TypeScript.Modifiers || (TypeScript.Modifiers = {})); - var Modifiers = TypeScript.Modifiers; + })(Modifiers = TypeScript.Modifiers || (TypeScript.Modifiers = {})); + var ASTFlags; (function (ASTFlags) { ASTFlags[ASTFlags["None"] = 0] = "None"; ASTFlags[ASTFlags["ExplicitSemicolon"] = 1] = "ExplicitSemicolon"; @@ -362,8 +363,8 @@ var TypeScript; // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. // Once we have a better way to associate information with nodes, this flag should not be used. ASTFlags[ASTFlags["SkipNextRParen"] = 2048] = "SkipNextRParen"; - })(TypeScript.ASTFlags || (TypeScript.ASTFlags = {})); - var ASTFlags = TypeScript.ASTFlags; + })(ASTFlags = TypeScript.ASTFlags || (TypeScript.ASTFlags = {})); + var DeclFlags; (function (DeclFlags) { DeclFlags[DeclFlags["None"] = 0] = "None"; DeclFlags[DeclFlags["Exported"] = 1] = "Exported"; @@ -374,8 +375,8 @@ var TypeScript; DeclFlags[DeclFlags["LocalStatic"] = 32] = "LocalStatic"; DeclFlags[DeclFlags["GetAccessor"] = 64] = "GetAccessor"; DeclFlags[DeclFlags["SetAccessor"] = 128] = "SetAccessor"; - })(TypeScript.DeclFlags || (TypeScript.DeclFlags = {})); - var DeclFlags = TypeScript.DeclFlags; + })(DeclFlags = TypeScript.DeclFlags || (TypeScript.DeclFlags = {})); + var ModuleFlags; (function (ModuleFlags) { ModuleFlags[ModuleFlags["None"] = 0] = "None"; ModuleFlags[ModuleFlags["Exported"] = 1] = "Exported"; @@ -391,8 +392,8 @@ var TypeScript; ModuleFlags[ModuleFlags["IsWholeFile"] = 1024] = "IsWholeFile"; ModuleFlags[ModuleFlags["IsDynamic"] = 2048] = "IsDynamic"; ModuleFlags[ModuleFlags["MustCaptureThis"] = 4096] = "MustCaptureThis"; - })(TypeScript.ModuleFlags || (TypeScript.ModuleFlags = {})); - var ModuleFlags = TypeScript.ModuleFlags; + })(ModuleFlags = TypeScript.ModuleFlags || (TypeScript.ModuleFlags = {})); + var SymbolFlags; (function (SymbolFlags) { SymbolFlags[SymbolFlags["None"] = 0] = "None"; SymbolFlags[SymbolFlags["Exported"] = 1] = "Exported"; @@ -415,8 +416,8 @@ var TypeScript; SymbolFlags[SymbolFlags["RecursivelyReferenced"] = 131072] = "RecursivelyReferenced"; SymbolFlags[SymbolFlags["Bound"] = 262144] = "Bound"; SymbolFlags[SymbolFlags["CompilerGenerated"] = 524288] = "CompilerGenerated"; - })(TypeScript.SymbolFlags || (TypeScript.SymbolFlags = {})); - var SymbolFlags = TypeScript.SymbolFlags; + })(SymbolFlags = TypeScript.SymbolFlags || (TypeScript.SymbolFlags = {})); + var VarFlags; (function (VarFlags) { VarFlags[VarFlags["None"] = 0] = "None"; VarFlags[VarFlags["Exported"] = 1] = "Exported"; @@ -437,8 +438,8 @@ var TypeScript; VarFlags[VarFlags["ClassSuperMustBeFirstCallInConstructor"] = 32768] = "ClassSuperMustBeFirstCallInConstructor"; VarFlags[VarFlags["Constant"] = 65536] = "Constant"; VarFlags[VarFlags["MustCaptureThis"] = 131072] = "MustCaptureThis"; - })(TypeScript.VarFlags || (TypeScript.VarFlags = {})); - var VarFlags = TypeScript.VarFlags; + })(VarFlags = TypeScript.VarFlags || (TypeScript.VarFlags = {})); + var FncFlags; (function (FncFlags) { FncFlags[FncFlags["None"] = 0] = "None"; FncFlags[FncFlags["Exported"] = 1] = "Exported"; @@ -461,19 +462,19 @@ var TypeScript; FncFlags[FncFlags["IsFunctionExpression"] = 131072] = "IsFunctionExpression"; FncFlags[FncFlags["ClassMethod"] = 262144] = "ClassMethod"; FncFlags[FncFlags["ClassPropertyMethodExported"] = 524288] = "ClassPropertyMethodExported"; - })(TypeScript.FncFlags || (TypeScript.FncFlags = {})); - var FncFlags = TypeScript.FncFlags; + })(FncFlags = TypeScript.FncFlags || (TypeScript.FncFlags = {})); + var SignatureFlags; (function (SignatureFlags) { SignatureFlags[SignatureFlags["None"] = 0] = "None"; SignatureFlags[SignatureFlags["IsIndexer"] = 1] = "IsIndexer"; SignatureFlags[SignatureFlags["IsStringIndexer"] = 2] = "IsStringIndexer"; SignatureFlags[SignatureFlags["IsNumberIndexer"] = 4] = "IsNumberIndexer"; - })(TypeScript.SignatureFlags || (TypeScript.SignatureFlags = {})); - var SignatureFlags = TypeScript.SignatureFlags; + })(SignatureFlags = TypeScript.SignatureFlags || (TypeScript.SignatureFlags = {})); function ToDeclFlags(fncOrVarOrSymbolOrModuleFlags) { return fncOrVarOrSymbolOrModuleFlags; } TypeScript.ToDeclFlags = ToDeclFlags; + var TypeFlags; (function (TypeFlags) { TypeFlags[TypeFlags["None"] = 0] = "None"; TypeFlags[TypeFlags["HasImplementation"] = 1] = "HasImplementation"; @@ -484,8 +485,8 @@ var TypeScript; TypeFlags[TypeFlags["HasBaseType"] = 32] = "HasBaseType"; TypeFlags[TypeFlags["HasBaseTypeOfObject"] = 64] = "HasBaseTypeOfObject"; TypeFlags[TypeFlags["IsClass"] = 128] = "IsClass"; - })(TypeScript.TypeFlags || (TypeScript.TypeFlags = {})); - var TypeFlags = TypeScript.TypeFlags; + })(TypeFlags = TypeScript.TypeFlags || (TypeScript.TypeFlags = {})); + var TypeRelationshipFlags; (function (TypeRelationshipFlags) { TypeRelationshipFlags[TypeRelationshipFlags["SuccessfulComparison"] = 0] = "SuccessfulComparison"; TypeRelationshipFlags[TypeRelationshipFlags["SourceIsNullTargetIsVoidOrUndefined"] = 1] = "SourceIsNullTargetIsVoidOrUndefined"; @@ -495,19 +496,18 @@ var TypeScript; TypeRelationshipFlags[TypeRelationshipFlags["IncompatibleReturnTypes"] = 16] = "IncompatibleReturnTypes"; TypeRelationshipFlags[TypeRelationshipFlags["IncompatiblePropertyTypes"] = 32] = "IncompatiblePropertyTypes"; TypeRelationshipFlags[TypeRelationshipFlags["IncompatibleParameterTypes"] = 64] = "IncompatibleParameterTypes"; - })(TypeScript.TypeRelationshipFlags || (TypeScript.TypeRelationshipFlags = {})); - var TypeRelationshipFlags = TypeScript.TypeRelationshipFlags; + })(TypeRelationshipFlags = TypeScript.TypeRelationshipFlags || (TypeScript.TypeRelationshipFlags = {})); + var CodeGenTarget; (function (CodeGenTarget) { CodeGenTarget[CodeGenTarget["ES3"] = 0] = "ES3"; CodeGenTarget[CodeGenTarget["ES5"] = 1] = "ES5"; - })(TypeScript.CodeGenTarget || (TypeScript.CodeGenTarget = {})); - var CodeGenTarget = TypeScript.CodeGenTarget; + })(CodeGenTarget = TypeScript.CodeGenTarget || (TypeScript.CodeGenTarget = {})); + var ModuleGenTarget; (function (ModuleGenTarget) { ModuleGenTarget[ModuleGenTarget["Synchronous"] = 0] = "Synchronous"; ModuleGenTarget[ModuleGenTarget["Asynchronous"] = 1] = "Asynchronous"; ModuleGenTarget[ModuleGenTarget["Local"] = 2] = "Local"; - })(TypeScript.ModuleGenTarget || (TypeScript.ModuleGenTarget = {})); - var ModuleGenTarget = TypeScript.ModuleGenTarget; + })(ModuleGenTarget = TypeScript.ModuleGenTarget || (TypeScript.ModuleGenTarget = {})); // Compiler defaults to generating ES5-compliant code for // - getters and setters TypeScript.codeGenTarget = CodeGenTarget.ES3; diff --git a/tests/baselines/reference/parserRealSource3.js b/tests/baselines/reference/parserRealSource3.js index 38e9028297bc9..f0e22395cfe5e 100644 --- a/tests/baselines/reference/parserRealSource3.js +++ b/tests/baselines/reference/parserRealSource3.js @@ -126,6 +126,7 @@ module TypeScript { var TypeScript; (function (TypeScript) { // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback + var NodeType; (function (NodeType) { NodeType[NodeType["None"] = 0] = "None"; NodeType[NodeType["Empty"] = 1] = "Empty"; @@ -236,6 +237,5 @@ var TypeScript; NodeType[NodeType["Debugger"] = 106] = "Debugger"; NodeType[NodeType["GeneralNode"] = 71] = "GeneralNode"; NodeType[NodeType["LastAsg"] = 41] = "LastAsg"; - })(TypeScript.NodeType || (TypeScript.NodeType = {})); - var NodeType = TypeScript.NodeType; + })(NodeType = TypeScript.NodeType || (TypeScript.NodeType = {})); })(TypeScript || (TypeScript = {})); diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js index 0ab6d3e531e70..b328e8b303693 100644 --- a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js +++ b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js @@ -163,11 +163,11 @@ var m_private; return c_private; }()); m_private.c_private = c_private; + var e_private; (function (e_private) { e_private[e_private["Happy"] = 0] = "Happy"; e_private[e_private["Grumpy"] = 1] = "Grumpy"; - })(m_private.e_private || (m_private.e_private = {})); - var e_private = m_private.e_private; + })(e_private = m_private.e_private || (m_private.e_private = {})); function f_private() { return new c_private(); } @@ -192,11 +192,11 @@ var m_public; return c_public; }()); m_public.c_public = c_public; + var e_public; (function (e_public) { e_public[e_public["Happy"] = 0] = "Happy"; e_public[e_public["Grumpy"] = 1] = "Grumpy"; - })(m_public.e_public || (m_public.e_public = {})); - var e_public = m_public.e_public; + })(e_public = m_public.e_public || (m_public.e_public = {})); function f_public() { return new c_public(); } diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js index 96f7b74b474c2..7d4a80a0d29e8 100644 --- a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js +++ b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js @@ -164,11 +164,11 @@ define(["require", "exports"], function (require, exports) { return c_private; }()); m_private.c_private = c_private; + var e_private; (function (e_private) { e_private[e_private["Happy"] = 0] = "Happy"; e_private[e_private["Grumpy"] = 1] = "Grumpy"; - })(m_private.e_private || (m_private.e_private = {})); - var e_private = m_private.e_private; + })(e_private = m_private.e_private || (m_private.e_private = {})); function f_private() { return new c_private(); } @@ -193,11 +193,11 @@ define(["require", "exports"], function (require, exports) { return c_public; }()); m_public.c_public = c_public; + var e_public; (function (e_public) { e_public[e_public["Happy"] = 0] = "Happy"; e_public[e_public["Grumpy"] = 1] = "Grumpy"; - })(m_public.e_public || (m_public.e_public = {})); - var e_public = m_public.e_public; + })(e_public = m_public.e_public || (m_public.e_public = {})); function f_public() { return new c_public(); } diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js index 852ae4d3f1998..a01f1ef611f88 100644 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js @@ -111,11 +111,11 @@ define(["require", "exports"], function (require, exports) { return c_private; }()); m_private.c_private = c_private; + var e_private; (function (e_private) { e_private[e_private["Happy"] = 0] = "Happy"; e_private[e_private["Grumpy"] = 1] = "Grumpy"; - })(m_private.e_private || (m_private.e_private = {})); - var e_private = m_private.e_private; + })(e_private = m_private.e_private || (m_private.e_private = {})); function f_private() { return new c_private(); } @@ -140,11 +140,11 @@ define(["require", "exports"], function (require, exports) { return c_public; }()); m_public.c_public = c_public; + var e_public; (function (e_public) { e_public[e_public["Happy"] = 0] = "Happy"; e_public[e_public["Grumpy"] = 1] = "Grumpy"; - })(m_public.e_public || (m_public.e_public = {})); - var e_public = m_public.e_public; + })(e_public = m_public.e_public || (m_public.e_public = {})); function f_public() { return new c_public(); } diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js index 1241165a8dcd3..2554085b94b41 100644 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js @@ -112,11 +112,11 @@ define(["require", "exports"], function (require, exports) { return c_private; }()); m_private.c_private = c_private; + var e_private; (function (e_private) { e_private[e_private["Happy"] = 0] = "Happy"; e_private[e_private["Grumpy"] = 1] = "Grumpy"; - })(m_private.e_private || (m_private.e_private = {})); - var e_private = m_private.e_private; + })(e_private = m_private.e_private || (m_private.e_private = {})); function f_private() { return new c_private(); } @@ -141,11 +141,11 @@ define(["require", "exports"], function (require, exports) { return c_public; }()); m_public.c_public = c_public; + var e_public; (function (e_public) { e_public[e_public["Happy"] = 0] = "Happy"; e_public[e_public["Grumpy"] = 1] = "Grumpy"; - })(m_public.e_public || (m_public.e_public = {})); - var e_public = m_public.e_public; + })(e_public = m_public.e_public || (m_public.e_public = {})); function f_public() { return new c_public(); } diff --git a/tests/baselines/reference/scannerEnum1.js b/tests/baselines/reference/scannerEnum1.js index e785a07ace2f6..5d8b506e62f02 100644 --- a/tests/baselines/reference/scannerEnum1.js +++ b/tests/baselines/reference/scannerEnum1.js @@ -6,8 +6,8 @@ //// [scannerEnum1.js] "use strict"; +var CodeGenTarget; (function (CodeGenTarget) { CodeGenTarget[CodeGenTarget["ES3"] = 0] = "ES3"; CodeGenTarget[CodeGenTarget["ES5"] = 1] = "ES5"; -})(exports.CodeGenTarget || (exports.CodeGenTarget = {})); -var CodeGenTarget = exports.CodeGenTarget; +})(CodeGenTarget = exports.CodeGenTarget || (exports.CodeGenTarget = {})); diff --git a/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js b/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js index 0cd6f472bdbc6..ca68d952ab3ab 100644 --- a/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js +++ b/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js @@ -29,10 +29,10 @@ System.register([], function (exports_1, context_1) { TopLevelConstEnum[TopLevelConstEnum["X"] = 0] = "X"; })(TopLevelConstEnum || (TopLevelConstEnum = {})); (function (M) { + var NonTopLevelConstEnum; (function (NonTopLevelConstEnum) { NonTopLevelConstEnum[NonTopLevelConstEnum["X"] = 0] = "X"; - })(M.NonTopLevelConstEnum || (M.NonTopLevelConstEnum = {})); - var NonTopLevelConstEnum = M.NonTopLevelConstEnum; + })(NonTopLevelConstEnum = M.NonTopLevelConstEnum || (M.NonTopLevelConstEnum = {})); })(M || (M = {})); } }; diff --git a/tests/baselines/reference/systemModuleDeclarationMerging.js b/tests/baselines/reference/systemModuleDeclarationMerging.js index 4dac69c2641b2..88b1b20149512 100644 --- a/tests/baselines/reference/systemModuleDeclarationMerging.js +++ b/tests/baselines/reference/systemModuleDeclarationMerging.js @@ -34,7 +34,7 @@ System.register([], function (exports_1, context_1) { })(C = C || (C = {})); exports_1("C", C); (function (E) { - })(E || (E = {})); + })(E = E || (E = {})); exports_1("E", E); (function (E) { var x; diff --git a/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js b/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js index b0498b23f79ac..db907c49d911b 100644 --- a/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js +++ b/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js @@ -34,7 +34,7 @@ System.register([], function (exports_1, context_1) { exports_1("TopLevelModule", TopLevelModule); (function (TopLevelEnum) { TopLevelEnum[TopLevelEnum["E"] = 0] = "E"; - })(TopLevelEnum || (TopLevelEnum = {})); + })(TopLevelEnum = TopLevelEnum || (TopLevelEnum = {})); exports_1("TopLevelEnum", TopLevelEnum); (function (TopLevelModule2) { var NonTopLevelClass = (function () { @@ -49,10 +49,10 @@ System.register([], function (exports_1, context_1) { })(NonTopLevelModule = TopLevelModule2.NonTopLevelModule || (TopLevelModule2.NonTopLevelModule = {})); function NonTopLevelFunction() { } TopLevelModule2.NonTopLevelFunction = NonTopLevelFunction; + var NonTopLevelEnum; (function (NonTopLevelEnum) { NonTopLevelEnum[NonTopLevelEnum["E"] = 0] = "E"; - })(TopLevelModule2.NonTopLevelEnum || (TopLevelModule2.NonTopLevelEnum = {})); - var NonTopLevelEnum = TopLevelModule2.NonTopLevelEnum; + })(NonTopLevelEnum = TopLevelModule2.NonTopLevelEnum || (TopLevelModule2.NonTopLevelEnum = {})); })(TopLevelModule2 = TopLevelModule2 || (TopLevelModule2 = {})); exports_1("TopLevelModule2", TopLevelModule2); } diff --git a/tests/baselines/reference/typeofAnExportedType.js b/tests/baselines/reference/typeofAnExportedType.js index 91b19d9bebd46..69602d3e4c339 100644 --- a/tests/baselines/reference/typeofAnExportedType.js +++ b/tests/baselines/reference/typeofAnExportedType.js @@ -74,10 +74,10 @@ var M; M.C = C; })(M = exports.M || (exports.M = {})); exports.Z = M; +var E; (function (E) { E[E["A"] = 0] = "A"; -})(exports.E || (exports.E = {})); -var E = exports.E; +})(E = exports.E || (exports.E = {})); function foo() { } exports.foo = foo; (function (foo) { From b557211a375bd47d11b42aa6ee29f5c741439fb3 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Thu, 13 Oct 2016 13:02:22 -0700 Subject: [PATCH 04/18] Return both ts and js results from module resolution, and don't have moduleNameResolver responsible for omitting files based on compiler options --- src/compiler/checker.ts | 18 +- src/compiler/core.ts | 6 +- src/compiler/diagnosticMessages.json | 12 +- src/compiler/moduleNameResolver.ts | 314 +++++++++++------- src/compiler/program.ts | 65 ++-- src/compiler/types.ts | 33 +- src/compiler/utilities.ts | 30 +- src/harness/unittests/moduleResolution.ts | 253 +++++++++++--- .../unittests/reuseProgramStructure.ts | 17 +- src/server/lsHost.ts | 51 +-- .../typingsInstaller/typingsInstaller.ts | 4 +- src/services/shims.ts | 2 +- ...portWithTrailingSlash_noResolve.trace.json | 2 + .../reference/library-reference-11.trace.json | 5 - .../reference/library-reference-12.trace.json | 5 - .../reference/library-reference-3.trace.json | 2 - .../reference/library-reference-4.trace.json | 16 - .../reference/library-reference-5.trace.json | 16 - .../reference/library-reference-7.trace.json | 2 - .../reference/moduleResolutionNoTs.js | 2 +- .../moduleResolutionWithExtensions.trace.json | 4 + ...tionWithExtensions_notSupported.errors.txt | 23 ++ ...leResolutionWithExtensions_notSupported.js | 17 + ...tionWithExtensions_notSupported.trace.json | 40 +++ ...ionWithExtensions_notSupported2.errors.txt | 12 + ...eResolutionWithExtensions_notSupported2.js | 12 + ...ionWithExtensions_notSupported2.trace.json | 18 + ...moduleResolutionWithExtensions_preferTs.js | 18 + ...eResolutionWithExtensions_preferTs.symbols | 8 + ...solutionWithExtensions_preferTs.trace.json | 14 + ...uleResolutionWithExtensions_preferTs.types | 8 + ...lutionWithExtensions_withAmbientPresent.js | 18 + ...nWithExtensions_withAmbientPresent.symbols | 11 + ...thExtensions_withAmbientPresent.trace.json | 28 ++ ...ionWithExtensions_withAmbientPresent.types | 12 + .../moduleResolutionWithSymlinks.trace.json | 28 ++ ...gBasedModuleResolution3_classic.trace.json | 9 + ...pingBasedModuleResolution3_node.trace.json | 22 ++ ...gBasedModuleResolution4_classic.trace.json | 9 + ...pingBasedModuleResolution4_node.trace.json | 22 ++ ...gBasedModuleResolution5_classic.trace.json | 15 + ...pingBasedModuleResolution5_node.trace.json | 30 ++ ...gBasedModuleResolution6_classic.trace.json | 7 + ...pingBasedModuleResolution6_node.trace.json | 10 + ...gBasedModuleResolution7_classic.trace.json | 24 ++ ...pingBasedModuleResolution7_node.trace.json | 40 +++ ...mMultipleNodeModulesDirectories.trace.json | 72 ++++ ...romNodeModulesInParentDirectory.trace.json | 16 + .../reference/typingsLookup4.trace.json | 35 +- .../reference/typingsLookupAmd.trace.json | 56 ++++ tests/cases/compiler/moduleResolutionNoTs.ts | 1 + ...leResolutionWithExtensions_notSupported.ts | 13 + ...eResolutionWithExtensions_notSupported2.ts | 9 + ...moduleResolutionWithExtensions_preferTs.ts | 10 + ...lutionWithExtensions_withAmbientPresent.ts | 14 + .../references/library-reference-11.ts | 1 + 56 files changed, 1223 insertions(+), 318 deletions(-) create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_notSupported.errors.txt create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_notSupported.js create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_notSupported.trace.json create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.errors.txt create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.trace.json create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_preferTs.js create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_preferTs.symbols create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_preferTs.trace.json create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_preferTs.types create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.symbols create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json create mode 100644 tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.types create mode 100644 tests/cases/compiler/moduleResolutionWithExtensions_notSupported.ts create mode 100644 tests/cases/compiler/moduleResolutionWithExtensions_notSupported2.ts create mode 100644 tests/cases/compiler/moduleResolutionWithExtensions_preferTs.ts create mode 100644 tests/cases/compiler/moduleResolutionWithExtensions_withAmbientPresent.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d3f15f2367bc6..ebf86484c4505 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1366,7 +1366,8 @@ namespace ts { } const resolvedModule = getResolvedModule(getSourceFileOfNode(location), moduleReference); - const sourceFile = resolvedModule && host.getSourceFile(resolvedModule.resolvedFileName); + const resolvedOrDiagnostic = resolvedModule && getResolutionOrDiagnostic(compilerOptions, resolvedModule); + const sourceFile = typeof resolvedOrDiagnostic === "string" && resolvedModule && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { if (sourceFile.symbol) { // merged symbol is module declaration symbol combined with all augmentations @@ -1388,13 +1389,18 @@ namespace ts { if (moduleNotFoundError) { // report errors only if it was requested - const tsExtension = tryExtractTypeScriptExtension(moduleName); - if (tsExtension) { - const diag = Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead; - error(errorNode, diag, tsExtension, removeExtension(moduleName, tsExtension)); + if (resolvedOrDiagnostic && typeof resolvedOrDiagnostic !== "string") { + error(errorNode, resolvedOrDiagnostic.diag, moduleName, resolvedOrDiagnostic.file); } else { - error(errorNode, moduleNotFoundError, moduleName); + const tsExtension = tryExtractTypeScriptExtension(moduleName); + if (tsExtension) { + const diag = Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead; + error(errorNode, diag, tsExtension, removeExtension(moduleName, tsExtension)); + } + else { + error(errorNode, moduleNotFoundError, moduleName); + } } } return undefined; diff --git a/src/compiler/core.ts b/src/compiler/core.ts index befa30b600618..66179a8ce3a92 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1753,7 +1753,7 @@ namespace ts { /** Must have ".d.ts" first because if ".ts" goes first, that will be detected as the extension instead of ".d.ts". */ export const supportedTypescriptExtensionsForExtractExtension = [".d.ts", ".ts", ".tsx"]; export const supportedJavascriptExtensions = [".js", ".jsx"]; - const allSupportedExtensions = supportedTypeScriptExtensions.concat(supportedJavascriptExtensions); + export const allSupportedExtensions = supportedTypeScriptExtensions.concat(supportedJavascriptExtensions); export function getSupportedExtensions(options?: CompilerOptions): string[] { return options && options.allowJs ? allSupportedExtensions : supportedTypeScriptExtensions; @@ -1850,10 +1850,6 @@ namespace ts { return path.substring(0, path.length - extension.length); } - export function isJsxOrTsxExtension(ext: string): boolean { - return ext === ".jsx" || ext === ".tsx"; - } - export function changeExtension(path: T, newExtension: string): T { return (removeFileExtension(path) + newExtension); } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 21f04da488d9b..5629e1e270f54 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2697,7 +2697,7 @@ "category": "Message", "code": 6099 }, - "'package.json' does not have 'types' field.": { + "'package.json' does not have a 'types' or 'main' field.": { "category": "Message", "code": 6100 }, @@ -2845,7 +2845,7 @@ "category": "Message", "code": 6136 }, - "No types specified in 'package.json' but 'allowJs' is set, so returning 'main' value of '{0}'": { + "No types specified in 'package.json', so returning 'main' value of '{0}'": { "category": "Message", "code": 6137 }, @@ -2865,6 +2865,14 @@ "category": "Message", "code": 6141 }, + "Module '{0}' was resolved to '{1}', but '--jsx' is not set.": { + "category": "Error", + "code": 6142 + }, + "Module '{0}' was resolved to '{1}', but '--allowJs' is not set.": { + "category": "Error", + "code": 6143 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", "code": 7005 diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 4ebdc59e6ddfd..b7b322096a8b8 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -2,10 +2,8 @@ /// namespace ts { - - /* @internal */ - export function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: any[]): void; - export function trace(host: ModuleResolutionHost, message: DiagnosticMessage): void { + function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: any[]): void; + function trace(host: ModuleResolutionHost, message: DiagnosticMessage): void { host.trace(formatMessage.apply(undefined, arguments)); } @@ -14,22 +12,102 @@ namespace ts { return compilerOptions.traceResolution && host.trace !== undefined; } + /** + * Result of trying to resolve a module. + * At least one of `ts` and `js` should be defined, or the whole thing should be `undefined`. + */ + interface Resolved { + ts: string | undefined; + js: string | undefined; + } + + /** + * Given a resolution result which does not have a resolvedTsFileName, combine it with second attempt. + * This should be used in the following pattern: + * + * const attemptA = foo(); + * return attemptA && attemptA.ts ? attemptA : combineAttempts(attemptA, bar()); + * + * Meaning, we stop early if we found a typed result. + */ + function combineAttempts(firstAttempt: Resolved | undefined, secondAttempt: Resolved | undefined): Resolved | undefined { + Debug.assert(!(firstAttempt && firstAttempt.ts)); + return firstAttempt && secondAttempt + ? { ts: secondAttempt.ts, js: firstAttempt.js } + : (firstAttempt || secondAttempt); + } + + /** + * Whether we are looking for all supported extensions or only `.d.ts` files. + * We look for tsx/jsx/js files even if the compiler settings do not allow them -- this will be a checker error. + */ + enum Extensions { All, DtsOnly } + + /** Used with `Extensions.DtsOnly` to use just the `ts` component, since `js` can't possibly be defined. */ + function resolvedTsOnly(resolved: Resolved | undefined): string | undefined { + Debug.assert(!(resolved && resolved.js)); + return resolved && resolved.ts; + } + + /** Create Resolved from a file with unknown extension. */ + function resolvedFromAnyFile(path: string): Resolved | undefined { + return fileExtensionIsAny(path, supportedTypeScriptExtensions) ? { ts: path, js: undefined } : { ts: undefined, js: path }; + } + /* @internal */ - export function createResolvedModule(resolvedFileName: string, isExternalLibraryImport: boolean, failedLookupLocations: string[]): ResolvedModuleWithFailedLookupLocations { - return { resolvedModule: resolvedFileName ? { resolvedFileName, isExternalLibraryImport } : undefined, failedLookupLocations }; + export function resolvedModuleFromAnyFile(fileName: string, isExternalLibraryImport: boolean): ResolvedModule { + return resolvedModuleFromResolved(resolvedFromAnyFile(fileName), isExternalLibraryImport); + } + + /** Adds `isExernalLibraryImport` to a Resolved to get a ResolvedModule. */ + function resolvedModuleFromResolved({ ts, js }: Resolved, isExternalLibraryImport: boolean): ResolvedModule { + return { resolvedFileName: ts || js, resolvedTsFileName: ts, resolvedJsFileName: js, isExternalLibraryImport }; + } + + function createResolvedModuleWithFailedLookupLocations(resolved: Resolved | undefined, isExternalLibraryImport: boolean, failedLookupLocations: string[]): ResolvedModuleWithFailedLookupLocations { + return { resolvedModule: resolved && resolvedModuleFromResolved(resolved, isExternalLibraryImport), failedLookupLocations }; } function moduleHasNonRelativeName(moduleName: string): boolean { return !(isRootedDiskPath(moduleName) || isExternalModuleNameRelative(moduleName)); } - /* @internal */ - export interface ModuleResolutionState { + interface ModuleResolutionState { host: ModuleResolutionHost; - compilerOptions: CompilerOptions; + // We only use this subset of the compiler options. + compilerOptions: { rootDirs?: string[], baseUrl?: string, paths?: MapLike; }; traceEnabled: boolean; - // skip .tsx files if jsx is not enabled - skipTsx: boolean; + } + + /** LsHost uses a global cache of automatically-installed typings to help it resolve modules. */ + /* @internal */ + export function resolveModuleNameForLsHost(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, globalCache: string | undefined, projectName: string): ResolvedModuleWithFailedLookupLocations { + const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host); + if (primaryResult.resolvedModule && primaryResult.resolvedModule.resolvedTsFileName) { + // return result immediately only if it is .ts, .tsx or .d.ts + // otherwise try to load typings from @types + return primaryResult; + } + + // create different collection of failed lookup locations for second pass + // if it will fail and we've already found something during the first pass - we don't want to pollute its results + const secondaryLookupFailedLookupLocations: string[] = []; + if (globalCache !== undefined) { + const traceEnabled = isTraceEnabled(compilerOptions, host); + if (traceEnabled) { + trace(host, Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache); + } + const state: ModuleResolutionState = { compilerOptions, host, traceEnabled }; + const resolved = loadModuleFromNodeModules(Extensions.All, moduleName, globalCache, secondaryLookupFailedLookupLocations, state, /*checkOneLevel*/ true); + if (resolved) { + return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, primaryResult.failedLookupLocations.concat(secondaryLookupFailedLookupLocations)); + } + } + + if (!primaryResult.resolvedModule && secondaryLookupFailedLookupLocations.length) { + primaryResult.failedLookupLocations = primaryResult.failedLookupLocations.concat(secondaryLookupFailedLookupLocations); + } + return primaryResult; } function tryReadTypesSection(packageJsonPath: string, baseDirectory: string, state: ModuleResolutionState): string { @@ -59,12 +137,11 @@ namespace ts { } // Use the main module for inferring types if no types package specified and the allowJs is set - if (state.compilerOptions.allowJs && jsonContent.main && typeof jsonContent.main === "string") { + if (typeof jsonContent.main === "string") { if (state.traceEnabled) { - trace(state.host, Diagnostics.No_types_specified_in_package_json_but_allowJs_is_set_so_returning_main_value_of_0, jsonContent.main); + trace(state.host, Diagnostics.No_types_specified_in_package_json_so_returning_main_value_of_0, jsonContent.main); } - const mainFilePath = normalizePath(combinePaths(baseDirectory, jsonContent.main)); - return mainFilePath; + return normalizePath(combinePaths(baseDirectory, jsonContent.main)); } return undefined; } @@ -80,8 +157,6 @@ namespace ts { } } - const typeReferenceExtensions = [".d.ts"]; - export function getEffectiveTypeRoots(options: CompilerOptions, host: { directoryExists?: (directoryName: string) => boolean, getCurrentDirectory?: () => string }): string[] | undefined { if (options.typeRoots) { return options.typeRoots; @@ -132,12 +207,11 @@ namespace ts { * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups * is assumed to be the same as root directory of the project. */ - export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string, options: CompilerOptions, host: ModuleResolutionHost): ResolvedTypeReferenceDirectiveWithFailedLookupLocations { + export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost): ResolvedTypeReferenceDirectiveWithFailedLookupLocations { const traceEnabled = isTraceEnabled(options, host); const moduleResolutionState: ModuleResolutionState = { compilerOptions: options, host: host, - skipTsx: true, traceEnabled }; @@ -168,19 +242,20 @@ namespace ts { if (traceEnabled) { trace(host, Diagnostics.Resolving_with_primary_search_path_0, typeRoots.join(", ")); } - const primarySearchPaths = typeRoots; - for (const typeRoot of primarySearchPaths) { + for (const typeRoot of typeRoots) { const candidate = combinePaths(typeRoot, typeReferenceDirectiveName); const candidateDirectory = getDirectoryPath(candidate); - const resolvedFile = loadNodeModuleFromDirectory(typeReferenceExtensions, candidate, failedLookupLocations, - !directoryProbablyExists(candidateDirectory, host), moduleResolutionState); - if (resolvedFile) { + const resolved = resolvedTsOnly( + loadNodeModuleFromDirectory(Extensions.DtsOnly, candidate, failedLookupLocations, + !directoryProbablyExists(candidateDirectory, host), moduleResolutionState)); + + if (resolved) { if (traceEnabled) { - trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolvedFile, true); + trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolved, true); } return { - resolvedTypeReferenceDirective: { primary: true, resolvedFileName: resolvedFile }, + resolvedTypeReferenceDirective: { primary: true, resolvedFileName: resolved }, failedLookupLocations }; } @@ -193,17 +268,14 @@ namespace ts { } let resolvedFile: string; - let initialLocationForSecondaryLookup: string; - if (containingFile) { - initialLocationForSecondaryLookup = getDirectoryPath(containingFile); - } + const initialLocationForSecondaryLookup = containingFile && getDirectoryPath(containingFile); if (initialLocationForSecondaryLookup !== undefined) { // check secondary locations if (traceEnabled) { trace(host, Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup); } - resolvedFile = loadModuleFromNodeModules(typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, /*checkOneLevel*/ false); + resolvedFile = resolvedTsOnly(loadModuleFromNodeModules(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, /*checkOneLevel*/ false)); if (traceEnabled) { if (resolvedFile) { trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolvedFile, false); @@ -219,9 +291,7 @@ namespace ts { } } return { - resolvedTypeReferenceDirective: resolvedFile - ? { primary: false, resolvedFileName: resolvedFile } - : undefined, + resolvedTypeReferenceDirective: resolvedFile ? { primary: false, resolvedFileName: resolvedFile } : undefined, failedLookupLocations }; } @@ -313,7 +383,7 @@ namespace ts { * 'typings' entry or file 'index' with some supported extension * - Classic loader will only try to interpret '/a/b/c' as file. */ - type ResolutionKindSpecificLoader = (candidate: string, extensions: string[], failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState) => string; + type ResolutionKindSpecificLoader = (candidate: string, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState) => Resolved | undefined; /** * Any module resolution kind can be augmented with optional settings: 'baseUrl', 'paths' and 'rootDirs' - they are used to @@ -376,18 +446,18 @@ namespace ts { * entries in 'rootDirs', use them to build absolute path out of (*) and try to resolve module from this location. */ function tryLoadModuleUsingOptionalResolutionSettings(moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader, - failedLookupLocations: string[], supportedExtensions: string[], state: ModuleResolutionState): string { + failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { if (moduleHasNonRelativeName(moduleName)) { - return tryLoadModuleUsingBaseUrl(moduleName, loader, failedLookupLocations, supportedExtensions, state); + return tryLoadModuleUsingBaseUrl(moduleName, loader, failedLookupLocations, state); } else { - return tryLoadModuleUsingRootDirs(moduleName, containingDirectory, loader, failedLookupLocations, supportedExtensions, state); + return tryLoadModuleUsingRootDirs(moduleName, containingDirectory, loader, failedLookupLocations, state); } } function tryLoadModuleUsingRootDirs(moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader, - failedLookupLocations: string[], supportedExtensions: string[], state: ModuleResolutionState): string { + failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { if (!state.compilerOptions.rootDirs) { return undefined; @@ -432,7 +502,7 @@ namespace ts { if (state.traceEnabled) { trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, matchedNormalizedPrefix, candidate); } - const resolvedFileName = loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(containingDirectory, state.host), state); + const resolvedFileName = loader(candidate, failedLookupLocations, !directoryProbablyExists(containingDirectory, state.host), state); if (resolvedFileName) { return resolvedFileName; } @@ -451,7 +521,7 @@ namespace ts { trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, rootDir, candidate); } const baseDirectory = getDirectoryPath(candidate); - const resolvedFileName = loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(baseDirectory, state.host), state); + const resolvedFileName = loader(candidate, failedLookupLocations, !directoryProbablyExists(baseDirectory, state.host), state); if (resolvedFileName) { return resolvedFileName; } @@ -463,9 +533,7 @@ namespace ts { return undefined; } - function tryLoadModuleUsingBaseUrl(moduleName: string, loader: ResolutionKindSpecificLoader, failedLookupLocations: string[], - supportedExtensions: string[], state: ModuleResolutionState): string { - + function tryLoadModuleUsingBaseUrl(moduleName: string, loader: ResolutionKindSpecificLoader, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { if (!state.compilerOptions.baseUrl) { return undefined; } @@ -494,9 +562,9 @@ namespace ts { if (state.traceEnabled) { trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path); } - const resolvedFileName = loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); - if (resolvedFileName) { - return resolvedFileName; + const resolved = loader(candidate, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); + if (resolved) { + return resolved; } } return undefined; @@ -508,56 +576,58 @@ namespace ts { trace(state.host, Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2, moduleName, state.compilerOptions.baseUrl, candidate); } - return loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); + return loader(candidate, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); } } export function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { const containingDirectory = getDirectoryPath(containingFile); - const supportedExtensions = getSupportedExtensions(compilerOptions); const traceEnabled = isTraceEnabled(compilerOptions, host); const failedLookupLocations: string[] = []; - const state = { compilerOptions, host, traceEnabled, skipTsx: false }; - let resolvedFileName = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, nodeLoadModuleByRelativeName, - failedLookupLocations, supportedExtensions, state); + const state: ModuleResolutionState = { compilerOptions, host, traceEnabled }; + let resolved = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, nodeLoadModuleByRelativeName, failedLookupLocations, state); let isExternalLibraryImport = false; - if (!resolvedFileName) { + if (!resolved) { if (moduleHasNonRelativeName(moduleName)) { if (traceEnabled) { trace(host, Diagnostics.Loading_module_0_from_node_modules_folder, moduleName); } - resolvedFileName = loadModuleFromNodeModules(moduleName, containingDirectory, failedLookupLocations, state, /*checkOneLevel*/ false); - isExternalLibraryImport = resolvedFileName !== undefined; + resolved = loadModuleFromNodeModules(Extensions.All, moduleName, containingDirectory, failedLookupLocations, state, /*checkOneLevel*/ false); + isExternalLibraryImport = resolved !== undefined; } else { const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - resolvedFileName = nodeLoadModuleByRelativeName(candidate, supportedExtensions, failedLookupLocations, /*onlyRecordFailures*/ false, state); + resolved = nodeLoadModuleByRelativeName(candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state); } } - if (resolvedFileName && host.realpath) { - const originalFileName = resolvedFileName; - resolvedFileName = normalizePath(host.realpath(resolvedFileName)); + return createResolvedModuleWithFailedLookupLocations(resolved && resolvedWithRealpath(resolved, host, traceEnabled), isExternalLibraryImport, failedLookupLocations); + } + + function resolvedWithRealpath(resolved: Resolved, host: ModuleResolutionHost, traceEnabled: boolean): Resolved { + return host.realpath ? { ts: resolved.ts && realpath(resolved.ts), js: resolved.js && realpath(resolved.js) } : resolved; + + function realpath(path: string): string { + const real = normalizePath(host.realpath(path)); if (traceEnabled) { - trace(host, Diagnostics.Resolving_real_path_for_0_result_1, originalFileName, resolvedFileName); + trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path, real); } + return real; } - - return createResolvedModule(resolvedFileName, isExternalLibraryImport, failedLookupLocations); } - function nodeLoadModuleByRelativeName(candidate: string, supportedExtensions: string[], failedLookupLocations: string[], - onlyRecordFailures: boolean, state: ModuleResolutionState): string { - + function nodeLoadModuleByRelativeName(candidate: string, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): Resolved | undefined { if (state.traceEnabled) { trace(state.host, Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0, candidate); } - const resolvedFileName = !pathEndsWithDirectorySeparator(candidate) && loadModuleFromFile(candidate, supportedExtensions, failedLookupLocations, onlyRecordFailures, state); - - return resolvedFileName || loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, onlyRecordFailures, state); + const resolvedFromFile = !pathEndsWithDirectorySeparator(candidate) && loadModuleFromFile(Extensions.All, candidate, failedLookupLocations, onlyRecordFailures, state); + return resolvedFromFile && resolvedFromFile.ts + ? resolvedFromFile + : combineAttempts(resolvedFromFile, + loadNodeModuleFromDirectory(Extensions.All, candidate, failedLookupLocations, onlyRecordFailures, state)); } /* @internal */ @@ -566,13 +636,17 @@ namespace ts { return !host.directoryExists || host.directoryExists(directoryName); } + function loadModuleFromFileAnyExtension(candidate: string, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): Resolved | undefined { + return loadModuleFromFile(Extensions.All, candidate, failedLookupLocations, onlyRecordFailures, state); + } + /** * @param {boolean} onlyRecordFailures - if true then function won't try to actually load files but instead record all attempts as failures. This flag is necessary * in cases when we know upfront that all load attempts will fail (because containing folder does not exists) however we still need to record all failed lookup locations. */ - function loadModuleFromFile(candidate: string, extensions: string[], failedLookupLocation: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): string | undefined { + function loadModuleFromFile(extensions: Extensions, candidate: string, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): Resolved | undefined { // First, try adding an extension. An import of "foo" could be matched by a file "foo.ts", or "foo.js" by "foo.js.ts" - const resolvedByAddingExtension = tryAddingExtensions(candidate, extensions, failedLookupLocation, onlyRecordFailures, state); + const resolvedByAddingExtension = tryAddingExtensions(candidate, extensions, failedLookupLocations, onlyRecordFailures, state); if (resolvedByAddingExtension) { return resolvedByAddingExtension; } @@ -585,12 +659,12 @@ namespace ts { const extension = candidate.substring(extensionless.length); trace(state.host, Diagnostics.File_name_0_has_a_1_extension_stripping_it, candidate, extension); } - return tryAddingExtensions(extensionless, extensions, failedLookupLocation, onlyRecordFailures, state); + return tryAddingExtensions(extensionless, Extensions.All, failedLookupLocations, onlyRecordFailures, state); } } /** Try to return an existing file that adds one of the `extensions` to `candidate`. */ - function tryAddingExtensions(candidate: string, extensions: string[], failedLookupLocation: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): string | undefined { + function tryAddingExtensions(candidate: string, extensions: Extensions, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): Resolved | undefined { if (!onlyRecordFailures) { // check if containing folder exists - if it doesn't then just record failures for all supported extensions without disk probing const directory = getDirectoryPath(candidate); @@ -598,8 +672,26 @@ namespace ts { onlyRecordFailures = !directoryProbablyExists(directory, state.host); } } - return forEach(extensions, ext => - !(state.skipTsx && isJsxOrTsxExtension(ext)) && tryFile(candidate + ext, failedLookupLocation, onlyRecordFailures, state)); + + switch (extensions) { + case Extensions.DtsOnly: { + const dts = tryExtension(".d.ts"); + return dts && { ts: dts, js: undefined }; + } + case Extensions.All: { + const ts = forEach(supportedTypeScriptExtensions, tryExtension); + if (ts) { + return { ts, js: undefined }; + } + + const js = forEach(supportedJavascriptExtensions, tryExtension); + return js && { ts: undefined, js }; + } + } + + function tryExtension(ext: string): string | undefined { + return tryFile(candidate + ext, failedLookupLocations, onlyRecordFailures, state); + } } /** Return the file if it exists. */ @@ -619,9 +711,12 @@ namespace ts { } } - function loadNodeModuleFromDirectory(extensions: string[], candidate: string, failedLookupLocation: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): string { + function loadNodeModuleFromDirectory(extensions: Extensions, candidate: string, failedLookupLocation: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): Resolved | undefined { const packageJsonPath = pathToPackageJson(candidate); const directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, state.host); + + let fromPackageJson: Resolved | undefined; + if (directoryExists && state.host.fileExists(packageJsonPath)) { if (state.traceEnabled) { trace(state.host, Diagnostics.Found_package_json_at_0, packageJsonPath); @@ -630,15 +725,18 @@ namespace ts { if (typesFile) { const onlyRecordFailures = !directoryProbablyExists(getDirectoryPath(typesFile), state.host); // A package.json "typings" may specify an exact filename, or may choose to omit an extension. - const result = tryFile(typesFile, failedLookupLocation, onlyRecordFailures, state) || - tryAddingExtensions(typesFile, extensions, failedLookupLocation, onlyRecordFailures, state); - if (result) { - return result; + const fromFile = tryFile(typesFile, failedLookupLocation, onlyRecordFailures, state); + if (fromFile) { + return resolvedFromAnyFile(fromFile); + } + fromPackageJson = tryAddingExtensions(typesFile, Extensions.All, failedLookupLocation, onlyRecordFailures, state); + if (fromPackageJson && fromPackageJson.ts) { + return fromPackageJson; } } else { if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_does_not_have_types_field); + trace(state.host, Diagnostics.package_json_does_not_have_a_types_or_main_field); } } } @@ -650,58 +748,56 @@ namespace ts { failedLookupLocation.push(packageJsonPath); } - return loadModuleFromFile(combinePaths(candidate, "index"), extensions, failedLookupLocation, !directoryExists, state); + return combineAttempts(fromPackageJson, loadModuleFromFile(extensions, combinePaths(candidate, "index"), failedLookupLocation, !directoryExists, state)); } function pathToPackageJson(directory: string): string { return combinePaths(directory, "package.json"); } - function loadModuleFromNodeModulesFolder(moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState): string { + function loadModuleFromNodeModulesFolder(extensions: Extensions, moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { const nodeModulesFolder = combinePaths(directory, "node_modules"); const nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host); const candidate = normalizePath(combinePaths(nodeModulesFolder, moduleName)); - const supportedExtensions = getSupportedExtensions(state.compilerOptions); - let result = loadModuleFromFile(candidate, supportedExtensions, failedLookupLocations, !nodeModulesFolderExists, state); + let result = loadModuleFromFile(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state); if (result) { return result; } - result = loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state); + result = loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state); if (result) { return result; } } - /* @internal */ - export function loadModuleFromNodeModules(moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState, checkOneLevel: boolean): string { - return loadModuleFromNodeModulesWorker(moduleName, directory, failedLookupLocations, state, checkOneLevel, /*typesOnly*/ false); + function loadModuleFromNodeModules(extensions: Extensions, moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState, checkOneLevel: boolean): Resolved | undefined { + return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, checkOneLevel, /*typesOnly*/ false); } - - function loadModuleFromNodeModulesAtTypes(moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState): string { - return loadModuleFromNodeModulesWorker(moduleName, directory, failedLookupLocations, state, /*checkOneLevel*/ false, /*typesOnly*/ true); + function loadModuleFromNodeModulesAtTypes(moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { + return loadModuleFromNodeModulesWorker(Extensions.All, moduleName, directory, failedLookupLocations, state, /*checkOneLevel*/ false, /*typesOnly*/ true); } - function loadModuleFromNodeModulesWorker(moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState, checkOneLevel: boolean, typesOnly: boolean): string { + function loadModuleFromNodeModulesWorker(extensions: Extensions, moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState, checkOneLevel: boolean, typesOnly: boolean): Resolved | undefined { directory = normalizeSlashes(directory); while (true) { const baseName = getBaseFileName(directory); if (baseName !== "node_modules") { - let packageResult: string | undefined; + let packageResult: Resolved | undefined; if (!typesOnly) { // Try to load source from the package - packageResult = loadModuleFromNodeModulesFolder(moduleName, directory, failedLookupLocations, state); - if (packageResult && hasTypeScriptFileExtension(packageResult)) { + packageResult = loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state); + if (packageResult && packageResult.ts) { // Always prefer a TypeScript (.ts, .tsx, .d.ts) file shipped with the package return packageResult; } } // Else prefer a types package over non-TypeScript results (e.g. JavaScript files) - const typesResult = loadModuleFromNodeModulesFolder(combinePaths("@types", moduleName), directory, failedLookupLocations, state); + const typesResult = loadModuleFromNodeModulesFolder(extensions, combinePaths("@types", moduleName), directory, failedLookupLocations, state); if (typesResult || packageResult) { - return typesResult || packageResult; + return combineAttempts(packageResult, typesResult); } + // TODO (anhans): We should remember JS results and use them for untyped results. } const parentPath = getDirectoryPath(directory); @@ -716,38 +812,34 @@ namespace ts { export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { const traceEnabled = isTraceEnabled(compilerOptions, host); - const state = { compilerOptions, host, traceEnabled, skipTsx: !compilerOptions.jsx }; + const state: ModuleResolutionState = { compilerOptions, host, traceEnabled }; const failedLookupLocations: string[] = []; - const supportedExtensions = getSupportedExtensions(compilerOptions); const containingDirectory = getDirectoryPath(containingFile); - const resolvedFileName = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, supportedExtensions, state); - if (resolvedFileName) { - return createResolvedModule(resolvedFileName, /*isExternalLibraryImport*/false, failedLookupLocations); + const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, loadModuleFromFileAnyExtension, failedLookupLocations, state); + if (resolvedUsingSettings) { + return createResolvedModuleWithFailedLookupLocations(resolvedUsingSettings, /*isExternalLibraryImport*/ false, failedLookupLocations); } - let referencedSourceFile: string; + let resolved: Resolved | undefined; if (moduleHasNonRelativeName(moduleName)) { - referencedSourceFile = referencedSourceFile = loadModuleFromAncestorDirectories(moduleName, containingDirectory, supportedExtensions, failedLookupLocations, state) || + resolved = loadModuleFromAncestorDirectories(moduleName, containingDirectory, failedLookupLocations, state) || // If we didn't find the file normally, look it up in @types. loadModuleFromNodeModulesAtTypes(moduleName, containingDirectory, failedLookupLocations, state); } else { const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - referencedSourceFile = loadModuleFromFile(candidate, supportedExtensions, failedLookupLocations, /*onlyRecordFailures*/ false, state); + resolved = loadModuleFromFileAnyExtension(candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state); } - - return referencedSourceFile - ? { resolvedModule: { resolvedFileName: referencedSourceFile }, failedLookupLocations } - : { resolvedModule: undefined, failedLookupLocations }; + return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ false, failedLookupLocations); } /** Climb up parent directories looking for a module. */ - function loadModuleFromAncestorDirectories(moduleName: string, containingDirectory: string, supportedExtensions: string[], failedLookupLocations: string[], state: ModuleResolutionState): string | undefined { + function loadModuleFromAncestorDirectories(moduleName: string, containingDirectory: string, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { while (true) { const searchName = normalizePath(combinePaths(containingDirectory, moduleName)); - const referencedSourceFile = loadModuleFromFile(searchName, supportedExtensions, failedLookupLocations, /*onlyRecordFailures*/ false, state); + const referencedSourceFile = loadModuleFromFileAnyExtension(searchName, failedLookupLocations, /*onlyRecordFailures*/ false, state); if (referencedSourceFile) { return referencedSourceFile; } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 50e53ab9484b2..43bc877bc583a 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -307,7 +307,7 @@ namespace ts { // - This calls resolveModuleNames, and then calls findSourceFile for each resolved module. // As all these operations happen - and are nested - within the createProgram call, they close over the below variables. // The current resolution depth is tracked by incrementing/decrementing as the depth first search progresses. - const maxNodeModulesJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0; + const maxNodeModuleJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0; let currentNodeModulesDepth = 0; // If a module has some of its imports skipped due to being at the depth limit under node_modules, then track @@ -331,7 +331,7 @@ namespace ts { let resolveModuleNamesWorker: (moduleNames: string[], containingFile: string) => ResolvedModule[]; if (host.resolveModuleNames) { - resolveModuleNamesWorker = (moduleNames, containingFile) => host.resolveModuleNames(moduleNames, containingFile); + resolveModuleNamesWorker = (moduleNames, containingFile) => host.resolveModuleNames(moduleNames, containingFile).map(convertResolvedModuleFromHost); } else { const loader = (moduleName: string, containingFile: string) => resolveModuleName(moduleName, containingFile, options, host).resolvedModule; @@ -1164,7 +1164,7 @@ namespace ts { } // See if we need to reprocess the imports due to prior skipped imports else if (file && modulesWithElidedImports[file.path]) { - if (currentNodeModulesDepth < maxNodeModulesJsDepth) { + if (currentNodeModulesDepth < maxNodeModuleJsDepth) { modulesWithElidedImports[file.path] = false; processImportedModules(file, getDirectoryPath(fileName)); } @@ -1308,35 +1308,40 @@ namespace ts { file.resolvedModules = createMap(); const moduleNames = map(concatenate(file.imports, file.moduleAugmentations), getTextOfLiteral); const resolutions = resolveModuleNamesWorker(moduleNames, getNormalizedAbsolutePath(file.fileName, currentDirectory)); + Debug.assert(resolutions.length === moduleNames.length); for (let i = 0; i < moduleNames.length; i++) { const resolution = resolutions[i]; setResolvedModule(file, moduleNames[i], resolution); - // add file to program only if: - // - resolution was successful - // - noResolve is falsy - // - module name comes from the list of imports - // - it's not a top level JavaScript module that exceeded the search max - const isFromNodeModulesSearch = resolution && resolution.isExternalLibraryImport; - const isJsFileFromNodeModules = isFromNodeModulesSearch && hasJavaScriptFileExtension(resolution.resolvedFileName); + if (!resolution) { + continue; + } + + const isFromNodeModulesSearch = resolution.isExternalLibraryImport; + const isJsFileFromNodeModules = !resolution.resolvedTsFileName; + const resolvedOrDiagnostic = getResolutionOrDiagnostic(options, resolution); + // Ignore it if it has a bad extension (e.g. 'tsx' if we don't have '--allowJs') -- this will be reported by the checker, so just return undefined for now. + const resolvedFileName = typeof resolvedOrDiagnostic === "string" ? resolvedOrDiagnostic : undefined; if (isFromNodeModulesSearch) { currentNodeModulesDepth++; } - const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModulesJsDepth; - const shouldAddFile = resolution && !options.noResolve && i < file.imports.length && !elideImport; + // add file to program only if: + // - resolution was successful + // - noResolve is falsy + // - module name comes from the list of imports + // - it's not a top level JavaScript module that exceeded the search max + const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth; + const shouldAddFile = resolvedFileName && !options.noResolve && i < file.imports.length && !elideImport; if (elideImport) { modulesWithElidedImports[file.path] = true; } else if (shouldAddFile) { - findSourceFile(resolution.resolvedFileName, - toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), - /*isDefaultLib*/ false, /*isReference*/ false, - file, - skipTrivia(file.text, file.imports[i].pos), - file.imports[i].end); + const path = toPath(resolvedFileName, currentDirectory, getCanonicalFileName); + const pos = skipTrivia(file.text, file.imports[i].pos); + findSourceFile(resolvedFileName, path, /*isDefaultLib*/ false, /*isReference*/ false, file, pos, file.imports[i].end); } if (isFromNodeModulesSearch) { @@ -1348,7 +1353,6 @@ namespace ts { // no imports - drop cached module resolutions file.resolvedModules = undefined; } - return; } function computeCommonSourceDirectory(sourceFiles: SourceFile[]): string { @@ -1573,4 +1577,27 @@ namespace ts { programDiagnostics.add(createCompilerDiagnostic(message, emitFileName)); } } + + /* @internal */ + /** + * Extracts the file name from a ResolvedModule, or returns a DiagnosticMessage if we are not set up to use that kind of file. + * The DiagnosticMessage's parameters are the imported module name, and the filename it resolved to. + */ + export function getResolutionOrDiagnostic(options: CompilerOptions, { resolvedTsFileName: ts, resolvedJsFileName: js }: ResolvedModule): string | { file: string, diag: DiagnosticMessage } { + if (ts) { + return !options.jsx && fileExtensionIs(ts, ".tsx") + ? { file: ts, diag: Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set } + : ts; + } + else { + if (!options.allowJs) { + return { file: js!, diag: Diagnostics.Module_0_was_resolved_to_1_but_allowJs_is_not_set }; + } + else if (!options.jsx && fileExtensionIs(js!, ".jsx")) { + return { file: js!, diag: Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set }; + } + else + return js!; + } + } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index dd1878f36a7f1..bc1a11febb14c 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3287,19 +3287,42 @@ namespace ts { getDirectories?(path: string): string[]; } + /** + * Represents the result of module resolution. + * Module resolution will pick up tsx/jsx/js files even if '--jsx' and '--allowJs' are turned off. + * The Program will then filter results based on these flags. + * + * At least one of `resolvedTsFileName` or `resolvedJsFileName` must be defined, + * else resolution should just return `undefined` instead of a ResolvedModule. + */ export interface ResolvedModule { + /** + * This should always be set to `resolvedTsFileName || resolvedJsFileName`. + * Present for backwards compatibility. + */ resolvedFileName: string; - /* - * Denotes if 'resolvedFileName' is isExternalLibraryImport and thus should be proper external module: + /** TypeScript (.d.ts, .ts, .tsx) file that the module was resolved to. This will be preferred over a JS file. */ + resolvedTsFileName: string | undefined; + /** JavaScript (or .jsx) file that the module was resolved to. This should be returned even if '--allowJs' (or '--jsx') is disabled. */ + resolvedJsFileName: string | undefined; + /** + * Denotes if 'resolvedFileName' is isExternalLibraryImport and thus should be a proper external module: * - be a .d.ts file * - use top level imports\exports * - don't use tripleslash references */ - isExternalLibraryImport?: boolean; + isExternalLibraryImport: boolean; } + /** + * For backwards compatibility, a host may choose not to return `resolvedTsFileName` and `resolvedJsFileName` from a result ResolvedModule, + * in which case they will be inferred from the file extension. + * Prefer to return a full ResolvedModule. + */ + export type ResolvedModuleFromHost = { resolvedFileName: string; isExternalLibraryImport: boolean } | ResolvedModule; + export interface ResolvedModuleWithFailedLookupLocations { - resolvedModule: ResolvedModule; + resolvedModule: ResolvedModule | undefined; failedLookupLocations: string[]; } @@ -3335,7 +3358,7 @@ namespace ts { * If resolveModuleNames is implemented then implementation for members from ModuleResolutionHost can be just * 'throw new Error("NotImplemented")' */ - resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[]; + resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModuleFromHost[]; /** * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files */ diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 952a32052508e..bcb57d93ab6a9 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -118,6 +118,29 @@ namespace ts { sourceFile.resolvedModules[moduleNameText] = resolvedModule; } + /** Host may have omitted resolvedTsFileName and resolvedJsFileName, in which case we should infer them from the file extension of resolvedFileName. */ + export function convertResolvedModuleFromHost(resolved: ResolvedModuleFromHost | undefined): ResolvedModule | undefined { + if (resolved === undefined) { + return undefined; + } + // `resolvedTsFileName` and `resolvedJsFileName` should be present as properties even if undefined. + else if ("resolvedTsFileName" in resolved) { + const { resolvedFileName, resolvedTsFileName, resolvedJsFileName } = resolved as ResolvedModule; + Debug.assert(resolvedFileName === (resolvedTsFileName || resolvedJsFileName)); + return resolved as ResolvedModule; + } + else { + const { resolvedFileName, isExternalLibraryImport } = resolved; + if (fileExtensionIsAny(resolvedFileName, supportedTypeScriptExtensions)) { + return { resolvedFileName, resolvedTsFileName: resolvedFileName, resolvedJsFileName: undefined, isExternalLibraryImport }; + } + else { + Debug.assert(fileExtensionIsAny(resolvedFileName, supportedJavascriptExtensions)); + return { resolvedFileName, resolvedTsFileName: undefined, resolvedJsFileName: resolvedFileName, isExternalLibraryImport }; + } + } + } + export function setResolvedTypeReferenceDirective(sourceFile: SourceFile, typeReferenceDirectiveName: string, resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective): void { if (!sourceFile.resolvedTypeReferenceDirectiveNames) { sourceFile.resolvedTypeReferenceDirectiveNames = createMap(); @@ -127,8 +150,13 @@ namespace ts { } /* @internal */ + /** + * Considers two ResolvedModules equal if they have the same `resolvedFileName`. + * Thus `{ ts: foo, js: bar }` is equal to `{ ts: foo, js: baz }` because `ts` is preferred. + */ export function moduleResolutionIsEqualTo(oldResolution: ResolvedModule, newResolution: ResolvedModule): boolean { - return oldResolution.resolvedFileName === newResolution.resolvedFileName && oldResolution.isExternalLibraryImport === newResolution.isExternalLibraryImport; + return oldResolution.isExternalLibraryImport === newResolution.isExternalLibraryImport && + oldResolution.resolvedFileName === newResolution.resolvedFileName; } /* @internal */ diff --git a/src/harness/unittests/moduleResolution.ts b/src/harness/unittests/moduleResolution.ts index b2f7d0c224d3d..21e7f6f990d4c 100644 --- a/src/harness/unittests/moduleResolution.ts +++ b/src/harness/unittests/moduleResolution.ts @@ -1,6 +1,28 @@ /// namespace ts { + export function checkResolvedModule(expected: ResolvedModule, actual: ResolvedModule): boolean { + if (!expected === !actual) { + if (expected) { + assert.isTrue(expected.resolvedTsFileName === actual.resolvedTsFileName, `'resolvedTsFileName': expected '${expected.resolvedTsFileName}' to be equal to '${actual.resolvedTsFileName}'`); + assert.isTrue(expected.resolvedJsFileName === actual.resolvedJsFileName, `'resolvedTsFileName': expected '${expected.resolvedJsFileName}' to be equal to '${actual.resolvedJsFileName}'`); + assert.isTrue(expected.isExternalLibraryImport === actual.isExternalLibraryImport, `'isExternalLibraryImport': expected '${expected.isExternalLibraryImport}' to be equal to '${actual.isExternalLibraryImport}'`); + } + return true; + } + return false; + } + + export function checkResolvedModuleWithFailedLookupLocations(actual: ResolvedModuleWithFailedLookupLocations, expectedResolvedModule: ResolvedModule, expectedFailedLookupLocations: string[]): void { + assert.isTrue(actual.resolvedModule !== undefined, "module should be resolved"); + checkResolvedModule(actual.resolvedModule, expectedResolvedModule); + assert.deepEqual(actual.failedLookupLocations, expectedFailedLookupLocations); + } + + export function createTsResolvedModule(resolvedTsFileName: string, isExternalLibraryImport = false): ResolvedModule { + return { resolvedFileName: resolvedTsFileName, resolvedTsFileName, resolvedJsFileName: undefined, isExternalLibraryImport }; + } + interface File { name: string; content?: string; @@ -53,8 +75,7 @@ namespace ts { const containingFile = { name: containingFileName }; const moduleFile = { name: moduleFileNameNoExt + ext }; const resolution = nodeModuleNameResolver(moduleName, containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, moduleFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); - assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); + checkResolvedModule(resolution.resolvedModule, createTsResolvedModule(moduleFile.name)); const failedLookupLocations: string[] = []; const dir = getDirectoryPath(containingFileName); @@ -97,10 +118,9 @@ namespace ts { const packageJson = { name: packageJsonFileName, content: JSON.stringify({ "typings": fieldRef }) }; const moduleFile = { name: moduleFileName }; const resolution = nodeModuleNameResolver(moduleName, containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, packageJson, moduleFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); - assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); + checkResolvedModule(resolution.resolvedModule, createTsResolvedModule(moduleFile.name)); // expect three failed lookup location - attempt to load module as file with all supported extensions - assert.equal(resolution.failedLookupLocations.length, supportedTypeScriptExtensions.length); + assert.equal(resolution.failedLookupLocations.length, allSupportedExtensions.length); } } @@ -125,7 +145,7 @@ namespace ts { const resolution = nodeModuleNameResolver("b", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, packageJson, moduleFile, indexFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, indexPath); + checkResolvedModule(resolution.resolvedModule, createTsResolvedModule(indexPath, /*isExternalLibraryImport*/true)); } } @@ -138,7 +158,6 @@ namespace ts { /* tslint:enable no-null-keyword */ testTypingsIgnored(undefined); }); - it("module name as directory - load index.d.ts", () => { test(/*hasDirectoryExists*/ false); test(/*hasDirectoryExists*/ true); @@ -148,12 +167,18 @@ namespace ts { const packageJson = { name: "/a/b/foo/package.json", content: JSON.stringify({ main: "/c/d" }) }; const indexFile = { name: "/a/b/foo/index.d.ts" }; const resolution = nodeModuleNameResolver("./foo", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, packageJson, indexFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, indexFile.name); - assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); - assert.deepEqual(resolution.failedLookupLocations, [ + checkResolvedModuleWithFailedLookupLocations(resolution, createTsResolvedModule(indexFile.name), [ "/a/b/foo.ts", "/a/b/foo.tsx", "/a/b/foo.d.ts", + "/a/b/foo.js", + "/a/b/foo.jsx", + "/c/d", + "/c/d.ts", + "/c/d.tsx", + "/c/d.d.ts", + "/c/d.js", + "/c/d.jsx", "/a/b/foo/index.ts", "/a/b/foo/index.tsx", ]); @@ -170,36 +195,58 @@ namespace ts { const containingFile = { name: "/a/b/c/d/e.ts" }; const moduleFile = { name: "/a/b/node_modules/foo.ts" }; const resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, moduleFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); - assert.deepEqual(resolution.failedLookupLocations, [ + checkResolvedModuleWithFailedLookupLocations(resolution, createTsResolvedModule(moduleFile.name, /*isExternalLibraryImport*/ true), [ "/a/b/c/d/node_modules/foo.ts", "/a/b/c/d/node_modules/foo.tsx", "/a/b/c/d/node_modules/foo.d.ts", + "/a/b/c/d/node_modules/foo.js", + "/a/b/c/d/node_modules/foo.jsx", "/a/b/c/d/node_modules/foo/package.json", + "/a/b/c/d/node_modules/foo/index.ts", "/a/b/c/d/node_modules/foo/index.tsx", "/a/b/c/d/node_modules/foo/index.d.ts", + "/a/b/c/d/node_modules/foo/index.js", + "/a/b/c/d/node_modules/foo/index.jsx", + "/a/b/c/d/node_modules/@types/foo.ts", "/a/b/c/d/node_modules/@types/foo.tsx", "/a/b/c/d/node_modules/@types/foo.d.ts", + "/a/b/c/d/node_modules/@types/foo.js", + "/a/b/c/d/node_modules/@types/foo.jsx", "/a/b/c/d/node_modules/@types/foo/package.json", + "/a/b/c/d/node_modules/@types/foo/index.ts", "/a/b/c/d/node_modules/@types/foo/index.tsx", "/a/b/c/d/node_modules/@types/foo/index.d.ts", + "/a/b/c/d/node_modules/@types/foo/index.js", + "/a/b/c/d/node_modules/@types/foo/index.jsx", + "/a/b/c/node_modules/foo.ts", "/a/b/c/node_modules/foo.tsx", "/a/b/c/node_modules/foo.d.ts", + "/a/b/c/node_modules/foo.js", + "/a/b/c/node_modules/foo.jsx", "/a/b/c/node_modules/foo/package.json", + "/a/b/c/node_modules/foo/index.ts", "/a/b/c/node_modules/foo/index.tsx", "/a/b/c/node_modules/foo/index.d.ts", + "/a/b/c/node_modules/foo/index.js", + "/a/b/c/node_modules/foo/index.jsx", + "/a/b/c/node_modules/@types/foo.ts", "/a/b/c/node_modules/@types/foo.tsx", "/a/b/c/node_modules/@types/foo.d.ts", + "/a/b/c/node_modules/@types/foo.js", + "/a/b/c/node_modules/@types/foo.jsx", "/a/b/c/node_modules/@types/foo/package.json", + "/a/b/c/node_modules/@types/foo/index.ts", "/a/b/c/node_modules/@types/foo/index.tsx", "/a/b/c/node_modules/@types/foo/index.d.ts", + "/a/b/c/node_modules/@types/foo/index.js", + "/a/b/c/node_modules/@types/foo/index.jsx", ]); } }); @@ -212,8 +259,7 @@ namespace ts { const containingFile = { name: "/a/b/c/d/e.ts" }; const moduleFile = { name: "/a/b/node_modules/foo.d.ts" }; const resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, moduleFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); - assert.equal(resolution.resolvedModule.isExternalLibraryImport, true); + checkResolvedModule(resolution.resolvedModule, createTsResolvedModule(moduleFile.name, /*isExternalLibraryImport*/ true)); } }); @@ -225,55 +271,92 @@ namespace ts { const containingFile = { name: "/a/node_modules/b/c/node_modules/d/e.ts" }; const moduleFile = { name: "/a/node_modules/foo/index.d.ts" }; const resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, moduleFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); - assert.equal(resolution.resolvedModule.isExternalLibraryImport, true); - assert.deepEqual(resolution.failedLookupLocations, [ + checkResolvedModuleWithFailedLookupLocations(resolution, createTsResolvedModule(moduleFile.name, /*isExternalLibraryImport*/ true), [ "/a/node_modules/b/c/node_modules/d/node_modules/foo.ts", "/a/node_modules/b/c/node_modules/d/node_modules/foo.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/foo.d.ts", + "/a/node_modules/b/c/node_modules/d/node_modules/foo.js", + "/a/node_modules/b/c/node_modules/d/node_modules/foo.jsx", "/a/node_modules/b/c/node_modules/d/node_modules/foo/package.json", + "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.ts", "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.d.ts", + "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.js", + "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.jsx", + "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.ts", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.d.ts", + "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.js", + "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.jsx", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/package.json", + "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.ts", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.d.ts", + "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.js", + "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.jsx", + "/a/node_modules/b/c/node_modules/foo.ts", "/a/node_modules/b/c/node_modules/foo.tsx", "/a/node_modules/b/c/node_modules/foo.d.ts", + "/a/node_modules/b/c/node_modules/foo.js", + "/a/node_modules/b/c/node_modules/foo.jsx", "/a/node_modules/b/c/node_modules/foo/package.json", + "/a/node_modules/b/c/node_modules/foo/index.ts", "/a/node_modules/b/c/node_modules/foo/index.tsx", "/a/node_modules/b/c/node_modules/foo/index.d.ts", + "/a/node_modules/b/c/node_modules/foo/index.js", + "/a/node_modules/b/c/node_modules/foo/index.jsx", + "/a/node_modules/b/c/node_modules/@types/foo.ts", "/a/node_modules/b/c/node_modules/@types/foo.tsx", "/a/node_modules/b/c/node_modules/@types/foo.d.ts", + "/a/node_modules/b/c/node_modules/@types/foo.js", + "/a/node_modules/b/c/node_modules/@types/foo.jsx", "/a/node_modules/b/c/node_modules/@types/foo/package.json", + "/a/node_modules/b/c/node_modules/@types/foo/index.ts", "/a/node_modules/b/c/node_modules/@types/foo/index.tsx", "/a/node_modules/b/c/node_modules/@types/foo/index.d.ts", + "/a/node_modules/b/c/node_modules/@types/foo/index.js", + "/a/node_modules/b/c/node_modules/@types/foo/index.jsx", + "/a/node_modules/b/node_modules/foo.ts", "/a/node_modules/b/node_modules/foo.tsx", "/a/node_modules/b/node_modules/foo.d.ts", + "/a/node_modules/b/node_modules/foo.js", + "/a/node_modules/b/node_modules/foo.jsx", "/a/node_modules/b/node_modules/foo/package.json", + "/a/node_modules/b/node_modules/foo/index.ts", "/a/node_modules/b/node_modules/foo/index.tsx", "/a/node_modules/b/node_modules/foo/index.d.ts", + "/a/node_modules/b/node_modules/foo/index.js", + "/a/node_modules/b/node_modules/foo/index.jsx", + "/a/node_modules/b/node_modules/@types/foo.ts", "/a/node_modules/b/node_modules/@types/foo.tsx", "/a/node_modules/b/node_modules/@types/foo.d.ts", + "/a/node_modules/b/node_modules/@types/foo.js", + "/a/node_modules/b/node_modules/@types/foo.jsx", "/a/node_modules/b/node_modules/@types/foo/package.json", + "/a/node_modules/b/node_modules/@types/foo/index.ts", "/a/node_modules/b/node_modules/@types/foo/index.tsx", "/a/node_modules/b/node_modules/@types/foo/index.d.ts", + "/a/node_modules/b/node_modules/@types/foo/index.js", + "/a/node_modules/b/node_modules/@types/foo/index.jsx", + "/a/node_modules/foo.ts", "/a/node_modules/foo.tsx", "/a/node_modules/foo.d.ts", + "/a/node_modules/foo.js", + "/a/node_modules/foo.jsx", "/a/node_modules/foo/package.json", + "/a/node_modules/foo/index.ts", "/a/node_modules/foo/index.tsx" ]); @@ -481,21 +564,15 @@ import b = require("./moduleB"); const options: CompilerOptions = { moduleResolution, baseUrl: "/root" }; { const result = resolveModuleName("folder2/file2", file1.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file2.name); - assert.deepEqual(result.failedLookupLocations, []); + checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(file2.name), []); } { const result = resolveModuleName("./file3", file2.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file3.name); - assert.deepEqual(result.failedLookupLocations, []); + checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(file3.name), []); } { const result = resolveModuleName("/root/folder1/file1", file2.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file1.name); - assert.deepEqual(result.failedLookupLocations, []); + checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(file1.name), []); } } } @@ -520,12 +597,11 @@ import b = require("./moduleB"); check("m1", main, m1); check("m2", main, m2); check("m3", main, m3Typings); - check("m4", main, m4); + check("m4", main, m4, /*isExternalLibraryImport*/true); - function check(name: string, caller: File, expected: File) { + function check(name: string, caller: File, expected: File, isExternalLibraryImport = false) { const result = resolveModuleName(name, caller.name, options, host); - assert.isTrue(result.resolvedModule !== undefined); - assert.equal(result.resolvedModule.resolvedFileName, expected.name); + checkResolvedModule(result.resolvedModule, createTsResolvedModule(expected.name, isExternalLibraryImport)); } } }); @@ -547,8 +623,7 @@ import b = require("./moduleB"); function check(name: string, caller: File, expected: File) { const result = resolveModuleName(name, caller.name, options, host); - assert.isTrue(result.resolvedModule !== undefined); - assert.equal(result.resolvedModule.resolvedFileName, expected.name); + checkResolvedModule(result.resolvedModule, createTsResolvedModule(expected.name)); } } }); @@ -589,10 +664,15 @@ import b = require("./moduleB"); "/root/folder1/file2.ts", "/root/folder1/file2.tsx", "/root/folder1/file2.d.ts", + "/root/folder1/file2.js", + "/root/folder1/file2.jsx", "/root/folder1/file2/package.json", + "/root/folder1/file2/index.ts", "/root/folder1/file2/index.tsx", - "/root/folder1/file2/index.d.ts" + "/root/folder1/file2/index.d.ts", + "/root/folder1/file2/index.js", + "/root/folder1/file2/index.jsx", // then first attempt on 'generated/*' was successful ]); check("folder2/file3", file3, [ @@ -600,15 +680,24 @@ import b = require("./moduleB"); "/root/folder2/file3.ts", "/root/folder2/file3.tsx", "/root/folder2/file3.d.ts", + "/root/folder2/file3.js", + "/root/folder2/file3.jsx", "/root/folder2/file3/package.json", + "/root/folder2/file3/index.ts", "/root/folder2/file3/index.tsx", "/root/folder2/file3/index.d.ts", + "/root/folder2/file3/index.js", + "/root/folder2/file3/index.jsx", + // then use remapped location "/root/generated/folder2/file3.ts", "/root/generated/folder2/file3.tsx", "/root/generated/folder2/file3.d.ts", + "/root/generated/folder2/file3.js", + "/root/generated/folder2/file3.jsx", "/root/generated/folder2/file3/package.json", + "/root/generated/folder2/file3/index.ts", "/root/generated/folder2/file3/index.tsx", // success on index.d.ts @@ -618,14 +707,22 @@ import b = require("./moduleB"); "/root/folder2/file4.ts", "/root/folder2/file4.tsx", "/root/folder2/file4.d.ts", + "/root/folder2/file4.js", + "/root/folder2/file4.jsx", "/root/folder2/file4/package.json", + "/root/folder2/file4/index.ts", "/root/folder2/file4/index.tsx", "/root/folder2/file4/index.d.ts", + "/root/folder2/file4/index.js", + "/root/folder2/file4/index.jsx", + // try to load from file from remapped location "/root/generated/folder2/file4.ts", "/root/generated/folder2/file4.tsx", - "/root/generated/folder2/file4.d.ts" + "/root/generated/folder2/file4.d.ts", + "/root/generated/folder2/file4.js", + "/root/generated/folder2/file4.jsx", // success on loading as from folder ]); check("somefolder/file5", file5, [ @@ -634,6 +731,9 @@ import b = require("./moduleB"); "/root/someanotherfolder/file5.ts", "/root/someanotherfolder/file5.tsx", "/root/someanotherfolder/file5.d.ts", + "/root/someanotherfolder/file5.js", + "/root/someanotherfolder/file5.jsx", + // load from folder "/root/someanotherfolder/file5/package.json", "/root/someanotherfolder/file5/index.ts", @@ -646,46 +746,67 @@ import b = require("./moduleB"); "/root/file6.ts", "/root/file6.tsx", "/root/file6.d.ts", + "/root/file6.js", + "/root/file6.jsx", + // load from folder "/root/file6/package.json", "/root/file6/index.ts", "/root/file6/index.tsx", "/root/file6/index.d.ts", + "/root/file6/index.js", + "/root/file6/index.jsx", + // then try 'generated/*' // load from file "/root/generated/file6.ts", "/root/generated/file6.tsx", "/root/generated/file6.d.ts", + "/root/generated/file6.js", + "/root/generated/file6.jsx", + // load from folder "/root/generated/file6/package.json", "/root/generated/file6/index.ts", "/root/generated/file6/index.tsx", "/root/generated/file6/index.d.ts", + "/root/generated/file6/index.js", + "/root/generated/file6/index.jsx", + // fallback to standard node behavior // load from file "/root/folder1/node_modules/file6.ts", "/root/folder1/node_modules/file6.tsx", "/root/folder1/node_modules/file6.d.ts", + "/root/folder1/node_modules/file6.js", + "/root/folder1/node_modules/file6.jsx", + // load from folder "/root/folder1/node_modules/file6/package.json", "/root/folder1/node_modules/file6/index.ts", "/root/folder1/node_modules/file6/index.tsx", "/root/folder1/node_modules/file6/index.d.ts", + "/root/folder1/node_modules/file6/index.js", + "/root/folder1/node_modules/file6/index.jsx", + "/root/folder1/node_modules/@types/file6.ts", "/root/folder1/node_modules/@types/file6.tsx", "/root/folder1/node_modules/@types/file6.d.ts", + "/root/folder1/node_modules/@types/file6.js", + "/root/folder1/node_modules/@types/file6.jsx", + "/root/folder1/node_modules/@types/file6/package.json", "/root/folder1/node_modules/@types/file6/index.ts", "/root/folder1/node_modules/@types/file6/index.tsx", - "/root/folder1/node_modules/@types/file6/index.d.ts" + "/root/folder1/node_modules/@types/file6/index.d.ts", + "/root/folder1/node_modules/@types/file6/index.js", + "/root/folder1/node_modules/@types/file6/index.jsx", // success on /root/node_modules/file6.ts - ]); + ], /*isExternalLibraryImport*/ true); - function check(name: string, expected: File, expectedFailedLookups: string[]) { + function check(name: string, expected: File, expectedFailedLookups: string[], isExternalLibraryImport = false) { const result = resolveModuleName(name, main.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, expected.name); - assert.deepEqual(result.failedLookupLocations, expectedFailedLookups); + checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(expected.name, isExternalLibraryImport), expectedFailedLookups); } } }); @@ -722,6 +843,8 @@ import b = require("./moduleB"); "/root/folder1/file2.ts", "/root/folder1/file2.tsx", "/root/folder1/file2.d.ts", + "/root/folder1/file2.js", + "/root/folder1/file2.jsx", // success when using 'generated/*' ]); check("folder1/file3", file3, [ @@ -729,24 +852,30 @@ import b = require("./moduleB"); "/root/folder1/file3.ts", "/root/folder1/file3.tsx", "/root/folder1/file3.d.ts", + "/root/folder1/file3.js", + "/root/folder1/file3.jsx", // then try 'generated/*' "/root/generated/folder1/file3.ts", "/root/generated/folder1/file3.tsx", "/root/generated/folder1/file3.d.ts", + "/root/generated/folder1/file3.js", + "/root/generated/folder1/file3.jsx", // fallback to classic "/root/folder1/folder1/file3.ts", "/root/folder1/folder1/file3.tsx", "/root/folder1/folder1/file3.d.ts", + "/root/folder1/folder1/file3.js", + "/root/folder1/folder1/file3.jsx", "/root/folder1/file3.ts", "/root/folder1/file3.tsx", "/root/folder1/file3.d.ts", + "/root/folder1/file3.js", + "/root/folder1/file3.jsx", ]); function check(name: string, expected: File, expectedFailedLookups: string[]) { const result = resolveModuleName(name, main.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, expected.name); - assert.deepEqual(result.failedLookupLocations, expectedFailedLookups); + checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(expected.name), expectedFailedLookups); } } }); @@ -774,11 +903,15 @@ import b = require("./moduleB"); "/root/folder1/file2.ts", "/root/folder1/file2.tsx", "/root/folder1/file2.d.ts", + "/root/folder1/file2.js", + "/root/folder1/file2.jsx", // load from folder "/root/folder1/file2/package.json", "/root/folder1/file2/index.ts", "/root/folder1/file2/index.tsx", "/root/folder1/file2/index.d.ts", + "/root/folder1/file2/index.js", + "/root/folder1/file2/index.jsx", // success after using alternative rootDir entry ]); check("../folder1/file1", file3, file1, [ @@ -787,11 +920,15 @@ import b = require("./moduleB"); "/root/generated/folder1/file1.ts", "/root/generated/folder1/file1.tsx", "/root/generated/folder1/file1.d.ts", + "/root/generated/folder1/file1.js", + "/root/generated/folder1/file1.jsx", // load from module "/root/generated/folder1/file1/package.json", "/root/generated/folder1/file1/index.ts", "/root/generated/folder1/file1/index.tsx", "/root/generated/folder1/file1/index.d.ts", + "/root/generated/folder1/file1/index.js", + "/root/generated/folder1/file1/index.jsx", // success after using alternative rootDir entry ]); check("../folder1/file1_1", file3, file1_1, [ @@ -800,16 +937,22 @@ import b = require("./moduleB"); "/root/generated/folder1/file1_1.ts", "/root/generated/folder1/file1_1.tsx", "/root/generated/folder1/file1_1.d.ts", + "/root/generated/folder1/file1_1.js", + "/root/generated/folder1/file1_1.jsx", // load from folder "/root/generated/folder1/file1_1/package.json", "/root/generated/folder1/file1_1/index.ts", "/root/generated/folder1/file1_1/index.tsx", "/root/generated/folder1/file1_1/index.d.ts", + "/root/generated/folder1/file1_1/index.js", + "/root/generated/folder1/file1_1/index.jsx", // try alternative rootDir entry // load from file "/root/folder1/file1_1.ts", "/root/folder1/file1_1.tsx", "/root/folder1/file1_1.d.ts", + "/root/folder1/file1_1.js", + "/root/folder1/file1_1.jsx", // load from directory "/root/folder1/file1_1/package.json", "/root/folder1/file1_1/index.ts", @@ -819,9 +962,7 @@ import b = require("./moduleB"); function check(name: string, container: File, expected: File, expectedFailedLookups: string[]) { const result = resolveModuleName(name, container.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, expected.name); - assert.deepEqual(result.failedLookupLocations, expectedFailedLookups); + checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(expected.name), expectedFailedLookups); } } }); @@ -848,6 +989,8 @@ import b = require("./moduleB"); "/root/folder1/file2.ts", "/root/folder1/file2.tsx", "/root/folder1/file2.d.ts", + "/root/folder1/file2.js", + "/root/folder1/file2.jsx", // then try alternative rootDir entry ]); check("../folder1/file1", file3, file1, [ @@ -855,6 +998,8 @@ import b = require("./moduleB"); "/root/generated/folder1/file1.ts", "/root/generated/folder1/file1.tsx", "/root/generated/folder1/file1.d.ts", + "/root/generated/folder1/file1.js", + "/root/generated/folder1/file1.jsx", // then try alternative rootDir entry ]); check("folder1/file1_1", file3, file4, [ @@ -862,22 +1007,26 @@ import b = require("./moduleB"); "/root/generated/folder2/folder1/file1_1.ts", "/root/generated/folder2/folder1/file1_1.tsx", "/root/generated/folder2/folder1/file1_1.d.ts", + "/root/generated/folder2/folder1/file1_1.js", + "/root/generated/folder2/folder1/file1_1.jsx", // other entry in rootDirs "/root/generated/folder1/file1_1.ts", "/root/generated/folder1/file1_1.tsx", "/root/generated/folder1/file1_1.d.ts", + "/root/generated/folder1/file1_1.js", + "/root/generated/folder1/file1_1.jsx", // fallback "/root/folder1/file1_1.ts", "/root/folder1/file1_1.tsx", "/root/folder1/file1_1.d.ts", + "/root/folder1/file1_1.js", + "/root/folder1/file1_1.jsx", // found one ]); function check(name: string, container: File, expected: File, expectedFailedLookups: string[]) { const result = resolveModuleName(name, container.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, expected.name); - assert.deepEqual(result.failedLookupLocations, expectedFailedLookups); + checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(expected.name), expectedFailedLookups); } } }); @@ -899,13 +1048,13 @@ import b = require("./moduleB"); } }; const result = resolveModuleName("libs/guid", app.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, libsTypings.name); - assert.deepEqual(result.failedLookupLocations, [ + checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(libsTypings.name), [ // first try to load module as file "/root/src/libs/guid.ts", "/root/src/libs/guid.tsx", "/root/src/libs/guid.d.ts", + "/root/src/libs/guid.js", + "/root/src/libs/guid.jsx", ]); } }); diff --git a/src/harness/unittests/reuseProgramStructure.ts b/src/harness/unittests/reuseProgramStructure.ts index 60687d34c55af..66b966aed16ff 100644 --- a/src/harness/unittests/reuseProgramStructure.ts +++ b/src/harness/unittests/reuseProgramStructure.ts @@ -152,17 +152,6 @@ namespace ts { return program; } - function checkResolvedModule(expected: ResolvedModule, actual: ResolvedModule): boolean { - if (!expected === !actual) { - if (expected) { - assert.isTrue(expected.resolvedFileName === actual.resolvedFileName, `'resolvedFileName': expected '${expected.resolvedFileName}' to be equal to '${actual.resolvedFileName}'`); - assert.isTrue(expected.isExternalLibraryImport === actual.isExternalLibraryImport, `'isExternalLibraryImport': expected '${expected.isExternalLibraryImport}' to be equal to '${actual.isExternalLibraryImport}'`); - } - return true; - } - return false; - } - function checkResolvedTypeDirective(expected: ResolvedTypeReferenceDirective, actual: ResolvedTypeReferenceDirective): boolean { if (!expected === !actual) { if (expected) { @@ -306,7 +295,7 @@ namespace ts { const options: CompilerOptions = { target }; const program_1 = newProgram(files, ["a.ts"], options); - checkResolvedModulesCache(program_1, "a.ts", createMap({ "b": { resolvedFileName: "b.ts" } })); + checkResolvedModulesCache(program_1, "a.ts", createMap({ "b": createTsResolvedModule("b.ts") })); checkResolvedModulesCache(program_1, "b.ts", undefined); const program_2 = updateProgram(program_1, ["a.ts"], options, files => { @@ -315,7 +304,7 @@ namespace ts { assert.isTrue(program_1.structureIsReused); // content of resolution cache should not change - checkResolvedModulesCache(program_1, "a.ts", createMap({ "b": { resolvedFileName: "b.ts" } })); + checkResolvedModulesCache(program_1, "a.ts", createMap({ "b": createTsResolvedModule("b.ts") })); checkResolvedModulesCache(program_1, "b.ts", undefined); // imports has changed - program is not reused @@ -332,7 +321,7 @@ namespace ts { files[0].text = files[0].text.updateImportsAndExports(newImports); }); assert.isTrue(!program_3.structureIsReused); - checkResolvedModulesCache(program_4, "a.ts", createMap({ "b": { resolvedFileName: "b.ts" }, "c": undefined })); + checkResolvedModulesCache(program_4, "a.ts", createMap({ "b": createTsResolvedModule("b.ts"), "c": undefined })); }); it("resolved type directives cache follows type directives", () => { diff --git a/src/server/lsHost.ts b/src/server/lsHost.ts index b36f73a19c545..d6dfb67ed04b7 100644 --- a/src/server/lsHost.ts +++ b/src/server/lsHost.ts @@ -5,8 +5,8 @@ namespace ts.server { export class LSHost implements ts.LanguageServiceHost, ModuleResolutionHost, ServerLanguageServiceHost { private compilationSettings: ts.CompilerOptions; - private readonly resolvedModuleNames: ts.FileMap>; - private readonly resolvedTypeReferenceDirectives: ts.FileMap>; + private readonly resolvedModuleNames= createFileMap>(); + private readonly resolvedTypeReferenceDirectives = createFileMap>(); private readonly getCanonicalFileName: (fileName: string) => string; private readonly resolveModuleName: typeof resolveModuleName; @@ -14,50 +14,26 @@ namespace ts.server { constructor(private readonly host: ServerHost, private readonly project: Project, private readonly cancellationToken: HostCancellationToken) { this.getCanonicalFileName = ts.createGetCanonicalFileName(this.host.useCaseSensitiveFileNames); - this.resolvedModuleNames = createFileMap>(); - this.resolvedTypeReferenceDirectives = createFileMap>(); if (host.trace) { this.trace = s => host.trace(s); } this.resolveModuleName = (moduleName, containingFile, compilerOptions, host) => { - const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host); - if (primaryResult.resolvedModule) { - // return result immediately only if it is .ts, .tsx or .d.ts - // otherwise try to load typings from @types - if (fileExtensionIsAny(primaryResult.resolvedModule.resolvedFileName, supportedTypeScriptExtensions)) { - return primaryResult; - } - } - // create different collection of failed lookup locations for second pass - // if it will fail and we've already found something during the first pass - we don't want to pollute its results - const secondaryLookupFailedLookupLocations: string[] = []; - const globalCache = this.project.projectService.typingsInstaller.globalTypingsCacheLocation; - if (this.project.getTypingOptions().enableAutoDiscovery && globalCache) { - const traceEnabled = isTraceEnabled(compilerOptions, host); - if (traceEnabled) { - trace(host, Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, this.project.getProjectName(), moduleName, globalCache); - } - const state: ModuleResolutionState = { compilerOptions, host, skipTsx: false, traceEnabled }; - const resolvedName = loadModuleFromNodeModules(moduleName, globalCache, secondaryLookupFailedLookupLocations, state, /*checkOneLevel*/ true); - if (resolvedName) { - return createResolvedModule(resolvedName, /*isExternalLibraryImport*/ true, primaryResult.failedLookupLocations.concat(secondaryLookupFailedLookupLocations)); - } - } - if (!primaryResult.resolvedModule && secondaryLookupFailedLookupLocations.length) { - primaryResult.failedLookupLocations = primaryResult.failedLookupLocations.concat(secondaryLookupFailedLookupLocations); - } - return primaryResult; + const globalCache = this.project.getTypingOptions().enableAutoDiscovery + ? this.project.projectService.typingsInstaller.globalTypingsCacheLocation + : undefined; + return resolveModuleNameForLsHost(moduleName, containingFile, compilerOptions, host, globalCache, this.project.getProjectName()); }; } - private resolveNamesWithLocalCache( + private resolveNamesWithLocalCache( names: string[], containingFile: string, cache: ts.FileMap>, loader: (name: string, containingFile: string, options: CompilerOptions, host: ModuleResolutionHost) => T, - getResult: (s: T) => R): R[] { + getResult: (s: T) => R, + getResultFileName: (result: R) => string): R[] { const path = toPath(containingFile, this.host.getCurrentDirectory(), this.getCanonicalFileName); const currentResolutionsInFile = cache.get(path); @@ -97,10 +73,7 @@ namespace ts.server { const result = getResult(resolution); if (result) { - if (result.resolvedFileName && result.resolvedFileName === lastDeletedFileName) { - return false; - } - return true; + return getResultFileName(result) !== lastDeletedFileName; } // consider situation if we have no candidate locations as valid resolution. @@ -126,11 +99,11 @@ namespace ts.server { } resolveTypeReferenceDirectives(typeDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[] { - return this.resolveNamesWithLocalCache(typeDirectiveNames, containingFile, this.resolvedTypeReferenceDirectives, resolveTypeReferenceDirective, m => m.resolvedTypeReferenceDirective); + return this.resolveNamesWithLocalCache(typeDirectiveNames, containingFile, this.resolvedTypeReferenceDirectives, resolveTypeReferenceDirective, m => m.resolvedTypeReferenceDirective, r => r.resolvedFileName); } resolveModuleNames(moduleNames: string[], containingFile: string): ResolvedModule[] { - return this.resolveNamesWithLocalCache(moduleNames, containingFile, this.resolvedModuleNames, this.resolveModuleName, m => m.resolvedModule); + return this.resolveNamesWithLocalCache(moduleNames, containingFile, this.resolvedModuleNames, this.resolveModuleName, m => m.resolvedModule, r => r.resolvedFileName); } getDefaultLibFileName() { diff --git a/src/server/typingsInstaller/typingsInstaller.ts b/src/server/typingsInstaller/typingsInstaller.ts index f62f5fc4abe5c..546e4bf2c1194 100644 --- a/src/server/typingsInstaller/typingsInstaller.ts +++ b/src/server/typingsInstaller/typingsInstaller.ts @@ -35,7 +35,7 @@ namespace ts.server.typingsInstaller { export const MaxPackageNameLength = 214; /** - * Validates package name using rules defined at https://docs.npmjs.com/files/package.json + * Validates package name using rules defined at https://docs.npmjs.com/files/package.json */ export function validatePackageName(packageName: string): PackageNameValidationResult { Debug.assert(!!packageName, "Package name is not specified"); @@ -131,7 +131,7 @@ namespace ts.server.typingsInstaller { this.log.writeLine(`Got install request ${JSON.stringify(req)}`); } - // load existing typing information from the cache + // load existing typing information from the cache if (req.cachePath) { if (this.log.isEnabled()) { this.log.writeLine(`Request specifies cache path '${req.cachePath}', loading cached information...`); diff --git a/src/services/shims.ts b/src/services/shims.ts index 7ed1786640d7f..709aeb88496e5 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -328,7 +328,7 @@ namespace ts { const resolutionsInFile = >JSON.parse(this.shimHost.getModuleResolutionsForFile(containingFile)); return map(moduleNames, name => { const result = getProperty(resolutionsInFile, name); - return result ? { resolvedFileName: result } : undefined; + return result ? resolvedModuleFromAnyFile(result, /*isExternalLibraryImport*/ false) : undefined; }); }; } diff --git a/tests/baselines/reference/importWithTrailingSlash_noResolve.trace.json b/tests/baselines/reference/importWithTrailingSlash_noResolve.trace.json index e010603106f4c..db316e5db74cd 100644 --- a/tests/baselines/reference/importWithTrailingSlash_noResolve.trace.json +++ b/tests/baselines/reference/importWithTrailingSlash_noResolve.trace.json @@ -6,5 +6,7 @@ "File '/foo/index.ts' does not exist.", "File '/foo/index.tsx' does not exist.", "File '/foo/index.d.ts' does not exist.", + "File '/foo/index.js' does not exist.", + "File '/foo/index.jsx' does not exist.", "======== Module name './foo/' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-11.trace.json b/tests/baselines/reference/library-reference-11.trace.json index e0af1e39c5ac8..6428f421d7e30 100644 --- a/tests/baselines/reference/library-reference-11.trace.json +++ b/tests/baselines/reference/library-reference-11.trace.json @@ -2,17 +2,12 @@ "======== Resolving type reference directive 'jquery', containing file '/a/b/consumer.ts', root directory not set. ========", "Root directory cannot be determined, skipping primary search paths.", "Looking up in 'node_modules' folder, initial location '/a/b'", - "File '/a/b/node_modules/jquery.ts' does not exist.", "File '/a/b/node_modules/jquery.d.ts' does not exist.", "File '/a/b/node_modules/jquery/package.json' does not exist.", - "File '/a/b/node_modules/jquery/index.ts' does not exist.", "File '/a/b/node_modules/jquery/index.d.ts' does not exist.", - "File '/a/b/node_modules/@types/jquery.ts' does not exist.", "File '/a/b/node_modules/@types/jquery.d.ts' does not exist.", "File '/a/b/node_modules/@types/jquery/package.json' does not exist.", - "File '/a/b/node_modules/@types/jquery/index.ts' does not exist.", "File '/a/b/node_modules/@types/jquery/index.d.ts' does not exist.", - "File '/a/node_modules/jquery.ts' does not exist.", "File '/a/node_modules/jquery.d.ts' does not exist.", "Found 'package.json' at '/a/node_modules/jquery/package.json'.", "'package.json' has 'typings' field 'jquery.d.ts' that references '/a/node_modules/jquery/jquery.d.ts'.", diff --git a/tests/baselines/reference/library-reference-12.trace.json b/tests/baselines/reference/library-reference-12.trace.json index 2cdf1f5f20ace..37017c86f0c9e 100644 --- a/tests/baselines/reference/library-reference-12.trace.json +++ b/tests/baselines/reference/library-reference-12.trace.json @@ -2,17 +2,12 @@ "======== Resolving type reference directive 'jquery', containing file '/a/b/consumer.ts', root directory not set. ========", "Root directory cannot be determined, skipping primary search paths.", "Looking up in 'node_modules' folder, initial location '/a/b'", - "File '/a/b/node_modules/jquery.ts' does not exist.", "File '/a/b/node_modules/jquery.d.ts' does not exist.", "File '/a/b/node_modules/jquery/package.json' does not exist.", - "File '/a/b/node_modules/jquery/index.ts' does not exist.", "File '/a/b/node_modules/jquery/index.d.ts' does not exist.", - "File '/a/b/node_modules/@types/jquery.ts' does not exist.", "File '/a/b/node_modules/@types/jquery.d.ts' does not exist.", "File '/a/b/node_modules/@types/jquery/package.json' does not exist.", - "File '/a/b/node_modules/@types/jquery/index.ts' does not exist.", "File '/a/b/node_modules/@types/jquery/index.d.ts' does not exist.", - "File '/a/node_modules/jquery.ts' does not exist.", "File '/a/node_modules/jquery.d.ts' does not exist.", "Found 'package.json' at '/a/node_modules/jquery/package.json'.", "'package.json' has 'types' field 'dist/jquery.d.ts' that references '/a/node_modules/jquery/dist/jquery.d.ts'.", diff --git a/tests/baselines/reference/library-reference-3.trace.json b/tests/baselines/reference/library-reference-3.trace.json index 419fe6d055d72..72cc8c950779b 100644 --- a/tests/baselines/reference/library-reference-3.trace.json +++ b/tests/baselines/reference/library-reference-3.trace.json @@ -2,10 +2,8 @@ "======== Resolving type reference directive 'jquery', containing file '/src/consumer.ts', root directory not set. ========", "Root directory cannot be determined, skipping primary search paths.", "Looking up in 'node_modules' folder, initial location '/src'", - "File '/src/node_modules/jquery.ts' does not exist.", "File '/src/node_modules/jquery.d.ts' does not exist.", "File '/src/node_modules/jquery/package.json' does not exist.", - "File '/src/node_modules/jquery/index.ts' does not exist.", "File '/src/node_modules/jquery/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'jquery' was successfully resolved to '/src/node_modules/jquery/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-4.trace.json b/tests/baselines/reference/library-reference-4.trace.json index 5df7320d3223c..2a128b4fcbef4 100644 --- a/tests/baselines/reference/library-reference-4.trace.json +++ b/tests/baselines/reference/library-reference-4.trace.json @@ -4,20 +4,14 @@ "File '/src/foo/package.json' does not exist.", "File '/src/foo/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/src'", - "File '/src/node_modules/foo.ts' does not exist.", "File '/src/node_modules/foo.d.ts' does not exist.", "File '/src/node_modules/foo/package.json' does not exist.", - "File '/src/node_modules/foo/index.ts' does not exist.", "File '/src/node_modules/foo/index.d.ts' does not exist.", - "File '/src/node_modules/@types/foo.ts' does not exist.", "File '/src/node_modules/@types/foo.d.ts' does not exist.", "File '/src/node_modules/@types/foo/package.json' does not exist.", - "File '/src/node_modules/@types/foo/index.ts' does not exist.", "File '/src/node_modules/@types/foo/index.d.ts' does not exist.", - "File '/node_modules/foo.ts' does not exist.", "File '/node_modules/foo.d.ts' does not exist.", "File '/node_modules/foo/package.json' does not exist.", - "File '/node_modules/foo/index.ts' does not exist.", "File '/node_modules/foo/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'foo' was successfully resolved to '/node_modules/foo/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'bar', containing file '/src/root.ts', root directory '/src'. ========", @@ -25,20 +19,14 @@ "File '/src/bar/package.json' does not exist.", "File '/src/bar/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/src'", - "File '/src/node_modules/bar.ts' does not exist.", "File '/src/node_modules/bar.d.ts' does not exist.", "File '/src/node_modules/bar/package.json' does not exist.", - "File '/src/node_modules/bar/index.ts' does not exist.", "File '/src/node_modules/bar/index.d.ts' does not exist.", - "File '/src/node_modules/@types/bar.ts' does not exist.", "File '/src/node_modules/@types/bar.d.ts' does not exist.", "File '/src/node_modules/@types/bar/package.json' does not exist.", - "File '/src/node_modules/@types/bar/index.ts' does not exist.", "File '/src/node_modules/@types/bar/index.d.ts' does not exist.", - "File '/node_modules/bar.ts' does not exist.", "File '/node_modules/bar.d.ts' does not exist.", "File '/node_modules/bar/package.json' does not exist.", - "File '/node_modules/bar/index.ts' does not exist.", "File '/node_modules/bar/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'bar' was successfully resolved to '/node_modules/bar/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'alpha', containing file '/node_modules/foo/index.d.ts', root directory '/src'. ========", @@ -46,10 +34,8 @@ "File '/src/alpha/package.json' does not exist.", "File '/src/alpha/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/node_modules/foo'", - "File '/node_modules/foo/node_modules/alpha.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha.d.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha/package.json' does not exist.", - "File '/node_modules/foo/node_modules/alpha/index.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/foo/node_modules/alpha/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'alpha', containing file '/node_modules/bar/index.d.ts', root directory '/src'. ========", @@ -57,10 +43,8 @@ "File '/src/alpha/package.json' does not exist.", "File '/src/alpha/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/node_modules/bar'", - "File '/node_modules/bar/node_modules/alpha.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha.d.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha/package.json' does not exist.", - "File '/node_modules/bar/node_modules/alpha/index.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/bar/node_modules/alpha/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-5.trace.json b/tests/baselines/reference/library-reference-5.trace.json index 9b8705f032311..dc9bff30b274e 100644 --- a/tests/baselines/reference/library-reference-5.trace.json +++ b/tests/baselines/reference/library-reference-5.trace.json @@ -4,20 +4,14 @@ "File 'types/foo/package.json' does not exist.", "File 'types/foo/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/src'", - "File '/src/node_modules/foo.ts' does not exist.", "File '/src/node_modules/foo.d.ts' does not exist.", "File '/src/node_modules/foo/package.json' does not exist.", - "File '/src/node_modules/foo/index.ts' does not exist.", "File '/src/node_modules/foo/index.d.ts' does not exist.", - "File '/src/node_modules/@types/foo.ts' does not exist.", "File '/src/node_modules/@types/foo.d.ts' does not exist.", "File '/src/node_modules/@types/foo/package.json' does not exist.", - "File '/src/node_modules/@types/foo/index.ts' does not exist.", "File '/src/node_modules/@types/foo/index.d.ts' does not exist.", - "File '/node_modules/foo.ts' does not exist.", "File '/node_modules/foo.d.ts' does not exist.", "File '/node_modules/foo/package.json' does not exist.", - "File '/node_modules/foo/index.ts' does not exist.", "File '/node_modules/foo/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'foo' was successfully resolved to '/node_modules/foo/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'bar', containing file '/src/root.ts', root directory 'types'. ========", @@ -25,20 +19,14 @@ "File 'types/bar/package.json' does not exist.", "File 'types/bar/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/src'", - "File '/src/node_modules/bar.ts' does not exist.", "File '/src/node_modules/bar.d.ts' does not exist.", "File '/src/node_modules/bar/package.json' does not exist.", - "File '/src/node_modules/bar/index.ts' does not exist.", "File '/src/node_modules/bar/index.d.ts' does not exist.", - "File '/src/node_modules/@types/bar.ts' does not exist.", "File '/src/node_modules/@types/bar.d.ts' does not exist.", "File '/src/node_modules/@types/bar/package.json' does not exist.", - "File '/src/node_modules/@types/bar/index.ts' does not exist.", "File '/src/node_modules/@types/bar/index.d.ts' does not exist.", - "File '/node_modules/bar.ts' does not exist.", "File '/node_modules/bar.d.ts' does not exist.", "File '/node_modules/bar/package.json' does not exist.", - "File '/node_modules/bar/index.ts' does not exist.", "File '/node_modules/bar/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'bar' was successfully resolved to '/node_modules/bar/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'alpha', containing file '/node_modules/foo/index.d.ts', root directory 'types'. ========", @@ -46,10 +34,8 @@ "File 'types/alpha/package.json' does not exist.", "File 'types/alpha/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/node_modules/foo'", - "File '/node_modules/foo/node_modules/alpha.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha.d.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha/package.json' does not exist.", - "File '/node_modules/foo/node_modules/alpha/index.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/foo/node_modules/alpha/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'alpha', containing file '/node_modules/bar/index.d.ts', root directory 'types'. ========", @@ -57,10 +43,8 @@ "File 'types/alpha/package.json' does not exist.", "File 'types/alpha/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/node_modules/bar'", - "File '/node_modules/bar/node_modules/alpha.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha.d.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha/package.json' does not exist.", - "File '/node_modules/bar/node_modules/alpha/index.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/bar/node_modules/alpha/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-7.trace.json b/tests/baselines/reference/library-reference-7.trace.json index 419fe6d055d72..72cc8c950779b 100644 --- a/tests/baselines/reference/library-reference-7.trace.json +++ b/tests/baselines/reference/library-reference-7.trace.json @@ -2,10 +2,8 @@ "======== Resolving type reference directive 'jquery', containing file '/src/consumer.ts', root directory not set. ========", "Root directory cannot be determined, skipping primary search paths.", "Looking up in 'node_modules' folder, initial location '/src'", - "File '/src/node_modules/jquery.ts' does not exist.", "File '/src/node_modules/jquery.d.ts' does not exist.", "File '/src/node_modules/jquery/package.json' does not exist.", - "File '/src/node_modules/jquery/index.ts' does not exist.", "File '/src/node_modules/jquery/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'jquery' was successfully resolved to '/src/node_modules/jquery/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionNoTs.js b/tests/baselines/reference/moduleResolutionNoTs.js index 9ff33d688ea24..a17f108d87238 100644 --- a/tests/baselines/reference/moduleResolutionNoTs.js +++ b/tests/baselines/reference/moduleResolutionNoTs.js @@ -25,7 +25,7 @@ import z2 from "./z"; "use strict"; exports.__esModule = true; exports["default"] = 0; -//// [y.js] +//// [y.jsx] "use strict"; exports.__esModule = true; exports["default"] = 0; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions.trace.json index 5060006ac56bd..924860326b891 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions.trace.json +++ b/tests/baselines/reference/moduleResolutionWithExtensions.trace.json @@ -11,6 +11,8 @@ "File '/src/a.js.ts' does not exist.", "File '/src/a.js.tsx' does not exist.", "File '/src/a.js.d.ts' does not exist.", + "File '/src/a.js.js' does not exist.", + "File '/src/a.js.jsx' does not exist.", "File name '/src/a.js' has a '.js' extension - stripping it", "File '/src/a.ts' exist - use it as a name resolution result.", "Resolving real path for '/src/a.ts', result '/src/a.ts'", @@ -21,6 +23,8 @@ "File '/src/jquery.js.ts' does not exist.", "File '/src/jquery.js.tsx' does not exist.", "File '/src/jquery.js.d.ts' does not exist.", + "File '/src/jquery.js.js' does not exist.", + "File '/src/jquery.js.jsx' does not exist.", "File name '/src/jquery.js' has a '.js' extension - stripping it", "File '/src/jquery.ts' does not exist.", "File '/src/jquery.tsx' does not exist.", diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.errors.txt b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.errors.txt new file mode 100644 index 0000000000000..f1da7b7728dc2 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.errors.txt @@ -0,0 +1,23 @@ +/a.ts(1,17): error TS6142: Module './tsx' was resolved to '/tsx.tsx', but '--jsx' is not set. +/a.ts(2,17): error TS6143: Module './jsx' was resolved to '/jsx.jsx', but '--allowJs' is not set. +/a.ts(3,16): error TS6143: Module './js' was resolved to '/js.js', but '--allowJs' is not set. + + +==== /a.ts (3 errors) ==== + import tsx from "./tsx"; + ~~~~~~~ +!!! error TS6142: Module './tsx' was resolved to '/tsx.tsx', but '--jsx' is not set. + import jsx from "./jsx"; + ~~~~~~~ +!!! error TS6143: Module './jsx' was resolved to '/jsx.jsx', but '--allowJs' is not set. + import js from "./js"; + ~~~~~~ +!!! error TS6143: Module './js' was resolved to '/js.js', but '--allowJs' is not set. + +==== /tsx.tsx (0 errors) ==== + + +==== /jsx.jsx (0 errors) ==== + +==== /js.js (0 errors) ==== + \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.js b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.js new file mode 100644 index 0000000000000..2e5297bdf65f8 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.js @@ -0,0 +1,17 @@ +//// [tests/cases/compiler/moduleResolutionWithExtensions_notSupported.ts] //// + +//// [tsx.tsx] + + +//// [jsx.jsx] + +//// [js.js] + +//// [a.ts] +import tsx from "./tsx"; +import jsx from "./jsx"; +import js from "./js"; + + +//// [a.js] +"use strict"; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.trace.json new file mode 100644 index 0000000000000..5628c6fb7afc5 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.trace.json @@ -0,0 +1,40 @@ +[ + "======== Resolving module './tsx' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module as file / folder, candidate module location '/tsx'.", + "File '/tsx.ts' does not exist.", + "File '/tsx.tsx' exist - use it as a name resolution result.", + "Resolving real path for '/tsx.tsx', result '/tsx.tsx'", + "======== Module name './tsx' was successfully resolved to '/tsx.tsx'. ========", + "======== Resolving module './jsx' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module as file / folder, candidate module location '/jsx'.", + "File '/jsx.ts' does not exist.", + "File '/jsx.tsx' does not exist.", + "File '/jsx.d.ts' does not exist.", + "File '/jsx.js' does not exist.", + "File '/jsx.jsx' exist - use it as a name resolution result.", + "File '/jsx/package.json' does not exist.", + "File '/jsx/index.ts' does not exist.", + "File '/jsx/index.tsx' does not exist.", + "File '/jsx/index.d.ts' does not exist.", + "File '/jsx/index.js' does not exist.", + "File '/jsx/index.jsx' does not exist.", + "Resolving real path for '/jsx.jsx', result '/jsx.jsx'", + "======== Module name './jsx' was successfully resolved to '/jsx.jsx'. ========", + "======== Resolving module './js' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module as file / folder, candidate module location '/js'.", + "File '/js.ts' does not exist.", + "File '/js.tsx' does not exist.", + "File '/js.d.ts' does not exist.", + "File '/js.js' exist - use it as a name resolution result.", + "File '/js/package.json' does not exist.", + "File '/js/index.ts' does not exist.", + "File '/js/index.tsx' does not exist.", + "File '/js/index.d.ts' does not exist.", + "File '/js/index.js' does not exist.", + "File '/js/index.jsx' does not exist.", + "Resolving real path for '/js.js', result '/js.js'", + "======== Module name './js' was successfully resolved to '/js.js'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.errors.txt b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.errors.txt new file mode 100644 index 0000000000000..bb8a0664ed6ff --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.errors.txt @@ -0,0 +1,12 @@ +/a.ts(1,17): error TS6142: Module './jsx' was resolved to '/jsx.jsx', but '--jsx' is not set. + + +==== /a.ts (1 errors) ==== + import jsx from "./jsx"; + ~~~~~~~ +!!! error TS6142: Module './jsx' was resolved to '/jsx.jsx', but '--jsx' is not set. + +==== /jsx.jsx (0 errors) ==== + // Test the error message if we have `--allowJs` but not `--jsx`. + + \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js new file mode 100644 index 0000000000000..c340f65f251d7 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js @@ -0,0 +1,12 @@ +//// [tests/cases/compiler/moduleResolutionWithExtensions_notSupported2.ts] //// + +//// [jsx.jsx] +// Test the error message if we have `--allowJs` but not `--jsx`. + + +//// [a.ts] +import jsx from "./jsx"; + + +//// [a.js] +"use strict"; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.trace.json new file mode 100644 index 0000000000000..2d6170f9946b4 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.trace.json @@ -0,0 +1,18 @@ +[ + "======== Resolving module './jsx' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module as file / folder, candidate module location '/jsx'.", + "File '/jsx.ts' does not exist.", + "File '/jsx.tsx' does not exist.", + "File '/jsx.d.ts' does not exist.", + "File '/jsx.js' does not exist.", + "File '/jsx.jsx' exist - use it as a name resolution result.", + "File '/jsx/package.json' does not exist.", + "File '/jsx/index.ts' does not exist.", + "File '/jsx/index.tsx' does not exist.", + "File '/jsx/index.d.ts' does not exist.", + "File '/jsx/index.js' does not exist.", + "File '/jsx/index.jsx' does not exist.", + "Resolving real path for '/jsx.jsx', result '/jsx.jsx'", + "======== Module name './jsx' was successfully resolved to '/jsx.jsx'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.js b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.js new file mode 100644 index 0000000000000..177321c7d0819 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.js @@ -0,0 +1,18 @@ +//// [tests/cases/compiler/moduleResolutionWithExtensions_preferTs.ts] //// + +//// [b.js] + + +//// [index.ts] +export default 0; + +//// [a.ts] +import b from "./b"; + + +//// [index.js] +"use strict"; +exports.__esModule = true; +exports["default"] = 0; +//// [a.js] +"use strict"; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.symbols b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.symbols new file mode 100644 index 0000000000000..af9dc4154d443 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.symbols @@ -0,0 +1,8 @@ +=== /a.ts === +import b from "./b"; +>b : Symbol(b, Decl(a.ts, 0, 6)) + +=== /b/index.ts === +export default 0; +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.trace.json new file mode 100644 index 0000000000000..150d492145c8c --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.trace.json @@ -0,0 +1,14 @@ +[ + "======== Resolving module './b' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module as file / folder, candidate module location '/b'.", + "File '/b.ts' does not exist.", + "File '/b.tsx' does not exist.", + "File '/b.d.ts' does not exist.", + "File '/b.js' exist - use it as a name resolution result.", + "File '/b/package.json' does not exist.", + "File '/b/index.ts' exist - use it as a name resolution result.", + "Resolving real path for '/b/index.ts', result '/b/index.ts'", + "Resolving real path for '/b.js', result '/b.js'", + "======== Module name './b' was successfully resolved to '/b/index.ts'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.types b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.types new file mode 100644 index 0000000000000..0e418c5dc143c --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.types @@ -0,0 +1,8 @@ +=== /a.ts === +import b from "./b"; +>b : 0 + +=== /b/index.ts === +export default 0; +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js new file mode 100644 index 0000000000000..51d476338c024 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js @@ -0,0 +1,18 @@ +//// [tests/cases/compiler/moduleResolutionWithExtensions_withAmbientPresent.ts] //// + +//// [index.js] +// Allowjs is false, but this should *not* warn about the unused 'index.js' + + +//// [declarations.d.ts] +declare module "js" { + export const x = 0; +} + +//// [a.ts] +/// +import { x } from "js"; + + +//// [a.js] +"use strict"; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.symbols b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.symbols new file mode 100644 index 0000000000000..1259c83ccdea3 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.symbols @@ -0,0 +1,11 @@ +=== /a.ts === +/// +import { x } from "js"; +>x : Symbol(x, Decl(a.ts, 1, 8)) + +=== /declarations.d.ts === +declare module "js" { + export const x = 0; +>x : Symbol(x, Decl(declarations.d.ts, 1, 16)) +} + diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json new file mode 100644 index 0000000000000..b2b46649529e2 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json @@ -0,0 +1,28 @@ +[ + "======== Resolving module 'js' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module 'js' from 'node_modules' folder.", + "File '/node_modules/js.ts' does not exist.", + "File '/node_modules/js.tsx' does not exist.", + "File '/node_modules/js.d.ts' does not exist.", + "File '/node_modules/js.js' does not exist.", + "File '/node_modules/js.jsx' does not exist.", + "File '/node_modules/js/package.json' does not exist.", + "File '/node_modules/js/index.ts' does not exist.", + "File '/node_modules/js/index.tsx' does not exist.", + "File '/node_modules/js/index.d.ts' does not exist.", + "File '/node_modules/js/index.js' exist - use it as a name resolution result.", + "File '/node_modules/@types/js.ts' does not exist.", + "File '/node_modules/@types/js.tsx' does not exist.", + "File '/node_modules/@types/js.d.ts' does not exist.", + "File '/node_modules/@types/js.js' does not exist.", + "File '/node_modules/@types/js.jsx' does not exist.", + "File '/node_modules/@types/js/package.json' does not exist.", + "File '/node_modules/@types/js/index.ts' does not exist.", + "File '/node_modules/@types/js/index.tsx' does not exist.", + "File '/node_modules/@types/js/index.d.ts' does not exist.", + "File '/node_modules/@types/js/index.js' does not exist.", + "File '/node_modules/@types/js/index.jsx' does not exist.", + "Resolving real path for '/node_modules/js/index.js', result '/node_modules/js/index.js'", + "======== Module name 'js' was successfully resolved to '/node_modules/js/index.js'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.types b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.types new file mode 100644 index 0000000000000..1e5af4e7579ec --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.types @@ -0,0 +1,12 @@ +=== /a.ts === +/// +import { x } from "js"; +>x : 0 + +=== /declarations.d.ts === +declare module "js" { + export const x = 0; +>x : 0 +>0 : 0 +} + diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json b/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json index f3bfae4b17346..d69fa7bfb50db 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json +++ b/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json @@ -5,6 +5,8 @@ "File '/src/library-a.ts' does not exist.", "File '/src/library-a.tsx' does not exist.", "File '/src/library-a.d.ts' does not exist.", + "File '/src/library-a.js' does not exist.", + "File '/src/library-a.jsx' does not exist.", "File '/src/library-a/package.json' does not exist.", "File '/src/library-a/index.ts' exist - use it as a name resolution result.", "Resolving real path for '/src/library-a/index.ts', result '/src/library-a/index.ts'", @@ -15,6 +17,8 @@ "File '/src/library-b.ts' does not exist.", "File '/src/library-b.tsx' does not exist.", "File '/src/library-b.d.ts' does not exist.", + "File '/src/library-b.js' does not exist.", + "File '/src/library-b.jsx' does not exist.", "File '/src/library-b/package.json' does not exist.", "File '/src/library-b/index.ts' exist - use it as a name resolution result.", "Resolving real path for '/src/library-b/index.ts', result '/src/library-b/index.ts'", @@ -25,44 +29,68 @@ "File '/src/library-b/node_modules/library-a.ts' does not exist.", "File '/src/library-b/node_modules/library-a.tsx' does not exist.", "File '/src/library-b/node_modules/library-a.d.ts' does not exist.", + "File '/src/library-b/node_modules/library-a.js' does not exist.", + "File '/src/library-b/node_modules/library-a.jsx' does not exist.", "File '/src/library-b/node_modules/library-a/package.json' does not exist.", "File '/src/library-b/node_modules/library-a/index.ts' does not exist.", "File '/src/library-b/node_modules/library-a/index.tsx' does not exist.", "File '/src/library-b/node_modules/library-a/index.d.ts' does not exist.", + "File '/src/library-b/node_modules/library-a/index.js' does not exist.", + "File '/src/library-b/node_modules/library-a/index.jsx' does not exist.", "File '/src/library-b/node_modules/@types/library-a.ts' does not exist.", "File '/src/library-b/node_modules/@types/library-a.tsx' does not exist.", "File '/src/library-b/node_modules/@types/library-a.d.ts' does not exist.", + "File '/src/library-b/node_modules/@types/library-a.js' does not exist.", + "File '/src/library-b/node_modules/@types/library-a.jsx' does not exist.", "File '/src/library-b/node_modules/@types/library-a/package.json' does not exist.", "File '/src/library-b/node_modules/@types/library-a/index.ts' does not exist.", "File '/src/library-b/node_modules/@types/library-a/index.tsx' does not exist.", "File '/src/library-b/node_modules/@types/library-a/index.d.ts' does not exist.", + "File '/src/library-b/node_modules/@types/library-a/index.js' does not exist.", + "File '/src/library-b/node_modules/@types/library-a/index.jsx' does not exist.", "File '/src/node_modules/library-a.ts' does not exist.", "File '/src/node_modules/library-a.tsx' does not exist.", "File '/src/node_modules/library-a.d.ts' does not exist.", + "File '/src/node_modules/library-a.js' does not exist.", + "File '/src/node_modules/library-a.jsx' does not exist.", "File '/src/node_modules/library-a/package.json' does not exist.", "File '/src/node_modules/library-a/index.ts' does not exist.", "File '/src/node_modules/library-a/index.tsx' does not exist.", "File '/src/node_modules/library-a/index.d.ts' does not exist.", + "File '/src/node_modules/library-a/index.js' does not exist.", + "File '/src/node_modules/library-a/index.jsx' does not exist.", "File '/src/node_modules/@types/library-a.ts' does not exist.", "File '/src/node_modules/@types/library-a.tsx' does not exist.", "File '/src/node_modules/@types/library-a.d.ts' does not exist.", + "File '/src/node_modules/@types/library-a.js' does not exist.", + "File '/src/node_modules/@types/library-a.jsx' does not exist.", "File '/src/node_modules/@types/library-a/package.json' does not exist.", "File '/src/node_modules/@types/library-a/index.ts' does not exist.", "File '/src/node_modules/@types/library-a/index.tsx' does not exist.", "File '/src/node_modules/@types/library-a/index.d.ts' does not exist.", + "File '/src/node_modules/@types/library-a/index.js' does not exist.", + "File '/src/node_modules/@types/library-a/index.jsx' does not exist.", "File '/node_modules/library-a.ts' does not exist.", "File '/node_modules/library-a.tsx' does not exist.", "File '/node_modules/library-a.d.ts' does not exist.", + "File '/node_modules/library-a.js' does not exist.", + "File '/node_modules/library-a.jsx' does not exist.", "File '/node_modules/library-a/package.json' does not exist.", "File '/node_modules/library-a/index.ts' does not exist.", "File '/node_modules/library-a/index.tsx' does not exist.", "File '/node_modules/library-a/index.d.ts' does not exist.", + "File '/node_modules/library-a/index.js' does not exist.", + "File '/node_modules/library-a/index.jsx' does not exist.", "File '/node_modules/@types/library-a.ts' does not exist.", "File '/node_modules/@types/library-a.tsx' does not exist.", "File '/node_modules/@types/library-a.d.ts' does not exist.", + "File '/node_modules/@types/library-a.js' does not exist.", + "File '/node_modules/@types/library-a.jsx' does not exist.", "File '/node_modules/@types/library-a/package.json' does not exist.", "File '/node_modules/@types/library-a/index.ts' does not exist.", "File '/node_modules/@types/library-a/index.tsx' does not exist.", "File '/node_modules/@types/library-a/index.d.ts' does not exist.", + "File '/node_modules/@types/library-a/index.js' does not exist.", + "File '/node_modules/@types/library-a/index.jsx' does not exist.", "======== Module name 'library-a' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json index 8b003e05e8f04..22d93809b1bdd 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json @@ -14,11 +14,20 @@ "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/file4.js' does not exist.", + "File 'c:/root/file4.jsx' does not exist.", "File 'c:/root/folder2/file4.ts' does not exist.", + "File 'c:/root/folder2/file4.tsx' does not exist.", "File 'c:/root/folder2/file4.d.ts' does not exist.", + "File 'c:/root/folder2/file4.js' does not exist.", + "File 'c:/root/folder2/file4.jsx' does not exist.", "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/file4.js' does not exist.", + "File 'c:/root/file4.jsx' does not exist.", "File 'c:/file4.ts' exist - use it as a name resolution result.", "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json index ab7210d7d020c..220f0f9c04b04 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json @@ -21,42 +21,64 @@ "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/file4.js' does not exist.", + "File 'c:/root/file4.jsx' does not exist.", "File 'c:/root/file4/package.json' does not exist.", "File 'c:/root/file4/index.ts' does not exist.", "File 'c:/root/file4/index.tsx' does not exist.", "File 'c:/root/file4/index.d.ts' does not exist.", + "File 'c:/root/file4/index.js' does not exist.", + "File 'c:/root/file4/index.jsx' does not exist.", "Loading module 'file4' from 'node_modules' folder.", "File 'c:/root/folder2/node_modules/file4.ts' does not exist.", "File 'c:/root/folder2/node_modules/file4.tsx' does not exist.", "File 'c:/root/folder2/node_modules/file4.d.ts' does not exist.", + "File 'c:/root/folder2/node_modules/file4.js' does not exist.", + "File 'c:/root/folder2/node_modules/file4.jsx' does not exist.", "File 'c:/root/folder2/node_modules/file4/package.json' does not exist.", "File 'c:/root/folder2/node_modules/file4/index.ts' does not exist.", "File 'c:/root/folder2/node_modules/file4/index.tsx' does not exist.", "File 'c:/root/folder2/node_modules/file4/index.d.ts' does not exist.", + "File 'c:/root/folder2/node_modules/file4/index.js' does not exist.", + "File 'c:/root/folder2/node_modules/file4/index.jsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4.ts' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4.tsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4.d.ts' does not exist.", + "File 'c:/root/folder2/node_modules/@types/file4.js' does not exist.", + "File 'c:/root/folder2/node_modules/@types/file4.jsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/package.json' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/index.ts' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/index.tsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/index.d.ts' does not exist.", + "File 'c:/root/folder2/node_modules/@types/file4/index.js' does not exist.", + "File 'c:/root/folder2/node_modules/@types/file4/index.jsx' does not exist.", "File 'c:/root/node_modules/file4.ts' does not exist.", "File 'c:/root/node_modules/file4.tsx' does not exist.", "File 'c:/root/node_modules/file4.d.ts' does not exist.", + "File 'c:/root/node_modules/file4.js' does not exist.", + "File 'c:/root/node_modules/file4.jsx' does not exist.", "File 'c:/root/node_modules/file4/package.json' does not exist.", "File 'c:/root/node_modules/file4/index.ts' does not exist.", "File 'c:/root/node_modules/file4/index.tsx' does not exist.", "File 'c:/root/node_modules/file4/index.d.ts' does not exist.", + "File 'c:/root/node_modules/file4/index.js' does not exist.", + "File 'c:/root/node_modules/file4/index.jsx' does not exist.", "File 'c:/root/node_modules/@types/file4.ts' does not exist.", "File 'c:/root/node_modules/@types/file4.tsx' does not exist.", "File 'c:/root/node_modules/@types/file4.d.ts' does not exist.", + "File 'c:/root/node_modules/@types/file4.js' does not exist.", + "File 'c:/root/node_modules/@types/file4.jsx' does not exist.", "File 'c:/root/node_modules/@types/file4/package.json' does not exist.", "File 'c:/root/node_modules/@types/file4/index.ts' does not exist.", "File 'c:/root/node_modules/@types/file4/index.tsx' does not exist.", "File 'c:/root/node_modules/@types/file4/index.d.ts' does not exist.", + "File 'c:/root/node_modules/@types/file4/index.js' does not exist.", + "File 'c:/root/node_modules/@types/file4/index.jsx' does not exist.", "File 'c:/node_modules/file4.ts' does not exist.", "File 'c:/node_modules/file4.tsx' does not exist.", "File 'c:/node_modules/file4.d.ts' does not exist.", + "File 'c:/node_modules/file4.js' does not exist.", + "File 'c:/node_modules/file4.jsx' does not exist.", "File 'c:/node_modules/file4/package.json' does not exist.", "File 'c:/node_modules/file4/index.ts' does not exist.", "File 'c:/node_modules/file4/index.tsx' does not exist.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json index 8b003e05e8f04..22d93809b1bdd 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json @@ -14,11 +14,20 @@ "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/file4.js' does not exist.", + "File 'c:/root/file4.jsx' does not exist.", "File 'c:/root/folder2/file4.ts' does not exist.", + "File 'c:/root/folder2/file4.tsx' does not exist.", "File 'c:/root/folder2/file4.d.ts' does not exist.", + "File 'c:/root/folder2/file4.js' does not exist.", + "File 'c:/root/folder2/file4.jsx' does not exist.", "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/file4.js' does not exist.", + "File 'c:/root/file4.jsx' does not exist.", "File 'c:/file4.ts' exist - use it as a name resolution result.", "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json index ab7210d7d020c..220f0f9c04b04 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json @@ -21,42 +21,64 @@ "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/file4.js' does not exist.", + "File 'c:/root/file4.jsx' does not exist.", "File 'c:/root/file4/package.json' does not exist.", "File 'c:/root/file4/index.ts' does not exist.", "File 'c:/root/file4/index.tsx' does not exist.", "File 'c:/root/file4/index.d.ts' does not exist.", + "File 'c:/root/file4/index.js' does not exist.", + "File 'c:/root/file4/index.jsx' does not exist.", "Loading module 'file4' from 'node_modules' folder.", "File 'c:/root/folder2/node_modules/file4.ts' does not exist.", "File 'c:/root/folder2/node_modules/file4.tsx' does not exist.", "File 'c:/root/folder2/node_modules/file4.d.ts' does not exist.", + "File 'c:/root/folder2/node_modules/file4.js' does not exist.", + "File 'c:/root/folder2/node_modules/file4.jsx' does not exist.", "File 'c:/root/folder2/node_modules/file4/package.json' does not exist.", "File 'c:/root/folder2/node_modules/file4/index.ts' does not exist.", "File 'c:/root/folder2/node_modules/file4/index.tsx' does not exist.", "File 'c:/root/folder2/node_modules/file4/index.d.ts' does not exist.", + "File 'c:/root/folder2/node_modules/file4/index.js' does not exist.", + "File 'c:/root/folder2/node_modules/file4/index.jsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4.ts' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4.tsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4.d.ts' does not exist.", + "File 'c:/root/folder2/node_modules/@types/file4.js' does not exist.", + "File 'c:/root/folder2/node_modules/@types/file4.jsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/package.json' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/index.ts' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/index.tsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/index.d.ts' does not exist.", + "File 'c:/root/folder2/node_modules/@types/file4/index.js' does not exist.", + "File 'c:/root/folder2/node_modules/@types/file4/index.jsx' does not exist.", "File 'c:/root/node_modules/file4.ts' does not exist.", "File 'c:/root/node_modules/file4.tsx' does not exist.", "File 'c:/root/node_modules/file4.d.ts' does not exist.", + "File 'c:/root/node_modules/file4.js' does not exist.", + "File 'c:/root/node_modules/file4.jsx' does not exist.", "File 'c:/root/node_modules/file4/package.json' does not exist.", "File 'c:/root/node_modules/file4/index.ts' does not exist.", "File 'c:/root/node_modules/file4/index.tsx' does not exist.", "File 'c:/root/node_modules/file4/index.d.ts' does not exist.", + "File 'c:/root/node_modules/file4/index.js' does not exist.", + "File 'c:/root/node_modules/file4/index.jsx' does not exist.", "File 'c:/root/node_modules/@types/file4.ts' does not exist.", "File 'c:/root/node_modules/@types/file4.tsx' does not exist.", "File 'c:/root/node_modules/@types/file4.d.ts' does not exist.", + "File 'c:/root/node_modules/@types/file4.js' does not exist.", + "File 'c:/root/node_modules/@types/file4.jsx' does not exist.", "File 'c:/root/node_modules/@types/file4/package.json' does not exist.", "File 'c:/root/node_modules/@types/file4/index.ts' does not exist.", "File 'c:/root/node_modules/@types/file4/index.tsx' does not exist.", "File 'c:/root/node_modules/@types/file4/index.d.ts' does not exist.", + "File 'c:/root/node_modules/@types/file4/index.js' does not exist.", + "File 'c:/root/node_modules/@types/file4/index.jsx' does not exist.", "File 'c:/node_modules/file4.ts' does not exist.", "File 'c:/node_modules/file4.tsx' does not exist.", "File 'c:/node_modules/file4.d.ts' does not exist.", + "File 'c:/node_modules/file4.js' does not exist.", + "File 'c:/node_modules/file4.jsx' does not exist.", "File 'c:/node_modules/file4/package.json' does not exist.", "File 'c:/node_modules/file4/index.ts' does not exist.", "File 'c:/node_modules/file4/index.tsx' does not exist.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json index d1709c82dc676..8fd0dee8e747e 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json @@ -14,7 +14,10 @@ "Module name 'folder3/file2', matched pattern '*'.", "Trying substitution '*', candidate module location: 'folder3/file2'.", "File 'c:/root/folder3/file2.ts' does not exist.", + "File 'c:/root/folder3/file2.tsx' does not exist.", "File 'c:/root/folder3/file2.d.ts' does not exist.", + "File 'c:/root/folder3/file2.js' does not exist.", + "File 'c:/root/folder3/file2.jsx' does not exist.", "Trying substitution 'generated/*', candidate module location: 'generated/folder3/file2'.", "File 'c:/root/generated/folder3/file2.ts' exist - use it as a name resolution result.", "======== Module name 'folder3/file2' was successfully resolved to 'c:/root/generated/folder3/file2.ts'. ========", @@ -33,14 +36,26 @@ "Module name 'file4', matched pattern '*'.", "Trying substitution '*', candidate module location: 'file4'.", "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/file4.js' does not exist.", + "File 'c:/root/file4.jsx' does not exist.", "Trying substitution 'generated/*', candidate module location: 'generated/file4'.", "File 'c:/root/generated/file4.ts' does not exist.", + "File 'c:/root/generated/file4.tsx' does not exist.", "File 'c:/root/generated/file4.d.ts' does not exist.", + "File 'c:/root/generated/file4.js' does not exist.", + "File 'c:/root/generated/file4.jsx' does not exist.", "File 'c:/root/folder1/file4.ts' does not exist.", + "File 'c:/root/folder1/file4.tsx' does not exist.", "File 'c:/root/folder1/file4.d.ts' does not exist.", + "File 'c:/root/folder1/file4.js' does not exist.", + "File 'c:/root/folder1/file4.jsx' does not exist.", "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/file4.js' does not exist.", + "File 'c:/root/file4.jsx' does not exist.", "File 'c:/file4.ts' exist - use it as a name resolution result.", "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json index 2efeefa24e5ca..8201ed793523e 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json @@ -19,10 +19,14 @@ "File 'c:/root/folder3/file2.ts' does not exist.", "File 'c:/root/folder3/file2.tsx' does not exist.", "File 'c:/root/folder3/file2.d.ts' does not exist.", + "File 'c:/root/folder3/file2.js' does not exist.", + "File 'c:/root/folder3/file2.jsx' does not exist.", "File 'c:/root/folder3/file2/package.json' does not exist.", "File 'c:/root/folder3/file2/index.ts' does not exist.", "File 'c:/root/folder3/file2/index.tsx' does not exist.", "File 'c:/root/folder3/file2/index.d.ts' does not exist.", + "File 'c:/root/folder3/file2/index.js' does not exist.", + "File 'c:/root/folder3/file2/index.jsx' does not exist.", "Trying substitution 'generated/*', candidate module location: 'generated/folder3/file2'.", "Loading module as file / folder, candidate module location 'c:/root/generated/folder3/file2'.", "File 'c:/root/generated/folder3/file2.ts' exist - use it as a name resolution result.", @@ -38,6 +42,8 @@ "File 'c:/root/shared/components/file3.ts' does not exist.", "File 'c:/root/shared/components/file3.tsx' does not exist.", "File 'c:/root/shared/components/file3.d.ts' does not exist.", + "File 'c:/root/shared/components/file3.js' does not exist.", + "File 'c:/root/shared/components/file3.jsx' does not exist.", "File 'c:/root/shared/components/file3/package.json' does not exist.", "File 'c:/root/shared/components/file3/index.ts' does not exist.", "File 'c:/root/shared/components/file3/index.tsx' does not exist.", @@ -54,48 +60,72 @@ "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", + "File 'c:/root/file4.js' does not exist.", + "File 'c:/root/file4.jsx' does not exist.", "File 'c:/root/file4/package.json' does not exist.", "File 'c:/root/file4/index.ts' does not exist.", "File 'c:/root/file4/index.tsx' does not exist.", "File 'c:/root/file4/index.d.ts' does not exist.", + "File 'c:/root/file4/index.js' does not exist.", + "File 'c:/root/file4/index.jsx' does not exist.", "Trying substitution 'generated/*', candidate module location: 'generated/file4'.", "Loading module as file / folder, candidate module location 'c:/root/generated/file4'.", "File 'c:/root/generated/file4.ts' does not exist.", "File 'c:/root/generated/file4.tsx' does not exist.", "File 'c:/root/generated/file4.d.ts' does not exist.", + "File 'c:/root/generated/file4.js' does not exist.", + "File 'c:/root/generated/file4.jsx' does not exist.", "File 'c:/root/generated/file4/package.json' does not exist.", "File 'c:/root/generated/file4/index.ts' does not exist.", "File 'c:/root/generated/file4/index.tsx' does not exist.", "File 'c:/root/generated/file4/index.d.ts' does not exist.", + "File 'c:/root/generated/file4/index.js' does not exist.", + "File 'c:/root/generated/file4/index.jsx' does not exist.", "Loading module 'file4' from 'node_modules' folder.", "File 'c:/root/folder1/node_modules/file4.ts' does not exist.", "File 'c:/root/folder1/node_modules/file4.tsx' does not exist.", "File 'c:/root/folder1/node_modules/file4.d.ts' does not exist.", + "File 'c:/root/folder1/node_modules/file4.js' does not exist.", + "File 'c:/root/folder1/node_modules/file4.jsx' does not exist.", "File 'c:/root/folder1/node_modules/file4/package.json' does not exist.", "File 'c:/root/folder1/node_modules/file4/index.ts' does not exist.", "File 'c:/root/folder1/node_modules/file4/index.tsx' does not exist.", "File 'c:/root/folder1/node_modules/file4/index.d.ts' does not exist.", + "File 'c:/root/folder1/node_modules/file4/index.js' does not exist.", + "File 'c:/root/folder1/node_modules/file4/index.jsx' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4.ts' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4.tsx' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4.d.ts' does not exist.", + "File 'c:/root/folder1/node_modules/@types/file4.js' does not exist.", + "File 'c:/root/folder1/node_modules/@types/file4.jsx' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4/package.json' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4/index.ts' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4/index.tsx' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4/index.d.ts' does not exist.", + "File 'c:/root/folder1/node_modules/@types/file4/index.js' does not exist.", + "File 'c:/root/folder1/node_modules/@types/file4/index.jsx' does not exist.", "File 'c:/root/node_modules/file4.ts' does not exist.", "File 'c:/root/node_modules/file4.tsx' does not exist.", "File 'c:/root/node_modules/file4.d.ts' does not exist.", + "File 'c:/root/node_modules/file4.js' does not exist.", + "File 'c:/root/node_modules/file4.jsx' does not exist.", "File 'c:/root/node_modules/file4/package.json' does not exist.", "File 'c:/root/node_modules/file4/index.ts' does not exist.", "File 'c:/root/node_modules/file4/index.tsx' does not exist.", "File 'c:/root/node_modules/file4/index.d.ts' does not exist.", + "File 'c:/root/node_modules/file4/index.js' does not exist.", + "File 'c:/root/node_modules/file4/index.jsx' does not exist.", "File 'c:/root/node_modules/@types/file4.ts' does not exist.", "File 'c:/root/node_modules/@types/file4.tsx' does not exist.", "File 'c:/root/node_modules/@types/file4.d.ts' does not exist.", + "File 'c:/root/node_modules/@types/file4.js' does not exist.", + "File 'c:/root/node_modules/@types/file4.jsx' does not exist.", "File 'c:/root/node_modules/@types/file4/package.json' does not exist.", "File 'c:/root/node_modules/@types/file4/index.ts' does not exist.", "File 'c:/root/node_modules/@types/file4/index.tsx' does not exist.", "File 'c:/root/node_modules/@types/file4/index.d.ts' does not exist.", + "File 'c:/root/node_modules/@types/file4/index.js' does not exist.", + "File 'c:/root/node_modules/@types/file4/index.jsx' does not exist.", "File 'c:/node_modules/file4.ts' exist - use it as a name resolution result.", "Resolving real path for 'c:/node_modules/file4.ts', result 'c:/node_modules/file4.ts'", "======== Module name 'file4' was successfully resolved to 'c:/node_modules/file4.ts'. ========" diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json index 20fc416ccd479..d6c6b1a45bcc7 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json @@ -7,7 +7,10 @@ "Longest matching prefix for 'c:/root/src/project/file3' is 'c:/root/src/'", "Loading 'project/file3' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file3'", "File 'c:/root/src/project/file3.ts' does not exist.", + "File 'c:/root/src/project/file3.tsx' does not exist.", "File 'c:/root/src/project/file3.d.ts' does not exist.", + "File 'c:/root/src/project/file3.js' does not exist.", + "File 'c:/root/src/project/file3.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'project/file3' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file3'", "File 'c:/root/generated/src/project/file3.ts' exist - use it as a name resolution result.", @@ -20,10 +23,14 @@ "Longest matching prefix for 'c:/root/generated/src/file2' is 'c:/root/generated/src/'", "Loading 'file2' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file2'", "File 'c:/root/generated/src/file2.ts' does not exist.", + "File 'c:/root/generated/src/file2.tsx' does not exist.", "File 'c:/root/generated/src/file2.d.ts' does not exist.", + "File 'c:/root/generated/src/file2.js' does not exist.", + "File 'c:/root/generated/src/file2.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'file2' from the root dir 'c:/root/src', candidate location 'c:/root/src/file2'", "File 'c:/root/src/file2.ts' does not exist.", + "File 'c:/root/src/file2.tsx' does not exist.", "File 'c:/root/src/file2.d.ts' exist - use it as a name resolution result.", "======== Module name '../file2' was successfully resolved to 'c:/root/src/file2.d.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json index 28e51a119152d..92eb9ad072cb2 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json @@ -10,10 +10,14 @@ "File 'c:/root/src/project/file3.ts' does not exist.", "File 'c:/root/src/project/file3.tsx' does not exist.", "File 'c:/root/src/project/file3.d.ts' does not exist.", + "File 'c:/root/src/project/file3.js' does not exist.", + "File 'c:/root/src/project/file3.jsx' does not exist.", "File 'c:/root/src/project/file3/package.json' does not exist.", "File 'c:/root/src/project/file3/index.ts' does not exist.", "File 'c:/root/src/project/file3/index.tsx' does not exist.", "File 'c:/root/src/project/file3/index.d.ts' does not exist.", + "File 'c:/root/src/project/file3/index.js' does not exist.", + "File 'c:/root/src/project/file3/index.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'project/file3' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file3'", "Loading module as file / folder, candidate module location 'c:/root/generated/src/project/file3'.", @@ -31,16 +35,22 @@ "File 'c:/root/generated/src/file2.ts' does not exist.", "File 'c:/root/generated/src/file2.tsx' does not exist.", "File 'c:/root/generated/src/file2.d.ts' does not exist.", + "File 'c:/root/generated/src/file2.js' does not exist.", + "File 'c:/root/generated/src/file2.jsx' does not exist.", "File 'c:/root/generated/src/file2/package.json' does not exist.", "File 'c:/root/generated/src/file2/index.ts' does not exist.", "File 'c:/root/generated/src/file2/index.tsx' does not exist.", "File 'c:/root/generated/src/file2/index.d.ts' does not exist.", + "File 'c:/root/generated/src/file2/index.js' does not exist.", + "File 'c:/root/generated/src/file2/index.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'file2' from the root dir 'c:/root/src', candidate location 'c:/root/src/file2'", "Loading module as file / folder, candidate module location 'c:/root/src/file2'.", "File 'c:/root/src/file2.ts' does not exist.", "File 'c:/root/src/file2.tsx' does not exist.", "File 'c:/root/src/file2.d.ts' does not exist.", + "File 'c:/root/src/file2.js' does not exist.", + "File 'c:/root/src/file2.jsx' does not exist.", "File 'c:/root/src/file2/package.json' does not exist.", "File 'c:/root/src/file2/index.ts' does not exist.", "File 'c:/root/src/file2/index.tsx' does not exist.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json index a8cadb8f0671a..24d43809bab14 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json @@ -7,7 +7,10 @@ "Longest matching prefix for 'c:/root/src/project/file2' is 'c:/root/src/'", "Loading 'project/file2' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file2'", "File 'c:/root/src/project/file2.ts' does not exist.", + "File 'c:/root/src/project/file2.tsx' does not exist.", "File 'c:/root/src/project/file2.d.ts' does not exist.", + "File 'c:/root/src/project/file2.js' does not exist.", + "File 'c:/root/src/project/file2.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'project/file2' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file2'", "File 'c:/root/generated/src/project/file2.ts' exist - use it as a name resolution result.", @@ -19,15 +22,28 @@ "Module name 'module3', matched pattern '*'.", "Trying substitution '*', candidate module location: 'module3'.", "File 'c:/root/module3.ts' does not exist.", + "File 'c:/root/module3.tsx' does not exist.", "File 'c:/root/module3.d.ts' does not exist.", + "File 'c:/root/module3.js' does not exist.", + "File 'c:/root/module3.jsx' does not exist.", "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module3'.", "File 'c:/shared/module3.ts' does not exist.", + "File 'c:/shared/module3.tsx' does not exist.", "File 'c:/shared/module3.d.ts' does not exist.", + "File 'c:/shared/module3.js' does not exist.", + "File 'c:/shared/module3.jsx' does not exist.", "File 'c:/root/src/module3.ts' does not exist.", + "File 'c:/root/src/module3.tsx' does not exist.", "File 'c:/root/src/module3.d.ts' does not exist.", + "File 'c:/root/src/module3.js' does not exist.", + "File 'c:/root/src/module3.jsx' does not exist.", "File 'c:/root/module3.ts' does not exist.", + "File 'c:/root/module3.tsx' does not exist.", "File 'c:/root/module3.d.ts' does not exist.", + "File 'c:/root/module3.js' does not exist.", + "File 'c:/root/module3.jsx' does not exist.", "File 'c:/module3.ts' does not exist.", + "File 'c:/module3.tsx' does not exist.", "File 'c:/module3.d.ts' exist - use it as a name resolution result.", "======== Module name 'module3' was successfully resolved to 'c:/module3.d.ts'. ========", "======== Resolving module 'module1' from 'c:/root/generated/src/project/file2.ts'. ========", @@ -37,9 +53,13 @@ "Module name 'module1', matched pattern '*'.", "Trying substitution '*', candidate module location: 'module1'.", "File 'c:/root/module1.ts' does not exist.", + "File 'c:/root/module1.tsx' does not exist.", "File 'c:/root/module1.d.ts' does not exist.", + "File 'c:/root/module1.js' does not exist.", + "File 'c:/root/module1.jsx' does not exist.", "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module1'.", "File 'c:/shared/module1.ts' does not exist.", + "File 'c:/shared/module1.tsx' does not exist.", "File 'c:/shared/module1.d.ts' exist - use it as a name resolution result.", "======== Module name 'module1' was successfully resolved to 'c:/shared/module1.d.ts'. ========", "======== Resolving module 'templates/module2' from 'c:/root/generated/src/project/file2.ts'. ========", @@ -58,10 +78,14 @@ "Longest matching prefix for 'c:/root/generated/src/file3' is 'c:/root/generated/src/'", "Loading 'file3' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file3'", "File 'c:/root/generated/src/file3.ts' does not exist.", + "File 'c:/root/generated/src/file3.tsx' does not exist.", "File 'c:/root/generated/src/file3.d.ts' does not exist.", + "File 'c:/root/generated/src/file3.js' does not exist.", + "File 'c:/root/generated/src/file3.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'file3' from the root dir 'c:/root/src', candidate location 'c:/root/src/file3'", "File 'c:/root/src/file3.ts' does not exist.", + "File 'c:/root/src/file3.tsx' does not exist.", "File 'c:/root/src/file3.d.ts' exist - use it as a name resolution result.", "======== Module name '../file3' was successfully resolved to 'c:/root/src/file3.d.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json index 48633c85e3b48..003f56463fb05 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json @@ -10,10 +10,14 @@ "File 'c:/root/src/project/file2.ts' does not exist.", "File 'c:/root/src/project/file2.tsx' does not exist.", "File 'c:/root/src/project/file2.d.ts' does not exist.", + "File 'c:/root/src/project/file2.js' does not exist.", + "File 'c:/root/src/project/file2.jsx' does not exist.", "File 'c:/root/src/project/file2/package.json' does not exist.", "File 'c:/root/src/project/file2/index.ts' does not exist.", "File 'c:/root/src/project/file2/index.tsx' does not exist.", "File 'c:/root/src/project/file2/index.d.ts' does not exist.", + "File 'c:/root/src/project/file2/index.js' does not exist.", + "File 'c:/root/src/project/file2/index.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'project/file2' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file2'", "Loading module as file / folder, candidate module location 'c:/root/generated/src/project/file2'.", @@ -30,48 +34,72 @@ "File 'c:/root/module3.ts' does not exist.", "File 'c:/root/module3.tsx' does not exist.", "File 'c:/root/module3.d.ts' does not exist.", + "File 'c:/root/module3.js' does not exist.", + "File 'c:/root/module3.jsx' does not exist.", "File 'c:/root/module3/package.json' does not exist.", "File 'c:/root/module3/index.ts' does not exist.", "File 'c:/root/module3/index.tsx' does not exist.", "File 'c:/root/module3/index.d.ts' does not exist.", + "File 'c:/root/module3/index.js' does not exist.", + "File 'c:/root/module3/index.jsx' does not exist.", "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module3'.", "Loading module as file / folder, candidate module location 'c:/shared/module3'.", "File 'c:/shared/module3.ts' does not exist.", "File 'c:/shared/module3.tsx' does not exist.", "File 'c:/shared/module3.d.ts' does not exist.", + "File 'c:/shared/module3.js' does not exist.", + "File 'c:/shared/module3.jsx' does not exist.", "File 'c:/shared/module3/package.json' does not exist.", "File 'c:/shared/module3/index.ts' does not exist.", "File 'c:/shared/module3/index.tsx' does not exist.", "File 'c:/shared/module3/index.d.ts' does not exist.", + "File 'c:/shared/module3/index.js' does not exist.", + "File 'c:/shared/module3/index.jsx' does not exist.", "Loading module 'module3' from 'node_modules' folder.", "File 'c:/root/src/node_modules/module3.ts' does not exist.", "File 'c:/root/src/node_modules/module3.tsx' does not exist.", "File 'c:/root/src/node_modules/module3.d.ts' does not exist.", + "File 'c:/root/src/node_modules/module3.js' does not exist.", + "File 'c:/root/src/node_modules/module3.jsx' does not exist.", "File 'c:/root/src/node_modules/module3/package.json' does not exist.", "File 'c:/root/src/node_modules/module3/index.ts' does not exist.", "File 'c:/root/src/node_modules/module3/index.tsx' does not exist.", "File 'c:/root/src/node_modules/module3/index.d.ts' does not exist.", + "File 'c:/root/src/node_modules/module3/index.js' does not exist.", + "File 'c:/root/src/node_modules/module3/index.jsx' does not exist.", "File 'c:/root/src/node_modules/@types/module3.ts' does not exist.", "File 'c:/root/src/node_modules/@types/module3.tsx' does not exist.", "File 'c:/root/src/node_modules/@types/module3.d.ts' does not exist.", + "File 'c:/root/src/node_modules/@types/module3.js' does not exist.", + "File 'c:/root/src/node_modules/@types/module3.jsx' does not exist.", "File 'c:/root/src/node_modules/@types/module3/package.json' does not exist.", "File 'c:/root/src/node_modules/@types/module3/index.ts' does not exist.", "File 'c:/root/src/node_modules/@types/module3/index.tsx' does not exist.", "File 'c:/root/src/node_modules/@types/module3/index.d.ts' does not exist.", + "File 'c:/root/src/node_modules/@types/module3/index.js' does not exist.", + "File 'c:/root/src/node_modules/@types/module3/index.jsx' does not exist.", "File 'c:/root/node_modules/module3.ts' does not exist.", "File 'c:/root/node_modules/module3.tsx' does not exist.", "File 'c:/root/node_modules/module3.d.ts' does not exist.", + "File 'c:/root/node_modules/module3.js' does not exist.", + "File 'c:/root/node_modules/module3.jsx' does not exist.", "File 'c:/root/node_modules/module3/package.json' does not exist.", "File 'c:/root/node_modules/module3/index.ts' does not exist.", "File 'c:/root/node_modules/module3/index.tsx' does not exist.", "File 'c:/root/node_modules/module3/index.d.ts' does not exist.", + "File 'c:/root/node_modules/module3/index.js' does not exist.", + "File 'c:/root/node_modules/module3/index.jsx' does not exist.", "File 'c:/root/node_modules/@types/module3.ts' does not exist.", "File 'c:/root/node_modules/@types/module3.tsx' does not exist.", "File 'c:/root/node_modules/@types/module3.d.ts' does not exist.", + "File 'c:/root/node_modules/@types/module3.js' does not exist.", + "File 'c:/root/node_modules/@types/module3.jsx' does not exist.", "File 'c:/root/node_modules/@types/module3/package.json' does not exist.", "File 'c:/root/node_modules/@types/module3/index.ts' does not exist.", "File 'c:/root/node_modules/@types/module3/index.tsx' does not exist.", "File 'c:/root/node_modules/@types/module3/index.d.ts' does not exist.", + "File 'c:/root/node_modules/@types/module3/index.js' does not exist.", + "File 'c:/root/node_modules/@types/module3/index.jsx' does not exist.", "File 'c:/node_modules/module3.ts' does not exist.", "File 'c:/node_modules/module3.tsx' does not exist.", "File 'c:/node_modules/module3.d.ts' exist - use it as a name resolution result.", @@ -87,15 +115,21 @@ "File 'c:/root/module1.ts' does not exist.", "File 'c:/root/module1.tsx' does not exist.", "File 'c:/root/module1.d.ts' does not exist.", + "File 'c:/root/module1.js' does not exist.", + "File 'c:/root/module1.jsx' does not exist.", "File 'c:/root/module1/package.json' does not exist.", "File 'c:/root/module1/index.ts' does not exist.", "File 'c:/root/module1/index.tsx' does not exist.", "File 'c:/root/module1/index.d.ts' does not exist.", + "File 'c:/root/module1/index.js' does not exist.", + "File 'c:/root/module1/index.jsx' does not exist.", "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module1'.", "Loading module as file / folder, candidate module location 'c:/shared/module1'.", "File 'c:/shared/module1.ts' does not exist.", "File 'c:/shared/module1.tsx' does not exist.", "File 'c:/shared/module1.d.ts' does not exist.", + "File 'c:/shared/module1.js' does not exist.", + "File 'c:/shared/module1.jsx' does not exist.", "File 'c:/shared/module1/package.json' does not exist.", "File 'c:/shared/module1/index.ts' does not exist.", "File 'c:/shared/module1/index.tsx' does not exist.", @@ -123,16 +157,22 @@ "File 'c:/root/generated/src/file3.ts' does not exist.", "File 'c:/root/generated/src/file3.tsx' does not exist.", "File 'c:/root/generated/src/file3.d.ts' does not exist.", + "File 'c:/root/generated/src/file3.js' does not exist.", + "File 'c:/root/generated/src/file3.jsx' does not exist.", "File 'c:/root/generated/src/file3/package.json' does not exist.", "File 'c:/root/generated/src/file3/index.ts' does not exist.", "File 'c:/root/generated/src/file3/index.tsx' does not exist.", "File 'c:/root/generated/src/file3/index.d.ts' does not exist.", + "File 'c:/root/generated/src/file3/index.js' does not exist.", + "File 'c:/root/generated/src/file3/index.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'file3' from the root dir 'c:/root/src', candidate location 'c:/root/src/file3'", "Loading module as file / folder, candidate module location 'c:/root/src/file3'.", "File 'c:/root/src/file3.ts' does not exist.", "File 'c:/root/src/file3.tsx' does not exist.", "File 'c:/root/src/file3.d.ts' does not exist.", + "File 'c:/root/src/file3.js' does not exist.", + "File 'c:/root/src/file3.jsx' does not exist.", "File 'c:/root/src/file3/package.json' does not exist.", "File 'c:/root/src/file3/index.ts' does not exist.", "File 'c:/root/src/file3/index.tsx' does not exist.", diff --git a/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json b/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json index c734e57cda24f..a541ee310ef7a 100644 --- a/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json +++ b/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json @@ -5,45 +5,69 @@ "File '/foo/bar/node_modules/xyz.ts' does not exist.", "File '/foo/bar/node_modules/xyz.tsx' does not exist.", "File '/foo/bar/node_modules/xyz.d.ts' does not exist.", + "File '/foo/bar/node_modules/xyz.js' does not exist.", + "File '/foo/bar/node_modules/xyz.jsx' does not exist.", "File '/foo/bar/node_modules/xyz/package.json' does not exist.", "File '/foo/bar/node_modules/xyz/index.ts' does not exist.", "File '/foo/bar/node_modules/xyz/index.tsx' does not exist.", "File '/foo/bar/node_modules/xyz/index.d.ts' does not exist.", + "File '/foo/bar/node_modules/xyz/index.js' does not exist.", + "File '/foo/bar/node_modules/xyz/index.jsx' does not exist.", "File '/foo/bar/node_modules/@types/xyz.ts' does not exist.", "File '/foo/bar/node_modules/@types/xyz.tsx' does not exist.", "File '/foo/bar/node_modules/@types/xyz.d.ts' does not exist.", + "File '/foo/bar/node_modules/@types/xyz.js' does not exist.", + "File '/foo/bar/node_modules/@types/xyz.jsx' does not exist.", "File '/foo/bar/node_modules/@types/xyz/package.json' does not exist.", "File '/foo/bar/node_modules/@types/xyz/index.ts' does not exist.", "File '/foo/bar/node_modules/@types/xyz/index.tsx' does not exist.", "File '/foo/bar/node_modules/@types/xyz/index.d.ts' does not exist.", + "File '/foo/bar/node_modules/@types/xyz/index.js' does not exist.", + "File '/foo/bar/node_modules/@types/xyz/index.jsx' does not exist.", "File '/foo/node_modules/xyz.ts' does not exist.", "File '/foo/node_modules/xyz.tsx' does not exist.", "File '/foo/node_modules/xyz.d.ts' does not exist.", + "File '/foo/node_modules/xyz.js' does not exist.", + "File '/foo/node_modules/xyz.jsx' does not exist.", "File '/foo/node_modules/xyz/package.json' does not exist.", "File '/foo/node_modules/xyz/index.ts' does not exist.", "File '/foo/node_modules/xyz/index.tsx' does not exist.", "File '/foo/node_modules/xyz/index.d.ts' does not exist.", + "File '/foo/node_modules/xyz/index.js' does not exist.", + "File '/foo/node_modules/xyz/index.jsx' does not exist.", "File '/foo/node_modules/@types/xyz.ts' does not exist.", "File '/foo/node_modules/@types/xyz.tsx' does not exist.", "File '/foo/node_modules/@types/xyz.d.ts' does not exist.", + "File '/foo/node_modules/@types/xyz.js' does not exist.", + "File '/foo/node_modules/@types/xyz.jsx' does not exist.", "File '/foo/node_modules/@types/xyz/package.json' does not exist.", "File '/foo/node_modules/@types/xyz/index.ts' does not exist.", "File '/foo/node_modules/@types/xyz/index.tsx' does not exist.", "File '/foo/node_modules/@types/xyz/index.d.ts' does not exist.", + "File '/foo/node_modules/@types/xyz/index.js' does not exist.", + "File '/foo/node_modules/@types/xyz/index.jsx' does not exist.", "File '/node_modules/xyz.ts' does not exist.", "File '/node_modules/xyz.tsx' does not exist.", "File '/node_modules/xyz.d.ts' does not exist.", + "File '/node_modules/xyz.js' does not exist.", + "File '/node_modules/xyz.jsx' does not exist.", "File '/node_modules/xyz/package.json' does not exist.", "File '/node_modules/xyz/index.ts' does not exist.", "File '/node_modules/xyz/index.tsx' does not exist.", "File '/node_modules/xyz/index.d.ts' does not exist.", + "File '/node_modules/xyz/index.js' does not exist.", + "File '/node_modules/xyz/index.jsx' does not exist.", "File '/node_modules/@types/xyz.ts' does not exist.", "File '/node_modules/@types/xyz.tsx' does not exist.", "File '/node_modules/@types/xyz.d.ts' does not exist.", + "File '/node_modules/@types/xyz.js' does not exist.", + "File '/node_modules/@types/xyz.jsx' does not exist.", "File '/node_modules/@types/xyz/package.json' does not exist.", "File '/node_modules/@types/xyz/index.ts' does not exist.", "File '/node_modules/@types/xyz/index.tsx' does not exist.", "File '/node_modules/@types/xyz/index.d.ts' does not exist.", + "File '/node_modules/@types/xyz/index.js' does not exist.", + "File '/node_modules/@types/xyz/index.jsx' does not exist.", "======== Module name 'xyz' was not resolved. ========", "======== Resolving module 'pdq' from '/foo/bar/a.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -51,45 +75,69 @@ "File '/foo/bar/node_modules/pdq.ts' does not exist.", "File '/foo/bar/node_modules/pdq.tsx' does not exist.", "File '/foo/bar/node_modules/pdq.d.ts' does not exist.", + "File '/foo/bar/node_modules/pdq.js' does not exist.", + "File '/foo/bar/node_modules/pdq.jsx' does not exist.", "File '/foo/bar/node_modules/pdq/package.json' does not exist.", "File '/foo/bar/node_modules/pdq/index.ts' does not exist.", "File '/foo/bar/node_modules/pdq/index.tsx' does not exist.", "File '/foo/bar/node_modules/pdq/index.d.ts' does not exist.", + "File '/foo/bar/node_modules/pdq/index.js' does not exist.", + "File '/foo/bar/node_modules/pdq/index.jsx' does not exist.", "File '/foo/bar/node_modules/@types/pdq.ts' does not exist.", "File '/foo/bar/node_modules/@types/pdq.tsx' does not exist.", "File '/foo/bar/node_modules/@types/pdq.d.ts' does not exist.", + "File '/foo/bar/node_modules/@types/pdq.js' does not exist.", + "File '/foo/bar/node_modules/@types/pdq.jsx' does not exist.", "File '/foo/bar/node_modules/@types/pdq/package.json' does not exist.", "File '/foo/bar/node_modules/@types/pdq/index.ts' does not exist.", "File '/foo/bar/node_modules/@types/pdq/index.tsx' does not exist.", "File '/foo/bar/node_modules/@types/pdq/index.d.ts' does not exist.", + "File '/foo/bar/node_modules/@types/pdq/index.js' does not exist.", + "File '/foo/bar/node_modules/@types/pdq/index.jsx' does not exist.", "File '/foo/node_modules/pdq.ts' does not exist.", "File '/foo/node_modules/pdq.tsx' does not exist.", "File '/foo/node_modules/pdq.d.ts' does not exist.", + "File '/foo/node_modules/pdq.js' does not exist.", + "File '/foo/node_modules/pdq.jsx' does not exist.", "File '/foo/node_modules/pdq/package.json' does not exist.", "File '/foo/node_modules/pdq/index.ts' does not exist.", "File '/foo/node_modules/pdq/index.tsx' does not exist.", "File '/foo/node_modules/pdq/index.d.ts' does not exist.", + "File '/foo/node_modules/pdq/index.js' does not exist.", + "File '/foo/node_modules/pdq/index.jsx' does not exist.", "File '/foo/node_modules/@types/pdq.ts' does not exist.", "File '/foo/node_modules/@types/pdq.tsx' does not exist.", "File '/foo/node_modules/@types/pdq.d.ts' does not exist.", + "File '/foo/node_modules/@types/pdq.js' does not exist.", + "File '/foo/node_modules/@types/pdq.jsx' does not exist.", "File '/foo/node_modules/@types/pdq/package.json' does not exist.", "File '/foo/node_modules/@types/pdq/index.ts' does not exist.", "File '/foo/node_modules/@types/pdq/index.tsx' does not exist.", "File '/foo/node_modules/@types/pdq/index.d.ts' does not exist.", + "File '/foo/node_modules/@types/pdq/index.js' does not exist.", + "File '/foo/node_modules/@types/pdq/index.jsx' does not exist.", "File '/node_modules/pdq.ts' does not exist.", "File '/node_modules/pdq.tsx' does not exist.", "File '/node_modules/pdq.d.ts' does not exist.", + "File '/node_modules/pdq.js' does not exist.", + "File '/node_modules/pdq.jsx' does not exist.", "File '/node_modules/pdq/package.json' does not exist.", "File '/node_modules/pdq/index.ts' does not exist.", "File '/node_modules/pdq/index.tsx' does not exist.", "File '/node_modules/pdq/index.d.ts' does not exist.", + "File '/node_modules/pdq/index.js' does not exist.", + "File '/node_modules/pdq/index.jsx' does not exist.", "File '/node_modules/@types/pdq.ts' does not exist.", "File '/node_modules/@types/pdq.tsx' does not exist.", "File '/node_modules/@types/pdq.d.ts' does not exist.", + "File '/node_modules/@types/pdq.js' does not exist.", + "File '/node_modules/@types/pdq.jsx' does not exist.", "File '/node_modules/@types/pdq/package.json' does not exist.", "File '/node_modules/@types/pdq/index.ts' does not exist.", "File '/node_modules/@types/pdq/index.tsx' does not exist.", "File '/node_modules/@types/pdq/index.d.ts' does not exist.", + "File '/node_modules/@types/pdq/index.js' does not exist.", + "File '/node_modules/@types/pdq/index.jsx' does not exist.", "======== Module name 'pdq' was not resolved. ========", "======== Resolving module 'abc' from '/foo/bar/a.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -97,45 +145,69 @@ "File '/foo/bar/node_modules/abc.ts' does not exist.", "File '/foo/bar/node_modules/abc.tsx' does not exist.", "File '/foo/bar/node_modules/abc.d.ts' does not exist.", + "File '/foo/bar/node_modules/abc.js' does not exist.", + "File '/foo/bar/node_modules/abc.jsx' does not exist.", "File '/foo/bar/node_modules/abc/package.json' does not exist.", "File '/foo/bar/node_modules/abc/index.ts' does not exist.", "File '/foo/bar/node_modules/abc/index.tsx' does not exist.", "File '/foo/bar/node_modules/abc/index.d.ts' does not exist.", + "File '/foo/bar/node_modules/abc/index.js' does not exist.", + "File '/foo/bar/node_modules/abc/index.jsx' does not exist.", "File '/foo/bar/node_modules/@types/abc.ts' does not exist.", "File '/foo/bar/node_modules/@types/abc.tsx' does not exist.", "File '/foo/bar/node_modules/@types/abc.d.ts' does not exist.", + "File '/foo/bar/node_modules/@types/abc.js' does not exist.", + "File '/foo/bar/node_modules/@types/abc.jsx' does not exist.", "File '/foo/bar/node_modules/@types/abc/package.json' does not exist.", "File '/foo/bar/node_modules/@types/abc/index.ts' does not exist.", "File '/foo/bar/node_modules/@types/abc/index.tsx' does not exist.", "File '/foo/bar/node_modules/@types/abc/index.d.ts' does not exist.", + "File '/foo/bar/node_modules/@types/abc/index.js' does not exist.", + "File '/foo/bar/node_modules/@types/abc/index.jsx' does not exist.", "File '/foo/node_modules/abc.ts' does not exist.", "File '/foo/node_modules/abc.tsx' does not exist.", "File '/foo/node_modules/abc.d.ts' does not exist.", + "File '/foo/node_modules/abc.js' does not exist.", + "File '/foo/node_modules/abc.jsx' does not exist.", "File '/foo/node_modules/abc/package.json' does not exist.", "File '/foo/node_modules/abc/index.ts' does not exist.", "File '/foo/node_modules/abc/index.tsx' does not exist.", "File '/foo/node_modules/abc/index.d.ts' does not exist.", + "File '/foo/node_modules/abc/index.js' does not exist.", + "File '/foo/node_modules/abc/index.jsx' does not exist.", "File '/foo/node_modules/@types/abc.ts' does not exist.", "File '/foo/node_modules/@types/abc.tsx' does not exist.", "File '/foo/node_modules/@types/abc.d.ts' does not exist.", + "File '/foo/node_modules/@types/abc.js' does not exist.", + "File '/foo/node_modules/@types/abc.jsx' does not exist.", "File '/foo/node_modules/@types/abc/package.json' does not exist.", "File '/foo/node_modules/@types/abc/index.ts' does not exist.", "File '/foo/node_modules/@types/abc/index.tsx' does not exist.", "File '/foo/node_modules/@types/abc/index.d.ts' does not exist.", + "File '/foo/node_modules/@types/abc/index.js' does not exist.", + "File '/foo/node_modules/@types/abc/index.jsx' does not exist.", "File '/node_modules/abc.ts' does not exist.", "File '/node_modules/abc.tsx' does not exist.", "File '/node_modules/abc.d.ts' does not exist.", + "File '/node_modules/abc.js' does not exist.", + "File '/node_modules/abc.jsx' does not exist.", "File '/node_modules/abc/package.json' does not exist.", "File '/node_modules/abc/index.ts' does not exist.", "File '/node_modules/abc/index.tsx' does not exist.", "File '/node_modules/abc/index.d.ts' does not exist.", + "File '/node_modules/abc/index.js' does not exist.", + "File '/node_modules/abc/index.jsx' does not exist.", "File '/node_modules/@types/abc.ts' does not exist.", "File '/node_modules/@types/abc.tsx' does not exist.", "File '/node_modules/@types/abc.d.ts' does not exist.", + "File '/node_modules/@types/abc.js' does not exist.", + "File '/node_modules/@types/abc.jsx' does not exist.", "File '/node_modules/@types/abc/package.json' does not exist.", "File '/node_modules/@types/abc/index.ts' does not exist.", "File '/node_modules/@types/abc/index.tsx' does not exist.", "File '/node_modules/@types/abc/index.d.ts' does not exist.", + "File '/node_modules/@types/abc/index.js' does not exist.", + "File '/node_modules/@types/abc/index.jsx' does not exist.", "======== Module name 'abc' was not resolved. ========", "======== Resolving type reference directive 'grumpy', containing file '/src/__inferred type names__.ts', root directory '/foo/node_modules/@types,/node_modules/@types'. ========", "Resolving with primary search path '/foo/node_modules/@types, /node_modules/@types'", diff --git a/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json b/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json index 7782ffc4ebf86..12a0bc0d23ab9 100644 --- a/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json +++ b/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json @@ -5,31 +5,47 @@ "File '/src/node_modules/xyz.ts' does not exist.", "File '/src/node_modules/xyz.tsx' does not exist.", "File '/src/node_modules/xyz.d.ts' does not exist.", + "File '/src/node_modules/xyz.js' does not exist.", + "File '/src/node_modules/xyz.jsx' does not exist.", "File '/src/node_modules/xyz/package.json' does not exist.", "File '/src/node_modules/xyz/index.ts' does not exist.", "File '/src/node_modules/xyz/index.tsx' does not exist.", "File '/src/node_modules/xyz/index.d.ts' does not exist.", + "File '/src/node_modules/xyz/index.js' does not exist.", + "File '/src/node_modules/xyz/index.jsx' does not exist.", "File '/src/node_modules/@types/xyz.ts' does not exist.", "File '/src/node_modules/@types/xyz.tsx' does not exist.", "File '/src/node_modules/@types/xyz.d.ts' does not exist.", + "File '/src/node_modules/@types/xyz.js' does not exist.", + "File '/src/node_modules/@types/xyz.jsx' does not exist.", "File '/src/node_modules/@types/xyz/package.json' does not exist.", "File '/src/node_modules/@types/xyz/index.ts' does not exist.", "File '/src/node_modules/@types/xyz/index.tsx' does not exist.", "File '/src/node_modules/@types/xyz/index.d.ts' does not exist.", + "File '/src/node_modules/@types/xyz/index.js' does not exist.", + "File '/src/node_modules/@types/xyz/index.jsx' does not exist.", "File '/node_modules/xyz.ts' does not exist.", "File '/node_modules/xyz.tsx' does not exist.", "File '/node_modules/xyz.d.ts' does not exist.", + "File '/node_modules/xyz.js' does not exist.", + "File '/node_modules/xyz.jsx' does not exist.", "File '/node_modules/xyz/package.json' does not exist.", "File '/node_modules/xyz/index.ts' does not exist.", "File '/node_modules/xyz/index.tsx' does not exist.", "File '/node_modules/xyz/index.d.ts' does not exist.", + "File '/node_modules/xyz/index.js' does not exist.", + "File '/node_modules/xyz/index.jsx' does not exist.", "File '/node_modules/@types/xyz.ts' does not exist.", "File '/node_modules/@types/xyz.tsx' does not exist.", "File '/node_modules/@types/xyz.d.ts' does not exist.", + "File '/node_modules/@types/xyz.js' does not exist.", + "File '/node_modules/@types/xyz.jsx' does not exist.", "File '/node_modules/@types/xyz/package.json' does not exist.", "File '/node_modules/@types/xyz/index.ts' does not exist.", "File '/node_modules/@types/xyz/index.tsx' does not exist.", "File '/node_modules/@types/xyz/index.d.ts' does not exist.", + "File '/node_modules/@types/xyz/index.js' does not exist.", + "File '/node_modules/@types/xyz/index.jsx' does not exist.", "======== Module name 'xyz' was not resolved. ========", "======== Resolving type reference directive 'foo', containing file '/src/__inferred type names__.ts', root directory '/node_modules/@types'. ========", "Resolving with primary search path '/node_modules/@types'", diff --git a/tests/baselines/reference/typingsLookup4.trace.json b/tests/baselines/reference/typingsLookup4.trace.json index 4bca8456f5846..e5ad33fd0d2d4 100644 --- a/tests/baselines/reference/typingsLookup4.trace.json +++ b/tests/baselines/reference/typingsLookup4.trace.json @@ -5,13 +5,19 @@ "File '/node_modules/jquery.ts' does not exist.", "File '/node_modules/jquery.tsx' does not exist.", "File '/node_modules/jquery.d.ts' does not exist.", + "File '/node_modules/jquery.js' does not exist.", + "File '/node_modules/jquery.jsx' does not exist.", "File '/node_modules/jquery/package.json' does not exist.", "File '/node_modules/jquery/index.ts' does not exist.", "File '/node_modules/jquery/index.tsx' does not exist.", "File '/node_modules/jquery/index.d.ts' does not exist.", + "File '/node_modules/jquery/index.js' does not exist.", + "File '/node_modules/jquery/index.jsx' does not exist.", "File '/node_modules/@types/jquery.ts' does not exist.", "File '/node_modules/@types/jquery.tsx' does not exist.", "File '/node_modules/@types/jquery.d.ts' does not exist.", + "File '/node_modules/@types/jquery.js' does not exist.", + "File '/node_modules/@types/jquery.jsx' does not exist.", "Found 'package.json' at '/node_modules/@types/jquery/package.json'.", "'package.json' has 'typings' field 'jquery.d.ts' that references '/node_modules/@types/jquery/jquery.d.ts'.", "File '/node_modules/@types/jquery/jquery.d.ts' exist - use it as a name resolution result.", @@ -23,13 +29,19 @@ "File '/node_modules/kquery.ts' does not exist.", "File '/node_modules/kquery.tsx' does not exist.", "File '/node_modules/kquery.d.ts' does not exist.", + "File '/node_modules/kquery.js' does not exist.", + "File '/node_modules/kquery.jsx' does not exist.", "File '/node_modules/kquery/package.json' does not exist.", "File '/node_modules/kquery/index.ts' does not exist.", "File '/node_modules/kquery/index.tsx' does not exist.", "File '/node_modules/kquery/index.d.ts' does not exist.", + "File '/node_modules/kquery/index.js' does not exist.", + "File '/node_modules/kquery/index.jsx' does not exist.", "File '/node_modules/@types/kquery.ts' does not exist.", "File '/node_modules/@types/kquery.tsx' does not exist.", "File '/node_modules/@types/kquery.d.ts' does not exist.", + "File '/node_modules/@types/kquery.js' does not exist.", + "File '/node_modules/@types/kquery.jsx' does not exist.", "Found 'package.json' at '/node_modules/@types/kquery/package.json'.", "'package.json' has 'typings' field 'kquery' that references '/node_modules/@types/kquery/kquery'.", "File '/node_modules/@types/kquery/kquery' does not exist.", @@ -44,13 +56,19 @@ "File '/node_modules/lquery.ts' does not exist.", "File '/node_modules/lquery.tsx' does not exist.", "File '/node_modules/lquery.d.ts' does not exist.", + "File '/node_modules/lquery.js' does not exist.", + "File '/node_modules/lquery.jsx' does not exist.", "File '/node_modules/lquery/package.json' does not exist.", "File '/node_modules/lquery/index.ts' does not exist.", "File '/node_modules/lquery/index.tsx' does not exist.", "File '/node_modules/lquery/index.d.ts' does not exist.", + "File '/node_modules/lquery/index.js' does not exist.", + "File '/node_modules/lquery/index.jsx' does not exist.", "File '/node_modules/@types/lquery.ts' does not exist.", "File '/node_modules/@types/lquery.tsx' does not exist.", "File '/node_modules/@types/lquery.d.ts' does not exist.", + "File '/node_modules/@types/lquery.js' does not exist.", + "File '/node_modules/@types/lquery.jsx' does not exist.", "Found 'package.json' at '/node_modules/@types/lquery/package.json'.", "'package.json' has 'typings' field 'lquery' that references '/node_modules/@types/lquery/lquery'.", "File '/node_modules/@types/lquery/lquery' does not exist.", @@ -68,6 +86,8 @@ "Found 'package.json' at '/node_modules/@types/kquery/package.json'.", "'package.json' has 'typings' field 'kquery' that references '/node_modules/@types/kquery/kquery'.", "File '/node_modules/@types/kquery/kquery' does not exist.", + "File '/node_modules/@types/kquery/kquery.ts' does not exist.", + "File '/node_modules/@types/kquery/kquery.tsx' does not exist.", "File '/node_modules/@types/kquery/kquery.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'kquery' was successfully resolved to '/node_modules/@types/kquery/kquery.d.ts', primary: true. ========", "======== Resolving type reference directive 'lquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", @@ -75,19 +95,6 @@ "Found 'package.json' at '/node_modules/@types/lquery/package.json'.", "'package.json' has 'typings' field 'lquery' that references '/node_modules/@types/lquery/lquery'.", "File '/node_modules/@types/lquery/lquery' does not exist.", - "File '/node_modules/@types/lquery/lquery.d.ts' does not exist.", - "File '/node_modules/@types/lquery/index.d.ts' does not exist.", - "Looking up in 'node_modules' folder, initial location '/'", - "File '/node_modules/lquery.ts' does not exist.", - "File '/node_modules/lquery.d.ts' does not exist.", - "File '/node_modules/lquery/package.json' does not exist.", - "File '/node_modules/lquery/index.ts' does not exist.", - "File '/node_modules/lquery/index.d.ts' does not exist.", - "File '/node_modules/@types/lquery.ts' does not exist.", - "File '/node_modules/@types/lquery.d.ts' does not exist.", - "Found 'package.json' at '/node_modules/@types/lquery/package.json'.", - "'package.json' has 'typings' field 'lquery' that references '/node_modules/@types/lquery/lquery'.", - "File '/node_modules/@types/lquery/lquery' does not exist.", "File '/node_modules/@types/lquery/lquery.ts' exist - use it as a name resolution result.", - "======== Type reference directive 'lquery' was successfully resolved to '/node_modules/@types/lquery/lquery.ts', primary: false. ========" + "======== Type reference directive 'lquery' was successfully resolved to '/node_modules/@types/lquery/lquery.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typingsLookupAmd.trace.json b/tests/baselines/reference/typingsLookupAmd.trace.json index 5c83757454c4b..732e990065841 100644 --- a/tests/baselines/reference/typingsLookupAmd.trace.json +++ b/tests/baselines/reference/typingsLookupAmd.trace.json @@ -2,53 +2,109 @@ "======== Resolving module 'b' from '/x/y/foo.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", "File '/x/y/b.ts' does not exist.", + "File '/x/y/b.tsx' does not exist.", "File '/x/y/b.d.ts' does not exist.", + "File '/x/y/b.js' does not exist.", + "File '/x/y/b.jsx' does not exist.", "File '/x/b.ts' does not exist.", + "File '/x/b.tsx' does not exist.", "File '/x/b.d.ts' does not exist.", + "File '/x/b.js' does not exist.", + "File '/x/b.jsx' does not exist.", "File '/b.ts' does not exist.", + "File '/b.tsx' does not exist.", "File '/b.d.ts' does not exist.", + "File '/b.js' does not exist.", + "File '/b.jsx' does not exist.", "File '/x/y/node_modules/@types/b.ts' does not exist.", + "File '/x/y/node_modules/@types/b.tsx' does not exist.", "File '/x/y/node_modules/@types/b.d.ts' does not exist.", + "File '/x/y/node_modules/@types/b.js' does not exist.", + "File '/x/y/node_modules/@types/b.jsx' does not exist.", "File '/x/y/node_modules/@types/b/package.json' does not exist.", "File '/x/y/node_modules/@types/b/index.ts' does not exist.", + "File '/x/y/node_modules/@types/b/index.tsx' does not exist.", "File '/x/y/node_modules/@types/b/index.d.ts' does not exist.", + "File '/x/y/node_modules/@types/b/index.js' does not exist.", + "File '/x/y/node_modules/@types/b/index.jsx' does not exist.", "File '/x/node_modules/@types/b.ts' does not exist.", + "File '/x/node_modules/@types/b.tsx' does not exist.", "File '/x/node_modules/@types/b.d.ts' does not exist.", + "File '/x/node_modules/@types/b.js' does not exist.", + "File '/x/node_modules/@types/b.jsx' does not exist.", "File '/x/node_modules/@types/b/package.json' does not exist.", "File '/x/node_modules/@types/b/index.ts' does not exist.", + "File '/x/node_modules/@types/b/index.tsx' does not exist.", "File '/x/node_modules/@types/b/index.d.ts' exist - use it as a name resolution result.", "======== Module name 'b' was successfully resolved to '/x/node_modules/@types/b/index.d.ts'. ========", "======== Resolving module 'a' from '/x/node_modules/@types/b/index.d.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", "File '/x/node_modules/@types/b/a.ts' does not exist.", + "File '/x/node_modules/@types/b/a.tsx' does not exist.", "File '/x/node_modules/@types/b/a.d.ts' does not exist.", + "File '/x/node_modules/@types/b/a.js' does not exist.", + "File '/x/node_modules/@types/b/a.jsx' does not exist.", "File '/x/node_modules/@types/a.ts' does not exist.", + "File '/x/node_modules/@types/a.tsx' does not exist.", "File '/x/node_modules/@types/a.d.ts' does not exist.", + "File '/x/node_modules/@types/a.js' does not exist.", + "File '/x/node_modules/@types/a.jsx' does not exist.", "File '/x/node_modules/a.ts' does not exist.", + "File '/x/node_modules/a.tsx' does not exist.", "File '/x/node_modules/a.d.ts' does not exist.", + "File '/x/node_modules/a.js' does not exist.", + "File '/x/node_modules/a.jsx' does not exist.", "File '/x/a.ts' does not exist.", + "File '/x/a.tsx' does not exist.", "File '/x/a.d.ts' does not exist.", + "File '/x/a.js' does not exist.", + "File '/x/a.jsx' does not exist.", "File '/a.ts' does not exist.", + "File '/a.tsx' does not exist.", "File '/a.d.ts' does not exist.", + "File '/a.js' does not exist.", + "File '/a.jsx' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a.ts' does not exist.", + "File '/x/node_modules/@types/b/node_modules/@types/a.tsx' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a.d.ts' does not exist.", + "File '/x/node_modules/@types/b/node_modules/@types/a.js' does not exist.", + "File '/x/node_modules/@types/b/node_modules/@types/a.jsx' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a/package.json' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a/index.ts' does not exist.", + "File '/x/node_modules/@types/b/node_modules/@types/a/index.tsx' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a/index.d.ts' does not exist.", + "File '/x/node_modules/@types/b/node_modules/@types/a/index.js' does not exist.", + "File '/x/node_modules/@types/b/node_modules/@types/a/index.jsx' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a.ts' does not exist.", + "File '/x/node_modules/@types/node_modules/@types/a.tsx' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a.d.ts' does not exist.", + "File '/x/node_modules/@types/node_modules/@types/a.js' does not exist.", + "File '/x/node_modules/@types/node_modules/@types/a.jsx' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a/package.json' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a/index.ts' does not exist.", + "File '/x/node_modules/@types/node_modules/@types/a/index.tsx' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a/index.d.ts' does not exist.", + "File '/x/node_modules/@types/node_modules/@types/a/index.js' does not exist.", + "File '/x/node_modules/@types/node_modules/@types/a/index.jsx' does not exist.", "File '/x/node_modules/@types/a.ts' does not exist.", + "File '/x/node_modules/@types/a.tsx' does not exist.", "File '/x/node_modules/@types/a.d.ts' does not exist.", + "File '/x/node_modules/@types/a.js' does not exist.", + "File '/x/node_modules/@types/a.jsx' does not exist.", "File '/x/node_modules/@types/a/package.json' does not exist.", "File '/x/node_modules/@types/a/index.ts' does not exist.", + "File '/x/node_modules/@types/a/index.tsx' does not exist.", "File '/x/node_modules/@types/a/index.d.ts' does not exist.", + "File '/x/node_modules/@types/a/index.js' does not exist.", + "File '/x/node_modules/@types/a/index.jsx' does not exist.", "File '/node_modules/@types/a.ts' does not exist.", + "File '/node_modules/@types/a.tsx' does not exist.", "File '/node_modules/@types/a.d.ts' does not exist.", + "File '/node_modules/@types/a.js' does not exist.", + "File '/node_modules/@types/a.jsx' does not exist.", "File '/node_modules/@types/a/package.json' does not exist.", "File '/node_modules/@types/a/index.ts' does not exist.", + "File '/node_modules/@types/a/index.tsx' does not exist.", "File '/node_modules/@types/a/index.d.ts' exist - use it as a name resolution result.", "======== Module name 'a' was successfully resolved to '/node_modules/@types/a/index.d.ts'. ========", "======== Resolving type reference directive 'a', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", diff --git a/tests/cases/compiler/moduleResolutionNoTs.ts b/tests/cases/compiler/moduleResolutionNoTs.ts index 2051bc259bf0e..fc92d72946432 100644 --- a/tests/cases/compiler/moduleResolutionNoTs.ts +++ b/tests/cases/compiler/moduleResolutionNoTs.ts @@ -1,3 +1,4 @@ +// @jsx: Preserve // @filename: x.ts export default 0; diff --git a/tests/cases/compiler/moduleResolutionWithExtensions_notSupported.ts b/tests/cases/compiler/moduleResolutionWithExtensions_notSupported.ts new file mode 100644 index 0000000000000..58b039ad8c2d6 --- /dev/null +++ b/tests/cases/compiler/moduleResolutionWithExtensions_notSupported.ts @@ -0,0 +1,13 @@ +// @noImplicitReferences: true +// @traceResolution: true + +// @Filename: /tsx.tsx + +// @Filename: /jsx.jsx + +// @Filename: /js.js + +// @Filename: /a.ts +import tsx from "./tsx"; +import jsx from "./jsx"; +import js from "./js"; diff --git a/tests/cases/compiler/moduleResolutionWithExtensions_notSupported2.ts b/tests/cases/compiler/moduleResolutionWithExtensions_notSupported2.ts new file mode 100644 index 0000000000000..42741fabad6c0 --- /dev/null +++ b/tests/cases/compiler/moduleResolutionWithExtensions_notSupported2.ts @@ -0,0 +1,9 @@ +// @noImplicitReferences: true +// @allowJs: true +// @traceResolution: true +// Test the error message if we have `--allowJs` but not `--jsx`. + +// @Filename: /jsx.jsx + +// @Filename: /a.ts +import jsx from "./jsx"; diff --git a/tests/cases/compiler/moduleResolutionWithExtensions_preferTs.ts b/tests/cases/compiler/moduleResolutionWithExtensions_preferTs.ts new file mode 100644 index 0000000000000..5688408b72b43 --- /dev/null +++ b/tests/cases/compiler/moduleResolutionWithExtensions_preferTs.ts @@ -0,0 +1,10 @@ +// @noImplicitReferences: true +// @traceResolution: true + +// @Filename: /b.js + +// @Filename: /b/index.ts +export default 0; + +// @Filename: /a.ts +import b from "./b"; diff --git a/tests/cases/compiler/moduleResolutionWithExtensions_withAmbientPresent.ts b/tests/cases/compiler/moduleResolutionWithExtensions_withAmbientPresent.ts new file mode 100644 index 0000000000000..b41a7e52bd8bd --- /dev/null +++ b/tests/cases/compiler/moduleResolutionWithExtensions_withAmbientPresent.ts @@ -0,0 +1,14 @@ +// @noImplicitReferences: true +// @traceResolution: true +// Allowjs is false, but this should *not* warn about the unused 'index.js' + +// @Filename: /node_modules/js/index.js + +// @Filename: /declarations.d.ts +declare module "js" { + export const x = 0; +} + +// @Filename: /a.ts +/// +import { x } from "js"; diff --git a/tests/cases/conformance/references/library-reference-11.ts b/tests/cases/conformance/references/library-reference-11.ts index 6708ceb4ab3fb..ec1de6e0e9df2 100644 --- a/tests/cases/conformance/references/library-reference-11.ts +++ b/tests/cases/conformance/references/library-reference-11.ts @@ -1,3 +1,4 @@ +// @allowJs: true // @noImplicitReferences: true // @traceResolution: true // @currentDirectory: / From 7c53a1deb28775dc0a57509d653c93dbfe41fd76 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Tue, 18 Oct 2016 14:22:43 -0700 Subject: [PATCH 05/18] Instead of getResolutionOrDiagnostic, use getResolutionDiagnostic and avoid using resolution.resolvedFileName if the diagnostic is defined. --- src/compiler/checker.ts | 10 +++++----- src/compiler/program.ts | 26 ++++++++++++-------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ebf86484c4505..aec9cbec41db8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1366,8 +1366,8 @@ namespace ts { } const resolvedModule = getResolvedModule(getSourceFileOfNode(location), moduleReference); - const resolvedOrDiagnostic = resolvedModule && getResolutionOrDiagnostic(compilerOptions, resolvedModule); - const sourceFile = typeof resolvedOrDiagnostic === "string" && resolvedModule && host.getSourceFile(resolvedModule.resolvedFileName); + const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule); + const sourceFile = resolvedModule && !resolutionDiagnostic && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { if (sourceFile.symbol) { // merged symbol is module declaration symbol combined with all augmentations @@ -1389,8 +1389,8 @@ namespace ts { if (moduleNotFoundError) { // report errors only if it was requested - if (resolvedOrDiagnostic && typeof resolvedOrDiagnostic !== "string") { - error(errorNode, resolvedOrDiagnostic.diag, moduleName, resolvedOrDiagnostic.file); + if (resolutionDiagnostic) { + error(errorNode, resolutionDiagnostic, moduleName, resolvedModule.resolvedFileName); } else { const tsExtension = tryExtractTypeScriptExtension(moduleName); @@ -8543,7 +8543,7 @@ namespace ts { // An evolving array type tracks the element types that have so far been seen in an // 'x.push(value)' or 'x[n] = value' operation along the control flow graph. Evolving // array types are ultimately converted into manifest array types (using getFinalArrayType) - // and never escape the getFlowTypeOfReference function. + // and never escape the getFlowTypeOfReference function. function createEvolvingArrayType(elementType: Type): AnonymousType { const result = createObjectType(TypeFlags.Anonymous); result.elementType = elementType; diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 43bc877bc583a..71ad88fea5ae9 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1318,10 +1318,8 @@ namespace ts { } const isFromNodeModulesSearch = resolution.isExternalLibraryImport; - const isJsFileFromNodeModules = !resolution.resolvedTsFileName; - const resolvedOrDiagnostic = getResolutionOrDiagnostic(options, resolution); - // Ignore it if it has a bad extension (e.g. 'tsx' if we don't have '--allowJs') -- this will be reported by the checker, so just return undefined for now. - const resolvedFileName = typeof resolvedOrDiagnostic === "string" ? resolvedOrDiagnostic : undefined; + const isJsFileFromNodeModules = isFromNodeModulesSearch && !resolution.resolvedTsFileName; + const resolvedFileName = resolution.resolvedFileName; if (isFromNodeModulesSearch) { currentNodeModulesDepth++; @@ -1333,7 +1331,8 @@ namespace ts { // - module name comes from the list of imports // - it's not a top level JavaScript module that exceeded the search max const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth; - const shouldAddFile = resolvedFileName && !options.noResolve && i < file.imports.length && !elideImport; + // Don't add the file if it has a bad extension (e.g. 'tsx' if we don't have '--allowJs') + const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(options, resolution) && !options.noResolve && i < file.imports.length && !elideImport; if (elideImport) { modulesWithElidedImports[file.path] = true; @@ -1580,24 +1579,23 @@ namespace ts { /* @internal */ /** - * Extracts the file name from a ResolvedModule, or returns a DiagnosticMessage if we are not set up to use that kind of file. + * Returns a DiagnosticMessage if we can't use a resolved module due to its extension. * The DiagnosticMessage's parameters are the imported module name, and the filename it resolved to. */ - export function getResolutionOrDiagnostic(options: CompilerOptions, { resolvedTsFileName: ts, resolvedJsFileName: js }: ResolvedModule): string | { file: string, diag: DiagnosticMessage } { + export function getResolutionDiagnostic(options: CompilerOptions, { resolvedTsFileName: ts, resolvedJsFileName: js }: ResolvedModule): DiagnosticMessage | undefined { if (ts) { - return !options.jsx && fileExtensionIs(ts, ".tsx") - ? { file: ts, diag: Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set } - : ts; + return !options.jsx && fileExtensionIs(ts, ".tsx") ? Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set : undefined; } else { if (!options.allowJs) { - return { file: js!, diag: Diagnostics.Module_0_was_resolved_to_1_but_allowJs_is_not_set }; + return Diagnostics.Module_0_was_resolved_to_1_but_allowJs_is_not_set; } else if (!options.jsx && fileExtensionIs(js!, ".jsx")) { - return { file: js!, diag: Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set }; + return Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set; + } + else { + return undefined; } - else - return js!; } } } From df20cf33f1e166d86a6d45df9cf776665278938b Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Wed, 19 Oct 2016 12:55:57 -0700 Subject: [PATCH 06/18] Remove "ResolvedModuleFromHost" type and just make `resolvedTsFileName` and `resolvedJsFileName` optional properties (but still automatically infer one of them to supply if the host supplied neither) --- src/compiler/types.ts | 13 +++---------- src/compiler/utilities.ts | 11 ++++++----- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index bc1a11febb14c..3e43d3ddf1052 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3302,9 +3302,9 @@ namespace ts { */ resolvedFileName: string; /** TypeScript (.d.ts, .ts, .tsx) file that the module was resolved to. This will be preferred over a JS file. */ - resolvedTsFileName: string | undefined; + resolvedTsFileName?: string; /** JavaScript (or .jsx) file that the module was resolved to. This should be returned even if '--allowJs' (or '--jsx') is disabled. */ - resolvedJsFileName: string | undefined; + resolvedJsFileName?: string; /** * Denotes if 'resolvedFileName' is isExternalLibraryImport and thus should be a proper external module: * - be a .d.ts file @@ -3314,13 +3314,6 @@ namespace ts { isExternalLibraryImport: boolean; } - /** - * For backwards compatibility, a host may choose not to return `resolvedTsFileName` and `resolvedJsFileName` from a result ResolvedModule, - * in which case they will be inferred from the file extension. - * Prefer to return a full ResolvedModule. - */ - export type ResolvedModuleFromHost = { resolvedFileName: string; isExternalLibraryImport: boolean } | ResolvedModule; - export interface ResolvedModuleWithFailedLookupLocations { resolvedModule: ResolvedModule | undefined; failedLookupLocations: string[]; @@ -3358,7 +3351,7 @@ namespace ts { * If resolveModuleNames is implemented then implementation for members from ModuleResolutionHost can be just * 'throw new Error("NotImplemented")' */ - resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModuleFromHost[]; + resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[]; /** * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files */ diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 8f00987f7edd2..cd75ca6d4d488 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -118,18 +118,19 @@ namespace ts { sourceFile.resolvedModules[moduleNameText] = resolvedModule; } - /** Host may have omitted resolvedTsFileName and resolvedJsFileName, in which case we should infer them from the file extension of resolvedFileName. */ - export function convertResolvedModuleFromHost(resolved: ResolvedModuleFromHost | undefined): ResolvedModule | undefined { + /** An older host may have omitted resolvedTsFileName and resolvedJsFileName, in which case we should infer them from the file extension of resolvedFileName. */ + export function convertResolvedModuleFromHost(resolved: ResolvedModule | undefined): ResolvedModule | undefined { if (resolved === undefined) { return undefined; } - // `resolvedTsFileName` and `resolvedJsFileName` should be present as properties even if undefined. - else if ("resolvedTsFileName" in resolved) { + // At least one of `resolevdTsFileName` or `resolvedJsFileName` should be defined. + else if (resolved.resolvedTsFileName || resolved.resolvedJsFileName) { const { resolvedFileName, resolvedTsFileName, resolvedJsFileName } = resolved as ResolvedModule; Debug.assert(resolvedFileName === (resolvedTsFileName || resolvedJsFileName)); - return resolved as ResolvedModule; + return resolved; } else { + // For backwards compatibility, if both `resolvedTsFileName` and `resolvedJsFileName` are undefined, we infer one of them to define. const { resolvedFileName, isExternalLibraryImport } = resolved; if (fileExtensionIsAny(resolvedFileName, supportedTypeScriptExtensions)) { return { resolvedFileName, resolvedTsFileName: resolvedFileName, resolvedJsFileName: undefined, isExternalLibraryImport }; From 84dc99ba1e187cb9530696349cff7f10fea5c435 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 17 Oct 2016 13:49:15 -0700 Subject: [PATCH 07/18] Moved AMD/CJS/UMD transform to end --- src/compiler/binder.ts | 21 +- src/compiler/core.ts | 9 +- src/compiler/factory.ts | 149 +++ src/compiler/transformer.ts | 9 +- src/compiler/transformers/es2015.ts | 166 +-- src/compiler/transformers/module/module.ts | 1090 ++++++++++------- src/compiler/transformers/module/system.ts | 2 +- src/compiler/transformers/ts.ts | 492 +++----- src/compiler/types.ts | 21 +- src/compiler/utilities.ts | 134 +- .../baselines/reference/ExportAssignment7.js | 1 - .../baselines/reference/ExportAssignment8.js | 1 - .../amdImportNotAsPrimaryExpression.js | 2 +- .../commonJSImportAsPrimaryExpression.js | 2 +- .../commonJSImportNotAsPrimaryExpression.js | 2 +- .../decoratedClassExportsCommonJS1.js | 4 +- .../decoratedClassExportsCommonJS2.js | 4 +- .../reference/decoratedClassExportsSystem1.js | 5 +- .../reference/decoratedClassExportsSystem2.js | 5 +- .../decoratorMetadataOnInferredType.js | 2 +- .../decoratorMetadataWithConstructorType.js | 2 +- .../reference/decoratorOnClass5.es6.js | 4 +- .../reference/decoratorOnClass6.es6.js | 4 +- .../reference/decoratorOnClass7.es6.js | 4 +- .../reference/defaultExportsCannotMerge02.js | 2 +- .../reference/defaultExportsCannotMerge04.js | 4 +- .../reference/dottedNamesInSystem.js | 2 +- .../reference/es3defaultAliasIsQuoted.js | 2 +- tests/baselines/reference/es5ExportEquals.js | 1 - .../reference/es6modulekindWithES5Target.js | 3 +- .../reference/es6modulekindWithES5Target12.js | 3 +- .../reference/exportAssignmentWithExports.js | 1 - tests/baselines/reference/exportEqualsAmd.js | 2 +- .../reference/exportEqualsCommonJs.js | 2 +- tests/baselines/reference/exportEqualsUmd.js | 2 +- tests/baselines/reference/externModule.js | 3 +- .../reference/importImportOnlyModule.js | 2 +- tests/baselines/reference/innerModExport1.js | 5 +- tests/baselines/reference/innerModExport2.js | 5 +- .../invalidModuleWithVarStatements.js | 4 +- .../moduleElementsInWrongContext3.js | 5 +- .../reference/outModuleConcatAmd.js.map | 2 +- .../outModuleConcatAmd.sourcemap.txt | 12 +- .../reference/outModuleTripleSlashRefs.js.map | 2 +- .../outModuleTripleSlashRefs.sourcemap.txt | 14 +- .../reference/parserExportAssignment7.js | 1 - .../reference/parserExportAssignment8.js | 1 - .../privacyCannotNameVarTypeDeclFile.js | 4 +- .../amd/ref/m2.js.map | 2 +- .../node/ref/m2.js.map | 2 +- .../amd/outdir/simple/ref/m2.js.map | 2 +- .../node/outdir/simple/ref/m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/bin/outAndOutDirFile.js.map | 2 +- .../amd/diskFile0.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/diskFile0.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/ref/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/ref/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m2.js.map | 2 +- .../node/ref/m2.js.map | 2 +- .../amd/outdir/simple/ref/m2.js.map | 2 +- .../node/outdir/simple/ref/m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/bin/outAndOutDirFile.js.map | 2 +- .../amd/diskFile0.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/diskFile0.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/ref/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/ref/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m2.js.map | 2 +- .../node/ref/m2.js.map | 2 +- .../amd/outdir/simple/ref/m2.js.map | 2 +- .../node/outdir/simple/ref/m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/bin/outAndOutDirFile.js.map | 2 +- .../amd/diskFile0.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/diskFile0.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/ref/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/ref/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m2.js.map | 2 +- .../node/ref/m2.js.map | 2 +- .../amd/outdir/simple/ref/m2.js.map | 2 +- .../node/outdir/simple/ref/m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/bin/outAndOutDirFile.js.map | 2 +- .../amd/diskFile0.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/diskFile0.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/ref/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/ref/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m2.js.map | 2 +- .../node/ref/m2.js.map | 2 +- .../amd/outdir/simple/ref/m2.js.map | 2 +- .../node/outdir/simple/ref/m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/bin/outAndOutDirFile.js.map | 2 +- .../amd/diskFile0.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/diskFile0.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/ref/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/ref/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m2.js.map | 2 +- .../node/ref/m2.js.map | 2 +- .../amd/outdir/simple/ref/m2.js.map | 2 +- .../node/outdir/simple/ref/m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/bin/outAndOutDirFile.js.map | 2 +- .../amd/diskFile0.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/diskFile0.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/ref/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/ref/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m2.js.map | 2 +- .../node/ref/m2.js.map | 2 +- .../amd/outdir/simple/ref/m2.js.map | 2 +- .../node/outdir/simple/ref/m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/bin/outAndOutDirFile.js.map | 2 +- .../amd/diskFile0.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/diskFile0.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/ref/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/ref/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m2.js.map | 2 +- .../node/ref/m2.js.map | 2 +- .../amd/outdir/simple/ref/m2.js.map | 2 +- .../node/outdir/simple/ref/m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/bin/outAndOutDirFile.js.map | 2 +- .../amd/diskFile0.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/diskFile0.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../ref/m1.js.map | 2 +- .../outputdir_module_multifolder/test.js.map | 2 +- .../m2.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../amd/ref/m1.js.map | 2 +- .../amd/test.js.map | 2 +- .../node/ref/m1.js.map | 2 +- .../node/test.js.map | 2 +- .../amd/outdir/simple/ref/m1.js.map | 2 +- .../amd/outdir/simple/test.js.map | 2 +- .../node/outdir/simple/ref/m1.js.map | 2 +- .../node/outdir/simple/test.js.map | 2 +- .../amd/bin/test.js.map | 2 +- .../sourceMapValidationDecorators.js.map | 2 +- ...ourceMapValidationDecorators.sourcemap.txt | 112 +- tests/baselines/reference/systemModule7.js | 2 +- .../systemModuleDeclarationMerging.js | 8 +- .../systemModuleNonTopLevelModuleMembers.js | 6 +- .../baselines/reference/tsxDefaultImports.js | 2 +- 350 files changed, 1647 insertions(+), 1296 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 4711d54e0b267..2b3584be9e0da 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -2566,9 +2566,9 @@ namespace ts { // A class with a parameter property assignment, property initializer, or decorator is // TypeScript syntax. - // An exported declaration may be TypeScript syntax. + // An exported declaration may be TypeScript syntax, but is handled by the visitor + // for a namespace declaration. if ((subtreeFlags & TransformFlags.TypeScriptClassSyntaxMask) - || (modifierFlags & ModifierFlags.Export) || node.typeParameters) { transformFlags |= TransformFlags.AssertTypeScript; } @@ -2727,11 +2727,6 @@ namespace ts { else { transformFlags = subtreeFlags | TransformFlags.ContainsHoistedDeclarationOrCompletion; - // If a FunctionDeclaration is exported, then it is either ES6 or TypeScript syntax. - if (modifierFlags & ModifierFlags.Export) { - transformFlags |= TransformFlags.AssertTypeScript | TransformFlags.AssertES2015; - } - // TypeScript-specific modifiers, type parameters, and type annotations are TypeScript // syntax. if (modifierFlags & ModifierFlags.TypeScriptModifier @@ -2873,11 +2868,6 @@ namespace ts { else { transformFlags = subtreeFlags; - // If a VariableStatement is exported, then it is either ES6 or TypeScript syntax. - if (modifierFlags & ModifierFlags.Export) { - transformFlags |= TransformFlags.AssertES2015 | TransformFlags.AssertTypeScript; - } - if (declarationListTransformFlags & TransformFlags.ContainsBindingPattern) { transformFlags |= TransformFlags.AssertES2015; } @@ -2994,12 +2984,6 @@ namespace ts { transformFlags |= TransformFlags.AssertJsx; break; - case SyntaxKind.ExportKeyword: - // This node is both ES6 and TypeScript syntax. - transformFlags |= TransformFlags.AssertES2015 | TransformFlags.AssertTypeScript; - break; - - case SyntaxKind.DefaultKeyword: case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.TemplateHead: case SyntaxKind.TemplateMiddle: @@ -3008,6 +2992,7 @@ namespace ts { case SyntaxKind.TaggedTemplateExpression: case SyntaxKind.ShorthandPropertyAssignment: case SyntaxKind.ForOfStatement: + case SyntaxKind.StaticKeyword: // These nodes are ES6 syntax. transformFlags |= TransformFlags.AssertES2015; break; diff --git a/src/compiler/core.ts b/src/compiler/core.ts index befa30b600618..1dd8ed8ff7f9a 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -485,6 +485,13 @@ namespace ts { return result; } + export function append(to: T[] | undefined, value: T | undefined): T[] | undefined { + if (value === undefined) return to; + if (to === undefined) to = []; + to.push(value); + return to; + } + export function addRange(to: T[], from: T[]): void { if (to && from) { for (const v of from) { @@ -830,7 +837,7 @@ namespace ts { * Adds the value to an array of values associated with the key, and returns the array. * Creates the array if it does not already exist. */ - export function multiMapAdd(map: Map, key: string, value: V): V[] { + export function multiMapAdd(map: Map, key: string | number, value: V): V[] { const values = map[key]; if (values) { values.push(value); diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index c42b16c5b8f3f..530d64e8aebe3 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -1461,6 +1461,17 @@ namespace ts { return node; } + /** + * Creates a synthetic element to act as a placeholder for the end of an emitted declaration in + * order to properly emit exports. + */ + export function createEndOfDeclarationMarker(original: Node) { + const node = createNode(SyntaxKind.EndOfDeclarationMarker); + node.emitNode = {}; + node.original = original; + return node; + } + /** * Creates a synthetic expression to act as a placeholder for a not-emitted expression in * order to preserve comments or sourcemap positions. @@ -1637,6 +1648,18 @@ namespace ts { ); } + export function createExportDefault(expression: Expression) { + return createExportAssignment(/*decorators*/ undefined, /*modifiers*/ undefined, /*isExportEquals*/ false, expression); + } + + export function createExternalModuleExport(exportName: Identifier) { + return createExportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, createNamedExports([createExportSpecifier(exportName)])); + } + + export function createLetStatement(name: Identifier, initializer: Expression, location?: TextRange) { + return createVariableStatement(/*modifiers*/ undefined, createLetDeclarationList([createVariableDeclaration(name, /*type*/ undefined, initializer)]), location); + } + export function createLetDeclarationList(declarations: VariableDeclaration[], location?: TextRange) { return createVariableDeclarationList(declarations, location, NodeFlags.Let); } @@ -2165,6 +2188,132 @@ namespace ts { ); } + /** + * Gets the local name of a declaration. This is primarily used for declarations that can be + * referred to by name in the declaration's immediate scope (classes, enums, namespaces). A + * local name will *never* be prefixed with an module or namespace export modifier like + * "exports." when emitted as an expression. + * + * @param node The declaration. + * @param allowComments A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + */ + export function getLocalName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean) { + return getName(node, allowComments, allowSourceMaps, EmitFlags.LocalName); + } + + /** + * Gets whether an identifier should only be referred to by its local name. + */ + export function isLocalName(node: Identifier) { + return (getEmitFlags(node) & EmitFlags.ExportBindingName) === EmitFlags.LocalName; + } + + /** + * Gets the export name of a declaration. This is primarily used for declarations that can be + * referred to by name in the declaration's immediate scope (classes, enums, namespaces). An + * export name will *always* be prefixed with an module or namespace export modifier like + * `"exports."` when emitted as an expression if the name points to an exported symbol. + * + * @param node The declaration. + * @param allowComments A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + */ + export function getExportName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier { + return getName(node, allowComments, allowSourceMaps, EmitFlags.ExportName); + } + + /** + * Gets whether an identifier should only be referred to by its export representation if the + * name points to an exported symbol. + */ + export function isExportName(node: Identifier) { + return (getEmitFlags(node) & EmitFlags.ExportBindingName) === EmitFlags.ExportName; + } + + /** + * Gets the export binding name of a declaration for use in the left-hand side of assignment + * expressions. This is primarily used for declarations that can be referred to by name in the + * declaration's immediate scope (classes, enums, namespaces). If the declaration is exported + * and the name is the target of an assignment expression, its export binding name should be + * substituted with an expression that assigns *both* the local *and* export names of the + * declaration. If an export binding name appears in any other position it should be treated + * as a local name. + * + * @param node The declaration. + * @param allowComments A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + */ + export function getExportBindingName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier { + return getName(node, allowComments, allowSourceMaps, EmitFlags.ExportBindingName); + } + + /** + * Gets whether an identifier should be treated as both an export name and a local name when + * it is the target of an assignment expression. + */ + export function isExportBindingName(node: Identifier) { + return (getEmitFlags(node) & EmitFlags.ExportBindingName) === EmitFlags.ExportBindingName; + } + + /** + * Gets the name of a declaration for use in declarations. + * + * @param node The declaration. + * @param allowComments A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + */ + export function getDeclarationName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean) { + return getName(node, allowComments, allowSourceMaps); + } + + function getName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean, emitFlags?: EmitFlags) { + if (node.name && isIdentifier(node.name) && !isGeneratedIdentifier(node.name)) { + const name = getMutableClone(node.name); + emitFlags |= getEmitFlags(node.name); + if (!allowSourceMaps) emitFlags |= EmitFlags.NoSourceMap; + if (!allowComments) emitFlags |= EmitFlags.NoComments; + if (emitFlags) setEmitFlags(name, emitFlags); + return name; + } + return getGeneratedNameForNode(node); + } + + /** + * Gets the exported name of a declaration for use in expressions. + * + * An exported name will *always* be prefixed with an module or namespace export modifier like + * "exports." if the name points to an exported symbol. + * + * @param ns The namespace identifier. + * @param node The declaration. + * @param allowComments A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + */ + export function getExternalModuleOrNamespaceExportName(ns: Identifier | undefined, node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier | PropertyAccessExpression { + if (ns && hasModifier(node, ModifierFlags.Export)) { + return getNamespaceMemberName(ns, getName(node), allowComments, allowSourceMaps); + } + return getExportName(node, allowComments, allowSourceMaps); + } + + /** + * Gets a namespace-qualified name for use in expressions. + * + * @param ns The namespace identifier. + * @param name The name. + * @param allowComments A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + */ + export function getNamespaceMemberName(ns: Identifier, name: Identifier, allowComments?: boolean, allowSourceMaps?: boolean): PropertyAccessExpression { + const qualifiedName = createPropertyAccess(ns, nodeIsSynthesized(name) ? name : getSynthesizedClone(name), /*location*/ name); + let emitFlags: EmitFlags; + if (!allowSourceMaps) emitFlags |= EmitFlags.NoSourceMap; + if (!allowComments) emitFlags |= EmitFlags.NoComments; + if (emitFlags) setEmitFlags(qualifiedName, emitFlags); + return qualifiedName; + } + // Utilities function isUseStrictPrologue(node: ExpressionStatement): boolean { diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 82e1843b70bbe..08ff4a55a1a65 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -111,7 +111,10 @@ namespace ts { const transformers: Transformer[] = []; transformers.push(transformTypeScript); - transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ModuleKind.None]); + + if (moduleKind === ModuleKind.System) { + transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ModuleKind.None]); + } if (jsx === JsxEmit.React) { transformers.push(transformJsx); @@ -130,6 +133,10 @@ namespace ts { transformers.push(transformGenerators); } + if (moduleKind !== ModuleKind.System) { + transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ModuleKind.None]); + } + if (languageVersion < ScriptTarget.ES5) { transformers.push(transformES5); } diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 22203876df400..8d158cd665eb5 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -308,8 +308,8 @@ namespace ts { function visitJavaScript(node: Node): VisitResult { switch (node.kind) { - case SyntaxKind.ExportKeyword: - return node; + case SyntaxKind.StaticKeyword: + return undefined; // elide static keyword case SyntaxKind.ClassDeclaration: return visitClassDeclaration(node); @@ -584,47 +584,41 @@ namespace ts { // return C; // }()); - const modifierFlags = getModifierFlags(node); - const isExported = modifierFlags & ModifierFlags.Export; - const isDefault = modifierFlags & ModifierFlags.Default; + const variable = createVariableDeclaration( + getDeclarationName(node, /*allowComments*/ true), + /*type*/ undefined, + transformClassLikeDeclarationToExpression(node) + ); - // Add an `export` modifier to the statement if needed (for `--target es5 --module es6`) - const modifiers = isExported && !isDefault - ? filter(node.modifiers, isExportModifier) - : undefined; + setOriginalNode(variable, node); - const statement = createVariableStatement( - modifiers, - createVariableDeclarationList([ - createVariableDeclaration( - getDeclarationName(node, /*allowComments*/ true), - /*type*/ undefined, - transformClassLikeDeclarationToExpression(node) - ) - ]), - /*location*/ node - ); + const statements: Statement[] = []; + const statement = createVariableStatement(/*modifiers*/ undefined, createVariableDeclarationList([variable]), /*location*/ node); setOriginalNode(statement, node); startOnNewLine(statement); + statements.push(statement); // Add an `export default` statement for default exports (for `--target es5 --module es6`) - if (isExported && isDefault) { - const statements: Statement[] = [statement]; - statements.push(createExportAssignment( - /*decorators*/ undefined, - /*modifiers*/ undefined, - /*isExportEquals*/ false, - getDeclarationName(node, /*allowComments*/ false) - )); - return statements; + if (hasModifier(node, ModifierFlags.Export)) { + if (hasModifier(node, ModifierFlags.Default)) { + const exportStatement = createExportDefault(getLocalName(node)); + setOriginalNode(exportStatement, statement); + statements.push(exportStatement); + } + else { + statements.push(createExternalModuleExport(getLocalName(node))); + } } - return statement; - } + const emitFlags = getEmitFlags(node); + if ((emitFlags & EmitFlags.HasEndOfDeclarationMarker) === 0) { + // Add a DeclarationMarker as a marker for the end of the declaration + statements.push(createEndOfDeclarationMarker(node)); + setEmitFlags(statement, emitFlags | EmitFlags.HasEndOfDeclarationMarker); + } - function isExportModifier(node: Modifier) { - return node.kind === SyntaxKind.ExportKeyword; + return singleOrMany(statements); } /** @@ -1984,13 +1978,16 @@ namespace ts { statements.push( createVariableStatement( /*modifiers*/ undefined, - createVariableDeclarationList([ - createVariableDeclaration( - firstOriginalDeclaration ? firstOriginalDeclaration.name : createTempVariable(/*recordTempVariable*/ undefined), - /*type*/ undefined, - createElementAccess(rhsReference, counter) - ) - ], /*location*/ moveRangePos(initializer, -1)), + setOriginalNode( + createVariableDeclarationList([ + createVariableDeclaration( + firstOriginalDeclaration ? firstOriginalDeclaration.name : createTempVariable(/*recordTempVariable*/ undefined), + /*type*/ undefined, + createElementAccess(rhsReference, counter) + ) + ], /*location*/ moveRangePos(initializer, -1)), + initializer + ), /*location*/ moveRangeEnd(initializer, -1) ) ); @@ -2052,10 +2049,13 @@ namespace ts { setEmitFlags(body, EmitFlags.NoSourceMap | EmitFlags.NoTokenSourceMaps); const forStatement = createFor( - createVariableDeclarationList([ - createVariableDeclaration(counter, /*type*/ undefined, createLiteral(0), /*location*/ moveRangePos(node.expression, -1)), - createVariableDeclaration(rhsReference, /*type*/ undefined, expression, /*location*/ node.expression) - ], /*location*/ node.expression), + setEmitFlags( + createVariableDeclarationList([ + createVariableDeclaration(counter, /*type*/ undefined, createLiteral(0), /*location*/ moveRangePos(node.expression, -1)), + createVariableDeclaration(rhsReference, /*type*/ undefined, expression, /*location*/ node.expression) + ], /*location*/ node.expression), + EmitFlags.NoHoisting + ), createLessThan( counter, createPropertyAccess(rhsReference, "length"), @@ -2247,25 +2247,28 @@ namespace ts { const convertedLoopVariable = createVariableStatement( /*modifiers*/ undefined, - createVariableDeclarationList( - [ - createVariableDeclaration( - functionName, - /*type*/ undefined, - setEmitFlags( - createFunctionExpression( - /*modifiers*/ undefined, - isAsyncBlockContainingAwait ? createToken(SyntaxKind.AsteriskToken) : undefined, - /*name*/ undefined, - /*typeParameters*/ undefined, - loopParameters, - /*type*/ undefined, - loopBody - ), - loopBodyFlags + setEmitFlags( + createVariableDeclarationList( + [ + createVariableDeclaration( + functionName, + /*type*/ undefined, + setEmitFlags( + createFunctionExpression( + /*modifiers*/ undefined, + isAsyncBlockContainingAwait ? createToken(SyntaxKind.AsteriskToken) : undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + loopParameters, + /*type*/ undefined, + loopBody + ), + loopBodyFlags + ) ) - ) - ] + ] + ), + EmitFlags.NoHoisting ) ); @@ -3192,45 +3195,6 @@ namespace ts { return node; } - /** - * Gets the local name for a declaration for use in expressions. - * - * A local name will *never* be prefixed with an module or namespace export modifier like - * "exports.". - * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. - */ - function getLocalName(node: ClassDeclaration | ClassExpression | FunctionDeclaration, allowComments?: boolean, allowSourceMaps?: boolean) { - return getDeclarationName(node, allowComments, allowSourceMaps, EmitFlags.LocalName); - } - - /** - * Gets the name of a declaration, without source map or comments. - * - * @param node The declaration. - * @param allowComments Allow comments for the name. - */ - function getDeclarationName(node: ClassDeclaration | ClassExpression | FunctionDeclaration, allowComments?: boolean, allowSourceMaps?: boolean, emitFlags?: EmitFlags) { - if (node.name && !isGeneratedIdentifier(node.name)) { - const name = getMutableClone(node.name); - emitFlags |= getEmitFlags(node.name); - if (!allowSourceMaps) { - emitFlags |= EmitFlags.NoSourceMap; - } - if (!allowComments) { - emitFlags |= EmitFlags.NoComments; - } - if (emitFlags) { - setEmitFlags(name, emitFlags); - } - return name; - } - - return getGeneratedNameForNode(node); - } - function getClassMemberPrefix(node: ClassExpression | ClassDeclaration, member: ClassElement) { const expression = getLocalName(node); return hasModifier(member, ModifierFlags.Static) ? expression : createPropertyAccess(expression, "prototype"); diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index 51b03b43c94da..2d8a513cc8845 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -26,22 +26,19 @@ namespace ts { const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(SyntaxKind.Identifier); - context.enableSubstitution(SyntaxKind.BinaryExpression); - context.enableSubstitution(SyntaxKind.PrefixUnaryExpression); - context.enableSubstitution(SyntaxKind.PostfixUnaryExpression); - context.enableSubstitution(SyntaxKind.ShorthandPropertyAssignment); - context.enableEmitNotification(SyntaxKind.SourceFile); - - let currentSourceFile: SourceFile; - let externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]; - let exportSpecifiers: Map; - let exportEquals: ExportAssignment; - let bindingNameExportSpecifiersMap: Map; - // Subset of exportSpecifiers that is a binding-name. - // This is to reduce amount of memory we have to keep around even after we done with module-transformer - const bindingNameExportSpecifiersForFileMap = createMap>(); - let hasExportStarsToExportValues: boolean; + context.enableSubstitution(SyntaxKind.Identifier); // Substitutes expression identifiers with imported/exported symbols. + context.enableSubstitution(SyntaxKind.BinaryExpression); // Substitutes assignments to exported symbols. + context.enableSubstitution(SyntaxKind.PrefixUnaryExpression); // Substitutes updates to exported symbols. + context.enableSubstitution(SyntaxKind.PostfixUnaryExpression); // Substitutes updates to exported symbols. + context.enableSubstitution(SyntaxKind.ShorthandPropertyAssignment); // Substitutes shorthand property assignments for imported/exported symbols. + context.enableEmitNotification(SyntaxKind.SourceFile); // Restore state when substituting nodes in a file. + + const moduleInfoMap = createMap(); // The ExternalModuleInfo for each file. + const deferredExports = createMap(); // Exports to defer until an EndOfDeclarationMarker is found. + + let currentSourceFile: SourceFile; // The current file. + let currentModuleInfo: ExternalModuleInfo; // The ExternalModuleInfo for the current file. + let noSubstitution: Map; // Set of nodes for which substitution rules should be ignored. return transformSourceFile; @@ -57,9 +54,7 @@ namespace ts { if (isExternalModule(node) || compilerOptions.isolatedModules) { currentSourceFile = node; - - // Collect information about the external module. - ({ externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues } = collectExternalModuleInfo(node)); + currentModuleInfo = moduleInfoMap[getOriginalNodeId(node)] = collectExternalModuleInfo(node, resolver); // Perform the transformation. const transformModule = transformModuleDelegates[moduleKind] || transformModuleDelegates[ModuleKind.None]; @@ -67,10 +62,7 @@ namespace ts { aggregateTransformFlags(updated); currentSourceFile = undefined; - externalImports = undefined; - exportSpecifiers = undefined; - exportEquals = undefined; - hasExportStarsToExportValues = false; + currentModuleInfo = undefined; return updated; } @@ -92,7 +84,7 @@ namespace ts { addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false); const updated = updateSourceFileNode(node, createNodeArray(statements, node.statements)); - if (hasExportStarsToExportValues) { + if (currentModuleInfo.hasExportStarsToExportValues) { setEmitFlags(updated, EmitFlags.EmitExportStar | getEmitFlags(node)); } @@ -158,43 +150,43 @@ namespace ts { // define(moduleName?, ["module1", "module2"], function ... return updateSourceFileNode(node, createNodeArray( [ - createStatement( - createCall( - define, - /*typeArguments*/ undefined, - [ - // Add the module name (if provided). - ...(moduleName ? [moduleName] : []), - - // Add the dependency array argument: - // - // ["require", "exports", module1", "module2", ...] - createArrayLiteral([ - createLiteral("require"), - createLiteral("exports"), - ...aliasedModuleNames, - ...unaliasedModuleNames - ]), - - // Add the module body function argument: - // - // function (require, exports, module1, module2) ... - createFunctionExpression( - /*modifiers*/ undefined, - /*asteriskToken*/ undefined, - /*name*/ undefined, - /*typeParameters*/ undefined, - [ + createStatement( + createCall( + define, + /*typeArguments*/ undefined, + [ + // Add the module name (if provided). + ...(moduleName ? [moduleName] : []), + + // Add the dependency array argument: + // + // ["require", "exports", module1", "module2", ...] + createArrayLiteral([ + createLiteral("require"), + createLiteral("exports"), + ...aliasedModuleNames, + ...unaliasedModuleNames + ]), + + // Add the module body function argument: + // + // function (require, exports, module1, module2) ... + createFunctionExpression( + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + [ createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"), createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports"), - ...importAliasNames - ], - /*type*/ undefined, - transformAsynchronousModuleBody(node) - ) - ] + ...importAliasNames + ], + /*type*/ undefined, + transformAsynchronousModuleBody(node) + ) + ] + ) ) - ) ], /*location*/ node.statements) ); @@ -222,7 +214,7 @@ namespace ts { addExportEqualsIfNeeded(statements, /*emitAsReturn*/ true); const body = createBlock(statements, /*location*/ undefined, /*multiLine*/ true); - if (hasExportStarsToExportValues) { + if (currentModuleInfo.hasExportStarsToExportValues) { // If we have any `export * from ...` declarations // we need to inform the emitter to add the __export helper. setEmitFlags(body, EmitFlags.EmitExportStar); @@ -231,35 +223,6 @@ namespace ts { return body; } - function addExportEqualsIfNeeded(statements: Statement[], emitAsReturn: boolean) { - if (exportEquals) { - if (emitAsReturn) { - const statement = createReturn( - exportEquals.expression, - /*location*/ exportEquals - ); - - setEmitFlags(statement, EmitFlags.NoTokenSourceMaps | EmitFlags.NoComments); - statements.push(statement); - } - else { - const statement = createStatement( - createAssignment( - createPropertyAccess( - createIdentifier("module"), - "exports" - ), - exportEquals.expression - ), - /*location*/ exportEquals - ); - - setEmitFlags(statement, EmitFlags.NoComments); - statements.push(statement); - } - } - } - /** * Visits a node at the top level of the source file. * @@ -288,8 +251,11 @@ namespace ts { case SyntaxKind.ClassDeclaration: return visitClassDeclaration(node); - case SyntaxKind.ExpressionStatement: - return visitExpressionStatement(node); + case SyntaxKind.NotEmittedStatement: + return visitNotEmittedStatement(node); + + case SyntaxKind.EndOfDeclarationMarker: + return visitEndOfDeclarationMarker(node); default: // This visitor does not descend into the tree, as export/import statements @@ -299,26 +265,33 @@ namespace ts { } /** - * Visits an ImportDeclaration node. + * Visits a modifier. * - * @param node The ImportDeclaration node. + * @param node The modifier. */ - function visitImportDeclaration(node: ImportDeclaration): VisitResult { - if (!contains(externalImports, node)) { - return undefined; + function modifierVisitor(node: Node): VisitResult { + // Elide module-specific modifiers. + switch (node.kind) { + case SyntaxKind.ExportKeyword: + case SyntaxKind.DefaultKeyword: + return undefined; } - const statements: Statement[] = []; + return node; + } + + /** + * Visits an ImportDeclaration node. + * + * @param node The ImportDeclaration node + */ + function visitImportDeclaration(node: ImportDeclaration): VisitResult { + let statements: Statement[]; const namespaceDeclaration = getNamespaceDeclarationNode(node); if (moduleKind !== ModuleKind.AMD) { if (!node.importClause) { // import "mod"; - statements.push( - createStatement( - createRequireCall(node), - /*location*/ node - ) - ); + return createStatement(createRequireCall(node), /*location*/ node); } else { const variables: VariableDeclaration[] = []; @@ -356,10 +329,14 @@ namespace ts { } } - statements.push( + statements = append(statements, createVariableStatement( /*modifiers*/ undefined, - createConstDeclarationList(variables), + createVariableDeclarationList( + variables, + /*location*/ undefined, + languageVersion >= ScriptTarget.ES2015 ? NodeFlags.Const : NodeFlags.None + ), /*location*/ node ) ); @@ -367,37 +344,41 @@ namespace ts { } else if (namespaceDeclaration && isDefaultImport(node)) { // import d, * as n from "mod"; - statements.push( + statements = append(statements, createVariableStatement( /*modifiers*/ undefined, - createVariableDeclarationList([ - createVariableDeclaration( - getSynthesizedClone(namespaceDeclaration.name), - /*type*/ undefined, - getGeneratedNameForNode(node), - /*location*/ node - ) - ]) + createVariableDeclarationList( + [ + createVariableDeclaration( + getSynthesizedClone(namespaceDeclaration.name), + /*type*/ undefined, + getGeneratedNameForNode(node), + /*location*/ node + ) + ], + /*location*/ undefined, + languageVersion >= ScriptTarget.ES2015 ? NodeFlags.Const : NodeFlags.None + ) ) ); } - addExportImportAssignments(statements, node); + statements = appendExportsOfImportDeclaration(statements, node); return singleOrMany(statements); } + /** + * Visits an ImportEqualsDeclaration node. + * + * @param node The ImportEqualsDeclaration node + */ function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): VisitResult { - if (!contains(externalImports, node)) { - return undefined; - } + Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); - // Set emitFlags on the name of the importEqualsDeclaration - // This is so the printer will not substitute the identifier - setEmitFlags(node.name, EmitFlags.NoSubstitution); - const statements: Statement[] = []; + let statements: Statement[]; if (moduleKind !== ModuleKind.AMD) { if (hasModifier(node, ModifierFlags.Export)) { - statements.push( + statements = append(statements, createStatement( createExportAssignment( node.name, @@ -408,18 +389,20 @@ namespace ts { ); } else { - statements.push( + statements = append(statements, createVariableStatement( /*modifiers*/ undefined, - createVariableDeclarationList([ - createVariableDeclaration( - getSynthesizedClone(node.name), - /*type*/ undefined, - createRequireCall(node) - ) - ], - /*location*/ undefined, - /*flags*/ languageVersion >= ScriptTarget.ES2015 ? NodeFlags.Const : NodeFlags.None), + createVariableDeclarationList( + [ + createVariableDeclaration( + getSynthesizedClone(node.name), + /*type*/ undefined, + createRequireCall(node) + ) + ], + /*location*/ undefined, + /*flags*/ languageVersion >= ScriptTarget.ES2015 ? NodeFlags.Const : NodeFlags.None + ), /*location*/ node ) ); @@ -427,21 +410,35 @@ namespace ts { } else { if (hasModifier(node, ModifierFlags.Export)) { - statements.push( + statements = append(statements, createStatement( - createExportAssignment(node.name, node.name), + createExportAssignment(getExportName(node), getLocalName(node)), /*location*/ node ) ); } } - addExportImportAssignments(statements, node); - return statements; + if (hasAssociatedEndOfDeclarationMarker(node)) { + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfImportEqualsDeclaration(deferredExports[id], node); + } + else { + statements = appendExportsOfImportEqualsDeclaration(statements, node); + } + + return singleOrMany(statements); } + /** + * Visits an ExportDeclaration node. + * + * @param The ExportDeclaration node + */ function visitExportDeclaration(node: ExportDeclaration): VisitResult { - if (!contains(externalImports, node)) { + if (!node.moduleSpecifier) { + // Elide export declarations with no module specifier as they are handled + // elsewhere. return undefined; } @@ -471,7 +468,7 @@ namespace ts { ); statements.push( createStatement( - createExportAssignment(specifier.name, exportedValue), + createExportAssignment(getExportName(specifier), exportedValue), /*location*/ specifier ) ); @@ -496,189 +493,87 @@ namespace ts { } } + /** + * Visits an ExportAssignment node. + * + * @param node The ExportAssignment node + */ function visitExportAssignment(node: ExportAssignment): VisitResult { if (node.isExportEquals) { - // Elide as `export=` is handled in addExportEqualsIfNeeded return undefined; } - const statements: Statement[] = []; - addExportDefault(statements, node.expression, /*location*/ node); - return statements; - } - - function addExportDefault(statements: Statement[], expression: Expression, location: TextRange): void { - tryAddExportDefaultCompat(statements); - - statements.push( - createStatement( - createExportAssignment( - createIdentifier("default"), - expression - ), - location - ) - ); - } - - function tryAddExportDefaultCompat(statements: Statement[]) { - const original = getOriginalNode(currentSourceFile); - Debug.assert(original.kind === SyntaxKind.SourceFile); - - if (!original.symbol.exports["___esModule"]) { - if (languageVersion === ScriptTarget.ES3) { - statements.push( - createStatement( - createExportAssignment( - createIdentifier("__esModule"), - createLiteral(true) - ) - ) - ); - } - else { - statements.push( - createStatement( - createCall( - createPropertyAccess(createIdentifier("Object"), "defineProperty"), - /*typeArguments*/ undefined, - [ - createIdentifier("exports"), - createLiteral("__esModule"), - createObjectLiteral([ - createPropertyAssignment("value", createLiteral(true)) - ]) - ] - ) - ) - ); - } - } - } - - function addExportImportAssignments(statements: Statement[], node: ImportEqualsDeclaration | ImportDeclaration) { - if (isImportEqualsDeclaration(node)) { - addExportMemberAssignments(statements, node.name); + let statements: Statement[]; + const original = node.original; + if (original && hasAssociatedEndOfDeclarationMarker(original)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportStatement(deferredExports[id], createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true); } else { - const names = reduceEachChild(node, collectExportMembers, []); - for (const name of names) { - addExportMemberAssignments(statements, name); - } + statements = appendExportStatement(statements, createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true); } - } - function collectExportMembers(names: Identifier[], node: Node): Identifier[] { - if (isAliasSymbolDeclaration(node) && isDeclaration(node)) { - const name = node.name; - if (isIdentifier(name)) { - names.push(name); - } - } - - return reduceEachChild(node, collectExportMembers, names); - } - - function addExportMemberAssignments(statements: Statement[], name: Identifier): void { - if (!exportEquals && exportSpecifiers && hasProperty(exportSpecifiers, name.text)) { - for (const specifier of exportSpecifiers[name.text]) { - statements.push( - startOnNewLine( - createStatement( - createExportAssignment(specifier.name, name), - /*location*/ specifier.name - ) - ) - ); - } - } - } - - function addExportMemberAssignment(statements: Statement[], node: DeclarationStatement) { - if (hasModifier(node, ModifierFlags.Default)) { - addExportDefault(statements, getDeclarationName(node), /*location*/ node); - } - else { - statements.push( - createExportStatement(node.name, setEmitFlags(getSynthesizedClone(node.name), EmitFlags.LocalName), /*location*/ node) - ); - } + return singleOrMany(statements); } + /** + * Visits a VariableStatement. + * + * @param node A VariableStatement node. + */ function visitVariableStatement(node: VariableStatement): VisitResult { - // If the variable is for a generated declaration, - // we should maintain it and just strip off the 'export' modifier if necessary. - const originalKind = getOriginalNode(node).kind; - if (originalKind === SyntaxKind.ModuleDeclaration || - originalKind === SyntaxKind.EnumDeclaration || - originalKind === SyntaxKind.ClassDeclaration) { - - if (!hasModifier(node, ModifierFlags.Export)) { - return node; - } + let statements: Statement[]; + let variables: VariableDeclaration[]; + let expressions: Expression[]; + if (hasModifier(node, ModifierFlags.Export)) { + let modifiers: NodeArray; + + // If we're exporting these variables, then these just become assignments to 'exports.x'. + // We only want to emit assignments for variables with initializers. + for (const variable of node.declarationList.declarations) { + if (isIdentifier(variable.name) && isLocalName(variable.name)) { + if (!modifiers) { + modifiers = visitNodes(node.modifiers, modifierVisitor, isModifier); + } - return setOriginalNode( - createVariableStatement( - /*modifiers*/ undefined, - node.declarationList - ), - node - ); - } + variables = append(variables, variable); + } + else if (variable.initializer) { + expressions = append(expressions, transformInitializedVariable(variable)); + } + } - const resultStatements: Statement[] = []; + if (variables) { + statements = append(statements, updateVariableStatement(node, modifiers, updateVariableDeclarationList(node.declarationList, variables))); + } - // If we're exporting these variables, then these just become assignments to 'exports.blah'. - // We only want to emit assignments for variables with initializers. - if (hasModifier(node, ModifierFlags.Export)) { - const variables = getInitializedVariables(node.declarationList); - if (variables.length > 0) { - const inlineAssignments = createStatement( - inlineExpressions( - map(variables, transformInitializedVariable) - ), - node - ); - resultStatements.push(inlineAssignments); + if (expressions) { + statements = append(statements, createStatement(inlineExpressions(expressions), /*location*/ node)); } } else { - resultStatements.push(node); + statements = append(statements, node); } - // While we might not have been exported here, each variable might have been exported - // later on in an export specifier (e.g. `export {foo as blah, bar}`). - for (const decl of node.declarationList.declarations) { - addExportMemberAssignmentsForBindingName(resultStatements, decl.name); + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node); + } + else { + statements = appendExportsOfVariableStatement(statements, node); } - return resultStatements; + // statements = addExportsOfVariableStatement(statements, node); + return singleOrMany(statements); } /** - * Creates appropriate assignments for each binding identifier that is exported in an export specifier, - * and inserts it into 'resultStatements'. + * Transforms an exported variable with an initializer into an expression. + * + * @param node The variable to transform. */ - function addExportMemberAssignmentsForBindingName(resultStatements: Statement[], name: BindingName): void { - if (isBindingPattern(name)) { - for (const element of name.elements) { - if (!isOmittedExpression(element)) { - addExportMemberAssignmentsForBindingName(resultStatements, element.name); - } - } - } - else { - if (!exportEquals && exportSpecifiers && hasProperty(exportSpecifiers, name.text)) { - const sourceFileId = getOriginalNodeId(currentSourceFile); - if (!bindingNameExportSpecifiersForFileMap[sourceFileId]) { - bindingNameExportSpecifiersForFileMap[sourceFileId] = createMap(); - } - bindingNameExportSpecifiersForFileMap[sourceFileId][name.text] = exportSpecifiers[name.text]; - addExportMemberAssignments(resultStatements, name); - } - } - } - function transformInitializedVariable(node: VariableDeclaration): Expression { const name = node.name; if (isBindingPattern(name)) { @@ -686,31 +581,32 @@ namespace ts { context, node, hoistVariableDeclaration, - getModuleMemberName, - visitor + getModuleMemberName ); } else { return createAssignment( getModuleMemberName(name), - visitNode(node.initializer, visitor, isExpression) + node.initializer ); } } + /** + * Visits a FunctionDeclaration. + * + * @param node A FunctionDeclaration node. + */ function visitFunctionDeclaration(node: FunctionDeclaration): VisitResult { - const statements: Statement[] = []; - const name = node.name || getGeneratedNameForNode(node); + let statements: Statement[]; if (hasModifier(node, ModifierFlags.Export)) { - // Keep async modifier for ES2017 transformer - const isAsync = hasModifier(node, ModifierFlags.Async); - statements.push( + statements = append(statements, setOriginalNode( createFunctionDeclaration( /*decorators*/ undefined, - isAsync ? [createNode(SyntaxKind.AsyncKeyword)] : undefined, + visitNodes(node.modifiers, modifierVisitor, isModifier), node.asteriskToken, - name, + getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true), /*typeParameters*/ undefined, node.parameters, /*type*/ undefined, @@ -720,30 +616,37 @@ namespace ts { /*original*/ node ) ); - - addExportMemberAssignment(statements, node); } else { - statements.push(node); + statements = append(statements, node); } - if (node.name) { - addExportMemberAssignments(statements, node.name); + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node); + } + else { + statements = appendExportsOfHoistedDeclaration(statements, node); } return singleOrMany(statements); } + /** + * Visits a ClassDeclaration. + * + * @param node A ClassDeclaration node. + */ function visitClassDeclaration(node: ClassDeclaration): VisitResult { - const statements: Statement[] = []; - const name = node.name || getGeneratedNameForNode(node); + let statements: Statement[]; if (hasModifier(node, ModifierFlags.Export)) { - statements.push( + statements = append(statements, setOriginalNode( createClassDeclaration( /*decorators*/ undefined, - /*modifiers*/ undefined, - name, + visitNodes(node.modifiers, modifierVisitor, isModifier), + getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true), /*typeParameters*/ undefined, node.heritageClauses, node.members, @@ -752,78 +655,333 @@ namespace ts { /*original*/ node ) ); - - addExportMemberAssignment(statements, node); } else { - statements.push(node); + statements = append(statements, node); } - // Decorators end up creating a series of assignment expressions which overwrite - // the local binding that we export, so we need to defer from exporting decorated classes - // until the decoration assignments take place. We do this when visiting expression-statements. - if (node.name && !(node.decorators && node.decorators.length)) { - addExportMemberAssignments(statements, node.name); + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node); + } + else { + statements = appendExportsOfHoistedDeclaration(statements, node); } return singleOrMany(statements); } - function visitExpressionStatement(node: ExpressionStatement): VisitResult { - const original = getOriginalNode(node); - const origKind = original.kind; + /** + * Visits a NotEmittedStatement. + * + * @param node A NotEmittedStatement node. + */ + function visitNotEmittedStatement(node: NotEmittedStatement): VisitResult { + // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding + // declaration we do not emit a leading variable declaration. To preserve the + // begin/end semantics of the declararation and to properly handle exports + // we wrap the leading variable declaration in a `NotEmittedStatement`. + // + // To balance the declaration, add the exports of the elided variable + // statement. + if (hasAssociatedEndOfDeclarationMarker(node.original) && node.original.kind === SyntaxKind.VariableStatement) { + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); + } + + return node; + } + + /** + * Visits a DeclarationMarker used as a placeholder for the end of a transformed declaration. + * + * @param node A DeclarationMarker node. + */ + function visitEndOfDeclarationMarker(node: EndOfDeclarationMarker): VisitResult { + // For some transformations we emit an `EndOfDeclarationMarker` to mark the actual + // end of the transformed declaration. We use this marker to emit any deferred exports + // of the declaration. + const id = getOriginalNodeId(node); + const statements = deferredExports[id]; + if (statements) { + delete deferredExports[id]; + return append(statements, node); + } + + return node; + } - if (origKind === SyntaxKind.EnumDeclaration || origKind === SyntaxKind.ModuleDeclaration) { - return visitExpressionStatementForEnumOrNamespaceDeclaration(node, original); + /** + * Appends the exports of an ImportDeclaration to a statement list, returning the + * statement list. + * + * If `statements` is `undefined`, a new array is allocated if statements are appended. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. + * @param decl The declaration whose exports are to be recorded. + */ + function appendExportsOfImportDeclaration(statements: Statement[] | undefined, decl: ImportDeclaration): Statement[] | undefined { + if (currentModuleInfo.exportEquals) { + return statements; } - else if (origKind === SyntaxKind.ClassDeclaration) { - // The decorated assignment for a class name may need to be transformed. - const classDecl = original as ClassDeclaration; - if (classDecl.name) { - const statements = [node]; - addExportMemberAssignments(statements, classDecl.name); - return statements; + + const importClause = decl.importClause; + if (importClause) { + if (importClause.name) { + statements = appendExportsOfDeclaration(statements, importClause); + } + + const namedBindings = importClause.namedBindings; + if (namedBindings) { + switch (namedBindings.kind) { + case SyntaxKind.NamespaceImport: + statements = appendExportsOfDeclaration(statements, namedBindings); + break; + + case SyntaxKind.NamedImports: + for (const importBinding of namedBindings.elements) { + statements = appendExportsOfDeclaration(statements, importBinding); + } + + break; + } } } - return node; + return statements; } - function visitExpressionStatementForEnumOrNamespaceDeclaration(node: ExpressionStatement, original: EnumDeclaration | ModuleDeclaration): VisitResult { - const statements: Statement[] = [node]; + /** + * Appends the exports of an ImportEqualsDeclaration to a statement list, returning the + * statement list. + * + * If `statements` is `undefined`, a new array is allocated if statements are appended. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. + * @param decl The declaration whose exports are to be recorded. + */ + function appendExportsOfImportEqualsDeclaration(statements: Statement[] | undefined, decl: ImportEqualsDeclaration): Statement[] | undefined { + if (currentModuleInfo.exportEquals) { + return statements; + } + return appendExportsOfDeclaration(statements, decl); + } - addExportMemberAssignments(statements, original.name); + /** + * Appends the exports of a VariableStatement to a statement list, returning the statement + * list. + * + * If `statements` is `undefined`, a new array is allocated if statements are appended. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. + * @param node The VariableStatement whose exports are to be recorded. + */ + function appendExportsOfVariableStatement(statements: Statement[] | undefined, node: VariableStatement): Statement[] | undefined { + if (currentModuleInfo.exportEquals) { + return statements; + } + + for (const decl of node.declarationList.declarations) { + statements = appendExportsOfBindingElement(statements, decl); + } return statements; } /** - * Adds a trailing VariableStatement for an enum or module declaration. + * Appends the exports of a VariableDeclaration or BindingElement to a statement list, + * returning the statement list. + * + * If `statements` is `undefined`, a new array is allocated if statements are appended. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. + * @param decl The declaration whose exports are to be recorded. */ - function addVarForExportedEnumOrNamespaceDeclaration(statements: Statement[], node: EnumDeclaration | ModuleDeclaration) { - const transformedStatement = createVariableStatement( - /*modifiers*/ undefined, - [createVariableDeclaration( - getDeclarationName(node), - /*type*/ undefined, - createPropertyAccess(createIdentifier("exports"), getDeclarationName(node)) - )], - /*location*/ node - ); - setEmitFlags(transformedStatement, EmitFlags.NoComments); - statements.push(transformedStatement); + function appendExportsOfBindingElement(statements: Statement[] | undefined, decl: VariableDeclaration | BindingElement): Statement[] | undefined { + if (currentModuleInfo.exportEquals) { + return statements; + } + + if (isBindingPattern(decl.name)) { + for (const element of decl.name.elements) { + if (!isOmittedExpression(element)) { + statements = appendExportsOfBindingElement(statements, element); + } + } + } + else if (!isGeneratedIdentifier(decl.name)) { + statements = appendExportsOfDeclaration(statements, decl); + } + + return statements; + } + + /** + * Appends the exports of a ClassDeclaration or FunctionDeclaration to a statement list, + * returning the statement list. + * + * If `statements` is `undefined`, a new array is allocated if statements are appended. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. + * @param decl The declaration whose exports are to be recorded. + */ + function appendExportsOfHoistedDeclaration(statements: Statement[] | undefined, decl: ClassDeclaration | FunctionDeclaration): Statement[] | undefined { + if (currentModuleInfo.exportEquals) { + return statements; + } + + if (hasModifier(decl, ModifierFlags.Export)) { + const exportName = hasModifier(decl, ModifierFlags.Default) ? createIdentifier("default") : decl.name; + statements = appendExportStatement(statements, exportName, getLocalName(decl), /*location*/ decl); + } + + if (decl.name) { + statements = appendExportsOfDeclaration(statements, decl); + } + + return statements; + } + + /** + * Appends the exports of a declaration to a statement list, returning the statement list. + * + * If `statements` is `undefined`, a new array is allocated if statements are appended. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. + * @param decl The declaration to export. + */ + function appendExportsOfDeclaration(statements: Statement[] | undefined, decl: Declaration): Statement[] | undefined { + const name = getDeclarationName(decl); + const exportSpecifiers = currentModuleInfo.exportSpecifiers[name.text]; + if (exportSpecifiers) { + for (const exportSpecifier of exportSpecifiers) { + statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name); + } + } + return statements; } - function getDeclarationName(node: DeclarationStatement) { - return node.name ? getSynthesizedClone(node.name) : getGeneratedNameForNode(node); + /** + * Appends the down-level representation of an export to a statement list, returning the + * statement list. + * + * If `statements` is `undefined`, a new array is allocated if statements are appended. + * + * @param statements The statement list to modify. + * @param exportName The name of the export. + * @param expression The expression to export. + * @param location The location to use for source maps and comments for the export. + * @param allowComments Whether to allow comments on the export. + */ + function appendExportStatement(statements: Statement[] | undefined, exportName: Identifier, expression: Expression, location?: TextRange, allowComments?: boolean): Statement[] | undefined { + if (exportName.text === "default") { + const sourceFile = getOriginalNode(currentSourceFile, isSourceFile); + if (sourceFile && !sourceFile.symbol.exports["___esModule"]) { + if (languageVersion === ScriptTarget.ES3) { + statements = append(statements, + createStatement( + createExportAssignment( + createIdentifier("__esModule"), + createLiteral(true) + ) + ) + ); + } + else { + statements = append(statements, + createStatement( + createCall( + createPropertyAccess(createIdentifier("Object"), "defineProperty"), + /*typeArguments*/ undefined, + [ + createIdentifier("exports"), + createLiteral("__esModule"), + createObjectLiteral([ + createPropertyAssignment("value", createLiteral(true)) + ]) + ] + ) + ) + ); + } + } + } + + statements = append(statements, createExportStatement(exportName, expression, location, allowComments)); + return statements; } + /** + * Adds the down-level representation of `export=` to the statement list if one exists + * in the source file. + * + * @param statements The Statement list to modify. + * @param emitAsReturn A value indicating whether to emit the `export=` statement as a + * return statement. + */ + function addExportEqualsIfNeeded(statements: Statement[], emitAsReturn: boolean) { + if (currentModuleInfo.exportEquals) { + if (emitAsReturn) { + const statement = createReturn( + currentModuleInfo.exportEquals.expression, + /*location*/ currentModuleInfo.exportEquals + ); + + setEmitFlags(statement, EmitFlags.NoTokenSourceMaps | EmitFlags.NoComments); + statements.push(statement); + } + else { + const statement = createStatement( + createAssignment( + createPropertyAccess( + createIdentifier("module"), + "exports" + ), + currentModuleInfo.exportEquals.expression + ), + /*location*/ currentModuleInfo.exportEquals + ); + + setEmitFlags(statement, EmitFlags.NoComments); + statements.push(statement); + } + } + } + + /** + * Determines whether a node has an associated EndDeclarationMarker. + * + * @param node The node to test. + */ + function hasAssociatedEndOfDeclarationMarker(node: Node) { + return (getEmitFlags(node) & EmitFlags.HasEndOfDeclarationMarker) !== 0; + } + + /** + * Hook for node emit. + * + * @param node The node to emit. + * @param emitCallback A callback used to emit the node in the printer. + */ function onEmitNode(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void { if (node.kind === SyntaxKind.SourceFile) { - bindingNameExportSpecifiersMap = bindingNameExportSpecifiersForFileMap[getOriginalNodeId(node)]; + currentSourceFile = node; + currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; + noSubstitution = createMap(); + previousOnEmitNode(emitContext, node, emitCallback); - bindingNameExportSpecifiersMap = undefined; + + currentSourceFile = undefined; + currentModuleInfo = undefined; + noSubstitution = undefined; } else { previousOnEmitNode(emitContext, node, emitCallback); @@ -839,15 +997,26 @@ namespace ts { */ function onSubstituteNode(emitContext: EmitContext, node: Node) { node = previousOnSubstituteNode(emitContext, node); + if (node.id && noSubstitution[node.id]) { + return node; + } + if (emitContext === EmitContext.Expression) { return substituteExpression(node); } else if (isShorthandPropertyAssignment(node)) { return substituteShorthandPropertyAssignment(node); } + return node; } + /** + * Substitution for a ShorthandPropertyAssignment whose declaration name is an imported + * or exported symbol. + * + * @param node A ShorthandPropertyAssignment + */ function substituteShorthandPropertyAssignment(node: ShorthandPropertyAssignment): ObjectLiteralElementLike { const name = node.name; const exportedOrImportedName = substituteExpressionIdentifier(name); @@ -863,6 +1032,11 @@ namespace ts { return node; } + /** + * Substitution for an Expression that may contain an imported or exported symbol. + * + * @param node An Expression + */ function substituteExpression(node: Expression) { switch (node.kind) { case SyntaxKind.Identifier: @@ -877,101 +1051,147 @@ namespace ts { return node; } + /** + * Substitution for an Identifier expression that may contain an imported or exported symbol. + * + * @param node An Identifier expression + */ function substituteExpressionIdentifier(node: Identifier): Expression { - return trySubstituteExportedName(node) - || trySubstituteImportedName(node) - || node; - } + const emitFlags = getEmitFlags(node); + if ((emitFlags & EmitFlags.LocalName) === 0) { + const exportContainer = resolver.getReferencedExportContainer(node, (emitFlags & EmitFlags.ExportName) !== 0); + if (exportContainer && exportContainer.kind === SyntaxKind.SourceFile) { + return createPropertyAccess( + createIdentifier("exports"), + getSynthesizedClone(node), + /*location*/ node + ); + } - function substituteBinaryExpression(node: BinaryExpression): Expression { - const left = node.left; - // If the left-hand-side of the binaryExpression is an identifier and its is export through export Specifier - if (isIdentifier(left) && isAssignmentOperator(node.operatorToken.kind)) { - if (bindingNameExportSpecifiersMap && hasProperty(bindingNameExportSpecifiersMap, left.text)) { - setEmitFlags(node, EmitFlags.NoSubstitution); - let nestedExportAssignment: BinaryExpression; - for (const specifier of bindingNameExportSpecifiersMap[left.text]) { - nestedExportAssignment = nestedExportAssignment ? - createExportAssignment(specifier.name, nestedExportAssignment) : - createExportAssignment(specifier.name, node); + const importDeclaration = resolver.getReferencedImportDeclaration(node); + if (importDeclaration) { + if (isImportClause(importDeclaration)) { + return createPropertyAccess( + getGeneratedNameForNode(importDeclaration.parent), + createIdentifier("default"), + /*location*/ node + ); + } + else if (isImportSpecifier(importDeclaration)) { + const name = importDeclaration.propertyName || importDeclaration.name; + return createPropertyAccess( + getGeneratedNameForNode(importDeclaration.parent.parent.parent), + getSynthesizedClone(name), + /*location*/ node + ); } - return nestedExportAssignment; } } return node; } - function substituteUnaryExpression(node: PrefixUnaryExpression | PostfixUnaryExpression): Expression { - // Because how the compiler only parse plusplus and minusminus to be either prefixUnaryExpression or postFixUnaryExpression depended on where they are - // We don't need to check that the operator has SyntaxKind.plusplus or SyntaxKind.minusminus - const operator = node.operator; - const operand = node.operand; - if (isIdentifier(operand) && bindingNameExportSpecifiersForFileMap) { - if (bindingNameExportSpecifiersMap && hasProperty(bindingNameExportSpecifiersMap, operand.text)) { - setEmitFlags(node, EmitFlags.NoSubstitution); - let transformedUnaryExpression: BinaryExpression; - if (node.kind === SyntaxKind.PostfixUnaryExpression) { - transformedUnaryExpression = createBinary( - operand, - createToken(operator === SyntaxKind.PlusPlusToken ? SyntaxKind.PlusEqualsToken : SyntaxKind.MinusEqualsToken), - createLiteral(1), - /*location*/ node - ); - // We have to set no substitution flag here to prevent visit the binary expression and substitute it again as we will preform all necessary substitution in here - setEmitFlags(transformedUnaryExpression, EmitFlags.NoSubstitution); - } - let nestedExportAssignment: BinaryExpression; - for (const specifier of bindingNameExportSpecifiersMap[operand.text]) { - nestedExportAssignment = nestedExportAssignment ? - createExportAssignment(specifier.name, nestedExportAssignment) : - createExportAssignment(specifier.name, transformedUnaryExpression || node); + /** + * Substitution for a BinaryExpression that may contain an imported or exported symbol. + * + * @param node A BinaryExpression + */ + function substituteBinaryExpression(node: BinaryExpression): Expression { + // When we see an assignment expression whose left-hand side is an exported symbol, + // we should ensure all exports of that symbol are updated with the correct value. + // + // - We do not substitute generated identifiers for any reason. + // - We do not substitute identifiers tagged with the LocalName flag. + // - We do not substitute identifiers that were originally the name of an enum or + // namespace due to how they are transformed in TypeScript. + // - We only substitute identifiers that are exported at the top level. + if (isAssignmentOperator(node.operatorToken.kind) + && isIdentifier(node.left) + && !isGeneratedIdentifier(node.left) + && !isLocalName(node.left) + && !isDeclarationNameOfEnumOrNamespace(node.left)) { + const exportedNames = getExportsOfName(node.left); + if (exportedNames) { + // Since we will be reusing this node as part of the substitution, we + // mark it to prevent triggering this rule again. + noSubstitution[getNodeId(node)] = true; + + let expression: Expression = node; + for (const exportName of exportedNames) { + expression = createExportAssignment(exportName, expression); + + // Mark the transformed node to prevent possibly triggering this rule + // again. + noSubstitution[getNodeId(expression)] = true; } - return nestedExportAssignment; + + return expression; } } + return node; } - function trySubstituteExportedName(node: Identifier) { - const emitFlags = getEmitFlags(node); - if ((emitFlags & EmitFlags.LocalName) === 0) { - const container = resolver.getReferencedExportContainer(node, (emitFlags & EmitFlags.ExportName) !== 0); - if (container) { - if (container.kind === SyntaxKind.SourceFile) { - return createPropertyAccess( - createIdentifier("exports"), - getSynthesizedClone(node), - /*location*/ node - ); + /** + * Substitution for a UnaryExpression that may contain an imported or exported symbol. + * + * @param node A UnaryExpression. + */ + function substituteUnaryExpression(node: PrefixUnaryExpression | PostfixUnaryExpression): Expression { + // When we see a prefix or postfix increment expression whose operand is an exported + // symbol, we should ensure all exports of that symbol are updated with the correct + // value. + // + // - We do not substitute generated identifiers for any reason. + // - We do not substitute identifiers tagged with the LocalName flag. + // - We do not substitute identifiers that were originally the name of an enum or + // namespace due to how they are transformed in TypeScript. + // - We only substitute identifiers that are exported at the top level. + if (isIdentifier(node.operand) + && !isGeneratedIdentifier(node.operand) + && !isLocalName(node.operand) + && !isDeclarationNameOfEnumOrNamespace(node.operand)) { + const exportedNames = getExportsOfName(node.operand); + if (exportedNames) { + let expression = node.kind === SyntaxKind.PostfixUnaryExpression + ? createBinary( + node.operand, + createToken(node.operator === SyntaxKind.PlusPlusToken ? SyntaxKind.PlusEqualsToken : SyntaxKind.MinusEqualsToken), + createLiteral(1), + /*location*/ node) + : node; + + // Since we will be reusing this node as part of the substitution, we + // mark it to prevent triggering this rule again. + noSubstitution[getNodeId(expression)] = true; + + for (const exportName of exportedNames) { + expression = createExportAssignment(exportName, expression); + // Mark the transformed node to prevent triggering the assignment + // expression substitution in `substituteBinaryExpression`. + noSubstitution[getNodeId(expression)] = true; } + + return expression; } } - return undefined; + return node; } - function trySubstituteImportedName(node: Identifier): Expression { - if ((getEmitFlags(node) & EmitFlags.LocalName) === 0) { - const declaration = resolver.getReferencedImportDeclaration(node); - if (declaration) { - if (isImportClause(declaration)) { - return createPropertyAccess( - getGeneratedNameForNode(declaration.parent), - createIdentifier("default"), - /*location*/ node - ); - } - else if (isImportSpecifier(declaration)) { - const name = declaration.propertyName || declaration.name; - return createPropertyAccess( - getGeneratedNameForNode(declaration.parent.parent.parent), - getSynthesizedClone(name), - /*location*/ node - ); - } + /** + * Gets the exports of a name. + * + * @param name The name. + */ + function getExportsOfName(name: Identifier): Identifier[] | undefined { + if (!isGeneratedIdentifier(name)) { + const valueDeclaration = resolver.getReferencedImportDeclaration(name) + || resolver.getReferencedValueDeclaration(name); + if (valueDeclaration) { + return currentModuleInfo + && currentModuleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]; } } - return undefined; } function getModuleMemberName(name: Identifier) { @@ -992,11 +1212,11 @@ namespace ts { return createCall(createIdentifier("require"), /*typeArguments*/ undefined, args); } - function createExportStatement(name: Identifier, value: Expression, location?: TextRange) { - const statement = createStatement(createExportAssignment(name, value)); - statement.startsOnNewLine = true; - if (location) { - setSourceMapRange(statement, location); + function createExportStatement(name: Identifier, value: Expression, location?: TextRange, allowComments?: boolean) { + const statement = createStatement(createExportAssignment(name, value), location); + startOnNewLine(statement); + if (!allowComments) { + setEmitFlags(statement, EmitFlags.NoComments); } return statement; @@ -1041,7 +1261,7 @@ namespace ts { } } - for (const importNode of externalImports) { + for (const importNode of currentModuleInfo.externalImports) { // Find the name of the external module const externalModuleName = getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions); diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index acd25a41a090f..8bea1e3d28a3c 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -90,7 +90,7 @@ namespace ts { Debug.assert(!exportFunctionForFile); // Collect information about the external module and dependency groups. - ({ externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues } = collectExternalModuleInfo(node)); + ({ externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues } = collectExternalModuleInfo(node, resolver)); // Make sure that the name of the 'exports' function does not conflict with // existing identifiers. diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index fdb3f7b208d9a..0e1821159bec0 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -241,6 +241,18 @@ namespace ts { } } + function modifierVisitor(node: Node): VisitResult { + if (modifierToFlag(node.kind) & ModifierFlags.TypeScriptModifier) { + return undefined; + } + else if (currentNamespace && node.kind === SyntaxKind.ExportKeyword) { + return undefined; + } + + return node; + } + + /** * Branching visitor, visits a TypeScript syntax node. * @@ -535,7 +547,6 @@ namespace ts { const staticProperties = getInitializedProperties(node, /*isStatic*/ true); const hasExtendsClause = getClassExtendsHeritageClauseElement(node) !== undefined; const isDecoratedClass = shouldEmitDecorateCallForClass(node); - let classAlias: Identifier; // emit name if // - node has a name @@ -546,33 +557,11 @@ namespace ts { name = getGeneratedNameForNode(node); } - const statements: Statement[] = []; - if (!isDecoratedClass) { - // ${modifiers} class ${name} ${heritageClauses} { - // ${members} - // } - const classDeclaration = createClassDeclaration( - /*decorators*/ undefined, - visitNodes(node.modifiers, visitor, isModifier), - name, - /*typeParameters*/ undefined, - visitNodes(node.heritageClauses, visitor, isHeritageClause), - transformClassMembers(node, hasExtendsClause), - /*location*/ node - ); - setOriginalNode(classDeclaration, node); + const classStatement = isDecoratedClass + ? createClassDeclarationHeadWithDecorators(node, name, hasExtendsClause) + : createClassDeclarationHeadWithoutDecorators(node, name, hasExtendsClause, staticProperties.length > 0); - // To better align with the old emitter, we should not emit a trailing source map - // entry if the class has static properties. - if (staticProperties.length > 0) { - setEmitFlags(classDeclaration, EmitFlags.NoTrailingSourceMap | getEmitFlags(classDeclaration)); - } - - statements.push(classDeclaration); - } - else { - classAlias = addClassDeclarationHeadWithDecorators(statements, node, name, hasExtendsClause); - } + const statements: Statement[] = [classStatement]; // Emit static property assignment. Because classDeclaration is lexically evaluated, // it is safe to emit static property assignment after classDeclaration @@ -580,13 +569,13 @@ namespace ts { // HasLexicalDeclaration (N) : Determines if the argument identifier has a binding in this environment record that was created using // a lexical declaration such as a LexicalDeclaration or a ClassDeclaration. if (staticProperties.length) { - addInitializedPropertyStatements(statements, node, staticProperties, getLocalName(node, /*noSourceMaps*/ true)); + addInitializedPropertyStatements(statements, node, staticProperties, getLocalName(node)); } // Write any decorators of the node. addClassElementDecorationStatements(statements, node, /*isStatic*/ false); addClassElementDecorationStatements(statements, node, /*isStatic*/ true); - addConstructorDecorationStatement(statements, node, classAlias); + addConstructorDecorationStatement(statements, node); // If the class is exported as part of a TypeScript namespace, emit the namespace export. // Otherwise, if the class was exported at the top level and was decorated, emit an export @@ -596,18 +585,54 @@ namespace ts { } else if (isDecoratedClass) { if (isDefaultExternalModuleExport(node)) { - statements.push(createExportAssignment( - /*decorators*/ undefined, - /*modifiers*/ undefined, - /*isExportEquals*/ false, - getLocalName(node))); + statements.push(createExportDefault(getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true))); } else if (isNamedExternalModuleExport(node)) { - statements.push(createExternalModuleExport(name)); + statements.push(createExternalModuleExport(getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true))); } } - return statements; + if (statements.length > 1) { + // Add a DeclarationMarker as a marker for the end of the declaration + statements.push(createEndOfDeclarationMarker(node)); + setEmitFlags(classStatement, getEmitFlags(classStatement) | EmitFlags.HasEndOfDeclarationMarker); + } + + return singleOrMany(statements); + } + + /** + * Transforms a non-decorated class declaration and appends the resulting statements. + * + * @param node A ClassDeclaration node. + * @param name The name of the class. + * @param hasExtendsClause A value indicating whether the class has an extends clause. + * @param hasStaticProperties A value indicating whether the class has static properties. + */ + function createClassDeclarationHeadWithoutDecorators(node: ClassDeclaration, name: Identifier, hasExtendsClause: boolean, hasStaticProperties: boolean) { + // ${modifiers} class ${name} ${heritageClauses} { + // ${members} + // } + const classDeclaration = createClassDeclaration( + /*decorators*/ undefined, + visitNodes(node.modifiers, modifierVisitor, isModifier), + name, + /*typeParameters*/ undefined, + visitNodes(node.heritageClauses, visitor, isHeritageClause), + transformClassMembers(node, hasExtendsClause), + node); + + let emitFlags = getEmitFlags(node); + + // To better align with the old emitter, we should not emit a trailing source map + // entry if the class has static properties. + if (hasStaticProperties) { + emitFlags |= EmitFlags.NoTrailingSourceMap; + } + + setOriginalNode(classDeclaration, node); + setEmitFlags(classDeclaration, emitFlags); + return classDeclaration; } /** @@ -619,7 +644,7 @@ namespace ts { * @param name The name of the class. * @param hasExtendsClause A value indicating whether the class has an extends clause. */ - function addClassDeclarationHeadWithDecorators(statements: Statement[], node: ClassDeclaration, name: Identifier, hasExtendsClause: boolean) { + function createClassDeclarationHeadWithDecorators(node: ClassDeclaration, name: Identifier, hasExtendsClause: boolean) { // When we emit an ES6 class that has a class decorator, we must tailor the // emit to certain specific cases. // @@ -654,20 +679,20 @@ namespace ts { // --------------------------------------------------------------------- // TypeScript | Javascript // --------------------------------------------------------------------- - // @dec | let C_1 = class C { + // @dec | let C = C_1 = class C { // class C { | static x() { return C_1.y; } // static x() { return C.y; } | } - // static y = 1; | let C = C_1; - // } | C.y = 1; - // | C = C_1 = __decorate([dec], C); + // static y = 1; | C.y = 1; + // } | C = C_1 = __decorate([dec], C); + // | var C_1; // --------------------------------------------------------------------- - // @dec | let C_1 = class C { + // @dec | let C = class C { // export class C { | static x() { return C_1.y; } // static x() { return C.y; } | } - // static y = 1; | let C = C_1; - // } | C.y = 1; - // | C = C_1 = __decorate([dec], C); + // static y = 1; | C.y = 1; + // } | C = C_1 = __decorate([dec], C); // | export { C }; + // | var C_1; // --------------------------------------------------------------------- // // If a class declaration is the default export of a module, we instead emit @@ -696,92 +721,34 @@ namespace ts { // --------------------------------------------------------------------- // TypeScript | Javascript // --------------------------------------------------------------------- - // @dec | let C_1 = class C { + // @dec | let C = class C { // export default class C { | static x() { return C_1.y; } // static x() { return C.y; } | } - // static y = 1; | let C = C_1; - // } | C.y = 1; - // | C = C_1 = __decorate([dec], C); + // static y = 1; | C.y = 1; + // } | C = C_1 = __decorate([dec], C); // | export default C; + // | var C_1; // --------------------------------------------------------------------- // const location = moveRangePastDecorators(node); + const classAlias = getClassAliasIfNeeded(node); + const declName = getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); // ... = class ${name} ${heritageClauses} { // ${members} // } - const classExpression: Expression = setOriginalNode( - createClassExpression( - /*modifiers*/ undefined, - name, - /*typeParameters*/ undefined, - visitNodes(node.heritageClauses, visitor, isHeritageClause), - transformClassMembers(node, hasExtendsClause), - /*location*/ location - ), - node - ); - - if (!name) { - name = getGeneratedNameForNode(node); - } - - // Record an alias to avoid class double-binding. - let classAlias: Identifier; - if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.ClassWithConstructorReference) { - enableSubstitutionForClassAliases(); - classAlias = createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? node.name.text : "default"); - classAliases[getOriginalNodeId(node)] = classAlias; - } - - const declaredName = getDeclarationName(node, /*allowComments*/ true); + const heritageClauses = visitNodes(node.heritageClauses, visitor, isHeritageClause); + const members = transformClassMembers(node, hasExtendsClause); + const classExpression = createClassExpression(/*modifiers*/ undefined, name, /*typeParameters*/ undefined, heritageClauses, members, location); + setOriginalNode(classExpression, node); // let ${name} = ${classExpression} where name is either declaredName if the class doesn't contain self-reference // or decoratedClassAlias if the class contain self-reference. - const transformedClassExpression = createVariableStatement( - /*modifiers*/ undefined, - createLetDeclarationList([ - createVariableDeclaration( - classAlias || declaredName, - /*type*/ undefined, - classExpression - ) - ]), - /*location*/ location - ); - setCommentRange(transformedClassExpression, node); - statements.push( - setOriginalNode( - /*node*/ transformedClassExpression, - /*original*/ node - ) - ); - - if (classAlias) { - // We emit the class alias as a `let` declaration here so that it has the same - // TDZ as the class. - - // let ${declaredName} = ${decoratedClassAlias} - statements.push( - setOriginalNode( - createVariableStatement( - /*modifiers*/ undefined, - createLetDeclarationList([ - createVariableDeclaration( - declaredName, - /*type*/ undefined, - classAlias - ) - ]), - /*location*/ location - ), - /*original*/ node - ) - ); - } - - return classAlias; + const statement = createLetStatement(declName, classAlias ? createAssignment(classAlias, classExpression) : classExpression, location); + setOriginalNode(statement, node); + setCommentRange(statement, node); + return statement; } /** @@ -992,7 +959,7 @@ namespace ts { statements, /*location*/ constructor ? constructor.body.statements : node.members ), - /*location*/ constructor ? constructor.body : undefined + /*location*/ constructor ? constructor.body : /*location*/ undefined ), true ); @@ -1472,8 +1439,8 @@ namespace ts { * * @param node The class node. */ - function addConstructorDecorationStatement(statements: Statement[], node: ClassDeclaration, decoratedClassAlias: Identifier) { - const expression = generateConstructorDecorationExpression(node, decoratedClassAlias); + function addConstructorDecorationStatement(statements: Statement[], node: ClassDeclaration) { + const expression = generateConstructorDecorationExpression(node); if (expression) { statements.push(setOriginalNode(createStatement(expression), node)); } @@ -1484,61 +1451,20 @@ namespace ts { * * @param node The class node. */ - function generateConstructorDecorationExpression(node: ClassExpression | ClassDeclaration, decoratedClassAlias: Identifier) { + function generateConstructorDecorationExpression(node: ClassExpression | ClassDeclaration) { const allDecorators = getAllDecoratorsOfConstructor(node); const decoratorExpressions = transformAllDecoratorsOfDeclaration(node, allDecorators); if (!decoratorExpressions) { return undefined; } - // Emit the call to __decorate. Given the class: - // - // @dec - // class C { - // } - // - // The emit for the class is: - // - // C = C_1 = __decorate([dec], C); - // - if (decoratedClassAlias) { - const expression = createAssignment( - decoratedClassAlias, - createDecorateHelper( - currentExternalHelpersModuleName, - decoratorExpressions, - getDeclarationName(node) - ) - ); - - const result = createAssignment(getDeclarationName(node), expression, moveRangePastDecorators(node)); - setEmitFlags(result, EmitFlags.NoComments); - return result; - } - // Emit the call to __decorate. Given the class: - // - // @dec - // export declare class C { - // } - // - // The emit for the class is: - // - // C = __decorate([dec], C); - // - else { - const result = createAssignment( - getDeclarationName(node), - createDecorateHelper( - currentExternalHelpersModuleName, - decoratorExpressions, - getDeclarationName(node) - ), - moveRangePastDecorators(node) - ); - - setEmitFlags(result, EmitFlags.NoComments); - return result; - } + const classAlias = classAliases && classAliases[getOriginalNodeId(node)]; + const localName = getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); + const decorate = createDecorateHelper(currentExternalHelpersModuleName, decoratorExpressions, localName); + const expression = createAssignment(localName, classAlias ? createAssignment(classAlias, decorate) : decorate); + setEmitFlags(expression, EmitFlags.NoComments); + setSourceMapRange(expression, moveRangePastDecorators(node)); + return expression; } /** @@ -2134,7 +2060,7 @@ namespace ts { const method = createMethod( /*decorators*/ undefined, - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), node.asteriskToken, visitPropertyNameOfClassElement(node), /*typeParameters*/ undefined, @@ -2179,7 +2105,7 @@ namespace ts { const accessor = createGetAccessor( /*decorators*/ undefined, - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), visitPropertyNameOfClassElement(node), visitNodes(node.parameters, visitor, isParameter), /*type*/ undefined, @@ -2212,7 +2138,7 @@ namespace ts { const accessor = createSetAccessor( /*decorators*/ undefined, - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), visitPropertyNameOfClassElement(node), visitNodes(node.parameters, visitor, isParameter), node.body ? visitEachChild(node.body, visitor, context) : createBlock([]), @@ -2245,7 +2171,7 @@ namespace ts { const func = createFunctionDeclaration( /*decorators*/ undefined, - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), node.asteriskToken, node.name, /*typeParameters*/ undefined, @@ -2279,7 +2205,7 @@ namespace ts { } const func = createFunctionExpression( - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), node.asteriskToken, node.name, /*typeParameters*/ undefined, @@ -2301,7 +2227,7 @@ namespace ts { */ function visitArrowFunction(node: ArrowFunction) { const func = createArrowFunction( - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), /*typeParameters*/ undefined, visitNodes(node.parameters, visitor, isParameter), /*type*/ undefined, @@ -2538,10 +2464,7 @@ namespace ts { // If needed, we should emit a variable declaration for the enum. If we emit // a leading variable declaration, we should not emit leading comments for the // enum body. - recordEmittedDeclarationInScope(node); - if (isFirstEmittedDeclarationInScope(node)) { - addVarForEnumOrModuleDeclaration(statements, node); - + if (addVarForEnumOrModuleDeclaration(statements, node)) { // We should still emit the comments if we are emitting a system module. if (moduleKind !== ModuleKind.System || currentScope !== currentSourceFile) { emitFlags |= EmitFlags.NoLeadingComments; @@ -2555,7 +2478,9 @@ namespace ts { const containerName = getNamespaceContainerName(node); // `exportName` is the expression used within this node's container for any exported references. - const exportName = getExportName(node); + const exportName = hasModifier(node, ModifierFlags.Export) + ? getExternalModuleOrNamespaceExportName(currentNamespaceContainerName, node, /*allowComments*/ false, /*allowSourceMaps*/ true) + : getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); // x || (x = {}) // exports.x || (exports.x = {}) @@ -2568,9 +2493,9 @@ namespace ts { ) ); - if (hasModifier(node, ModifierFlags.Export) && !isES6ExportedDeclaration(node)) { + if (hasNamespaceQualifiedExportName(node)) { // `localName` is the expression used within this node's containing scope for any local references. - const localName = getLocalName(node); + const localName = getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); // x = (exports.x || (exports.x = {})) moduleArg = createAssignment(localName, moduleArg); @@ -2600,6 +2525,10 @@ namespace ts { setOriginalNode(enumStatement, node); setEmitFlags(enumStatement, emitFlags); statements.push(enumStatement); + + // Add a DeclarationMarker for the enum to preserve trailing comments and mark + // the end of the declaration. + statements.push(createEndOfDeclarationMarker(node)); return statements; } @@ -2684,9 +2613,15 @@ namespace ts { return isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules); } - function isES6ExportedDeclaration(node: Node) { - return isExternalModuleExport(node) - && moduleKind === ModuleKind.ES2015; + /** + * Determines whether an exported declaration will have a qualified export name (e.g. `f.x` + * or `exports.x`). + */ + function hasNamespaceQualifiedExportName(node: Node) { + return isNamespaceExport(node) + || (isExternalModuleExport(node) + && moduleKind !== ModuleKind.ES2015 + && moduleKind !== ModuleKind.System); } /** @@ -2730,47 +2665,55 @@ namespace ts { function addVarForEnumOrModuleDeclaration(statements: Statement[], node: ModuleDeclaration | EnumDeclaration) { // Emit a variable statement for the module. const statement = createVariableStatement( - isES6ExportedDeclaration(node) - ? visitNodes(node.modifiers, visitor, isModifier) - : undefined, + visitNodes(node.modifiers, modifierVisitor, isModifier), [ createVariableDeclaration( - getDeclarationName(node, /*allowComments*/ false, /*allowSourceMaps*/ true) + getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true) ) ] ); setOriginalNode(statement, node); - // Adjust the source map emit to match the old emitter. - if (node.kind === SyntaxKind.EnumDeclaration) { - setSourceMapRange(statement.declarationList, node); + recordEmittedDeclarationInScope(node); + if (isFirstEmittedDeclarationInScope(node)) { + // Adjust the source map emit to match the old emitter. + if (node.kind === SyntaxKind.EnumDeclaration) { + setSourceMapRange(statement.declarationList, node); + } + else { + setSourceMapRange(statement, node); + } + + // Trailing comments for module declaration should be emitted after the function closure + // instead of the variable statement: + // + // /** Module comment*/ + // module m1 { + // function foo4Export() { + // } + // } // trailing comment module + // + // Should emit: + // + // /** Module comment*/ + // var m1; + // (function (m1) { + // function foo4Export() { + // } + // })(m1 || (m1 = {})); // trailing comment module + // + setCommentRange(statement, node); + setEmitFlags(statement, EmitFlags.NoTrailingComments | EmitFlags.HasEndOfDeclarationMarker); + statements.push(statement); + return true; } else { - setSourceMapRange(statement, node); + const notEmittedStatement = createNotEmittedStatement(statement); + setEmitFlags(notEmittedStatement, EmitFlags.NoComments); + statements.push(notEmittedStatement); + return false; } - - // Trailing comments for module declaration should be emitted after the function closure - // instead of the variable statement: - // - // /** Module comment*/ - // module m1 { - // function foo4Export() { - // } - // } // trailing comment module - // - // Should emit: - // - // /** Module comment*/ - // var m1; - // (function (m1) { - // function foo4Export() { - // } - // })(m1 || (m1 = {})); // trailing comment module - // - setCommentRange(statement, node); - setEmitFlags(statement, EmitFlags.NoTrailingComments); - statements.push(statement); } /** @@ -2797,9 +2740,7 @@ namespace ts { // If needed, we should emit a variable declaration for the module. If we emit // a leading variable declaration, we should not emit leading comments for the // module body. - recordEmittedDeclarationInScope(node); - if (isFirstEmittedDeclarationInScope(node)) { - addVarForEnumOrModuleDeclaration(statements, node); + if (addVarForEnumOrModuleDeclaration(statements, node)) { // We should still emit the comments if we are emitting a system module. if (moduleKind !== ModuleKind.System || currentScope !== currentSourceFile) { emitFlags |= EmitFlags.NoLeadingComments; @@ -2813,7 +2754,9 @@ namespace ts { const containerName = getNamespaceContainerName(node); // `exportName` is the expression used within this node's container for any exported references. - const exportName = getExportName(node); + const exportName = hasModifier(node, ModifierFlags.Export) + ? getExternalModuleOrNamespaceExportName(currentNamespaceContainerName, node, /*allowComments*/ false, /*allowSourceMaps*/ true) + : getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); // x || (x = {}) // exports.x || (exports.x = {}) @@ -2826,9 +2769,9 @@ namespace ts { ) ); - if (hasModifier(node, ModifierFlags.Export) && !isES6ExportedDeclaration(node)) { + if (hasNamespaceQualifiedExportName(node)) { // `localName` is the expression used within this node's containing scope for any local references. - const localName = getLocalName(node); + const localName = getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); // x = (exports.x || (exports.x = {})) moduleArg = createAssignment(localName, moduleArg); @@ -2857,6 +2800,10 @@ namespace ts { setOriginalNode(moduleStatement, node); setEmitFlags(moduleStatement, emitFlags); statements.push(moduleStatement); + + // Add a DeclarationMarker for the namespace to preserve trailing comments and mark + // the end of the declaration. + statements.push(createEndOfDeclarationMarker(node)); return statements; } @@ -3112,7 +3059,7 @@ namespace ts { // var ${name} = ${moduleReference}; return setOriginalNode( createVariableStatement( - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), createVariableDeclarationList([ createVariableDeclaration( node.name, @@ -3185,8 +3132,8 @@ namespace ts { function addExportMemberAssignment(statements: Statement[], node: ClassDeclaration | FunctionDeclaration) { const expression = createAssignment( - getExportName(node), - getLocalName(node, /*noSourceMaps*/ true) + getExternalModuleOrNamespaceExportName(currentNamespaceContainerName, node, /*allowComments*/ false, /*allowSourceMaps*/ true), + getLocalName(node) ); setSourceMapRange(expression, createRange(node.name.pos, node.end)); @@ -3198,40 +3145,15 @@ namespace ts { function createNamespaceExport(exportName: Identifier, exportValue: Expression, location?: TextRange) { return createStatement( createAssignment( - getNamespaceMemberName(exportName, /*allowComments*/ false, /*allowSourceMaps*/ true), + getNamespaceMemberName(currentNamespaceContainerName, exportName, /*allowComments*/ false, /*allowSourceMaps*/ true), exportValue ), location ); } - function createExternalModuleExport(exportName: Identifier) { - return createExportDeclaration( - /*decorators*/ undefined, - /*modifiers*/ undefined, - createNamedExports([ - createExportSpecifier(exportName) - ]) - ); - } - - function getNamespaceMemberName(name: Identifier, allowComments?: boolean, allowSourceMaps?: boolean): Expression { - const qualifiedName = createPropertyAccess(currentNamespaceContainerName, getSynthesizedClone(name), /*location*/ name); - let emitFlags: EmitFlags; - if (!allowComments) { - emitFlags |= EmitFlags.NoComments; - } - if (!allowSourceMaps) { - emitFlags |= EmitFlags.NoSourceMap; - } - if (emitFlags) { - setEmitFlags(qualifiedName, emitFlags); - } - return qualifiedName; - } - function getNamespaceMemberNameWithSourceMapsAndWithoutComments(name: Identifier) { - return getNamespaceMemberName(name, /*allowComments*/ false, /*allowSourceMaps*/ true); + return getNamespaceMemberName(currentNamespaceContainerName, name, /*allowComments*/ false, /*allowSourceMaps*/ true); } /** @@ -3252,65 +3174,17 @@ namespace ts { } /** - * Gets the local name for a declaration for use in expressions. - * - * A local name will *never* be prefixed with an module or namespace export modifier like - * "exports.". - * - * @param node The declaration. - * @param noSourceMaps A value indicating whether source maps may not be emitted for the name. - * @param allowComments A value indicating whether comments may be emitted for the name. - */ - function getLocalName(node: FunctionDeclaration | ClassDeclaration | ClassExpression | ModuleDeclaration | EnumDeclaration, noSourceMaps?: boolean, allowComments?: boolean) { - return getDeclarationName(node, allowComments, !noSourceMaps, EmitFlags.LocalName); - } - - /** - * Gets the export name for a declaration for use in expressions. - * - * An export name will *always* be prefixed with an module or namespace export modifier - * like "exports." if one is required. - * - * @param node The declaration. - * @param noSourceMaps A value indicating whether source maps may not be emitted for the name. - * @param allowComments A value indicating whether comments may be emitted for the name. - */ - function getExportName(node: FunctionDeclaration | ClassDeclaration | ClassExpression | ModuleDeclaration | EnumDeclaration, noSourceMaps?: boolean, allowComments?: boolean) { - if (isNamespaceExport(node)) { - return getNamespaceMemberName(getDeclarationName(node), allowComments, !noSourceMaps); - } - - return getDeclarationName(node, allowComments, !noSourceMaps, EmitFlags.ExportName); - } - - /** - * Gets the name for a declaration for use in declarations. - * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. - * @param emitFlags Additional NodeEmitFlags to specify for the name. + * Gets a local alias for a class declaration if it is a decorated class with an internal + * reference to the static side of the class. This is necessary to avoid issues with + * double-binding semantics for the class name. */ - function getDeclarationName(node: FunctionDeclaration | ClassDeclaration | ClassExpression | ModuleDeclaration | EnumDeclaration, allowComments?: boolean, allowSourceMaps?: boolean, emitFlags?: EmitFlags) { - if (node.name) { - const name = getMutableClone(node.name); - emitFlags |= getEmitFlags(node.name); - if (!allowSourceMaps) { - emitFlags |= EmitFlags.NoSourceMap; - } - - if (!allowComments) { - emitFlags |= EmitFlags.NoComments; - } - - if (emitFlags) { - setEmitFlags(name, emitFlags); - } - - return name; - } - else { - return getGeneratedNameForNode(node); + function getClassAliasIfNeeded(node: ClassDeclaration) { + if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.ClassWithConstructorReference) { + enableSubstitutionForClassAliases(); + const classAlias = createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? node.name.text : "default"); + classAliases[getOriginalNodeId(node)] = classAlias; + hoistVariableDeclaration(classAlias); + return classAlias; } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index d031188571db6..93fd9afb79c0e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -362,6 +362,7 @@ namespace ts { // Transformation nodes NotEmittedStatement, PartiallyEmittedExpression, + EndOfDeclarationMarker, // Enum value count Count, @@ -457,7 +458,8 @@ namespace ts { ParameterPropertyModifier = AccessibilityModifier | Readonly, NonPublicAccessibilityModifier = Private | Protected, - TypeScriptModifier = Ambient | Public | Private | Protected | Readonly | Abstract | Const + TypeScriptModifier = Ambient | Public | Private | Protected | Readonly | Abstract | Const, + ExportDefault = Export | Default, } export const enum JsxFlags { @@ -1426,6 +1428,14 @@ namespace ts { kind: SyntaxKind.NotEmittedStatement; } + /** + * Marks the end of transformed declaration to properly emit exports. + */ + /* @internal */ + export interface EndOfDeclarationMarker extends Statement { + kind: SyntaxKind.EndOfDeclarationMarker; + } + export interface EmptyStatement extends Statement { kind: SyntaxKind.EmptyStatement; } @@ -3367,9 +3377,9 @@ namespace ts { ContainsES2016 = 1 << 7, ES2015 = 1 << 8, ContainsES2015 = 1 << 9, - DestructuringAssignment = 1 << 10, - Generator = 1 << 11, - ContainsGenerator = 1 << 12, + Generator = 1 << 10, + ContainsGenerator = 1 << 11, + DestructuringAssignment = 1 << 12, // Markers // - Flags used to indicate that a subtree contains a specific transformation. @@ -3454,11 +3464,14 @@ namespace ts { NoNestedComments = 1 << 16, ExportName = 1 << 17, // Ensure an export prefix is added for an identifier that points to an exported declaration with a local name (see SymbolFlags.ExportHasLocal). LocalName = 1 << 18, // Ensure an export prefix is not added for an identifier that points to an exported declaration. + ExportBindingName = LocalName | ExportName, Indented = 1 << 19, // Adds an explicit extra indentation level for class and function bodies when printing (used to match old emitter). NoIndentation = 1 << 20, // Do not indent the node. AsyncFunctionBody = 1 << 21, ReuseTempVariableScope = 1 << 22, // Reuse the existing temp variable scope during emit. CustomPrologue = 1 << 23, // Treat the statement as if it were a prologue directive (NOTE: Prologue directives are *not* transformed). + NoHoisting = 1 << 24, // Do not hoist this declaration in --module system + HasEndOfDeclarationMarker = 1 << 25, // Declaration has an associated NotEmittedStatement to mark the end of the declaration } /* @internal */ diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index c4e6712015cb9..ac0dd1af72062 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1953,14 +1953,16 @@ namespace ts { || positionIsSynthesized(node.end); } - export function getOriginalNode(node: Node): Node { + export function getOriginalNode(node: Node): Node; + export function getOriginalNode(node: Node, nodeTest: (node: Node) => node is T): T; + export function getOriginalNode(node: Node, nodeTest?: (node: Node) => boolean): Node { if (node) { while (node.original !== undefined) { node = node.original; } } - return node; + return !nodeTest || nodeTest(node) ? node : undefined; } /** @@ -3506,9 +3508,20 @@ namespace ts { return positionIsSynthesized(range.pos) ? -1 : skipTrivia(sourceFile.text, range.pos); } - export function collectExternalModuleInfo(sourceFile: SourceFile) { + export interface ExternalModuleInfo { + externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]; // imports of other external modules + exportSpecifiers: Map; // export specifiers by name + exportedBindings: Map; // exported names of local declarations + exportedNames: Identifier[]; // all exported names local to module + exportEquals: ExportAssignment | undefined; // an export= declaration if one was present + hasExportStarsToExportValues: boolean; // whether this module contains export* + } + + export function collectExternalModuleInfo(sourceFile: SourceFile, resolver: EmitResolver): ExternalModuleInfo { const externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[] = []; const exportSpecifiers = createMap(); + const exportedBindings = createMap(); + const uniqueExports = createMap(); let exportEquals: ExportAssignment = undefined; let hasExportStarsToExportValues = false; for (const node of sourceFile.statements) { @@ -3526,6 +3539,16 @@ namespace ts { // import x = require("mod") externalImports.push(node); } + + if (hasModifier(node, ModifierFlags.Export)) { + // export import x = ... + const name = (node).name; + if (!uniqueExports[name.text]) { + multiMapAdd(exportedBindings, getOriginalNodeId(node), name); + uniqueExports[name.text] = name; + } + } + break; case SyntaxKind.ExportDeclaration: @@ -3543,8 +3566,19 @@ namespace ts { else { // export { x, y } for (const specifier of (node).exportClause.elements) { - const name = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name] || (exportSpecifiers[name] = [])).push(specifier); + if (!uniqueExports[specifier.name.text]) { + const name = specifier.propertyName || specifier.name; + multiMapAdd(exportSpecifiers, name.text, specifier); + + const decl = resolver.getReferencedImportDeclaration(name) + || resolver.getReferencedValueDeclaration(name); + + if (decl) { + multiMapAdd(exportedBindings, getOriginalNodeId(decl), specifier.name); + } + + uniqueExports[specifier.name.text] = specifier.name; + } } } break; @@ -3555,10 +3589,95 @@ namespace ts { exportEquals = node; } break; + + case SyntaxKind.VariableDeclaration: + // export var x + if (hasModifier(node, ModifierFlags.Export)) { + for (const decl of (node).declarationList.declarations) { + collectExportedVariableInfo(decl, exportedBindings, uniqueExports); + } + } + break; + + case SyntaxKind.FunctionDeclaration: + if (hasModifier(node, ModifierFlags.Export)) { + if (hasModifier(node, ModifierFlags.Default)) { + // export default function() { } + if (!uniqueExports["default"]) { + multiMapAdd(exportedBindings, getOriginalNodeId(node), getDeclarationName(node)); + uniqueExports["default"] = createIdentifier("default"); + } + } + else { + // export function x() { } + const name = (node).name; + if (!uniqueExports[name.text]) { + multiMapAdd(exportedBindings, getOriginalNodeId(node), name); + uniqueExports[name.text] = name; + } + } + } + break; + + case SyntaxKind.ClassDeclaration: + if (hasModifier(node, ModifierFlags.Export)) { + if (hasModifier(node, ModifierFlags.Default)) { + // export default class { } + if (!uniqueExports["default"]) { + multiMapAdd(exportedBindings, getOriginalNodeId(node), getDeclarationName(node)); + } + } + else { + // export class x { } + const name = (node).name; + if (!uniqueExports[name.text]) { + multiMapAdd(exportedBindings, getOriginalNodeId(node), name); + uniqueExports[name.text] = name; + } + } + } + break; } } - return { externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues }; + const exportedNames: Identifier[] = []; + for (const key in uniqueExports) { + exportedNames.push(uniqueExports[key]); + } + + return { externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues, exportedBindings, exportedNames }; + } + + function collectExportedVariableInfo(decl: VariableDeclaration | BindingElement, exportedNames: Map, uniqueExports: Map) { + if (isBindingPattern(decl.name)) { + for (const element of decl.name.elements) { + if (!isOmittedExpression(element)) { + collectExportedVariableInfo(element, exportedNames, uniqueExports); + } + } + } + else if (!isGeneratedIdentifier(decl.name)) { + if (!uniqueExports[decl.name.text]) { + multiMapAdd(exportedNames, getOriginalNodeId(decl), decl.name); + uniqueExports[decl.name.text] = decl.name; + } + } + } + + /** + * Determines whether a name was originally the declaration name of an enum or namespace + * declaration. + */ + export function isDeclarationNameOfEnumOrNamespace(node: Identifier) { + const parseNode = getParseTreeNode(node); + if (parseNode) { + switch (parseNode.parent.kind) { + case SyntaxKind.EnumDeclaration: + case SyntaxKind.ModuleDeclaration: + return parseNode === (parseNode.parent).name; + } + } + return false; } export function getInitializedVariables(node: VariableDeclarationList) { @@ -4041,7 +4160,8 @@ namespace ts { || kind === SyntaxKind.VariableStatement || kind === SyntaxKind.WhileStatement || kind === SyntaxKind.WithStatement - || kind === SyntaxKind.NotEmittedStatement; + || kind === SyntaxKind.NotEmittedStatement + || kind === SyntaxKind.EndOfDeclarationMarker; } export function isDeclaration(node: Node): node is Declaration { diff --git a/tests/baselines/reference/ExportAssignment7.js b/tests/baselines/reference/ExportAssignment7.js index bc7cee12b1dca..461631e0e7d0d 100644 --- a/tests/baselines/reference/ExportAssignment7.js +++ b/tests/baselines/reference/ExportAssignment7.js @@ -11,5 +11,4 @@ var C = (function () { } return C; }()); -exports.C = C; module.exports = B; diff --git a/tests/baselines/reference/ExportAssignment8.js b/tests/baselines/reference/ExportAssignment8.js index e31a38c651c75..d09630080125a 100644 --- a/tests/baselines/reference/ExportAssignment8.js +++ b/tests/baselines/reference/ExportAssignment8.js @@ -11,5 +11,4 @@ var C = (function () { } return C; }()); -exports.C = C; module.exports = B; diff --git a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js index efd1c2aa909fa..a0bd7c83d64e5 100644 --- a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js @@ -40,8 +40,8 @@ define(["require", "exports"], function (require, exports) { } return C1; }()); - exports.C1 = C1; C1.s1 = true; + exports.C1 = C1; var E1; (function (E1) { E1[E1["A"] = 0] = "A"; diff --git a/tests/baselines/reference/commonJSImportAsPrimaryExpression.js b/tests/baselines/reference/commonJSImportAsPrimaryExpression.js index d22b5b2855b22..b8cf42ea7622a 100644 --- a/tests/baselines/reference/commonJSImportAsPrimaryExpression.js +++ b/tests/baselines/reference/commonJSImportAsPrimaryExpression.js @@ -21,8 +21,8 @@ var C1 = (function () { } return C1; }()); -exports.C1 = C1; C1.s1 = true; +exports.C1 = C1; //// [foo_1.js] "use strict"; var foo = require("./foo_0"); diff --git a/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js b/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js index a66d04a2ddedb..eb77d1baa3cb5 100644 --- a/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js @@ -39,8 +39,8 @@ var C1 = (function () { } return C1; }()); -exports.C1 = C1; C1.s1 = true; +exports.C1 = C1; var E1; (function (E1) { E1[E1["A"] = 0] = "A"; diff --git a/tests/baselines/reference/decoratedClassExportsCommonJS1.js b/tests/baselines/reference/decoratedClassExportsCommonJS1.js index 9674d7853d5d8..2b20c7ec168b8 100644 --- a/tests/baselines/reference/decoratedClassExportsCommonJS1.js +++ b/tests/baselines/reference/decoratedClassExportsCommonJS1.js @@ -17,12 +17,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; -let Testing123_1 = class Testing123 { +let Testing123 = Testing123_1 = class Testing123 { }; -let Testing123 = Testing123_1; Testing123.prop1 = Testing123_1.prop0; Testing123 = Testing123_1 = __decorate([ Something({ v: () => Testing123_1 }), __metadata("design:paramtypes", []) ], Testing123); exports.Testing123 = Testing123; +var Testing123_1; diff --git a/tests/baselines/reference/decoratedClassExportsCommonJS2.js b/tests/baselines/reference/decoratedClassExportsCommonJS2.js index 3ca6fa2d70e31..9e8b8693109b6 100644 --- a/tests/baselines/reference/decoratedClassExportsCommonJS2.js +++ b/tests/baselines/reference/decoratedClassExportsCommonJS2.js @@ -16,11 +16,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; -let Testing123_1 = class Testing123 { +let Testing123 = Testing123_1 = class Testing123 { }; -let Testing123 = Testing123_1; Testing123 = Testing123_1 = __decorate([ Something({ v: () => Testing123_1 }), __metadata("design:paramtypes", []) ], Testing123); exports.Testing123 = Testing123; +var Testing123_1; diff --git a/tests/baselines/reference/decoratedClassExportsSystem1.js b/tests/baselines/reference/decoratedClassExportsSystem1.js index 43a4421642e1a..6f7fcbd144aae 100644 --- a/tests/baselines/reference/decoratedClassExportsSystem1.js +++ b/tests/baselines/reference/decoratedClassExportsSystem1.js @@ -21,13 +21,12 @@ System.register([], function (exports_1, context_1) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __moduleName = context_1 && context_1.id; - var Testing123_1, Testing123; + var Testing123, Testing123_1; return { setters: [], execute: function () { - Testing123_1 = class Testing123 { + Testing123 = Testing123_1 = class Testing123 { }; - Testing123 = Testing123_1; Testing123.prop1 = Testing123_1.prop0; Testing123 = Testing123_1 = __decorate([ Something({ v: () => Testing123_1 }), diff --git a/tests/baselines/reference/decoratedClassExportsSystem2.js b/tests/baselines/reference/decoratedClassExportsSystem2.js index cbb592539cf7d..2a1a394a1f39c 100644 --- a/tests/baselines/reference/decoratedClassExportsSystem2.js +++ b/tests/baselines/reference/decoratedClassExportsSystem2.js @@ -18,13 +18,12 @@ System.register([], function (exports_1, context_1) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __moduleName = context_1 && context_1.id; - var Testing123_1, Testing123; + var Testing123, Testing123_1; return { setters: [], execute: function () { - Testing123_1 = class Testing123 { + Testing123 = Testing123_1 = class Testing123 { }; - Testing123 = Testing123_1; Testing123 = Testing123_1 = __decorate([ Something({ v: () => Testing123_1 }), __metadata("design:paramtypes", []) diff --git a/tests/baselines/reference/decoratorMetadataOnInferredType.js b/tests/baselines/reference/decoratorMetadataOnInferredType.js index 0c63bcf49daea..43cdaa79ab8c4 100644 --- a/tests/baselines/reference/decoratorMetadataOnInferredType.js +++ b/tests/baselines/reference/decoratorMetadataOnInferredType.js @@ -33,8 +33,8 @@ var B = (function () { } return B; }()); -exports.B = B; __decorate([ decorator, __metadata("design:type", Object) ], B.prototype, "x", void 0); +exports.B = B; diff --git a/tests/baselines/reference/decoratorMetadataWithConstructorType.js b/tests/baselines/reference/decoratorMetadataWithConstructorType.js index 49b72e39a097b..2c14c9b5bdabb 100644 --- a/tests/baselines/reference/decoratorMetadataWithConstructorType.js +++ b/tests/baselines/reference/decoratorMetadataWithConstructorType.js @@ -33,8 +33,8 @@ var B = (function () { } return B; }()); -exports.B = B; __decorate([ decorator, __metadata("design:type", A) ], B.prototype, "x", void 0); +exports.B = B; diff --git a/tests/baselines/reference/decoratorOnClass5.es6.js b/tests/baselines/reference/decoratorOnClass5.es6.js index e34740d651721..426a93668e7e0 100644 --- a/tests/baselines/reference/decoratorOnClass5.es6.js +++ b/tests/baselines/reference/decoratorOnClass5.es6.js @@ -16,12 +16,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; -let C_1 = class C { +let C = C_1 = class C { static x() { return C_1.y; } }; -let C = C_1; C.y = 1; C = C_1 = __decorate([ dec ], C); let c = new C(); +var C_1; diff --git a/tests/baselines/reference/decoratorOnClass6.es6.js b/tests/baselines/reference/decoratorOnClass6.es6.js index fff39d8591661..7da4a20bb9331 100644 --- a/tests/baselines/reference/decoratorOnClass6.es6.js +++ b/tests/baselines/reference/decoratorOnClass6.es6.js @@ -16,13 +16,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; -let C_1 = class C { +let C = C_1 = class C { static x() { return C_1.y; } }; -let C = C_1; C.y = 1; C = C_1 = __decorate([ dec ], C); export { C }; let c = new C(); +var C_1; diff --git a/tests/baselines/reference/decoratorOnClass7.es6.js b/tests/baselines/reference/decoratorOnClass7.es6.js index 7f111ea4abf97..92ee02c899e4f 100644 --- a/tests/baselines/reference/decoratorOnClass7.es6.js +++ b/tests/baselines/reference/decoratorOnClass7.es6.js @@ -16,13 +16,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; -let C_1 = class C { +let C = C_1 = class C { static x() { return C_1.y; } }; -let C = C_1; C.y = 1; C = C_1 = __decorate([ dec ], C); export default C; let c = new C(); +var C_1; diff --git a/tests/baselines/reference/defaultExportsCannotMerge02.js b/tests/baselines/reference/defaultExportsCannotMerge02.js index ae5701b86bc79..f327c62e5714e 100644 --- a/tests/baselines/reference/defaultExportsCannotMerge02.js +++ b/tests/baselines/reference/defaultExportsCannotMerge02.js @@ -33,7 +33,7 @@ var Decl = (function () { return Decl; }()); Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = exports.Decl; +exports.default = Decl; //// [m2.js] "use strict"; var m1_1 = require("m1"); diff --git a/tests/baselines/reference/defaultExportsCannotMerge04.js b/tests/baselines/reference/defaultExportsCannotMerge04.js index ef8d6853d9809..7c9bd88bc16df 100644 --- a/tests/baselines/reference/defaultExportsCannotMerge04.js +++ b/tests/baselines/reference/defaultExportsCannotMerge04.js @@ -18,7 +18,7 @@ export interface Foo { function Foo() { } Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = exports.Foo; +exports.default = Foo; var Foo; (function (Foo) { -})(exports.Foo || (exports.Foo = {})); +})(Foo || (Foo = {})); diff --git a/tests/baselines/reference/dottedNamesInSystem.js b/tests/baselines/reference/dottedNamesInSystem.js index c4bb44f03cf2c..e337e8cb1238a 100644 --- a/tests/baselines/reference/dottedNamesInSystem.js +++ b/tests/baselines/reference/dottedNamesInSystem.js @@ -28,7 +28,7 @@ System.register([], function (exports_1, context_1) { C.foo = foo; })(C = B.C || (B.C = {})); })(B = A.B || (A.B = {})); - })(A = A || (A = {})); + })(A || (A = {})); exports_1("A", A); } }; diff --git a/tests/baselines/reference/es3defaultAliasIsQuoted.js b/tests/baselines/reference/es3defaultAliasIsQuoted.js index 2ce6113b4fe25..89fd0c47a7e94 100644 --- a/tests/baselines/reference/es3defaultAliasIsQuoted.js +++ b/tests/baselines/reference/es3defaultAliasIsQuoted.js @@ -21,8 +21,8 @@ var Foo = (function () { } return Foo; }()); -exports.Foo = Foo; Foo.CONSTANT = "Foo"; +exports.Foo = Foo; function assert(value) { if (!value) throw new Error("Assertion failed!"); diff --git a/tests/baselines/reference/es5ExportEquals.js b/tests/baselines/reference/es5ExportEquals.js index 4697c61976b88..3a1ae6fe242c2 100644 --- a/tests/baselines/reference/es5ExportEquals.js +++ b/tests/baselines/reference/es5ExportEquals.js @@ -8,7 +8,6 @@ export = f; //// [es5ExportEquals.js] "use strict"; function f() { } -exports.f = f; module.exports = f; diff --git a/tests/baselines/reference/es6modulekindWithES5Target.js b/tests/baselines/reference/es6modulekindWithES5Target.js index 10d9cd2e36f32..66967cbc89fc9 100644 --- a/tests/baselines/reference/es6modulekindWithES5Target.js +++ b/tests/baselines/reference/es6modulekindWithES5Target.js @@ -27,13 +27,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; -export var C = (function () { +var C = (function () { function C() { this.p = 1; } C.prototype.method = function () { }; return C; }()); +export { C }; C.s = 0; export { C as C2 }; var D = (function () { diff --git a/tests/baselines/reference/es6modulekindWithES5Target12.js b/tests/baselines/reference/es6modulekindWithES5Target12.js index 316718e6f8083..74646f73e556a 100644 --- a/tests/baselines/reference/es6modulekindWithES5Target12.js +++ b/tests/baselines/reference/es6modulekindWithES5Target12.js @@ -38,11 +38,12 @@ export namespace F { } //// [es6modulekindWithES5Target12.js] -export var C = (function () { +var C = (function () { function C() { } return C; }()); +export { C }; (function (C) { C.x = 1; })(C || (C = {})); diff --git a/tests/baselines/reference/exportAssignmentWithExports.js b/tests/baselines/reference/exportAssignmentWithExports.js index 626e7881548d7..8441b7b4320d9 100644 --- a/tests/baselines/reference/exportAssignmentWithExports.js +++ b/tests/baselines/reference/exportAssignmentWithExports.js @@ -10,7 +10,6 @@ var C = (function () { } return C; }()); -exports.C = C; var D = (function () { function D() { } diff --git a/tests/baselines/reference/exportEqualsAmd.js b/tests/baselines/reference/exportEqualsAmd.js index 385012a6e0f0f..8b66b8896e315 100644 --- a/tests/baselines/reference/exportEqualsAmd.js +++ b/tests/baselines/reference/exportEqualsAmd.js @@ -4,6 +4,6 @@ export = { ["hi"]: "there" }; //// [exportEqualsAmd.js] define(["require", "exports"], function (require, exports) { "use strict"; - return _a = {}, _a["hi"] = "there", _a; var _a; + return _a = {}, _a["hi"] = "there", _a; }); diff --git a/tests/baselines/reference/exportEqualsCommonJs.js b/tests/baselines/reference/exportEqualsCommonJs.js index 01b7a43b31033..03202239b1727 100644 --- a/tests/baselines/reference/exportEqualsCommonJs.js +++ b/tests/baselines/reference/exportEqualsCommonJs.js @@ -3,5 +3,5 @@ export = { ["hi"]: "there" }; //// [exportEqualsCommonJs.js] "use strict"; -module.exports = (_a = {}, _a["hi"] = "there", _a); var _a; +module.exports = (_a = {}, _a["hi"] = "there", _a); diff --git a/tests/baselines/reference/exportEqualsUmd.js b/tests/baselines/reference/exportEqualsUmd.js index cd4c99f504d12..500c8795dc7c0 100644 --- a/tests/baselines/reference/exportEqualsUmd.js +++ b/tests/baselines/reference/exportEqualsUmd.js @@ -11,6 +11,6 @@ export = { ["hi"]: "there" }; } })(["require", "exports"], function (require, exports) { "use strict"; - return _a = {}, _a["hi"] = "there", _a; var _a; + return _a = {}, _a["hi"] = "there", _a; }); diff --git a/tests/baselines/reference/externModule.js b/tests/baselines/reference/externModule.js index ff83d07ef981b..f7edc1283df8f 100644 --- a/tests/baselines/reference/externModule.js +++ b/tests/baselines/reference/externModule.js @@ -43,11 +43,12 @@ n=XDate.UTC(1964,2,1); declare; module; { - export var XDate = (function () { + var XDate = (function () { function XDate() { } return XDate; }()); + export { XDate }; } var d = new XDate(); d.getDay(); diff --git a/tests/baselines/reference/importImportOnlyModule.js b/tests/baselines/reference/importImportOnlyModule.js index 38ffc08d65e00..013999321f959 100644 --- a/tests/baselines/reference/importImportOnlyModule.js +++ b/tests/baselines/reference/importImportOnlyModule.js @@ -24,8 +24,8 @@ define(["require", "exports"], function (require, exports) { } return C1; }()); - exports.C1 = C1; C1.s1 = true; + exports.C1 = C1; }); //// [foo_1.js] define(["require", "exports"], function (require, exports) { diff --git a/tests/baselines/reference/innerModExport1.js b/tests/baselines/reference/innerModExport1.js index cbeced3704629..285120c7462cd 100644 --- a/tests/baselines/reference/innerModExport1.js +++ b/tests/baselines/reference/innerModExport1.js @@ -27,10 +27,9 @@ var Outer; module; { var non_export_var = 0; - Outer.export_var = 1; + export var export_var = 1; function NonExportFunc() { return 0; } - function ExportFunc() { return 0; } - Outer.ExportFunc = ExportFunc; + export function ExportFunc() { return 0; } } Outer.outer_var_export = 0; function outerFuncExport() { return 0; } diff --git a/tests/baselines/reference/innerModExport2.js b/tests/baselines/reference/innerModExport2.js index a1526daf6f3d9..2024cd8284fa9 100644 --- a/tests/baselines/reference/innerModExport2.js +++ b/tests/baselines/reference/innerModExport2.js @@ -28,10 +28,9 @@ var Outer; module; { var non_export_var = 0; - Outer.export_var = 1; + export var export_var = 1; function NonExportFunc() { return 0; } - function ExportFunc() { return 0; } - Outer.ExportFunc = ExportFunc; + export function ExportFunc() { return 0; } } var export_var; Outer.outer_var_export = 0; diff --git a/tests/baselines/reference/invalidModuleWithVarStatements.js b/tests/baselines/reference/invalidModuleWithVarStatements.js index ce5fbd54ed152..caa6b24f00ff6 100644 --- a/tests/baselines/reference/invalidModuleWithVarStatements.js +++ b/tests/baselines/reference/invalidModuleWithVarStatements.js @@ -39,11 +39,11 @@ var Y2; })(Y2 || (Y2 = {})); var Y4; (function (Y4) { - static var x = 0; + var x = 0; })(Y4 || (Y4 = {})); var YY; (function (YY) { - static function fn(x) { } + function fn(x) { } })(YY || (YY = {})); var YY2; (function (YY2) { diff --git a/tests/baselines/reference/moduleElementsInWrongContext3.js b/tests/baselines/reference/moduleElementsInWrongContext3.js index 76220eab251a1..851ad654494b4 100644 --- a/tests/baselines/reference/moduleElementsInWrongContext3.js +++ b/tests/baselines/reference/moduleElementsInWrongContext3.js @@ -47,9 +47,8 @@ var P; } return C; }()); - P.C = C; - function bee() { } - P.bee = bee; + export default C; + export function bee() { } import I2 = require("foo"); import * as Foo from "ambient"; import bar from "ambient"; diff --git a/tests/baselines/reference/outModuleConcatAmd.js.map b/tests/baselines/reference/outModuleConcatAmd.js.map index e987d5deb8a10..9187aca0646db 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js.map +++ b/tests/baselines/reference/outModuleConcatAmd.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAlB,cAAkB;;;;ICAlB;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAA5B,cAA4B"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,cAAC;;;;ICAd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index 1bfda04977630..34ab74816ade5 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -64,9 +64,9 @@ sourceFile:tests/cases/compiler/ref/a.ts 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> -2 > export class A { } -1->Emitted(13, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(13, 19) Source(2, 19) + SourceIndex(0) +2 > A +1->Emitted(13, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(13, 19) Source(2, 15) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -139,9 +139,9 @@ sourceFile:tests/cases/compiler/b.ts 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> -2 > export class B extends A { } -1->Emitted(24, 5) Source(2, 1) + SourceIndex(1) -2 >Emitted(24, 19) Source(2, 29) + SourceIndex(1) +2 > B +1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(24, 19) Source(2, 15) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js.map b/tests/baselines/reference/outModuleTripleSlashRefs.js.map index 45d5799045001..5ccc59aeabfb3 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js.map +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFD,cAEC;;;;ICHD;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAA5B,cAA4B"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,cAAC;;;;ICDd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index 482c898e0cb03..ce41bae6de338 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -138,11 +138,9 @@ sourceFile:tests/cases/compiler/ref/a.ts 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> -2 > export class A { - > member: typeof GlobalFoo; - > } -1->Emitted(20, 5) Source(3, 1) + SourceIndex(1) -2 >Emitted(20, 19) Source(5, 2) + SourceIndex(1) +2 > A +1->Emitted(20, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(20, 19) Source(3, 15) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:all.js @@ -215,9 +213,9 @@ sourceFile:tests/cases/compiler/b.ts 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> -2 > export class B extends A { } -1->Emitted(31, 5) Source(2, 1) + SourceIndex(2) -2 >Emitted(31, 19) Source(2, 29) + SourceIndex(2) +2 > B +1->Emitted(31, 5) Source(2, 14) + SourceIndex(2) +2 >Emitted(31, 19) Source(2, 15) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/parserExportAssignment7.js b/tests/baselines/reference/parserExportAssignment7.js index f359ada1e91ba..dd6750bec323c 100644 --- a/tests/baselines/reference/parserExportAssignment7.js +++ b/tests/baselines/reference/parserExportAssignment7.js @@ -11,5 +11,4 @@ var C = (function () { } return C; }()); -exports.C = C; module.exports = B; diff --git a/tests/baselines/reference/parserExportAssignment8.js b/tests/baselines/reference/parserExportAssignment8.js index 16a50a30b3c52..07ff257fb6193 100644 --- a/tests/baselines/reference/parserExportAssignment8.js +++ b/tests/baselines/reference/parserExportAssignment8.js @@ -11,5 +11,4 @@ var C = (function () { } return C; }()); -exports.C = C; module.exports = B; diff --git a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js index cebf700aa5923..c139b6279fd1d 100644 --- a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js +++ b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js @@ -161,11 +161,11 @@ var publicClassWithWithPrivatePropertyTypes = (function () { } return publicClassWithWithPrivatePropertyTypes; }()); -exports.publicClassWithWithPrivatePropertyTypes = publicClassWithWithPrivatePropertyTypes; publicClassWithWithPrivatePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget1(); // Error publicClassWithWithPrivatePropertyTypes.myPrivateStaticProperty = exporter.createExportedWidget1(); publicClassWithWithPrivatePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget3(); // Error publicClassWithWithPrivatePropertyTypes.myPrivateStaticProperty1 = exporter.createExportedWidget3(); +exports.publicClassWithWithPrivatePropertyTypes = publicClassWithWithPrivatePropertyTypes; var privateClassWithWithPrivatePropertyTypes = (function () { function privateClassWithWithPrivatePropertyTypes() { this.myPublicProperty = exporter.createExportedWidget1(); @@ -190,9 +190,9 @@ var publicClassWithPrivateModulePropertyTypes = (function () { } return publicClassWithPrivateModulePropertyTypes; }()); -exports.publicClassWithPrivateModulePropertyTypes = publicClassWithPrivateModulePropertyTypes; publicClassWithPrivateModulePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget2(); // Error publicClassWithPrivateModulePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget4(); // Error +exports.publicClassWithPrivateModulePropertyTypes = publicClassWithPrivateModulePropertyTypes; exports.publicVarWithPrivateModulePropertyTypes = exporter.createExportedWidget2(); // Error exports.publicVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4(); // Error var privateClassWithPrivateModulePropertyTypes = (function () { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map index c0e40d9e56ccd..891c03b13f2e4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map index 5f6fc59aa0ec9..30f6e242bc8aa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index c0e40d9e56ccd..891c03b13f2e4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 5f6fc59aa0ec9..30f6e242bc8aa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 06567a4fddd7a..dce282ee37f08 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index d3c0e8697cd34..1316ec7465939 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 048c281681125..5db5f8f1bfb54 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map index 8e4c69b85cad6..28136d8ffc30a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map index adc497fc60ffb..dd409b9f2c3b1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map index 3c11f6387b31a..78b4b9fcfe113 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map index f102ba902d9de..f5f5dfcd793b1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map index c84a8f5c8357f..6ba04afda9e2a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 8e4c69b85cad6..28136d8ffc30a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index adc497fc60ffb..dd409b9f2c3b1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 048c281681125..5db5f8f1bfb54 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index f102ba902d9de..f5f5dfcd793b1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index c84a8f5c8357f..6ba04afda9e2a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 3c11f6387b31a..78b4b9fcfe113 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 5132061665307..d9151baabe48c 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map index cb20dafd0e677..43b1caa625e11 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map index 379e5b9d7b255..ba491a3c6fa57 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map index 2a7d88eea534a..02f7bbcbb676a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map index 99658249a0947..766ff607b5482 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index cb20dafd0e677..43b1caa625e11 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 379e5b9d7b255..ba491a3c6fa57 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 2a7d88eea534a..02f7bbcbb676a 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 99658249a0947..766ff607b5482 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 105ebefb06ec7..a910ecda80eb3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map index 9eb482b6438ac..a6d24f0f0204d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map index 379e5b9d7b255..ba491a3c6fa57 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map index 764cd7db3b422..a23c18711264e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map index 48a5bd9efa8a3..a758d2a1cd03e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 9eb482b6438ac..a6d24f0f0204d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 379e5b9d7b255..ba491a3c6fa57 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 764cd7db3b422..a23c18711264e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 48a5bd9efa8a3..a758d2a1cd03e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 12c15dd7143ae..a3532b9e4ce85 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map index 26b3342e168e2..0dab151470606 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map index 2137f48e86baf..14104ec68b946 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index 26b3342e168e2..0dab151470606 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 2137f48e86baf..14104ec68b946 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 6e903b7c3707d..d8fff48f73ee0 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 4767cb6f4255c..bb9e992d47128 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 60700ad9d1740..4f51d470c8238 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map index 1c3270c1034f3..ee8a26cafcfb4 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map index eb045bec338dd..e60e0fbfa7afc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map index 4b491bfe9bb93..3c653ded70050 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map index 70285d9fdb407..5f97087307dc1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map index 3b815b5296131..8c64bacf53325 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 1c3270c1034f3..ee8a26cafcfb4 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index eb045bec338dd..e60e0fbfa7afc 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 60700ad9d1740..4f51d470c8238 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 70285d9fdb407..5f97087307dc1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 3b815b5296131..8c64bacf53325 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 4b491bfe9bb93..3c653ded70050 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index e5f2d235179c4..ae1d6457599bf 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../projects/outputdir_module_multifolder/ref/m1.ts","../projects/outputdir_module_multifolder_ref/m2.ts","../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../projects/outputdir_module_multifolder/ref/m1.ts","../projects/outputdir_module_multifolder_ref/m2.ts","../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map index a623d2caaa6ae..611b73c5c7daf 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map index 579a6a187e3b5..a6d5cebe7f182 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map index 3a1b7b27c5841..733fa0fc069d6 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map index a9589e1fed81f..86cfbeb5b6365 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index a623d2caaa6ae..611b73c5c7daf 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 579a6a187e3b5..a6d5cebe7f182 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 3a1b7b27c5841..733fa0fc069d6 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index a9589e1fed81f..86cfbeb5b6365 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 5ac4a707e3977..3542da2fe04c7 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts","../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts","../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map index 943ae3c5b8ed4..dbfe0b5d9270f 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map index 478bae202d610..a8d6293492c13 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map index 9fea18a6b0227..172c4d4804a02 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map index e96624acd65ec..ef62267d9579b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 943ae3c5b8ed4..dbfe0b5d9270f 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 478bae202d610..a8d6293492c13 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 9fea18a6b0227..172c4d4804a02 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index e96624acd65ec..ef62267d9579b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 4c60ddd29d42e..3096c61023772 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/ref/m1.ts","../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/ref/m1.ts","../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map index a1de0913da583..c657ed8edce0c 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map index 861972de2097e..56f12c2290391 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index a1de0913da583..c657ed8edce0c 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 861972de2097e..56f12c2290391 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 64ad8eb164287..eececdeabfdf5 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 63bc893832b84..4bdde30882427 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map index 7a4095156075d..3c1c9b64dc299 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map index 3343670eb846e..9bdc7ad550474 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map index 57bb373e05407..3a4d618044a38 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map index 2da721ff1a0c1..4103e499cbdef 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map index c1f7e172c9d2a..49f97b88a3888 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map index 474dd10752984..830a0ddd3e5fc 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 3343670eb846e..9bdc7ad550474 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index 57bb373e05407..3a4d618044a38 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 7a4095156075d..3c1c9b64dc299 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index c1f7e172c9d2a..49f97b88a3888 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 474dd10752984..830a0ddd3e5fc 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 2da721ff1a0c1..4103e499cbdef 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 155baf7912b7c..6b934e00e04a4 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts","file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts","file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts","file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts","file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map index e9f1d54cc8741..eceec7b450a5e 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map index 4c83678dafdb9..d68dbf6eb9e6d 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map index e96a1a904e70c..b9de639cb1d4b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map index e0513a8b07bee..826729aba8749 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index e9f1d54cc8741..eceec7b450a5e 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 4c83678dafdb9..d68dbf6eb9e6d 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index e96a1a904e70c..b9de639cb1d4b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index e0513a8b07bee..826729aba8749 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index ecbd039578c4a..5396cab1d7c10 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts","file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts","file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map index 94b0fd005cbfa..755cc1d0aaf44 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map index 76cc81a74f445..957a73c648a60 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map index 637153a8c7a52..f7e4388304886 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map index 99312830f1c3a..8baefdad92bbe 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 94b0fd005cbfa..755cc1d0aaf44 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 76cc81a74f445..957a73c648a60 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 637153a8c7a52..f7e4388304886 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 99312830f1c3a..8baefdad92bbe 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index d962fcf11cb75..308dbbfaa67c8 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map index e68a248d5d7dc..a1c9985be48e4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map index c6ff2cc27ce1e..9ccd44f3a018a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index e68a248d5d7dc..a1c9985be48e4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index c6ff2cc27ce1e..9ccd44f3a018a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 35e555688e090..26353fdf396cc 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 19bcc3ee32a40..ec57587014d89 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map index a8c35bc15c620..59ebd34cfe355 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map index f1623c531a61c..9afdf343f77e1 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map index b199c0dc1adfd..5000f3a49b9f2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map index ef338fcc8875e..866e1007e240c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map index 10777c25bd48c..0f5e28ddbf724 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map index dbab2cdf457a2..a39cd29ba7764 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index f1623c531a61c..9afdf343f77e1 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index b199c0dc1adfd..5000f3a49b9f2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index a8c35bc15c620..59ebd34cfe355 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 10777c25bd48c..0f5e28ddbf724 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index dbab2cdf457a2..a39cd29ba7764 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index ef338fcc8875e..866e1007e240c 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 5a120cbe80072..c4facdba9364e 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map index 26e7b01ccdba5..1706ba768171b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map index f92c491640f17..07e9825a93a7a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map index 1b563cf259d6d..d134ab774afff 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map index 46e8000caa09c..d07c1aa067898 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 26e7b01ccdba5..1706ba768171b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index f92c491640f17..07e9825a93a7a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 1b563cf259d6d..d134ab774afff 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 46e8000caa09c..d07c1aa067898 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 28d5511a5ee6f..64c90d05e8808 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map index 88ce97eeeffa7..7e2762b41a45b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map index f92c491640f17..07e9825a93a7a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map index e28d378dfc002..eb8832755683f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map index c956b034f6f9d..4f024886c03bb 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 88ce97eeeffa7..7e2762b41a45b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index f92c491640f17..07e9825a93a7a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index e28d378dfc002..eb8832755683f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index c956b034f6f9d..4f024886c03bb 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index a46d68e9b0541..6d26d850e1924 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map index fa8f5c4613ebb..e9a80c428b2b4 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map index 3d7c6263ee65c..9f1206b5b146f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index fa8f5c4613ebb..e9a80c428b2b4 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 3d7c6263ee65c..9f1206b5b146f 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 28783dfb98362..650c9d1e5d59d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 1361d34702bd9..6113c44d85d98 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 90860d39fe511..ab7082a2e8e1a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map index b9400dc56242b..6bebdd113b6f3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map index c50aee154a247..21c996978fdcc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map index 11747238b4e01..06c30f32eaf7c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map index 186a8fb37535e..b757263c8667e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map index 450cff64fa113..b123ccf13c8f4 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index b9400dc56242b..6bebdd113b6f3 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index c50aee154a247..21c996978fdcc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 90860d39fe511..ab7082a2e8e1a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 186a8fb37535e..b757263c8667e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 450cff64fa113..b123ccf13c8f4 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 11747238b4e01..06c30f32eaf7c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index c1afcd019cc18..baeea1e93dc19 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map index 3539fcb8d17fa..ffc39be804440 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map index 6355e10911480..6366b8c2d8595 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map index 4347d2eb3ea8c..04bd4e10a3b47 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map index 647c302260c3d..9dc457a016701 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 3539fcb8d17fa..ffc39be804440 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 6355e10911480..6366b8c2d8595 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 4347d2eb3ea8c..04bd4e10a3b47 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 647c302260c3d..9dc457a016701 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 13c43235b2b95..aa0c2ca28b2a1 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map index d39589e4f3e7b..cd798e72d8902 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map index 63351122f3e51..6738a871942dd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map index 4cd2a39d1c1b4..81d64320d78de 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map index 993894958b0c9..b2ea9133dfcb9 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index d39589e4f3e7b..cd798e72d8902 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 63351122f3e51..6738a871942dd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 4cd2a39d1c1b4..81d64320d78de 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 993894958b0c9..b2ea9133dfcb9 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 8dca8ba1a6c53..27b41a837a976 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map index 5685e41f2bb55..560075530f1ae 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map index ea96dcd448f95..27abb47a45bbe 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index 5685e41f2bb55..560075530f1ae 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index ea96dcd448f95..27abb47a45bbe 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index f9f1f0cd10ebf..9a9586bd20ded 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 19977a8159bae..16e3437b61c59 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 0f5e1f6de5c06..6b4ece94c1588 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map index 453bd03628699..8271bf25be1bd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map index 019c9ca53da98..8be239f355348 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map index d32dfbe0fa377..c7ae549832a57 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map index a923e39f3eb8d..37adc61e54fdd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map index faf9a0a8d5059..79b428ca3a1de 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 453bd03628699..8271bf25be1bd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index 019c9ca53da98..8be239f355348 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 0f5e1f6de5c06..6b4ece94c1588 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index a923e39f3eb8d..37adc61e54fdd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index faf9a0a8d5059..79b428ca3a1de 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index d32dfbe0fa377..c7ae549832a57 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index bb8c756a0b94c..4d37f7bfbf5fd 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map index 05d9f8cb3dacd..29c8533aded52 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map index e446b64679d5f..d713f6b7f5ee5 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map index cca0e50d76211..8086d9c04da05 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map index 46798ce7bb461..0d24a0e332a2a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 05d9f8cb3dacd..29c8533aded52 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index e446b64679d5f..d713f6b7f5ee5 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index cca0e50d76211..8086d9c04da05 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 46798ce7bb461..0d24a0e332a2a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index d70e1816041b8..7e83d4cd269e8 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map index 43194290d9d6c..91793ab100241 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map index e446b64679d5f..d713f6b7f5ee5 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map index cd7b5d10db425..00e388b171e2f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map index b77575bb8b5cf..07178ab519f00 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 43194290d9d6c..91793ab100241 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index e446b64679d5f..d713f6b7f5ee5 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index cd7b5d10db425..00e388b171e2f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index b77575bb8b5cf..07178ab519f00 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 3c2cbaf1342d2..223d2cfdad30c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js.map index b7c7a76331897..c4bc3c327089b 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js.map index 57aea3578c6d5..208dd329040a0 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index af5f11f8dd381..c0b56df8d9001 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 3d8629098dcc8..5e34d4494ddc1 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 06567a4fddd7a..dce282ee37f08 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index d3c0e8697cd34..1316ec7465939 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map index b7c7a76331897..c4bc3c327089b 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js.map index 41a7fb93ee628..dcdf5faf89716 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map index dc6ab342a5191..096386e968d05 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map index 57aea3578c6d5..208dd329040a0 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js.map index 6af45080bd6c1..87fa414a454ee 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map index c51718c91d88f..a9dba1be1ddbd 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index a77c789e625bf..2293c1a7c9602 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index 5890568ea24c1..d21a585cc41d5 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 502b9145dc80d..5d8cf325d5277 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 1bc2118f2b757..49bb95f32d517 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 48cc4f7aa985d..a48d929a86067 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 476d3d9396665..b9e5ddb335f92 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 5132061665307..d9151baabe48c 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map index 41a7fb93ee628..dcdf5faf89716 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map index 0deeb01864d89..9a899efce6487 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map index 6af45080bd6c1..87fa414a454ee 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map index 40fdb33821b7c..57b2f0a9935b7 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 761471d9d8204..128c9957bf43b 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index d3fedc589bffa..50263c64897cd 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 2923aa0a0140a..40d0111893e18 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 8cd970cb557aa..cc2b2e9b918e4 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 105ebefb06ec7..a910ecda80eb3 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js.map index 41a7fb93ee628..dcdf5faf89716 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map index 0deeb01864d89..9a899efce6487 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js.map index 6af45080bd6c1..87fa414a454ee 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map index 92ae347312c14..6f71fb82f4c2d 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 8e4c69b85cad6..28136d8ffc30a 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index d3fedc589bffa..50263c64897cd 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index f102ba902d9de..f5f5dfcd793b1 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index be65d1d02a5d2..9c9d3ffec9263 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 12c15dd7143ae..a3532b9e4ce85 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map index e68a248d5d7dc..a1c9985be48e4 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map index c6ff2cc27ce1e..9ccd44f3a018a 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index e68a248d5d7dc..a1c9985be48e4 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index c6ff2cc27ce1e..9ccd44f3a018a 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 35e555688e090..26353fdf396cc 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 19bcc3ee32a40..ec57587014d89 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map index a8c35bc15c620..59ebd34cfe355 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map index f1623c531a61c..9afdf343f77e1 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map index b199c0dc1adfd..5000f3a49b9f2 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map index ef338fcc8875e..866e1007e240c 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map index 10777c25bd48c..0f5e28ddbf724 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map index dbab2cdf457a2..a39cd29ba7764 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index f1623c531a61c..9afdf343f77e1 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index b199c0dc1adfd..5000f3a49b9f2 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index a8c35bc15c620..59ebd34cfe355 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 10777c25bd48c..0f5e28ddbf724 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index dbab2cdf457a2..a39cd29ba7764 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index ef338fcc8875e..866e1007e240c 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 5a120cbe80072..c4facdba9364e 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map index 26e7b01ccdba5..1706ba768171b 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map index f92c491640f17..07e9825a93a7a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map index 1b563cf259d6d..d134ab774afff 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map index 46e8000caa09c..d07c1aa067898 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 26e7b01ccdba5..1706ba768171b 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index f92c491640f17..07e9825a93a7a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 1b563cf259d6d..d134ab774afff 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 46e8000caa09c..d07c1aa067898 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 28d5511a5ee6f..64c90d05e8808 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map index 88ce97eeeffa7..7e2762b41a45b 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map index f92c491640f17..07e9825a93a7a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map index e28d378dfc002..eb8832755683f 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map index c956b034f6f9d..4f024886c03bb 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 88ce97eeeffa7..7e2762b41a45b 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index f92c491640f17..07e9825a93a7a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index e28d378dfc002..eb8832755683f 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index c956b034f6f9d..4f024886c03bb 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index a46d68e9b0541..6d26d850e1924 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js.map b/tests/baselines/reference/sourceMapValidationDecorators.js.map index 535d6603d8c02..ac635a518f157 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js.map +++ b/tests/baselines/reference/sourceMapValidationDecorators.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDecorators.js.map] -{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":[],"mappings":";;;;;;;;;AASA;IACI,iBAGS,QAAgB;QAIvB,WAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,0BAAc;;QAJP,aAAQ,GAAR,QAAQ,CAAQ;IAKzB,CAAC;IAID,uBAAK,GAAL;QACI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5C,CAAC;IAUO,oBAAE,GAAV,UAGE,CAAS;QACP,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAID,sBAAI,8BAAS;aAAb;YACI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aAED,UAGE,SAAiB;YACf,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;;;OAPA;IAQL,cAAC;AAAD,CAAC,AA5CD,IA4CC;AArBkB,UAAE,GAAW,EAAE,CAAC;AAV/B;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;oCAGtB;AAID;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;kCACL;AAMlB;IACG,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;iCAGzB;AAID;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;IAMpB,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;wCAJzB;AAbD;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;yBACQ;AAvBnC;IAFC,eAAe;IACf,eAAe,CAAC,EAAE,CAAC;IAGb,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;IAGvB,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;WAqC7B"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":[],"mappings":";;;;;;;;;AASA,IAAM,OAAO;IACT,iBAGS,QAAgB;QAIvB,WAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,0BAAc;;QAJP,aAAQ,GAAR,QAAQ,CAAQ;IAKzB,CAAC;IAID,uBAAK,GAAL;QACI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5C,CAAC;IAUO,oBAAE,GAAV,UAGE,CAAS;QACP,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAID,sBAAI,8BAAS;aAAb;YACI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aAED,UAGE,SAAiB;YACf,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;;;OAPA;IAQL,cAAC;AAAD,CAAC,AA5CD,IA4CC;AArBkB,UAAE,GAAW,EAAE,CAAC;AAV/B;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;oCAGtB;AAID;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;kCACL;AAMlB;IACG,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;iCAGzB;AAID;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;IAMpB,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;wCAJzB;AAbD;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;yBACQ;AAvB7B,OAAO;IAFZ,eAAe;IACf,eAAe,CAAC,EAAE,CAAC;IAGb,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;IAGvB,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;GAPxB,OAAO,CA4CZ"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt index 37f6a4bea0805..d581fdef88634 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt @@ -19,7 +19,9 @@ sourceFile:sourceMapValidationDecorators.ts >>>}; >>>var Greeter = (function () { 1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^ +3 > ^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^-> 1 >declare function ClassDecorator1(target: Function): void; >declare function ClassDecorator2(x: number): (target: Function) => void; >declare function PropertyDecorator1(target: Object, key: string | symbol, descriptor?: PropertyDescriptor): void; @@ -30,13 +32,17 @@ sourceFile:sourceMapValidationDecorators.ts >@ClassDecorator1 >@ClassDecorator2(10) > +2 >class +3 > Greeter 1 >Emitted(10, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(10, 5) Source(10, 7) + SourceIndex(0) +3 >Emitted(10, 12) Source(10, 14) + SourceIndex(0) --- >>> function Greeter(greeting) { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^ -1->class Greeter { +1-> { > 2 > constructor( > @ParameterDecorator1 @@ -729,9 +735,12 @@ sourceFile:sourceMapValidationDecorators.ts --- >>>Greeter = __decorate([ 1 > -2 >^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^ +3 > ^^^^^^^^^^^^^^-> 1 > -1 >Emitted(59, 1) Source(10, 1) + SourceIndex(0) +2 >Greeter +1 >Emitted(59, 1) Source(10, 7) + SourceIndex(0) +2 >Emitted(59, 8) Source(10, 14) + SourceIndex(0) --- >>> ClassDecorator1, 1->^^^^ @@ -846,46 +855,59 @@ sourceFile:sourceMapValidationDecorators.ts 7 >Emitted(65, 40) Source(17, 31) + SourceIndex(0) --- >>>], Greeter); -1 >^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - > ...b: string[]) { - > } - > - > @PropertyDecorator1 - > @PropertyDecorator2(40) - > greet() { - > return "

" + this.greeting + "

"; - > } - > - > @PropertyDecorator1 - > @PropertyDecorator2(50) - > private x: string; - > - > @PropertyDecorator1 - > @PropertyDecorator2(60) - > private static x1: number = 10; - > - > private fn( - > @ParameterDecorator1 - > @ParameterDecorator2(70) - > x: number) { - > return this.greeting; - > } - > - > @PropertyDecorator1 - > @PropertyDecorator2(80) - > get greetings() { - > return this.greeting; - > } - > - > set greetings( - > @ParameterDecorator1 - > @ParameterDecorator2(90) - > greetings: string) { - > this.greeting = greetings; - > } - >} -1 >Emitted(66, 12) Source(54, 2) + SourceIndex(0) +1 >^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 > Greeter +3 > { + > constructor( + > @ParameterDecorator1 + > @ParameterDecorator2(20) + > public greeting: string, + > + > @ParameterDecorator1 + > @ParameterDecorator2(30) + > ...b: string[]) { + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(40) + > greet() { + > return "

" + this.greeting + "

"; + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(50) + > private x: string; + > + > @PropertyDecorator1 + > @PropertyDecorator2(60) + > private static x1: number = 10; + > + > private fn( + > @ParameterDecorator1 + > @ParameterDecorator2(70) + > x: number) { + > return this.greeting; + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(80) + > get greetings() { + > return this.greeting; + > } + > + > set greetings( + > @ParameterDecorator1 + > @ParameterDecorator2(90) + > greetings: string) { + > this.greeting = greetings; + > } + > } +1 >Emitted(66, 4) Source(10, 7) + SourceIndex(0) +2 >Emitted(66, 11) Source(10, 14) + SourceIndex(0) +3 >Emitted(66, 12) Source(54, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationDecorators.js.map \ No newline at end of file diff --git a/tests/baselines/reference/systemModule7.js b/tests/baselines/reference/systemModule7.js index bf34e3f786ccb..d25ca627e441b 100644 --- a/tests/baselines/reference/systemModule7.js +++ b/tests/baselines/reference/systemModule7.js @@ -21,7 +21,7 @@ System.register([], function (exports_1, context_1) { // filename: instantiatedModule.ts (function (M) { var x = 1; - })(M = M || (M = {})); + })(M || (M = {})); exports_1("M", M); } }; diff --git a/tests/baselines/reference/systemModuleDeclarationMerging.js b/tests/baselines/reference/systemModuleDeclarationMerging.js index 88b1b20149512..27cdd9f157274 100644 --- a/tests/baselines/reference/systemModuleDeclarationMerging.js +++ b/tests/baselines/reference/systemModuleDeclarationMerging.js @@ -21,7 +21,7 @@ System.register([], function (exports_1, context_1) { execute: function () { (function (F) { var x; - })(F = F || (F = {})); + })(F || (F = {})); exports_1("F", F); C = (function () { function C() { @@ -31,14 +31,14 @@ System.register([], function (exports_1, context_1) { exports_1("C", C); (function (C) { var x; - })(C = C || (C = {})); + })(C || (C = {})); exports_1("C", C); (function (E) { - })(E = E || (E = {})); + })(E || (E = {})); exports_1("E", E); (function (E) { var x; - })(E = E || (E = {})); + })(E || (E = {})); exports_1("E", E); } }; diff --git a/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js b/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js index db907c49d911b..c6d3c8295e01f 100644 --- a/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js +++ b/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js @@ -30,11 +30,11 @@ System.register([], function (exports_1, context_1) { exports_1("TopLevelClass", TopLevelClass); (function (TopLevelModule) { var v; - })(TopLevelModule = TopLevelModule || (TopLevelModule = {})); + })(TopLevelModule || (TopLevelModule = {})); exports_1("TopLevelModule", TopLevelModule); (function (TopLevelEnum) { TopLevelEnum[TopLevelEnum["E"] = 0] = "E"; - })(TopLevelEnum = TopLevelEnum || (TopLevelEnum = {})); + })(TopLevelEnum || (TopLevelEnum = {})); exports_1("TopLevelEnum", TopLevelEnum); (function (TopLevelModule2) { var NonTopLevelClass = (function () { @@ -53,7 +53,7 @@ System.register([], function (exports_1, context_1) { (function (NonTopLevelEnum) { NonTopLevelEnum[NonTopLevelEnum["E"] = 0] = "E"; })(NonTopLevelEnum = TopLevelModule2.NonTopLevelEnum || (TopLevelModule2.NonTopLevelEnum = {})); - })(TopLevelModule2 = TopLevelModule2 || (TopLevelModule2 = {})); + })(TopLevelModule2 || (TopLevelModule2 = {})); exports_1("TopLevelModule2", TopLevelModule2); } }; diff --git a/tests/baselines/reference/tsxDefaultImports.js b/tests/baselines/reference/tsxDefaultImports.js index e7e0a13860d83..46a94dea92fcf 100644 --- a/tests/baselines/reference/tsxDefaultImports.js +++ b/tests/baselines/reference/tsxDefaultImports.js @@ -25,9 +25,9 @@ var SomeClass = (function () { } return SomeClass; }()); +SomeClass.E = SomeEnum; exports.__esModule = true; exports["default"] = SomeClass; -SomeClass.E = SomeEnum; //// [b.js] "use strict"; var a_1 = require("./a"); From 5e2bd6b063a935d5cb5eda00d200a951cca662bf Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 20 Oct 2016 16:44:51 -0700 Subject: [PATCH 08/18] Move System module transform to end. --- src/compiler/binder.ts | 2 +- src/compiler/core.ts | 67 +- src/compiler/factory.ts | 40 +- src/compiler/transformer.ts | 10 +- src/compiler/transformers/destructuring.ts | 18 +- src/compiler/transformers/es2015.ts | 20 +- src/compiler/transformers/module/module.ts | 683 +++--- src/compiler/transformers/module/system.ts | 1967 ++++++++++------- src/compiler/transformers/ts.ts | 31 +- src/compiler/types.ts | 53 +- src/compiler/utilities.ts | 50 +- .../reference/capturedLetConstInLoop4.js | 4 +- .../reference/dottedNamesInSystem.js | 2 +- .../outFilerootDirModuleNamesSystem.js | 2 +- tests/baselines/reference/systemModule10.js | 4 +- .../baselines/reference/systemModule10_ES5.js | 4 +- tests/baselines/reference/systemModule11.js | 10 +- tests/baselines/reference/systemModule13.js | 6 +- tests/baselines/reference/systemModule14.js | 4 +- tests/baselines/reference/systemModule17.js | 8 +- tests/baselines/reference/systemModule3.js | 4 +- tests/baselines/reference/systemModule8.js | 2 +- tests/baselines/reference/systemModule9.js | 1 - ...stemModuleConstEnumsSeparateCompilation.js | 2 +- .../systemModuleDeclarationMerging.js | 2 +- .../reference/systemModuleExportDefault.js | 4 +- .../systemModuleNonTopLevelModuleMembers.js | 2 +- .../reference/systemModuleTargetES6.js | 6 +- 28 files changed, 1735 insertions(+), 1273 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 2b3584be9e0da..97644000b80b5 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -2485,7 +2485,7 @@ namespace ts { && (leftKind === SyntaxKind.ObjectLiteralExpression || leftKind === SyntaxKind.ArrayLiteralExpression)) { // Destructuring assignments are ES6 syntax. - transformFlags |= TransformFlags.AssertES2015 | TransformFlags.DestructuringAssignment; + transformFlags |= TransformFlags.AssertES2015 | TransformFlags.AssertDestructuringAssignment; } else if (operatorTokenKind === SyntaxKind.AsteriskAsteriskToken || operatorTokenKind === SyntaxKind.AsteriskAsteriskEqualsToken) { diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 1dd8ed8ff7f9a..e143d4c434520 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -424,11 +424,16 @@ namespace ts { export function some(array: T[], predicate?: (value: T) => boolean): boolean { if (array) { - for (const v of array) { - if (!predicate || predicate(v)) { - return true; + if (predicate) { + for (const v of array) { + if (predicate(v)) { + return true; + } } } + else { + return array.length > 0; + } } return false; } @@ -485,6 +490,14 @@ namespace ts { return result; } + /** + * Appends a value to an array, returning the array. + * + * @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array + * is created if `value` was appended. + * @param value The value to append to the array. If `value` is `undefined`, nothing is + * appended. + */ export function append(to: T[] | undefined, value: T | undefined): T[] | undefined { if (value === undefined) return to; if (to === undefined) to = []; @@ -492,14 +505,20 @@ namespace ts { return to; } - export function addRange(to: T[], from: T[]): void { - if (to && from) { - for (const v of from) { - if (v !== undefined) { - to.push(v); - } - } + /** + * Appends a range of value to an array, returning the array. + * + * @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array + * is created if `value` was appended. + * @param from The values to append to the array. If `from` is `undefined`, nothing is + * appended. If an element of `from` is `undefined`, that element is not appended. + */ + export function addRange(to: T[] | undefined, from: T[] | undefined): T[] | undefined { + if (from === undefined) return to; + for (const v of from) { + to = append(to, v); } + return to; } export function rangeEquals(array1: T[], array2: T[], pos: number, end: number) { @@ -512,33 +531,43 @@ namespace ts { return true; } + /** + * Returns the first element of an array if non-empty, `undefined` otherwise. + */ export function firstOrUndefined(array: T[]): T { return array && array.length > 0 ? array[0] : undefined; } + /** + * Returns the last element of an array if non-empty, `undefined` otherwise. + */ + export function lastOrUndefined(array: T[]): T { + return array && array.length > 0 + ? array[array.length - 1] + : undefined; + } + + /** + * Returns the only element of an array if it contains only one element, `undefined` otherwise. + */ export function singleOrUndefined(array: T[]): T { return array && array.length === 1 ? array[0] : undefined; } + /** + * Returns the only element of an array if it contains only one element; otheriwse, returns the + * array. + */ export function singleOrMany(array: T[]): T | T[] { return array && array.length === 1 ? array[0] : array; } - /** - * Returns the last element of an array if non-empty, undefined otherwise. - */ - export function lastOrUndefined(array: T[]): T { - return array && array.length > 0 - ? array[array.length - 1] - : undefined; - } - /** * Performs a binary search, finding the index at which 'value' occurs in 'array'. * If no such index is found, returns the 2's-complement of first index at which diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 530d64e8aebe3..2b36afa297c2e 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -1472,6 +1472,17 @@ namespace ts { return node; } + /** + * Creates a synthetic element to act as a placeholder for the beginning of a merged declaration in + * order to properly emit exports. + */ + export function createMergeDeclarationMarker(original: Node) { + const node = createNode(SyntaxKind.MergeDeclarationMarker); + node.emitNode = {}; + node.original = original; + return node; + } + /** * Creates a synthetic expression to act as a placeholder for a not-emitted expression in * order to preserve comments or sourcemap positions. @@ -2206,7 +2217,7 @@ namespace ts { * Gets whether an identifier should only be referred to by its local name. */ export function isLocalName(node: Identifier) { - return (getEmitFlags(node) & EmitFlags.ExportBindingName) === EmitFlags.LocalName; + return (getEmitFlags(node) & EmitFlags.LocalName) !== 0; } /** @@ -2228,32 +2239,7 @@ namespace ts { * name points to an exported symbol. */ export function isExportName(node: Identifier) { - return (getEmitFlags(node) & EmitFlags.ExportBindingName) === EmitFlags.ExportName; - } - - /** - * Gets the export binding name of a declaration for use in the left-hand side of assignment - * expressions. This is primarily used for declarations that can be referred to by name in the - * declaration's immediate scope (classes, enums, namespaces). If the declaration is exported - * and the name is the target of an assignment expression, its export binding name should be - * substituted with an expression that assigns *both* the local *and* export names of the - * declaration. If an export binding name appears in any other position it should be treated - * as a local name. - * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. - */ - export function getExportBindingName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier { - return getName(node, allowComments, allowSourceMaps, EmitFlags.ExportBindingName); - } - - /** - * Gets whether an identifier should be treated as both an export name and a local name when - * it is the target of an assignment expression. - */ - export function isExportBindingName(node: Identifier) { - return (getEmitFlags(node) & EmitFlags.ExportBindingName) === EmitFlags.ExportBindingName; + return (getEmitFlags(node) & EmitFlags.ExportName) !== 0; } /** diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 08ff4a55a1a65..6da6a54313b20 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -112,10 +112,6 @@ namespace ts { transformers.push(transformTypeScript); - if (moduleKind === ModuleKind.System) { - transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ModuleKind.None]); - } - if (jsx === JsxEmit.React) { transformers.push(transformJsx); } @@ -133,10 +129,10 @@ namespace ts { transformers.push(transformGenerators); } - if (moduleKind !== ModuleKind.System) { - transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ModuleKind.None]); - } + transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ModuleKind.None]); + // The ES5 transformer is last so that it can substitute expressions like `exports.default` + // for ES3. if (languageVersion < ScriptTarget.ES5) { transformers.push(transformES5); } diff --git a/src/compiler/transformers/destructuring.ts b/src/compiler/transformers/destructuring.ts index c7219866df7a9..96e9ea23ab778 100644 --- a/src/compiler/transformers/destructuring.ts +++ b/src/compiler/transformers/destructuring.ts @@ -176,14 +176,15 @@ namespace ts { * * @param node The VariableDeclaration to flatten. * @param recordTempVariable A callback used to record new temporary variables. - * @param nameSubstitution An optional callback used to substitute binding names. + * @param createAssignmentCallback An optional callback used to create assignment expressions + * for non-temporary variables. * @param visitor An optional visitor to use to visit expressions. */ export function flattenVariableDestructuringToExpression( context: TransformationContext, node: VariableDeclaration, recordTempVariable: (name: Identifier) => void, - nameSubstitution?: (name: Identifier) => Expression, + createAssignmentCallback?: (name: Identifier, value: Expression, location?: TextRange) => Expression, visitor?: (node: Node) => VisitResult) { const pendingAssignments: Expression[] = []; @@ -195,18 +196,20 @@ namespace ts { return expression; function emitAssignment(name: Identifier, value: Expression, location: TextRange, original: Node) { - const left = nameSubstitution && nameSubstitution(name) || name; - emitPendingAssignment(left, value, location, original); + const expression = createAssignmentCallback + ? createAssignmentCallback(name, value, location) + : createAssignment(name, value, location); + + emitPendingAssignment(expression, original); } function emitTempVariableAssignment(value: Expression, location: TextRange) { const name = createTempVariable(recordTempVariable); - emitPendingAssignment(name, value, location, /*original*/ undefined); + emitPendingAssignment(createAssignment(name, value, location), /*original*/ undefined); return name; } - function emitPendingAssignment(name: Expression, value: Expression, location: TextRange, original: Node) { - const expression = createAssignment(name, value, location); + function emitPendingAssignment(expression: Expression, original: Node) { expression.original = original; // NOTE: this completely disables source maps, but aligns with the behavior of @@ -214,7 +217,6 @@ namespace ts { setEmitFlags(expression, EmitFlags.NoNestedSourceMaps); pendingAssignments.push(expression); - return expression; } } diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 8d158cd665eb5..8ba416919fc77 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -585,7 +585,7 @@ namespace ts { // }()); const variable = createVariableDeclaration( - getDeclarationName(node, /*allowComments*/ true), + getLocalName(node, /*allowComments*/ true), /*type*/ undefined, transformClassLikeDeclarationToExpression(node) ); @@ -601,14 +601,12 @@ namespace ts { // Add an `export default` statement for default exports (for `--target es5 --module es6`) if (hasModifier(node, ModifierFlags.Export)) { - if (hasModifier(node, ModifierFlags.Default)) { - const exportStatement = createExportDefault(getLocalName(node)); - setOriginalNode(exportStatement, statement); - statements.push(exportStatement); - } - else { - statements.push(createExternalModuleExport(getLocalName(node))); - } + const exportStatement = hasModifier(node, ModifierFlags.Default) + ? createExportDefault(getLocalName(node)) + : createExternalModuleExport(getLocalName(node)); + + setOriginalNode(exportStatement, statement); + statements.push(exportStatement); } const emitFlags = getEmitFlags(node); @@ -758,7 +756,7 @@ namespace ts { if (extendsClauseElement) { statements.push( createStatement( - createExtendsHelper(currentSourceFile.externalHelpersModuleName, getDeclarationName(node)), + createExtendsHelper(currentSourceFile.externalHelpersModuleName, getLocalName(node)), /*location*/ extendsClauseElement ) ); @@ -1694,7 +1692,7 @@ namespace ts { if (decl.initializer) { let assignment: Expression; if (isBindingPattern(decl.name)) { - assignment = flattenVariableDestructuringToExpression(context, decl, hoistVariableDeclaration, /*nameSubstitution*/ undefined, visitor); + assignment = flattenVariableDestructuringToExpression(context, decl, hoistVariableDeclaration, /*createAssignmentCallback*/ undefined, visitor); } else { assignment = createBinary(decl.name, SyntaxKind.EqualsToken, visitNode(decl.initializer, visitor, isExpression)); diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index 2d8a513cc8845..fc193a7850df2 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -4,6 +4,12 @@ /*@internal*/ namespace ts { export function transformModule(context: TransformationContext) { + interface AsynchronousDependencies { + aliasedModuleNames: Expression[]; + unaliasedModuleNames: Expression[]; + importAliasNames: ParameterDeclaration[]; + } + const transformModuleDelegates = createMap<(node: SourceFile) => SourceFile>({ [ModuleKind.None]: transformCommonJSModule, [ModuleKind.CommonJS]: transformCommonJSModule, @@ -48,25 +54,22 @@ namespace ts { * @param node The SourceFile node. */ function transformSourceFile(node: SourceFile) { - if (isDeclarationFile(node)) { + if (isDeclarationFile(node) + || !(isExternalModule(node) + || compilerOptions.isolatedModules)) { return node; } - if (isExternalModule(node) || compilerOptions.isolatedModules) { - currentSourceFile = node; - currentModuleInfo = moduleInfoMap[getOriginalNodeId(node)] = collectExternalModuleInfo(node, resolver); - - // Perform the transformation. - const transformModule = transformModuleDelegates[moduleKind] || transformModuleDelegates[ModuleKind.None]; - const updated = transformModule(node); - aggregateTransformFlags(updated); + currentSourceFile = node; + currentModuleInfo = moduleInfoMap[getOriginalNodeId(node)] = collectExternalModuleInfo(node, resolver); - currentSourceFile = undefined; - currentModuleInfo = undefined; - return updated; - } + // Perform the transformation. + const transformModule = transformModuleDelegates[moduleKind] || transformModuleDelegates[ModuleKind.None]; + const updated = transformModule(node); - return node; + currentSourceFile = undefined; + currentModuleInfo = undefined; + return aggregateTransformFlags(updated); } /** @@ -78,8 +81,8 @@ namespace ts { startLexicalEnvironment(); const statements: Statement[] = []; - const statementOffset = addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, visitor); - addRange(statements, visitNodes(node.statements, visitor, isStatement, statementOffset)); + const statementOffset = addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor); + addRange(statements, visitNodes(node.statements, sourceElementVisitor, isStatement, statementOffset)); addRange(statements, endLexicalEnvironment()); addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false); @@ -192,6 +195,56 @@ namespace ts { ); } + /** + * Collect the additional asynchronous dependencies for the module. + * + * @param node The source file. + * @param includeNonAmdDependencies A value indicating whether to include non-AMD dependencies. + */ + function collectAsynchronousDependencies(node: SourceFile, includeNonAmdDependencies: boolean): AsynchronousDependencies { + // names of modules with corresponding parameter in the factory function + const aliasedModuleNames: Expression[] = []; + + // names of modules with no corresponding parameters in factory function + const unaliasedModuleNames: Expression[] = []; + + // names of the parameters in the factory function; these + // parameters need to match the indexes of the corresponding + // module names in aliasedModuleNames. + const importAliasNames: ParameterDeclaration[] = []; + + // Fill in amd-dependency tags + for (const amdDependency of node.amdDependencies) { + if (amdDependency.name) { + aliasedModuleNames.push(createLiteral(amdDependency.path)); + importAliasNames.push(createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, amdDependency.name)); + } + else { + unaliasedModuleNames.push(createLiteral(amdDependency.path)); + } + } + + for (const importNode of currentModuleInfo.externalImports) { + // Find the name of the external module + const externalModuleName = getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions); + + // Find the name of the module alias, if there is one + const importAliasName = getLocalNameForExternalImport(importNode, currentSourceFile); + if (includeNonAmdDependencies && importAliasName) { + // Set emitFlags on the name of the classDeclaration + // This is so that when printer will not substitute the identifier + setEmitFlags(importAliasName, EmitFlags.NoSubstitution); + aliasedModuleNames.push(externalModuleName); + importAliasNames.push(createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, importAliasName)); + } + else { + unaliasedModuleNames.push(externalModuleName); + } + } + + return { aliasedModuleNames, unaliasedModuleNames, importAliasNames }; + } + /** * Transforms a SourceFile into an AMD or UMD module body. * @@ -201,10 +254,10 @@ namespace ts { startLexicalEnvironment(); const statements: Statement[] = []; - const statementOffset = addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, visitor); + const statementOffset = addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor); // Visit each statement of the module body. - addRange(statements, visitNodes(node.statements, visitor, isStatement, statementOffset)); + addRange(statements, visitNodes(node.statements, sourceElementVisitor, isStatement, statementOffset)); // End the lexical environment for the module body // and merge any new lexical declarations. @@ -223,12 +276,53 @@ namespace ts { return body; } + /** + * Adds the down-level representation of `export=` to the statement list if one exists + * in the source file. + * + * @param statements The Statement list to modify. + * @param emitAsReturn A value indicating whether to emit the `export=` statement as a + * return statement. + */ + function addExportEqualsIfNeeded(statements: Statement[], emitAsReturn: boolean) { + if (currentModuleInfo.exportEquals) { + if (emitAsReturn) { + const statement = createReturn( + currentModuleInfo.exportEquals.expression, + /*location*/ currentModuleInfo.exportEquals + ); + + setEmitFlags(statement, EmitFlags.NoTokenSourceMaps | EmitFlags.NoComments); + statements.push(statement); + } + else { + const statement = createStatement( + createAssignment( + createPropertyAccess( + createIdentifier("module"), + "exports" + ), + currentModuleInfo.exportEquals.expression + ), + /*location*/ currentModuleInfo.exportEquals + ); + + setEmitFlags(statement, EmitFlags.NoComments); + statements.push(statement); + } + } + } + + // + // Top-Level Source Element Visitors + // + /** * Visits a node at the top level of the source file. * - * @param node The node. + * @param node The node to visit. */ - function visitor(node: Node): VisitResult { + function sourceElementVisitor(node: Node): VisitResult { switch (node.kind) { case SyntaxKind.ImportDeclaration: return visitImportDeclaration(node); @@ -251,8 +345,8 @@ namespace ts { case SyntaxKind.ClassDeclaration: return visitClassDeclaration(node); - case SyntaxKind.NotEmittedStatement: - return visitNotEmittedStatement(node); + case SyntaxKind.MergeDeclarationMarker: + return visitMergeDeclarationMarker(node); case SyntaxKind.EndOfDeclarationMarker: return visitEndOfDeclarationMarker(node); @@ -264,26 +358,10 @@ namespace ts { } } - /** - * Visits a modifier. - * - * @param node The modifier. - */ - function modifierVisitor(node: Node): VisitResult { - // Elide module-specific modifiers. - switch (node.kind) { - case SyntaxKind.ExportKeyword: - case SyntaxKind.DefaultKeyword: - return undefined; - } - - return node; - } - /** * Visits an ImportDeclaration node. * - * @param node The ImportDeclaration node + * @param node The node to visit. */ function visitImportDeclaration(node: ImportDeclaration): VisitResult { let statements: Statement[]; @@ -363,14 +441,37 @@ namespace ts { ); } - statements = appendExportsOfImportDeclaration(statements, node); + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfImportDeclaration(deferredExports[id], node); + } + else { + statements = appendExportsOfImportDeclaration(statements, node); + } + return singleOrMany(statements); } + /** + * Creates a `require()` call to import an external module. + * + * @param importNode The declararation to import. + */ + function createRequireCall(importNode: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration) { + const moduleName = getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions); + const args: Expression[] = []; + if (moduleName) { + args.push(moduleName); + } + + return createCall(createIdentifier("require"), /*typeArguments*/ undefined, args); + } + /** * Visits an ImportEqualsDeclaration node. * - * @param node The ImportEqualsDeclaration node + * @param node The node to visit. */ function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): VisitResult { Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); @@ -380,7 +481,7 @@ namespace ts { if (hasModifier(node, ModifierFlags.Export)) { statements = append(statements, createStatement( - createExportAssignment( + createExportExpression( node.name, createRequireCall(node) ), @@ -412,7 +513,7 @@ namespace ts { if (hasModifier(node, ModifierFlags.Export)) { statements = append(statements, createStatement( - createExportAssignment(getExportName(node), getLocalName(node)), + createExportExpression(getExportName(node), getLocalName(node)), /*location*/ node ) ); @@ -420,6 +521,7 @@ namespace ts { } if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node const id = getOriginalNodeId(node); deferredExports[id] = appendExportsOfImportEqualsDeclaration(deferredExports[id], node); } @@ -433,7 +535,7 @@ namespace ts { /** * Visits an ExportDeclaration node. * - * @param The ExportDeclaration node + * @param The node to visit. */ function visitExportDeclaration(node: ExportDeclaration): VisitResult { if (!node.moduleSpecifier) { @@ -468,7 +570,7 @@ namespace ts { ); statements.push( createStatement( - createExportAssignment(getExportName(specifier), exportedValue), + createExportExpression(getExportName(specifier), exportedValue), /*location*/ specifier ) ); @@ -496,7 +598,7 @@ namespace ts { /** * Visits an ExportAssignment node. * - * @param node The ExportAssignment node + * @param node The node to visit. */ function visitExportAssignment(node: ExportAssignment): VisitResult { if (node.isExportEquals) { @@ -518,84 +620,9 @@ namespace ts { } /** - * Visits a VariableStatement. - * - * @param node A VariableStatement node. - */ - function visitVariableStatement(node: VariableStatement): VisitResult { - let statements: Statement[]; - let variables: VariableDeclaration[]; - let expressions: Expression[]; - if (hasModifier(node, ModifierFlags.Export)) { - let modifiers: NodeArray; - - // If we're exporting these variables, then these just become assignments to 'exports.x'. - // We only want to emit assignments for variables with initializers. - for (const variable of node.declarationList.declarations) { - if (isIdentifier(variable.name) && isLocalName(variable.name)) { - if (!modifiers) { - modifiers = visitNodes(node.modifiers, modifierVisitor, isModifier); - } - - variables = append(variables, variable); - } - else if (variable.initializer) { - expressions = append(expressions, transformInitializedVariable(variable)); - } - } - - if (variables) { - statements = append(statements, updateVariableStatement(node, modifiers, updateVariableDeclarationList(node.declarationList, variables))); - } - - if (expressions) { - statements = append(statements, createStatement(inlineExpressions(expressions), /*location*/ node)); - } - } - else { - statements = append(statements, node); - } - - if (hasAssociatedEndOfDeclarationMarker(node)) { - // Defer exports until we encounter an EndOfDeclarationMarker node - const id = getOriginalNodeId(node); - deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node); - } - else { - statements = appendExportsOfVariableStatement(statements, node); - } - - // statements = addExportsOfVariableStatement(statements, node); - return singleOrMany(statements); - } - - /** - * Transforms an exported variable with an initializer into an expression. - * - * @param node The variable to transform. - */ - function transformInitializedVariable(node: VariableDeclaration): Expression { - const name = node.name; - if (isBindingPattern(name)) { - return flattenVariableDestructuringToExpression( - context, - node, - hoistVariableDeclaration, - getModuleMemberName - ); - } - else { - return createAssignment( - getModuleMemberName(name), - node.initializer - ); - } - } - - /** - * Visits a FunctionDeclaration. + * Visits a FunctionDeclaration node. * - * @param node A FunctionDeclaration node. + * @param node The node to visit. */ function visitFunctionDeclaration(node: FunctionDeclaration): VisitResult { let statements: Statement[]; @@ -634,9 +661,9 @@ namespace ts { } /** - * Visits a ClassDeclaration. + * Visits a ClassDeclaration node. * - * @param node A ClassDeclaration node. + * @param node The node to visit. */ function visitClassDeclaration(node: ClassDeclaration): VisitResult { let statements: Statement[]; @@ -673,19 +700,97 @@ namespace ts { } /** - * Visits a NotEmittedStatement. + * Visits a VariableStatement node. * - * @param node A NotEmittedStatement node. + * @param node The node to visit. */ - function visitNotEmittedStatement(node: NotEmittedStatement): VisitResult { + function visitVariableStatement(node: VariableStatement): VisitResult { + let statements: Statement[]; + let variables: VariableDeclaration[]; + let expressions: Expression[]; + if (hasModifier(node, ModifierFlags.Export)) { + let modifiers: NodeArray; + + // If we're exporting these variables, then these just become assignments to 'exports.x'. + // We only want to emit assignments for variables with initializers. + for (const variable of node.declarationList.declarations) { + if (isIdentifier(variable.name) && isLocalName(variable.name)) { + if (!modifiers) { + modifiers = visitNodes(node.modifiers, modifierVisitor, isModifier); + } + + variables = append(variables, variable); + } + else if (variable.initializer) { + expressions = append(expressions, transformInitializedVariable(variable)); + } + } + + if (variables) { + statements = append(statements, updateVariableStatement(node, modifiers, updateVariableDeclarationList(node.declarationList, variables))); + } + + if (expressions) { + statements = append(statements, createStatement(inlineExpressions(expressions), /*location*/ node)); + } + } + else { + statements = append(statements, node); + } + + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node); + } + else { + statements = appendExportsOfVariableStatement(statements, node); + } + + return singleOrMany(statements); + } + + /** + * Transforms an exported variable with an initializer into an expression. + * + * @param node The node to transform. + */ + function transformInitializedVariable(node: VariableDeclaration): Expression { + if (isBindingPattern(node.name)) { + return flattenVariableDestructuringToExpression( + context, + node, + hoistVariableDeclaration, + createExportExpression + ); + } + else { + return createAssignment( + createPropertyAccess( + createIdentifier("exports"), + node.name, + /*location*/ node.name + ), + node.initializer + ); + } + } + + /** + * Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged + * and transformed declaration. + * + * @param node The node to visit. + */ + function visitMergeDeclarationMarker(node: MergeDeclarationMarker): VisitResult { // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding // declaration we do not emit a leading variable declaration. To preserve the // begin/end semantics of the declararation and to properly handle exports - // we wrap the leading variable declaration in a `NotEmittedStatement`. + // we wrapped the leading variable declaration in a `MergeDeclarationMarker`. // // To balance the declaration, add the exports of the elided variable // statement. - if (hasAssociatedEndOfDeclarationMarker(node.original) && node.original.kind === SyntaxKind.VariableStatement) { + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === SyntaxKind.VariableStatement) { const id = getOriginalNodeId(node); deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } @@ -694,9 +799,19 @@ namespace ts { } /** - * Visits a DeclarationMarker used as a placeholder for the end of a transformed declaration. + * Determines whether a node has an associated EndOfDeclarationMarker. + * + * @param node The node to test. + */ + function hasAssociatedEndOfDeclarationMarker(node: Node) { + return (getEmitFlags(node) & EmitFlags.HasEndOfDeclarationMarker) !== 0; + } + + /** + * Visits a DeclarationMarker used as a placeholder for the end of a transformed + * declaration. * - * @param node A DeclarationMarker node. + * @param node The node to visit. */ function visitEndOfDeclarationMarker(node: EndOfDeclarationMarker): VisitResult { // For some transformations we emit an `EndOfDeclarationMarker` to mark the actual @@ -716,10 +831,9 @@ namespace ts { * Appends the exports of an ImportDeclaration to a statement list, returning the * statement list. * - * If `statements` is `undefined`, a new array is allocated if statements are appended. - * * @param statements A statement list to which the down-level export statements are to be - * appended. + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. * @param decl The declaration whose exports are to be recorded. */ function appendExportsOfImportDeclaration(statements: Statement[] | undefined, decl: ImportDeclaration): Statement[] | undefined { @@ -728,25 +842,27 @@ namespace ts { } const importClause = decl.importClause; - if (importClause) { - if (importClause.name) { - statements = appendExportsOfDeclaration(statements, importClause); - } + if (!importClause) { + return statements; + } - const namedBindings = importClause.namedBindings; - if (namedBindings) { - switch (namedBindings.kind) { - case SyntaxKind.NamespaceImport: - statements = appendExportsOfDeclaration(statements, namedBindings); - break; + if (importClause.name) { + statements = appendExportsOfDeclaration(statements, importClause); + } - case SyntaxKind.NamedImports: - for (const importBinding of namedBindings.elements) { - statements = appendExportsOfDeclaration(statements, importBinding); - } + const namedBindings = importClause.namedBindings; + if (namedBindings) { + switch (namedBindings.kind) { + case SyntaxKind.NamespaceImport: + statements = appendExportsOfDeclaration(statements, namedBindings); + break; - break; - } + case SyntaxKind.NamedImports: + for (const importBinding of namedBindings.elements) { + statements = appendExportsOfDeclaration(statements, importBinding); + } + + break; } } @@ -757,10 +873,9 @@ namespace ts { * Appends the exports of an ImportEqualsDeclaration to a statement list, returning the * statement list. * - * If `statements` is `undefined`, a new array is allocated if statements are appended. - * * @param statements A statement list to which the down-level export statements are to be - * appended. + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. * @param decl The declaration whose exports are to be recorded. */ function appendExportsOfImportEqualsDeclaration(statements: Statement[] | undefined, decl: ImportEqualsDeclaration): Statement[] | undefined { @@ -775,10 +890,9 @@ namespace ts { * Appends the exports of a VariableStatement to a statement list, returning the statement * list. * - * If `statements` is `undefined`, a new array is allocated if statements are appended. - * * @param statements A statement list to which the down-level export statements are to be - * appended. + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. * @param node The VariableStatement whose exports are to be recorded. */ function appendExportsOfVariableStatement(statements: Statement[] | undefined, node: VariableStatement): Statement[] | undefined { @@ -797,10 +911,9 @@ namespace ts { * Appends the exports of a VariableDeclaration or BindingElement to a statement list, * returning the statement list. * - * If `statements` is `undefined`, a new array is allocated if statements are appended. - * * @param statements A statement list to which the down-level export statements are to be - * appended. + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. * @param decl The declaration whose exports are to be recorded. */ function appendExportsOfBindingElement(statements: Statement[] | undefined, decl: VariableDeclaration | BindingElement): Statement[] | undefined { @@ -826,9 +939,8 @@ namespace ts { * Appends the exports of a ClassDeclaration or FunctionDeclaration to a statement list, * returning the statement list. * - * If `statements` is `undefined`, a new array is allocated if statements are appended. - * * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are * appended. * @param decl The declaration whose exports are to be recorded. */ @@ -852,10 +964,9 @@ namespace ts { /** * Appends the exports of a declaration to a statement list, returning the statement list. * - * If `statements` is `undefined`, a new array is allocated if statements are appended. - * * @param statements A statement list to which the down-level export statements are to be - * appended. + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. * @param decl The declaration to export. */ function appendExportsOfDeclaration(statements: Statement[] | undefined, decl: Declaration): Statement[] | undefined { @@ -873,9 +984,9 @@ namespace ts { * Appends the down-level representation of an export to a statement list, returning the * statement list. * - * If `statements` is `undefined`, a new array is allocated if statements are appended. - * - * @param statements The statement list to modify. + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. * @param exportName The name of the export. * @param expression The expression to export. * @param location The location to use for source maps and comments for the export. @@ -888,7 +999,7 @@ namespace ts { if (languageVersion === ScriptTarget.ES3) { statements = append(statements, createStatement( - createExportAssignment( + createExportExpression( createIdentifier("__esModule"), createLiteral(true) ) @@ -920,56 +1031,71 @@ namespace ts { } /** - * Adds the down-level representation of `export=` to the statement list if one exists - * in the source file. + * Creates a call to the current file's export function to export a value. * - * @param statements The Statement list to modify. - * @param emitAsReturn A value indicating whether to emit the `export=` statement as a - * return statement. + * @param name The bound name of the export. + * @param value The exported value. + * @param location The location to use for source maps and comments for the export. + * @param allowComments An optional value indicating whether to emit comments for the statement. */ - function addExportEqualsIfNeeded(statements: Statement[], emitAsReturn: boolean) { - if (currentModuleInfo.exportEquals) { - if (emitAsReturn) { - const statement = createReturn( - currentModuleInfo.exportEquals.expression, - /*location*/ currentModuleInfo.exportEquals - ); + function createExportStatement(name: Identifier, value: Expression, location?: TextRange, allowComments?: boolean) { + const statement = createStatement(createExportExpression(name, value), location); + startOnNewLine(statement); + if (!allowComments) { + setEmitFlags(statement, EmitFlags.NoComments); + } - setEmitFlags(statement, EmitFlags.NoTokenSourceMaps | EmitFlags.NoComments); - statements.push(statement); - } - else { - const statement = createStatement( - createAssignment( - createPropertyAccess( - createIdentifier("module"), - "exports" - ), - currentModuleInfo.exportEquals.expression - ), - /*location*/ currentModuleInfo.exportEquals - ); + return statement; + } - setEmitFlags(statement, EmitFlags.NoComments); - statements.push(statement); - } - } + /** + * Creates a call to the current file's export function to export a value. + * + * @param name The bound name of the export. + * @param value The exported value. + * @param location The location to use for source maps and comments for the export. + */ + function createExportExpression(name: Identifier, value: Expression, location?: TextRange) { + return createAssignment( + createPropertyAccess( + createIdentifier("exports"), + getSynthesizedClone(name) + ), + value, + location + ); } + // + // Modifier Visitors + // + /** - * Determines whether a node has an associated EndDeclarationMarker. + * Visit nodes to elide module-specific modifiers. * - * @param node The node to test. + * @param node The node to visit. */ - function hasAssociatedEndOfDeclarationMarker(node: Node) { - return (getEmitFlags(node) & EmitFlags.HasEndOfDeclarationMarker) !== 0; + function modifierVisitor(node: Node): VisitResult { + // Elide module-specific modifiers. + switch (node.kind) { + case SyntaxKind.ExportKeyword: + case SyntaxKind.DefaultKeyword: + return undefined; + } + + return node; } + // + // Emit Notification + // + /** - * Hook for node emit. + * Hook for node emit notifications. * + * @param emitContext A context hint for the emitter. * @param node The node to emit. - * @param emitCallback A callback used to emit the node in the printer. + * @param emit A callback used to emit the node in the printer. */ function onEmitNode(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void { if (node.kind === SyntaxKind.SourceFile) { @@ -988,12 +1114,15 @@ namespace ts { } } + // + // Substitutions + // + /** * Hooks node substitutions. * + * @param emitContext A context hint for the emitter. * @param node The node to substitute. - * @param isExpression A value indicating whether the node is to be used in an expression - * position. */ function onSubstituteNode(emitContext: EmitContext, node: Node) { node = previousOnSubstituteNode(emitContext, node); @@ -1015,7 +1144,7 @@ namespace ts { * Substitution for a ShorthandPropertyAssignment whose declaration name is an imported * or exported symbol. * - * @param node A ShorthandPropertyAssignment + * @param node The node to substitute. */ function substituteShorthandPropertyAssignment(node: ShorthandPropertyAssignment): ObjectLiteralElementLike { const name = node.name; @@ -1035,7 +1164,7 @@ namespace ts { /** * Substitution for an Expression that may contain an imported or exported symbol. * - * @param node An Expression + * @param node The node to substitute. */ function substituteExpression(node: Expression) { switch (node.kind) { @@ -1052,14 +1181,14 @@ namespace ts { } /** - * Substitution for an Identifier expression that may contain an imported or exported symbol. + * Substitution for an Identifier expression that may contain an imported or exported + * symbol. * - * @param node An Identifier expression + * @param node The node to substitute. */ function substituteExpressionIdentifier(node: Identifier): Expression { - const emitFlags = getEmitFlags(node); - if ((emitFlags & EmitFlags.LocalName) === 0) { - const exportContainer = resolver.getReferencedExportContainer(node, (emitFlags & EmitFlags.ExportName) !== 0); + if (!isGeneratedIdentifier(node) && !isLocalName(node)) { + const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); if (exportContainer && exportContainer.kind === SyntaxKind.SourceFile) { return createPropertyAccess( createIdentifier("exports"), @@ -1093,7 +1222,7 @@ namespace ts { /** * Substitution for a BinaryExpression that may contain an imported or exported symbol. * - * @param node A BinaryExpression + * @param node The node to substitute. */ function substituteBinaryExpression(node: BinaryExpression): Expression { // When we see an assignment expression whose left-hand side is an exported symbol, @@ -1109,19 +1238,14 @@ namespace ts { && !isGeneratedIdentifier(node.left) && !isLocalName(node.left) && !isDeclarationNameOfEnumOrNamespace(node.left)) { - const exportedNames = getExportsOfName(node.left); + const exportedNames = getExports(node.left); if (exportedNames) { - // Since we will be reusing this node as part of the substitution, we - // mark it to prevent triggering this rule again. - noSubstitution[getNodeId(node)] = true; - + // For each additional export of the declaration, apply an export assignment. let expression: Expression = node; for (const exportName of exportedNames) { - expression = createExportAssignment(exportName, expression); - - // Mark the transformed node to prevent possibly triggering this rule - // again. + // Mark the node to prevent triggering this rule again. noSubstitution[getNodeId(expression)] = true; + expression = createExportExpression(exportName, expression, /*location*/ node); } return expression; @@ -1134,7 +1258,7 @@ namespace ts { /** * Substitution for a UnaryExpression that may contain an imported or exported symbol. * - * @param node A UnaryExpression. + * @param node The node to substitute. */ function substituteUnaryExpression(node: PrefixUnaryExpression | PostfixUnaryExpression): Expression { // When we see a prefix or postfix increment expression whose operand is an exported @@ -1146,29 +1270,24 @@ namespace ts { // - We do not substitute identifiers that were originally the name of an enum or // namespace due to how they are transformed in TypeScript. // - We only substitute identifiers that are exported at the top level. - if (isIdentifier(node.operand) + if ((node.operator === SyntaxKind.PlusPlusToken || node.operator === SyntaxKind.MinusMinusToken) + && isIdentifier(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand) && !isDeclarationNameOfEnumOrNamespace(node.operand)) { - const exportedNames = getExportsOfName(node.operand); + const exportedNames = getExports(node.operand); if (exportedNames) { - let expression = node.kind === SyntaxKind.PostfixUnaryExpression + let expression: Expression = node.kind === SyntaxKind.PostfixUnaryExpression ? createBinary( node.operand, createToken(node.operator === SyntaxKind.PlusPlusToken ? SyntaxKind.PlusEqualsToken : SyntaxKind.MinusEqualsToken), createLiteral(1), /*location*/ node) : node; - - // Since we will be reusing this node as part of the substitution, we - // mark it to prevent triggering this rule again. - noSubstitution[getNodeId(expression)] = true; - for (const exportName of exportedNames) { - expression = createExportAssignment(exportName, expression); - // Mark the transformed node to prevent triggering the assignment - // expression substitution in `substituteBinaryExpression`. + // Mark the node to prevent triggering this rule again. noSubstitution[getNodeId(expression)] = true; + expression = createExportExpression(exportName, expression); } return expression; @@ -1179,11 +1298,11 @@ namespace ts { } /** - * Gets the exports of a name. + * Gets the additional exports of a name. * * @param name The name. */ - function getExportsOfName(name: Identifier): Identifier[] | undefined { + function getExports(name: Identifier): Identifier[] | undefined { if (!isGeneratedIdentifier(name)) { const valueDeclaration = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name); @@ -1193,93 +1312,5 @@ namespace ts { } } } - - function getModuleMemberName(name: Identifier) { - return createPropertyAccess( - createIdentifier("exports"), - name, - /*location*/ name - ); - } - - function createRequireCall(importNode: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration) { - const moduleName = getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions); - const args: Expression[] = []; - if (moduleName) { - args.push(moduleName); - } - - return createCall(createIdentifier("require"), /*typeArguments*/ undefined, args); - } - - function createExportStatement(name: Identifier, value: Expression, location?: TextRange, allowComments?: boolean) { - const statement = createStatement(createExportAssignment(name, value), location); - startOnNewLine(statement); - if (!allowComments) { - setEmitFlags(statement, EmitFlags.NoComments); - } - - return statement; - } - - function createExportAssignment(name: Identifier, value: Expression) { - return createAssignment( - createPropertyAccess( - createIdentifier("exports"), - getSynthesizedClone(name) - ), - value - ); - } - - interface AsynchronousDependencies { - aliasedModuleNames: Expression[]; - unaliasedModuleNames: Expression[]; - importAliasNames: ParameterDeclaration[]; - } - - function collectAsynchronousDependencies(node: SourceFile, includeNonAmdDependencies: boolean): AsynchronousDependencies { - // names of modules with corresponding parameter in the factory function - const aliasedModuleNames: Expression[] = []; - - // names of modules with no corresponding parameters in factory function - const unaliasedModuleNames: Expression[] = []; - - // names of the parameters in the factory function; these - // parameters need to match the indexes of the corresponding - // module names in aliasedModuleNames. - const importAliasNames: ParameterDeclaration[] = []; - - // Fill in amd-dependency tags - for (const amdDependency of node.amdDependencies) { - if (amdDependency.name) { - aliasedModuleNames.push(createLiteral(amdDependency.path)); - importAliasNames.push(createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, amdDependency.name)); - } - else { - unaliasedModuleNames.push(createLiteral(amdDependency.path)); - } - } - - for (const importNode of currentModuleInfo.externalImports) { - // Find the name of the external module - const externalModuleName = getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions); - - // Find the name of the module alias, if there is one - const importAliasName = getLocalNameForExternalImport(importNode, currentSourceFile); - if (includeNonAmdDependencies && importAliasName) { - // Set emitFlags on the name of the classDeclaration - // This is so that when printer will not substitute the identifier - setEmitFlags(importAliasName, EmitFlags.NoSubstitution); - aliasedModuleNames.push(externalModuleName); - importAliasNames.push(createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, importAliasName)); - } - else { - unaliasedModuleNames.push(externalModuleName); - } - } - - return { aliasedModuleNames, unaliasedModuleNames, importAliasNames }; - } } } diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index 8bea1e3d28a3c..f1267831719c6 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -12,8 +12,7 @@ namespace ts { const { startLexicalEnvironment, endLexicalEnvironment, - hoistVariableDeclaration, - hoistFunctionDeclaration, + hoistVariableDeclaration } = context; const compilerOptions = context.getCompilerOptions(); @@ -23,58 +22,43 @@ namespace ts { const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(SyntaxKind.Identifier); - context.enableSubstitution(SyntaxKind.BinaryExpression); - context.enableSubstitution(SyntaxKind.PrefixUnaryExpression); - context.enableSubstitution(SyntaxKind.PostfixUnaryExpression); - context.enableEmitNotification(SyntaxKind.SourceFile); - - const exportFunctionForFileMap: Identifier[] = []; - let currentSourceFile: SourceFile; - let externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]; - let exportSpecifiers: Map; - let exportEquals: ExportAssignment; - let hasExportStarsToExportValues: boolean; - let exportFunctionForFile: Identifier; - let contextObjectForFile: Identifier; - let exportedLocalNames: Identifier[]; - let exportedFunctionDeclarations: ExpressionStatement[]; - + context.enableSubstitution(SyntaxKind.Identifier); // Substitutes expression identifiers for imported symbols. + context.enableSubstitution(SyntaxKind.BinaryExpression); // Substitutes assignments to exported symbols. + context.enableSubstitution(SyntaxKind.PrefixUnaryExpression); // Substitutes updates to exported symbols. + context.enableSubstitution(SyntaxKind.PostfixUnaryExpression); // Substitutes updates to exported symbols. + context.enableEmitNotification(SyntaxKind.SourceFile); // Restore state when substituting nodes in a file. + + const moduleInfoMap = createMap(); // The ExternalModuleInfo for each file. + const deferredExports = createMap(); // Exports to defer until an EndOfDeclarationMarker is found. + const exportFunctionsMap = createMap(); // The export function associated with a source file. + const noSubstitutionMap = createMap>(); // Set of nodes for which substitution rules should be ignored for each file. + + let currentSourceFile: SourceFile; // The current file. + let moduleInfo: ExternalModuleInfo; // ExternalModuleInfo for the current file. + let exportFunction: Identifier; // The export function for the current file. + let contextObject: Identifier; // The context object for the current file. + let hoistedStatements: Statement[]; let enclosingBlockScopedContainer: Node; - let currentParent: Node; - let currentNode: Node; + let noSubstitution: Map; // Set of nodes for which substitution rules should be ignored. return transformSourceFile; + /** + * Transforms the module aspects of a SourceFile. + * + * @param node The SourceFile node. + */ function transformSourceFile(node: SourceFile) { - if (isDeclarationFile(node)) { + if (isDeclarationFile(node) + || !(isExternalModule(node) + || compilerOptions.isolatedModules)) { return node; } - if (isExternalModule(node) || compilerOptions.isolatedModules) { - currentSourceFile = node; - currentNode = node; - - // Perform the transformation. - const updated = transformSystemModuleWorker(node); - aggregateTransformFlags(updated); - - currentSourceFile = undefined; - externalImports = undefined; - exportSpecifiers = undefined; - exportEquals = undefined; - hasExportStarsToExportValues = false; - exportFunctionForFile = undefined; - contextObjectForFile = undefined; - exportedLocalNames = undefined; - exportedFunctionDeclarations = undefined; - return updated; - } - - return node; - } + const id = getOriginalNodeId(node); + currentSourceFile = node; + enclosingBlockScopedContainer = node; - function transformSystemModuleWorker(node: SourceFile) { // System modules have the following shape: // // System.register(['dep-1', ... 'dep-n'], function(exports) {/* module body function */}) @@ -87,67 +71,103 @@ namespace ts { // // The only exception in this rule is postfix unary operators, // see comment to 'substitutePostfixUnaryExpression' for more details - Debug.assert(!exportFunctionForFile); // Collect information about the external module and dependency groups. - ({ externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues } = collectExternalModuleInfo(node, resolver)); + moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(node, resolver); // Make sure that the name of the 'exports' function does not conflict with // existing identifiers. - exportFunctionForFile = createUniqueName("exports"); - contextObjectForFile = createUniqueName("context"); - - exportFunctionForFileMap[getOriginalNodeId(node)] = exportFunctionForFile; - - const dependencyGroups = collectDependencyGroups(externalImports); - - const statements: Statement[] = []; + exportFunction = exportFunctionsMap[id] = createUniqueName("exports"); + contextObject = createUniqueName("context"); // Add the body of the module. - addSystemModuleBody(statements, node, dependencyGroups); - - const moduleName = tryGetModuleNameFromFile(node, host, compilerOptions); - const dependencies = createArrayLiteral(map(dependencyGroups, getNameOfDependencyGroup)); - const body = createFunctionExpression( + const dependencyGroups = collectDependencyGroups(moduleInfo.externalImports); + const moduleBodyFunction = createFunctionExpression( /*modifiers*/ undefined, /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, [ - createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, exportFunctionForFile), - createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, contextObjectForFile) + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, exportFunction), + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, contextObject) ], /*type*/ undefined, - setEmitFlags( - createBlock(statements, /*location*/ undefined, /*multiLine*/ true), - EmitFlags.EmitEmitHelpers - ) + createSystemModuleBody(node, dependencyGroups) ); // Write the call to `System.register` // Clear the emit-helpers flag for later passes since we'll have already used it in the module body // So the helper will be emit at the correct position instead of at the top of the source-file - return updateSourceFile(node, [ - createStatement( - createCall( - createPropertyAccess(createIdentifier("System"), "register"), - /*typeArguments*/ undefined, - moduleName - ? [moduleName, dependencies, body] - : [dependencies, body] + const moduleName = tryGetModuleNameFromFile(node, host, compilerOptions); + const dependencies = createArrayLiteral(map(dependencyGroups, dependencyGroup => dependencyGroup.name)); + const updated = updateSourceFileNode( + node, + createNodeArray([ + createStatement( + createCall( + createPropertyAccess(createIdentifier("System"), "register"), + /*typeArguments*/ undefined, + moduleName + ? [moduleName, dependencies, moduleBodyFunction] + : [dependencies, moduleBodyFunction] + ) ) - ) - ], /*nodeEmitFlags*/ ~EmitFlags.EmitEmitHelpers & getEmitFlags(node)); + ], node.statements) + ); + + setEmitFlags(updated, getEmitFlags(node) & ~EmitFlags.EmitEmitHelpers); + + if (noSubstitution) { + noSubstitutionMap[id] = noSubstitution; + noSubstitution = undefined; + } + + currentSourceFile = undefined; + moduleInfo = undefined; + exportFunction = undefined; + contextObject = undefined; + hoistedStatements = undefined; + enclosingBlockScopedContainer = undefined; + + return aggregateTransformFlags(updated); + } + + /** + * Collects the dependency groups for this files imports. + * + * @param externalImports The imports for the file. + */ + function collectDependencyGroups(externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]) { + const groupIndices = createMap(); + const dependencyGroups: DependencyGroup[] = []; + for (let i = 0; i < externalImports.length; i++) { + const externalImport = externalImports[i]; + const externalModuleName = getExternalModuleNameLiteral(externalImport, currentSourceFile, host, resolver, compilerOptions); + const text = externalModuleName.text; + if (hasProperty(groupIndices, text)) { + // deduplicate/group entries in dependency list by the dependency name + const groupIndex = groupIndices[text]; + dependencyGroups[groupIndex].externalImports.push(externalImport); + } + else { + groupIndices[text] = dependencyGroups.length; + dependencyGroups.push({ + name: externalModuleName, + externalImports: [externalImport] + }); + } + } + + return dependencyGroups; } /** * Adds the statements for the module body function for the source file. * - * @param statements The output statements for the module body. * @param node The source file for the module. - * @param statementOffset The offset at which to begin visiting the statements of the SourceFile. + * @param dependencyGroups The grouped dependencies of the module. */ - function addSystemModuleBody(statements: Statement[], node: SourceFile, dependencyGroups: DependencyGroup[]) { + function createSystemModuleBody(node: SourceFile, dependencyGroups: DependencyGroup[]) { // Shape of the body in system modules: // // function (exports) { @@ -175,10 +195,9 @@ namespace ts { // Will be transformed to: // // function(exports) { - // var file_1; // local alias - // var y; // function foo() { return y + file_1.x(); } // exports("foo", foo); + // var file_1, y; // return { // setters: [ // function(v) { file_1 = v } @@ -190,13 +209,15 @@ namespace ts { // }; // } + const statements: Statement[] = []; + // We start a new lexical environment in this function body, but *not* in the // body of the execute function. This allows us to emit temporary declarations // only in the outer module body and not in the inner one. startLexicalEnvironment(); // Add any prologue directives. - const statementOffset = addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, visitSourceElement); + const statementOffset = addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor); // var __moduleName = context_1 && context_1.id; statements.push( @@ -207,8 +228,8 @@ namespace ts { "__moduleName", /*type*/ undefined, createLogicalAnd( - contextObjectForFile, - createPropertyAccess(contextObjectForFile, "id") + contextObject, + createPropertyAccess(contextObject, "id") ) ) ]) @@ -220,27 +241,23 @@ namespace ts { // as we both emit transformations as well as aggregate some data used when creating // setters. This allows us to reduce the number of times we need to loop through the // statements of the source file. - const executeStatements = visitNodes(node.statements, visitSourceElement, isStatement, statementOffset); + const executeStatements = visitNodes(node.statements, sourceElementVisitor, isStatement, statementOffset); + + // Emit early exports for function declarations. + addRange(statements, hoistedStatements); - // We emit the lexical environment (hoisted variables and function declarations) - // early to align roughly with our previous emit output. + // We emit hoisted variables early to align roughly with our previous emit output. // Two key differences in this approach are: // - Temporary variables will appear at the top rather than at the bottom of the file - // - Calls to the exporter for exported function declarations are grouped after - // the declarations. addRange(statements, endLexicalEnvironment()); - // Emit early exports for function declarations. - addRange(statements, exportedFunctionDeclarations); - const exportStarFunction = addExportStarIfNeeded(statements); - statements.push( createReturn( setMultiLine( createObjectLiteral([ createPropertyAssignment("setters", - generateSetters(exportStarFunction, dependencyGroups) + createSettersArray(exportStarFunction, dependencyGroups) ), createPropertyAssignment("execute", createFunctionExpression( @@ -262,24 +279,34 @@ namespace ts { ) ) ); + + const body = createBlock(statements, /*location*/ undefined, /*multiLine*/ true); + setEmitFlags(body, EmitFlags.EmitEmitHelpers); + return body; } + /** + * Adds an exportStar function to a statement list if it is needed for the file. + * + * @param statements A statement list. + */ function addExportStarIfNeeded(statements: Statement[]) { - if (!hasExportStarsToExportValues) { + if (!moduleInfo.hasExportStarsToExportValues) { return; } + // when resolving exports local exported entries/indirect exported entries in the module // should always win over entries with similar names that were added via star exports // to support this we store names of local/indirect exported entries in a set. // this set is used to filter names brought by star expors. // local names set should only be added if we have anything exported - if (!exportedLocalNames && isEmpty(exportSpecifiers)) { + if (!moduleInfo.exportedNames && isEmpty(moduleInfo.exportSpecifiers)) { // no exported declarations (export var ...) or export specifiers (export {x}) // check if we have any non star export declarations. let hasExportDeclarationWithExportClause = false; - for (const externalImport of externalImports) { - if (externalImport.kind === SyntaxKind.ExportDeclaration && (externalImport).exportClause) { + for (const externalImport of moduleInfo.externalImports) { + if (externalImport.kind === SyntaxKind.ExportDeclaration && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -287,24 +314,30 @@ namespace ts { if (!hasExportDeclarationWithExportClause) { // we still need to emit exportStar helper - return addExportStarFunction(statements, /*localNames*/ undefined); + const exportStarFunction = createExportStarFunction(/*localNames*/ undefined); + statements.push(exportStarFunction); + return exportStarFunction.name; } } const exportedNames: ObjectLiteralElementLike[] = []; - if (exportedLocalNames) { - for (const exportedLocalName of exportedLocalNames) { + if (moduleInfo.exportedNames) { + for (const exportedLocalName of moduleInfo.exportedNames) { + if (exportedLocalName.text === "default") { + continue; + } + // write name of exported declaration, i.e 'export var x...' exportedNames.push( createPropertyAssignment( - createLiteral(exportedLocalName.text), + createLiteral(exportedLocalName), createLiteral(true) ) ); } } - for (const externalImport of externalImports) { + for (const externalImport of moduleInfo.externalImports) { if (externalImport.kind !== SyntaxKind.ExportDeclaration) { continue; } @@ -340,14 +373,90 @@ namespace ts { ) ); - return addExportStarFunction(statements, exportedNamesStorageRef); + const exportStarFunction = createExportStarFunction(exportedNamesStorageRef); + statements.push(exportStarFunction); + return exportStarFunction.name; + } + + /** + * Creates an exportStar function for the file, with an optional set of excluded local + * names. + * + * @param localNames An optional reference to an object containing a set of excluded local + * names. + */ + function createExportStarFunction(localNames: Identifier | undefined) { + const exportStarFunction = createUniqueName("exportStar"); + const m = createIdentifier("m"); + const n = createIdentifier("n"); + const exports = createIdentifier("exports"); + let condition: Expression = createStrictInequality(n, createLiteral("default")); + if (localNames) { + condition = createLogicalAnd( + condition, + createLogicalNot(createHasOwnProperty(localNames, n)) + ); + } + + return createFunctionDeclaration( + /*decorators*/ undefined, + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + exportStarFunction, + /*typeParameters*/ undefined, + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, m)], + /*type*/ undefined, + createBlock([ + createVariableStatement( + /*modifiers*/ undefined, + createVariableDeclarationList([ + createVariableDeclaration( + exports, + /*type*/ undefined, + createObjectLiteral([]) + ) + ]) + ), + createForIn( + createVariableDeclarationList([ + createVariableDeclaration(n, /*type*/ undefined) + ]), + m, + createBlock([ + setEmitFlags( + createIf( + condition, + createStatement( + createAssignment( + createElementAccess(exports, n), + createElementAccess(m, n) + ) + ) + ), + EmitFlags.SingleLine + ) + ]) + ), + createStatement( + createCall( + exportFunction, + /*typeArguments*/ undefined, + [exports] + ) + ) + ], + /*location*/ undefined, + /*multiline*/ true) + ); } /** - * Emits a setter callback for each dependency group. - * @param write The callback used to write each callback. + * Creates an array setter callbacks for each dependency group. + * + * @param exportStarFunction A reference to an exportStarFunction for the file. + * @param dependencyGroups An array of grouped dependencies. */ - function generateSetters(exportStarFunction: Identifier, dependencyGroups: DependencyGroup[]) { + function createSettersArray(exportStarFunction: Identifier, dependencyGroups: DependencyGroup[]) { const setters: Expression[] = []; for (const group of dependencyGroups) { // derive a unique name for parameter from the first named entry in the group @@ -402,7 +511,7 @@ namespace ts { statements.push( createStatement( createCall( - exportFunctionForFile, + exportFunction, /*typeArguments*/ undefined, [createObjectLiteral(properties, /*location*/ undefined, /*multiline*/ true)] ) @@ -445,7 +554,16 @@ namespace ts { return createArrayLiteral(setters, /*location*/ undefined, /*multiLine*/ true); } - function visitSourceElement(node: Node): VisitResult { + // + // Top-level Source Element Visitors + // + + /** + * Visit source elements at the top-level of a module. + * + * @param node The node to visit. + */ + function sourceElementVisitor(node: Node): VisitResult { switch (node.kind) { case SyntaxKind.ImportDeclaration: return visitImportDeclaration(node); @@ -460,260 +578,137 @@ namespace ts { return visitExportAssignment(node); default: - return visitNestedNode(node); + return nestedElementVisitor(node); } } - function visitNestedNode(node: Node): VisitResult { - const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; - const savedCurrentParent = currentParent; - const savedCurrentNode = currentNode; - - const currentGrandparent = currentParent; - currentParent = currentNode; - currentNode = node; - - if (currentParent && isBlockScope(currentParent, currentGrandparent)) { - enclosingBlockScopedContainer = currentParent; + /** + * Visits an ImportDeclaration node. + * + * @param node The node to visit. + */ + function visitImportDeclaration(node: ImportDeclaration): VisitResult { + let statements: Statement[]; + if (node.importClause) { + hoistVariableDeclaration(getLocalNameForExternalImport(node, currentSourceFile)); } - const result = visitNestedNodeWorker(node); - - enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; - currentParent = savedCurrentParent; - currentNode = savedCurrentNode; - - return result; - } - - function visitNestedNodeWorker(node: Node): VisitResult { - switch (node.kind) { - case SyntaxKind.VariableStatement: - return visitVariableStatement(node); - - case SyntaxKind.FunctionDeclaration: - return visitFunctionDeclaration(node); - - case SyntaxKind.ClassDeclaration: - return visitClassDeclaration(node); - - case SyntaxKind.ForStatement: - return visitForStatement(node); - - case SyntaxKind.ForInStatement: - return visitForInStatement(node); - - case SyntaxKind.ForOfStatement: - return visitForOfStatement(node); - - case SyntaxKind.DoStatement: - return visitDoStatement(node); - - case SyntaxKind.WhileStatement: - return visitWhileStatement(node); - - case SyntaxKind.LabeledStatement: - return visitLabeledStatement(node); - - case SyntaxKind.WithStatement: - return visitWithStatement(node); - - case SyntaxKind.SwitchStatement: - return visitSwitchStatement(node); - - case SyntaxKind.CaseBlock: - return visitCaseBlock(node); - - case SyntaxKind.CaseClause: - return visitCaseClause(node); - - case SyntaxKind.DefaultClause: - return visitDefaultClause(node); - - case SyntaxKind.TryStatement: - return visitTryStatement(node); - - case SyntaxKind.CatchClause: - return visitCatchClause(node); - - case SyntaxKind.Block: - return visitBlock(node); - - case SyntaxKind.ExpressionStatement: - return visitExpressionStatement(node); - - default: - return node; + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfImportDeclaration(deferredExports[id], node); } - } - - function visitImportDeclaration(node: ImportDeclaration): Node { - if (node.importClause && contains(externalImports, node)) { - hoistVariableDeclaration(getLocalNameForExternalImport(node, currentSourceFile)); + else { + statements = appendExportsOfImportDeclaration(statements, node); } - return undefined; + return singleOrMany(statements); } - function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): Node { - if (contains(externalImports, node)) { - hoistVariableDeclaration(getLocalNameForExternalImport(node, currentSourceFile)); - } + /** + * Visits an ImportEqualsDeclaration node. + * + * @param node The node to visit. + */ + function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): VisitResult { + Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); - // NOTE(rbuckton): Do we support export import = require('') in System? - return undefined; - } + let statements: Statement[]; + hoistVariableDeclaration(getLocalNameForExternalImport(node, currentSourceFile)); - function visitExportDeclaration(node: ExportDeclaration): VisitResult { - if (!node.moduleSpecifier) { - const statements: Statement[] = []; - addRange(statements, map(node.exportClause.elements, visitExportSpecifier)); - return statements; + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfImportEqualsDeclaration(deferredExports[id], node); } - - return undefined; - } - - function visitExportSpecifier(specifier: ExportSpecifier): Statement { - recordExportName(specifier.name); - return createExportStatement( - specifier.name, - specifier.propertyName || specifier.name - ); - } - - function visitExportAssignment(node: ExportAssignment): Statement { - if (node.isExportEquals) { - // Elide `export=` as it is illegal in a SystemJS module. - return undefined; + else { + statements = appendExportsOfImportEqualsDeclaration(statements, node); } - return createExportStatement( - createLiteral("default"), - node.expression - ); + return singleOrMany(statements); } /** - * Visits a variable statement, hoisting declared names to the top-level module body. - * Each declaration is rewritten into an assignment expression. + * Visits an ExportDeclaration node. ExportDeclarations are elided as they are handled via + * `appendExportsOfDeclaration`. * - * @param node The variable statement to visit. + * @param The node to visit. */ - function visitVariableStatement(node: VariableStatement): VisitResult { - // hoist only non-block scoped declarations or block scoped declarations parented by source file - const shouldHoist = - ((getCombinedNodeFlags(getOriginalNode(node.declarationList)) & NodeFlags.BlockScoped) == 0) || - enclosingBlockScopedContainer.kind === SyntaxKind.SourceFile; - if (!shouldHoist) { - return node; - } - const isExported = hasModifier(node, ModifierFlags.Export); - const expressions: Expression[] = []; - for (const variable of node.declarationList.declarations) { - const visited = transformVariable(variable, isExported); - if (visited) { - expressions.push(visited); - } - } - - if (expressions.length) { - return createStatement(inlineExpressions(expressions), node); - } - + function visitExportDeclaration(node: ExportDeclaration): VisitResult { return undefined; } /** - * Transforms a VariableDeclaration into one or more assignment expressions. + * Visits an ExportAssignment node. * - * @param node The VariableDeclaration to transform. - * @param isExported A value used to indicate whether the containing statement was exported. + * @param node The node to visit. */ - function transformVariable(node: VariableDeclaration, isExported: boolean): VariableDeclaration | Expression { - // Hoist any bound names within the declaration. - hoistBindingElement(node, isExported); - - if (!node.initializer) { - // If the variable has no initializer, ignore it. - return; + function visitExportAssignment(node: ExportAssignment): VisitResult { + if (node.isExportEquals) { + // Elide `export=` as it is illegal in a SystemJS module. + return undefined; } - const name = node.name; - if (isIdentifier(name)) { - // If the variable has an IdentifierName, write out an assignment expression in its place. - return createAssignment(name, node.initializer); + const expression = visitNode(node.expression, destructuringVisitor, isExpression); + const original = node.original; + if (original && hasAssociatedEndOfDeclarationMarker(original)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportStatement(deferredExports[id], createIdentifier("default"), expression, /*allowComments*/ true); } else { - // If the variable has a BindingPattern, flatten the variable into multiple assignment expressions. - return flattenVariableDestructuringToExpression(context, node, hoistVariableDeclaration); + return createExportStatement(createIdentifier("default"), expression, /*allowComments*/ true); } } /** * Visits a FunctionDeclaration, hoisting it to the outer module body function. * - * @param node The function declaration to visit. + * @param node The node to visit. */ - function visitFunctionDeclaration(node: FunctionDeclaration): Node { + function visitFunctionDeclaration(node: FunctionDeclaration): VisitResult { if (hasModifier(node, ModifierFlags.Export)) { - // If the function is exported, ensure it has a name and rewrite the function without any export flags. - const name = node.name || getGeneratedNameForNode(node); - // Keep async modifier for ES2017 transformer - const isAsync = hasModifier(node, ModifierFlags.Async); - const newNode = createFunctionDeclaration( - /*decorators*/ undefined, - isAsync ? [createNode(SyntaxKind.AsyncKeyword)] : undefined, - node.asteriskToken, - name, - /*typeParameters*/ undefined, - node.parameters, - /*type*/ undefined, - node.body, - /*location*/ node); - - // Record a declaration export in the outer module body function. - recordExportedFunctionDeclaration(node); - - if (!hasModifier(node, ModifierFlags.Default)) { - recordExportName(name); - } + hoistedStatements = append(hoistedStatements, + updateFunctionDeclaration( + node, + node.decorators, + visitNodes(node.modifiers, modifierVisitor, isModifier), + getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true), + /*typeParameters*/ undefined, + visitNodes(node.parameters, destructuringVisitor, isParameterDeclaration), + /*type*/ undefined, + visitNode(node.body, destructuringVisitor, isBlock))); + } + else { + hoistedStatements = append(hoistedStatements, node); + } - setOriginalNode(newNode, node); - node = newNode; + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node); + } + else { + hoistedStatements = appendExportsOfHoistedDeclaration(hoistedStatements, node); } - // Hoist the function declaration to the outer module body function. - hoistFunctionDeclaration(node); return undefined; } - function visitExpressionStatement(node: ExpressionStatement): VisitResult { - const originalNode = getOriginalNode(node); - if ((originalNode.kind === SyntaxKind.ModuleDeclaration || originalNode.kind === SyntaxKind.EnumDeclaration) && hasModifier(originalNode, ModifierFlags.Export)) { - const name = getDeclarationName(originalNode); - return [ - node, - createExportStatement(name, name) - ]; - } - return node; - } - /** * Visits a ClassDeclaration, hoisting its name to the outer module body function. * - * @param node The class declaration to visit. + * @param node The node to visit. */ function visitClassDeclaration(node: ClassDeclaration): VisitResult { + let statements: Statement[]; + // Hoist the name of the class declaration to the outer module body function. - const name = getDeclarationName(node); + const name = getLocalName(node); hoistVariableDeclaration(name); - const statements: Statement[] = []; - // Rewrite the class declaration into an assignment of a class expression. - statements.push( + statements = append(statements, createStatement( createAssignment( name, @@ -721,8 +716,8 @@ namespace ts { /*modifiers*/ undefined, node.name, /*typeParameters*/ undefined, - node.heritageClauses, - node.members, + visitNodes(node.heritageClauses, destructuringVisitor, isHeritageClause), + visitNodes(node.members, destructuringVisitor, isClassElement), /*location*/ node ) ), @@ -730,651 +725,1039 @@ namespace ts { ) ); - // If the class was exported, write a declaration export to the inner module body function. - if (hasModifier(node, ModifierFlags.Export)) { - if (!hasModifier(node, ModifierFlags.Default)) { - recordExportName(name); - } - - statements.push(createDeclarationExport(node)); + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node); + } + else { + statements = appendExportsOfHoistedDeclaration(statements, node); } - return statements; - } - - function shouldHoistLoopInitializer(node: VariableDeclarationList | Expression) { - return isVariableDeclarationList(node) && (getCombinedNodeFlags(node) & NodeFlags.BlockScoped) === 0; + return singleOrMany(statements); } /** - * Visits the body of a ForStatement to hoist declarations. + * Visits a variable statement, hoisting declared names to the top-level module body. + * Each declaration is rewritten into an assignment expression. * - * @param node The statement to visit. + * @param node The node to visit. */ - function visitForStatement(node: ForStatement): ForStatement { - const initializer = node.initializer; - if (shouldHoistLoopInitializer(initializer)) { - const expressions: Expression[] = []; - for (const variable of (initializer).declarations) { - const visited = transformVariable(variable, /*isExported*/ false); - if (visited) { - expressions.push(visited); - } - }; - - return createFor( - expressions.length - ? inlineExpressions(expressions) - : createOmittedExpression(), - node.condition, - node.incrementor, - visitNode(node.statement, visitNestedNode, isStatement), - /*location*/ node - ); + function visitVariableStatement(node: VariableStatement): VisitResult { + if (!shouldHoistVariableDeclarationList(node.declarationList)) { + return visitNode(node, destructuringVisitor, isStatement); } - else { - return visitEachChild(node, visitNestedNode, context); + + let expressions: Expression[]; + const isExportedDeclaration = hasModifier(node, ModifierFlags.Export); + const isMarkedDeclaration = hasAssociatedEndOfDeclarationMarker(node); + for (const variable of node.declarationList.declarations) { + if (variable.initializer) { + expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration && !isMarkedDeclaration)); + } + else { + hoistBindingElement(variable); + } } - } - /** - * Transforms and hoists the declaration list of a ForInStatement or ForOfStatement into an expression. - * - * @param node The decalaration list to transform. - */ - function transformForBinding(node: VariableDeclarationList): Expression { - const firstDeclaration = firstOrUndefined(node.declarations); - hoistBindingElement(firstDeclaration, /*isExported*/ false); - - const name = firstDeclaration.name; - return isIdentifier(name) - ? name - : flattenVariableDestructuringToExpression(context, firstDeclaration, hoistVariableDeclaration); - } + let statements: Statement[]; + if (expressions) { + statements = append(statements, createStatement(inlineExpressions(expressions), /*location*/ node)); + } - /** - * Visits the body of a ForInStatement to hoist declarations. - * - * @param node The statement to visit. - */ - function visitForInStatement(node: ForInStatement): ForInStatement { - const initializer = node.initializer; - if (shouldHoistLoopInitializer(initializer)) { - return updateForIn( - node, - transformForBinding(initializer), - node.expression, - visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock) - ); + if (isMarkedDeclaration) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node, isExportedDeclaration); } else { - return visitEachChild(node, visitNestedNode, context); + statements = appendExportsOfVariableStatement(statements, node, /*exportSelf*/ false); } + + return singleOrMany(statements); } /** - * Visits the body of a ForOfStatement to hoist declarations. + * Hoists the declared names of a VariableDeclaration or BindingElement. * - * @param node The statement to visit. + * @param node The declaration to hoist. */ - function visitForOfStatement(node: ForOfStatement): ForOfStatement { - const initializer = node.initializer; - if (shouldHoistLoopInitializer(initializer)) { - return updateForOf( - node, - transformForBinding(initializer), - node.expression, - visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock) - ); + function hoistBindingElement(node: VariableDeclaration | BindingElement): void { + if (isBindingPattern(node.name)) { + for (const element of node.name.elements) { + if (!isOmittedExpression(element)) { + hoistBindingElement(element); + } + } } else { - return visitEachChild(node, visitNestedNode, context); + hoistVariableDeclaration(getSynthesizedClone(node.name)); } } /** - * Visits the body of a DoStatement to hoist declarations. + * Determines whether a VariableDeclarationList should be hoisted. * - * @param node The statement to visit. + * @param node The node to test. */ - function visitDoStatement(node: DoStatement) { - return updateDo( - node, - visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock), - node.expression - ); + function shouldHoistVariableDeclarationList(node: VariableDeclarationList) { + // hoist only non-block scoped declarations or block scoped declarations parented by source file + return (getEmitFlags(node) & EmitFlags.NoHoisting) === 0 + && (enclosingBlockScopedContainer.kind === SyntaxKind.SourceFile + || (getOriginalNode(node).flags & NodeFlags.BlockScoped) === 0); } /** - * Visits the body of a WhileStatement to hoist declarations. + * Transform an initialized variable declaration into an expression. * - * @param node The statement to visit. + * @param node The node to transform. + * @param isExportedDeclaration A value indicating whether the variable is exported. */ - function visitWhileStatement(node: WhileStatement) { - return updateWhile( - node, - node.expression, - visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock) - ); + function transformInitializedVariable(node: VariableDeclaration, isExportedDeclaration: boolean): Expression { + const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; + return isBindingPattern(node.name) + ? flattenVariableDestructuringToExpression(context, node, hoistVariableDeclaration, createAssignment, destructuringVisitor) + : createAssignment(node.name, visitNode(node.initializer, destructuringVisitor, isExpression)); } /** - * Visits the body of a LabeledStatement to hoist declarations. + * Creates an assignment expression for an exported variable declaration. * - * @param node The statement to visit. + * @param name The name of the variable. + * @param value The value of the variable's initializer. + * @param location The source map location for the assignment. */ - function visitLabeledStatement(node: LabeledStatement) { - return updateLabel( - node, - node.label, - visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock) - ); + function createExportedVariableAssignment(name: Identifier, value: Expression, location?: TextRange) { + return createVariableAssignment(name, value, location, /*isExportedDeclaration*/ true); } /** - * Visits the body of a WithStatement to hoist declarations. + * Creates an assignment expression for a non-exported variable declaration. * - * @param node The statement to visit. + * @param name The name of the variable. + * @param value The value of the variable's initializer. + * @param location The source map location for the assignment. */ - function visitWithStatement(node: WithStatement) { - return updateWith( - node, - node.expression, - visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock) - ); + function createNonExportedVariableAssignment(name: Identifier, value: Expression, location?: TextRange) { + return createVariableAssignment(name, value, location, /*isExportedDeclaration*/ false); } /** - * Visits the body of a SwitchStatement to hoist declarations. + * Creates an assignment expression for a variable declaration. * - * @param node The statement to visit. + * @param name The name of the variable. + * @param value The value of the variable's initializer. + * @param location The source map location for the assignment. + * @param isExportedDeclaration A value indicating whether the variable is exported. */ - function visitSwitchStatement(node: SwitchStatement) { - return updateSwitch( - node, - node.expression, - visitNode(node.caseBlock, visitNestedNode, isCaseBlock) - ); + function createVariableAssignment(name: Identifier, value: Expression, location: TextRange, isExportedDeclaration: boolean) { + hoistVariableDeclaration(getSynthesizedClone(name)); + return isExportedDeclaration + ? createExportExpression(name, preventSubstitution(createAssignment(name, value, location))) + : preventSubstitution(createAssignment(name, value, location)); } /** - * Visits the body of a CaseBlock to hoist declarations. + * Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged + * and transformed declaration. * * @param node The node to visit. */ - function visitCaseBlock(node: CaseBlock) { - return updateCaseBlock( - node, - visitNodes(node.clauses, visitNestedNode, isCaseOrDefaultClause) - ); - } + function visitMergeDeclarationMarker(node: MergeDeclarationMarker): VisitResult { + // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding + // declaration we do not emit a leading variable declaration. To preserve the + // begin/end semantics of the declararation and to properly handle exports + // we wrapped the leading variable declaration in a `MergeDeclarationMarker`. + // + // To balance the declaration, we defer the exports of the elided variable + // statement until we visit this declaration's `EndOfDeclarationMarker`. + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === SyntaxKind.VariableStatement) { + const id = getOriginalNodeId(node); + const isExportedDeclaration = hasModifier(node.original, ModifierFlags.Export); + deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); + } - /** - * Visits the body of a CaseClause to hoist declarations. - * - * @param node The clause to visit. - */ - function visitCaseClause(node: CaseClause) { - return updateCaseClause( - node, - node.expression, - visitNodes(node.statements, visitNestedNode, isStatement) - ); + return node; } /** - * Visits the body of a DefaultClause to hoist declarations. + * Determines whether a node has an associated EndOfDeclarationMarker. * - * @param node The clause to visit. + * @param node The node to test. */ - function visitDefaultClause(node: DefaultClause) { - return visitEachChild(node, visitNestedNode, context); + function hasAssociatedEndOfDeclarationMarker(node: Node) { + return (getEmitFlags(node) & EmitFlags.HasEndOfDeclarationMarker) !== 0; } /** - * Visits the body of a TryStatement to hoist declarations. + * Visits a DeclarationMarker used as a placeholder for the end of a transformed + * declaration. * - * @param node The statement to visit. + * @param node The node to visit. */ - function visitTryStatement(node: TryStatement) { - return visitEachChild(node, visitNestedNode, context); - } + function visitEndOfDeclarationMarker(node: EndOfDeclarationMarker): VisitResult { + // For some transformations we emit an `EndOfDeclarationMarker` to mark the actual + // end of the transformed declaration. We use this marker to emit any deferred exports + // of the declaration. + const id = getOriginalNodeId(node); + const statements = deferredExports[id]; + if (statements) { + delete deferredExports[id]; + return append(statements, node); + } - /** - * Visits the body of a CatchClause to hoist declarations. - * - * @param node The clause to visit. - */ - function visitCatchClause(node: CatchClause) { - return updateCatchClause( - node, - node.variableDeclaration, - visitNode(node.block, visitNestedNode, isBlock) - ); + return node; } /** - * Visits the body of a Block to hoist declarations. + * Appends the exports of an ImportDeclaration to a statement list, returning the + * statement list. * - * @param node The block to visit. + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration whose exports are to be recorded. */ - function visitBlock(node: Block) { - return visitEachChild(node, visitNestedNode, context); - } + function appendExportsOfImportDeclaration(statements: Statement[], decl: ImportDeclaration) { + if (moduleInfo.exportEquals) { + return statements; + } - // - // Substitutions - // + const importClause = decl.importClause; + if (!importClause) { + return statements; + } - function onEmitNode(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void { - if (node.kind === SyntaxKind.SourceFile) { - exportFunctionForFile = exportFunctionForFileMap[getOriginalNodeId(node)]; - previousOnEmitNode(emitContext, node, emitCallback); - exportFunctionForFile = undefined; + if (importClause.name) { + statements = appendExportsOfDeclaration(statements, importClause); } - else { - previousOnEmitNode(emitContext, node, emitCallback); + + const namedBindings = importClause.namedBindings; + if (namedBindings) { + switch (namedBindings.kind) { + case SyntaxKind.NamespaceImport: + statements = appendExportsOfDeclaration(statements, namedBindings); + break; + + case SyntaxKind.NamedImports: + for (const importBinding of namedBindings.elements) { + statements = appendExportsOfDeclaration(statements, importBinding); + } + + break; + } } + + return statements; } /** - * Hooks node substitutions. + * Appends the export of an ImportEqualsDeclaration to a statement list, returning the + * statement list. * - * @param node The node to substitute. - * @param isExpression A value indicating whether the node is to be used in an expression - * position. + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration whose exports are to be recorded. */ - function onSubstituteNode(emitContext: EmitContext, node: Node) { - node = previousOnSubstituteNode(emitContext, node); - if (emitContext === EmitContext.Expression) { - return substituteExpression(node); + function appendExportsOfImportEqualsDeclaration(statements: Statement[], decl: ImportEqualsDeclaration): Statement[] | undefined { + if (moduleInfo.exportEquals) { + return statements; } - return node; + return appendExportsOfDeclaration(statements, decl); } /** - * Substitute the expression, if necessary. + * Appends the exports of a VariableStatement to a statement list, returning the statement + * list. * - * @param node The node to substitute. + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param node The VariableStatement whose exports are to be recorded. + * @param exportSelf A value indicating whether to also export each VariableDeclaration of + * `nodes` declaration list. */ - function substituteExpression(node: Expression) { - switch (node.kind) { - case SyntaxKind.Identifier: - return substituteExpressionIdentifier(node); - case SyntaxKind.BinaryExpression: - return substituteBinaryExpression(node); - case SyntaxKind.PrefixUnaryExpression: - case SyntaxKind.PostfixUnaryExpression: - return substituteUnaryExpression(node); + function appendExportsOfVariableStatement(statements: Statement[] | undefined, node: VariableStatement, exportSelf: boolean): Statement[] | undefined { + if (moduleInfo.exportEquals) { + return statements; } - return node; - } - /** - * Substitution for identifiers exported at the top level of a module. - */ - function substituteExpressionIdentifier(node: Identifier): Expression { - const importDeclaration = resolver.getReferencedImportDeclaration(node); - if (importDeclaration) { - const importBinding = createImportBinding(importDeclaration); - if (importBinding) { - return importBinding; + for (const decl of node.declarationList.declarations) { + if (decl.initializer || exportSelf) { + statements = appendExportsOfBindingElement(statements, decl, exportSelf); } } - return node; + return statements; } - function substituteBinaryExpression(node: BinaryExpression): Expression { - if (isAssignmentOperator(node.operatorToken.kind)) { - return substituteAssignmentExpression(node); + /** + * Appends the exports of a VariableDeclaration or BindingElement to a statement list, + * returning the statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration whose exports are to be recorded. + * @param exportSelf A value indicating whether to also export the declaration itself. + */ + function appendExportsOfBindingElement(statements: Statement[] | undefined, decl: VariableDeclaration | BindingElement, exportSelf: boolean): Statement[] | undefined { + if (moduleInfo.exportEquals) { + return statements; } - return node; - } - - function substituteAssignmentExpression(node: BinaryExpression): Expression { - setEmitFlags(node, EmitFlags.NoSubstitution); - - const left = node.left; - switch (left.kind) { - case SyntaxKind.Identifier: - const exportDeclaration = resolver.getReferencedExportContainer(left); - if (exportDeclaration) { - return createExportExpression(left, node); - } - break; - - case SyntaxKind.ObjectLiteralExpression: - case SyntaxKind.ArrayLiteralExpression: - if (hasExportedReferenceInDestructuringPattern(left)) { - return substituteDestructuring(node); + if (isBindingPattern(decl.name)) { + for (const element of decl.name.elements) { + if (!isOmittedExpression(element)) { + statements = appendExportsOfBindingElement(statements, element, exportSelf); } - break; + } } + else if (!isGeneratedIdentifier(decl.name)) { + let excludeName: string; + if (exportSelf) { + statements = appendExportStatement(statements, decl.name, getLocalName(decl)); + excludeName = decl.name.text; + } - return node; - } - - function isExportedBinding(name: Identifier) { - const container = resolver.getReferencedExportContainer(name); - return container && container.kind === SyntaxKind.SourceFile; - } - - function hasExportedReferenceInDestructuringPattern(node: ObjectLiteralExpression | ArrayLiteralExpression | Identifier): boolean { - switch (node.kind) { - case SyntaxKind.Identifier: - return isExportedBinding(node); - - case SyntaxKind.ObjectLiteralExpression: - for (const property of (node).properties) { - if (hasExportedReferenceInObjectDestructuringElement(property)) { - return true; - } - } - - break; - - case SyntaxKind.ArrayLiteralExpression: - for (const element of (node).elements) { - if (hasExportedReferenceInArrayDestructuringElement(element)) { - return true; - } - } - - break; + statements = appendExportsOfDeclaration(statements, decl, excludeName); } - return false; + return statements; } - function hasExportedReferenceInObjectDestructuringElement(node: ObjectLiteralElementLike): boolean { - if (isShorthandPropertyAssignment(node)) { - return isExportedBinding(node.name); - } - else if (isPropertyAssignment(node)) { - return hasExportedReferenceInDestructuringElement(node.initializer); - } - else { - return false; + /** + * Appends the exports of a ClassDeclaration or FunctionDeclaration to a statement list, + * returning the statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration whose exports are to be recorded. + */ + function appendExportsOfHoistedDeclaration(statements: Statement[] | undefined, decl: ClassDeclaration | FunctionDeclaration): Statement[] | undefined { + if (moduleInfo.exportEquals) { + return statements; } - } - function hasExportedReferenceInArrayDestructuringElement(node: Expression): boolean { - if (isSpreadElementExpression(node)) { - const expression = node.expression; - return isIdentifier(expression) && isExportedBinding(expression); - } - else { - return hasExportedReferenceInDestructuringElement(node); + let excludeName: string; + if (hasModifier(decl, ModifierFlags.Export)) { + const exportName = hasModifier(decl, ModifierFlags.Default) ? createLiteral("default") : decl.name; + statements = appendExportStatement(statements, exportName, getLocalName(decl)); + excludeName = exportName.text; } - } - function hasExportedReferenceInDestructuringElement(node: Expression): boolean { - if (isBinaryExpression(node)) { - const left = node.left; - return node.operatorToken.kind === SyntaxKind.EqualsToken - && isDestructuringPattern(left) - && hasExportedReferenceInDestructuringPattern(left); - } - else if (isIdentifier(node)) { - return isExportedBinding(node); - } - else if (isSpreadElementExpression(node)) { - const expression = node.expression; - return isIdentifier(expression) && isExportedBinding(expression); - } - else if (isDestructuringPattern(node)) { - return hasExportedReferenceInDestructuringPattern(node); - } - else { - return false; + if (decl.name) { + statements = appendExportsOfDeclaration(statements, decl, excludeName); } - } - - function isDestructuringPattern(node: Expression): node is ObjectLiteralExpression | ArrayLiteralExpression | Identifier { - const kind = node.kind; - return kind === SyntaxKind.Identifier - || kind === SyntaxKind.ObjectLiteralExpression - || kind === SyntaxKind.ArrayLiteralExpression; - } - function substituteDestructuring(node: BinaryExpression) { - return flattenDestructuringAssignment(context, node, /*needsValue*/ true, hoistVariableDeclaration); + return statements; } - function substituteUnaryExpression(node: PrefixUnaryExpression | PostfixUnaryExpression): Expression { - const operand = node.operand; - const operator = node.operator; - const substitute = - isIdentifier(operand) && - ( - node.kind === SyntaxKind.PostfixUnaryExpression || - (node.kind === SyntaxKind.PrefixUnaryExpression && (operator === SyntaxKind.PlusPlusToken || operator === SyntaxKind.MinusMinusToken)) - ); + /** + * Appends the exports of a declaration to a statement list, returning the statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration to export. + * @param excludeName An optional name to exclude from exports. + */ + function appendExportsOfDeclaration(statements: Statement[] | undefined, decl: Declaration, excludeName?: string): Statement[] | undefined { + if (moduleInfo.exportEquals) { + return statements; + } - if (substitute) { - const exportDeclaration = resolver.getReferencedExportContainer(operand); - if (exportDeclaration) { - const expr = createPrefix(node.operator, operand, node); - setEmitFlags(expr, EmitFlags.NoSubstitution); - const call = createExportExpression(operand, expr); - if (node.kind === SyntaxKind.PrefixUnaryExpression) { - return call; - } - else { - // export function returns the value that was passes as the second argument - // however for postfix unary expressions result value should be the value before modification. - // emit 'x++' as '(export('x', ++x) - 1)' and 'x--' as '(export('x', --x) + 1)' - return operator === SyntaxKind.PlusPlusToken - ? createSubtract(call, createLiteral(1)) - : createAdd(call, createLiteral(1)); + const name = getDeclarationName(decl); + const exportSpecifiers = moduleInfo.exportSpecifiers[name.text]; + if (exportSpecifiers) { + for (const exportSpecifier of exportSpecifiers) { + if (exportSpecifier.name.text !== excludeName) { + statements = appendExportStatement(statements, exportSpecifier.name, name); } } } - return node; + return statements; } /** - * Gets a name to use for a DeclarationStatement. - * @param node The declaration statement. + * Appends the down-level representation of an export to a statement list, returning the + * statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param exportName The name of the export. + * @param expression The expression to export. + * @param allowComments Whether to allow comments on the export. */ - function getDeclarationName(node: DeclarationStatement) { - return node.name ? getSynthesizedClone(node.name) : getGeneratedNameForNode(node); - } - - function addExportStarFunction(statements: Statement[], localNames: Identifier) { - const exportStarFunction = createUniqueName("exportStar"); - const m = createIdentifier("m"); - const n = createIdentifier("n"); - const exports = createIdentifier("exports"); - let condition: Expression = createStrictInequality(n, createLiteral("default")); - if (localNames) { - condition = createLogicalAnd( - condition, - createLogicalNot(createHasOwnProperty(localNames, n)) - ); - } - - statements.push( - createFunctionDeclaration( - /*decorators*/ undefined, - /*modifiers*/ undefined, - /*asteriskToken*/ undefined, - exportStarFunction, - /*typeParameters*/ undefined, - [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, m)], - /*type*/ undefined, - createBlock([ - createVariableStatement( - /*modifiers*/ undefined, - createVariableDeclarationList([ - createVariableDeclaration( - exports, - /*type*/ undefined, - createObjectLiteral([]) - ) - ]) - ), - createForIn( - createVariableDeclarationList([ - createVariableDeclaration(n, /*type*/ undefined) - ]), - m, - createBlock([ - setEmitFlags( - createIf( - condition, - createStatement( - createAssignment( - createElementAccess(exports, n), - createElementAccess(m, n) - ) - ) - ), - EmitFlags.SingleLine - ) - ]) - ), - createStatement( - createCall( - exportFunctionForFile, - /*typeArguments*/ undefined, - [exports] - ) - ) - ], - /*location*/ undefined, - /*multiline*/ true) - ) - ); - - return exportStarFunction; + function appendExportStatement(statements: Statement[] | undefined, exportName: Identifier | StringLiteral, expression: Expression, allowComments?: boolean): Statement[] | undefined { + statements = append(statements, createExportStatement(exportName, expression, allowComments)); + return statements; } /** * Creates a call to the current file's export function to export a value. + * * @param name The bound name of the export. * @param value The exported value. + * @param allowComments An optional value indicating whether to emit comments for the statement. */ - function createExportExpression(name: Identifier | StringLiteral, value: Expression) { - const exportName = isIdentifier(name) ? createLiteral(name.text) : name; - return createCall(exportFunctionForFile, /*typeArguments*/ undefined, [exportName, value]); + function createExportStatement(name: Identifier | StringLiteral, value: Expression, allowComments?: boolean) { + const statement = createStatement(createExportExpression(name, value)); + startOnNewLine(statement); + if (!allowComments) { + setEmitFlags(statement, EmitFlags.NoComments); + } + + return statement; } /** * Creates a call to the current file's export function to export a value. + * * @param name The bound name of the export. * @param value The exported value. */ - function createExportStatement(name: Identifier | StringLiteral, value: Expression) { - return createStatement(createExportExpression(name, value)); + function createExportExpression(name: Identifier | StringLiteral, value: Expression) { + const exportName = isIdentifier(name) ? createLiteral(name) : name; + return createCall(exportFunction, /*typeArguments*/ undefined, [exportName, value]); } + // + // Top-Level or Nested Source Element Visitors + // + /** - * Creates a call to the current file's export function to export a declaration. - * @param node The declaration to export. + * Visit nested elements at the top-level of a module. + * + * @param node The node to visit. */ - function createDeclarationExport(node: DeclarationStatement) { - const declarationName = getDeclarationName(node); - const exportName = hasModifier(node, ModifierFlags.Default) ? createLiteral("default") : declarationName; - return createExportStatement(exportName, declarationName); - } + function nestedElementVisitor(node: Node): VisitResult { + switch (node.kind) { + case SyntaxKind.VariableStatement: + return visitVariableStatement(node); - function createImportBinding(importDeclaration: Declaration): LeftHandSideExpression { - let importAlias: Identifier; - let name: Identifier; - if (isImportClause(importDeclaration)) { - importAlias = getGeneratedNameForNode(importDeclaration.parent); - name = createIdentifier("default"); - } - else if (isImportSpecifier(importDeclaration)) { - importAlias = getGeneratedNameForNode(importDeclaration.parent.parent.parent); - name = importDeclaration.propertyName || importDeclaration.name; - } - else { - return undefined; - } + case SyntaxKind.FunctionDeclaration: + return visitFunctionDeclaration(node); - return createPropertyAccess(importAlias, getSynthesizedClone(name)); - } + case SyntaxKind.ClassDeclaration: + return visitClassDeclaration(node); - function collectDependencyGroups(externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]) { - const groupIndices = createMap(); - const dependencyGroups: DependencyGroup[] = []; - for (let i = 0; i < externalImports.length; i++) { - const externalImport = externalImports[i]; - const externalModuleName = getExternalModuleNameLiteral(externalImport, currentSourceFile, host, resolver, compilerOptions); - const text = externalModuleName.text; - if (hasProperty(groupIndices, text)) { - // deduplicate/group entries in dependency list by the dependency name - const groupIndex = groupIndices[text]; - dependencyGroups[groupIndex].externalImports.push(externalImport); - continue; - } - else { - groupIndices[text] = dependencyGroups.length; - dependencyGroups.push({ - name: externalModuleName, - externalImports: [externalImport] - }); + case SyntaxKind.ForStatement: + return visitForStatement(node); + + case SyntaxKind.ForInStatement: + return visitForInStatement(node); + + case SyntaxKind.ForOfStatement: + return visitForOfStatement(node); + + case SyntaxKind.DoStatement: + return visitDoStatement(node); + + case SyntaxKind.WhileStatement: + return visitWhileStatement(node); + + case SyntaxKind.LabeledStatement: + return visitLabeledStatement(node); + + case SyntaxKind.WithStatement: + return visitWithStatement(node); + + case SyntaxKind.SwitchStatement: + return visitSwitchStatement(node); + + case SyntaxKind.CaseBlock: + return visitCaseBlock(node); + + case SyntaxKind.CaseClause: + return visitCaseClause(node); + + case SyntaxKind.DefaultClause: + return visitDefaultClause(node); + + case SyntaxKind.TryStatement: + return visitTryStatement(node); + + case SyntaxKind.CatchClause: + return visitCatchClause(node); + + case SyntaxKind.Block: + return visitBlock(node); + + case SyntaxKind.MergeDeclarationMarker: + return visitMergeDeclarationMarker(node); + + case SyntaxKind.EndOfDeclarationMarker: + return visitEndOfDeclarationMarker(node); + + default: + return destructuringVisitor(node); + } + } + + /** + * Visits the body of a ForStatement to hoist declarations. + * + * @param node The node to visit. + */ + function visitForStatement(node: ForStatement): VisitResult { + const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; + enclosingBlockScopedContainer = node; + + node = updateFor( + node, + visitForInitializer(node.initializer), + visitNode(node.condition, destructuringVisitor, isExpression, /*optional*/ true), + visitNode(node.incrementor, destructuringVisitor, isExpression, /*optional*/ true), + visitNode(node.statement, nestedElementVisitor, isStatement) + ); + + enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; + return node; + } + + /** + * Visits the body of a ForInStatement to hoist declarations. + * + * @param node The node to visit. + */ + function visitForInStatement(node: ForInStatement): VisitResult { + const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; + enclosingBlockScopedContainer = node; + + node = updateForIn( + node, + visitForInitializer(node.initializer), + visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.statement, nestedElementVisitor, isStatement, /*optional*/ false, liftToBlock) + ); + + enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; + return node; + } + + /** + * Visits the body of a ForOfStatement to hoist declarations. + * + * @param node The node to visit. + */ + function visitForOfStatement(node: ForOfStatement): VisitResult { + const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; + enclosingBlockScopedContainer = node; + + node = updateForOf( + node, + visitForInitializer(node.initializer), + visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.statement, nestedElementVisitor, isStatement, /*optional*/ false, liftToBlock) + ); + + enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; + return node; + } + + /** + * Determines whether to hoist the initializer of a ForStatement, ForInStatement, or + * ForOfStatement. + * + * @param node The node to test. + */ + function shouldHoistForInitializer(node: ForInitializer): node is VariableDeclarationList { + return isVariableDeclarationList(node) + && shouldHoistVariableDeclarationList(node); + } + + /** + * Visits the initializer of a ForStatement, ForInStatement, or ForOfStatement + * + * @param node The node to visit. + */ + function visitForInitializer(node: ForInitializer): ForInitializer { + if (shouldHoistForInitializer(node)) { + let expressions: Expression[]; + for (const variable of node.declarations) { + expressions = append(expressions, transformInitializedVariable(variable, /*isExportedDeclaration*/ false)); } + + return expressions ? inlineExpressions(expressions) : createOmittedExpression(); + } + else { + return visitEachChild(node, nestedElementVisitor, context); } + } - return dependencyGroups; + /** + * Visits the body of a DoStatement to hoist declarations. + * + * @param node The node to visit. + */ + function visitDoStatement(node: DoStatement): VisitResult { + return updateDo( + node, + visitNode(node.statement, nestedElementVisitor, isStatement, /*optional*/ false, liftToBlock), + visitNode(node.expression, destructuringVisitor, isExpression) + ); + } + + /** + * Visits the body of a WhileStatement to hoist declarations. + * + * @param node The node to visit. + */ + function visitWhileStatement(node: WhileStatement): VisitResult { + return updateWhile( + node, + visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.statement, nestedElementVisitor, isStatement, /*optional*/ false, liftToBlock) + ); } - function getNameOfDependencyGroup(dependencyGroup: DependencyGroup) { - return dependencyGroup.name; + /** + * Visits the body of a LabeledStatement to hoist declarations. + * + * @param node The node to visit. + */ + function visitLabeledStatement(node: LabeledStatement): VisitResult { + return updateLabel( + node, + node.label, + visitNode(node.statement, nestedElementVisitor, isStatement, /*optional*/ false, liftToBlock) + ); } - function recordExportName(name: Identifier) { - if (!exportedLocalNames) { - exportedLocalNames = []; + /** + * Visits the body of a WithStatement to hoist declarations. + * + * @param node The node to visit. + */ + function visitWithStatement(node: WithStatement): VisitResult { + return updateWith( + node, + visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.statement, nestedElementVisitor, isStatement, /*optional*/ false, liftToBlock) + ); + } + + /** + * Visits the body of a SwitchStatement to hoist declarations. + * + * @param node The node to visit. + */ + function visitSwitchStatement(node: SwitchStatement): VisitResult { + return updateSwitch( + node, + visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.caseBlock, nestedElementVisitor, isCaseBlock) + ); + } + + /** + * Visits the body of a CaseBlock to hoist declarations. + * + * @param node The node to visit. + */ + function visitCaseBlock(node: CaseBlock): CaseBlock { + const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; + enclosingBlockScopedContainer = node; + + node = updateCaseBlock( + node, + visitNodes(node.clauses, nestedElementVisitor, isCaseOrDefaultClause) + ); + + enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; + return node; + } + + /** + * Visits the body of a CaseClause to hoist declarations. + * + * @param node The node to visit. + */ + function visitCaseClause(node: CaseClause): VisitResult { + return updateCaseClause( + node, + visitNode(node.expression, destructuringVisitor, isExpression), + visitNodes(node.statements, nestedElementVisitor, isStatement) + ); + } + + /** + * Visits the body of a DefaultClause to hoist declarations. + * + * @param node The node to visit. + */ + function visitDefaultClause(node: DefaultClause): VisitResult { + return visitEachChild(node, nestedElementVisitor, context); + } + + /** + * Visits the body of a TryStatement to hoist declarations. + * + * @param node The node to visit. + */ + function visitTryStatement(node: TryStatement): VisitResult { + return visitEachChild(node, nestedElementVisitor, context); + } + + /** + * Visits the body of a CatchClause to hoist declarations. + * + * @param node The node to visit. + */ + function visitCatchClause(node: CatchClause): CatchClause { + const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; + enclosingBlockScopedContainer = node; + + node = updateCatchClause( + node, + node.variableDeclaration, + visitNode(node.block, nestedElementVisitor, isBlock) + ); + + enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; + return node; + } + + /** + * Visits the body of a Block to hoist declarations. + * + * @param node The node to visit. + */ + function visitBlock(node: Block): Block { + const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; + enclosingBlockScopedContainer = node; + + node = visitEachChild(node, nestedElementVisitor, context); + + enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; + return node; + } + + // + // Destructuring Assignment Visitors + // + + /** + * Visit nodes to flatten destructuring assignments to exported symbols. + * + * @param node The node to visit. + */ + function destructuringVisitor(node: Node): VisitResult { + if (node.transformFlags & TransformFlags.DestructuringAssignment + && node.kind === SyntaxKind.BinaryExpression) { + return visitDestructuringAssignment(node); + } + else if (node.transformFlags & TransformFlags.ContainsDestructuringAssignment) { + return visitEachChild(node, destructuringVisitor, context); + } + else { + return node; } + } - exportedLocalNames.push(name); + /** + * Visits a DestructuringAssignment to flatten destructuring to exported symbols. + * + * @param node The node to visit. + */ + function visitDestructuringAssignment(node: DestructuringAssignment): VisitResult { + if (hasExportedReferenceInDestructuringTarget(node.left)) { + return flattenDestructuringAssignment(context, node, /*needsValue*/ true, hoistVariableDeclaration, destructuringVisitor); + } + + return visitEachChild(node, destructuringVisitor, context); } - function recordExportedFunctionDeclaration(node: FunctionDeclaration) { - if (!exportedFunctionDeclarations) { - exportedFunctionDeclarations = []; + /** + * Determines whether the target of a destructuring assigment refers to an exported symbol. + * + * @param node The destructuring target. + */ + function hasExportedReferenceInDestructuringTarget(node: Expression | ObjectLiteralElementLike): boolean { + if (isAssignmentExpression(node)) { + return hasExportedReferenceInDestructuringTarget(node.left); + } + else if (isSpreadElementExpression(node)) { + return hasExportedReferenceInDestructuringTarget(node.expression); + } + else if (isObjectLiteralExpression(node)) { + return some(node.properties, hasExportedReferenceInDestructuringTarget); + } + else if (isArrayLiteralExpression(node)) { + return some(node.elements, hasExportedReferenceInDestructuringTarget); + } + else if (isShorthandPropertyAssignment(node)) { + return hasExportedReferenceInDestructuringTarget(node.name); + } + else if (isPropertyAssignment(node)) { + return hasExportedReferenceInDestructuringTarget(node.initializer); } + else if (isIdentifier(node)) { + const container = resolver.getReferencedExportContainer(node); + return container !== undefined && container.kind === SyntaxKind.SourceFile; + } + else { + return false; + } + } - exportedFunctionDeclarations.push(createDeclarationExport(node)); + // + // Modifier Visitors + // + + /** + * Visit nodes to elide module-specific modifiers. + * + * @param node The node to visit. + */ + function modifierVisitor(node: Node): VisitResult { + switch (node.kind) { + case SyntaxKind.ExportKeyword: + case SyntaxKind.DefaultKeyword: + return undefined; + } + return node; } - function hoistBindingElement(node: VariableDeclaration | ArrayBindingElement, isExported: boolean): void { - if (isOmittedExpression(node)) { - return; + // + // Emit Notification + // + + /** + * Hook for node emit notifications. + * + * @param emitContext A context hint for the emitter. + * @param node The node to emit. + * @param emit A callback used to emit the node in the printer. + */ + function onEmitNode(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void { + if (node.kind === SyntaxKind.SourceFile) { + const id = getOriginalNodeId(node); + currentSourceFile = node; + moduleInfo = moduleInfoMap[id]; + exportFunction = exportFunctionsMap[id]; + noSubstitution = noSubstitutionMap[id]; + + if (noSubstitution) { + delete noSubstitutionMap[id]; + } + + previousOnEmitNode(emitContext, node, emitCallback); + + currentSourceFile = undefined; + moduleInfo = undefined; + exportFunction = undefined; + noSubstitution = undefined; + } + else { + previousOnEmitNode(emitContext, node, emitCallback); + } + } + + // + // Substitutions + // + + /** + * Hooks node substitutions. + * + * @param emitContext A context hint for the emitter. + * @param node The node to substitute. + */ + function onSubstituteNode(emitContext: EmitContext, node: Node) { + node = previousOnSubstituteNode(emitContext, node); + if (isSubstitutionPrevented(node)) { + return node; + } + + if (emitContext === EmitContext.Expression) { + return substituteExpression(node); + } + + return node; + } + + /** + * Substitute the expression, if necessary. + * + * @param node The node to substitute. + */ + function substituteExpression(node: Expression) { + switch (node.kind) { + case SyntaxKind.Identifier: + return substituteExpressionIdentifier(node); + case SyntaxKind.BinaryExpression: + return substituteBinaryExpression(node); + case SyntaxKind.PrefixUnaryExpression: + case SyntaxKind.PostfixUnaryExpression: + return substituteUnaryExpression(node); } - const name = node.name; - if (isIdentifier(name)) { - hoistVariableDeclaration(getSynthesizedClone(name)); - if (isExported) { - recordExportName(name); + return node; + } + + /** + * Substitution for an Identifier expression that may contain an imported or exported symbol. + * + * @param node The node to substitute. + */ + function substituteExpressionIdentifier(node: Identifier): Expression { + // When we see an identifier in an expression position that + // points to an imported symbol, we should substitute a qualified + // reference to the imported symbol if one is needed. + // + // - We do not substitute generated identifiers for any reason. + // - We do not substitute identifiers tagged with the LocalName flag. + if (!isGeneratedIdentifier(node) && !isLocalName(node)) { + const importDeclaration = resolver.getReferencedImportDeclaration(node); + if (importDeclaration) { + if (isImportClause(importDeclaration)) { + return createPropertyAccess( + getGeneratedNameForNode(importDeclaration.parent), + createIdentifier("default"), + /*location*/ node + ); + } + else if (isImportSpecifier(importDeclaration)) { + return createPropertyAccess( + getGeneratedNameForNode(importDeclaration.parent.parent.parent), + getSynthesizedClone(importDeclaration.propertyName || importDeclaration.name), + /*location*/ node + ); + } } } - else if (isBindingPattern(name)) { - forEach(name.elements, isExported ? hoistExportedBindingElement : hoistNonExportedBindingElement); + + return node; + } + + /** + * Substitution for a BinaryExpression that may contain an imported or exported symbol. + * + * @param node The node to substitute. + */ + function substituteBinaryExpression(node: BinaryExpression): Expression { + // When we see an assignment expression whose left-hand side is an exported symbol, + // we should ensure all exports of that symbol are updated with the correct value. + // + // - We do not substitute generated identifiers for any reason. + // - We do not substitute identifiers tagged with the LocalName flag. + // - We do not substitute identifiers that were originally the name of an enum or + // namespace due to how they are transformed in TypeScript. + // - We only substitute identifiers that are exported at the top level. + if (isAssignmentOperator(node.operatorToken.kind) + && isIdentifier(node.left) + && !isGeneratedIdentifier(node.left) + && !isLocalName(node.left) + && !isDeclarationNameOfEnumOrNamespace(node.left)) { + const exportedNames = getExports(node.left); + if (exportedNames) { + // For each additional export of the declaration, apply an export assignment. + let expression: Expression = node; + for (const exportName of exportedNames) { + expression = createExportExpression(exportName, preventSubstitution(expression)); + } + + return expression; + } } + + return node; } - function hoistExportedBindingElement(node: VariableDeclaration | ArrayBindingElement) { - hoistBindingElement(node, /*isExported*/ true); + /** + * Substitution for a UnaryExpression that may contain an imported or exported symbol. + * + * @param node The node to substitute. + */ + function substituteUnaryExpression(node: PrefixUnaryExpression | PostfixUnaryExpression): Expression { + // When we see a prefix or postfix increment expression whose operand is an exported + // symbol, we should ensure all exports of that symbol are updated with the correct + // value. + // + // - We do not substitute generated identifiers for any reason. + // - We do not substitute identifiers tagged with the LocalName flag. + // - We do not substitute identifiers that were originally the name of an enum or + // namespace due to how they are transformed in TypeScript. + // - We only substitute identifiers that are exported at the top level. + if ((node.operator === SyntaxKind.PlusPlusToken || node.operator === SyntaxKind.MinusMinusToken) + && isIdentifier(node.operand) + && !isGeneratedIdentifier(node.operand) + && !isLocalName(node.operand) + && !isDeclarationNameOfEnumOrNamespace(node.operand)) { + const exportedNames = getExports(node.operand); + if (exportedNames) { + let expression: Expression = node.kind === SyntaxKind.PostfixUnaryExpression + ? createPrefix( + node.operator, + node.operand, + /*location*/ node) + : node; + + for (const exportName of exportedNames) { + expression = createExportExpression(exportName, preventSubstitution(expression)); + } + + if (node.kind === SyntaxKind.PostfixUnaryExpression) { + expression = node.operator === SyntaxKind.PlusPlusToken + ? createSubtract(preventSubstitution(expression), createLiteral(1)) + : createAdd(preventSubstitution(expression), createLiteral(1)); + } + + return expression; + } + } + + return node; } - function hoistNonExportedBindingElement(node: VariableDeclaration | ArrayBindingElement) { - hoistBindingElement(node, /*isExported*/ false); + /** + * Gets the exports of a name. + * + * @param name The name. + */ + function getExports(name: Identifier) { + let exportedNames: Identifier[]; + if (!isGeneratedIdentifier(name)) { + const valueDeclaration = resolver.getReferencedImportDeclaration(name) + || resolver.getReferencedValueDeclaration(name); + + if (valueDeclaration) { + const exportContainer = resolver.getReferencedExportContainer(name, /*prefixLocals*/ false); + if (exportContainer && exportContainer.kind === SyntaxKind.SourceFile) { + exportedNames = append(exportedNames, getDeclarationName(valueDeclaration)); + } + + exportedNames = addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); + } + } + + return exportedNames; } - function updateSourceFile(node: SourceFile, statements: Statement[], nodeEmitFlags: EmitFlags) { - const updated = getMutableClone(node); - updated.statements = createNodeArray(statements, node.statements); - setEmitFlags(updated, nodeEmitFlags); - return updated; + /** + * Prevent substitution of a node for this transformer. + * + * @param node The node which should not be substituted. + */ + function preventSubstitution(node: T): T { + if (noSubstitution === undefined) noSubstitution = createMap(); + noSubstitution[getNodeId(node)] = true; + return node; + } + + /** + * Determines whether a node should not be substituted. + * + * @param node The node to test. + */ + function isSubstitutionPrevented(node: Node) { + return noSubstitution && node.id && noSubstitution[node.id]; } } } diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 0e1821159bec0..6d2d70e7fbda1 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -2353,7 +2353,7 @@ namespace ts { context, node, hoistVariableDeclaration, - getNamespaceMemberNameWithSourceMapsAndWithoutComments, + createNamespaceExportExpression, visitor ); } @@ -2709,9 +2709,13 @@ namespace ts { return true; } else { - const notEmittedStatement = createNotEmittedStatement(statement); - setEmitFlags(notEmittedStatement, EmitFlags.NoComments); - statements.push(notEmittedStatement); + // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding + // declaration we do not emit a leading variable declaration. To preserve the + // begin/end semantics of the declararation and to properly handle exports + // we wrap the leading variable declaration in a `MergeDeclarationMarker`. + const mergeMarker = createMergeDeclarationMarker(statement); + setEmitFlags(mergeMarker, EmitFlags.NoComments | EmitFlags.HasEndOfDeclarationMarker); + statements.push(mergeMarker); return false; } } @@ -3061,10 +3065,13 @@ namespace ts { createVariableStatement( visitNodes(node.modifiers, modifierVisitor, isModifier), createVariableDeclarationList([ - createVariableDeclaration( - node.name, - /*type*/ undefined, - moduleReference + setOriginalNode( + createVariableDeclaration( + node.name, + /*type*/ undefined, + moduleReference + ), + node ) ]), node @@ -3152,6 +3159,10 @@ namespace ts { ); } + function createNamespaceExportExpression(exportName: Identifier, exportValue: Expression, location?: TextRange) { + return createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue, location); + } + function getNamespaceMemberNameWithSourceMapsAndWithoutComments(name: Identifier) { return getNamespaceMemberName(currentNamespaceContainerName, name, /*allowComments*/ false, /*allowSourceMaps*/ true); } @@ -3343,11 +3354,11 @@ namespace ts { function trySubstituteNamespaceExportedName(node: Identifier): Expression { // If this is explicitly a local name, do not substitute. - if (enabledSubstitutions & applicableSubstitutions && (getEmitFlags(node) & EmitFlags.LocalName) === 0) { + if (enabledSubstitutions & applicableSubstitutions && !isLocalName(node)) { // If we are nested within a namespace declaration, we may need to qualifiy // an identifier that is exported from a merged namespace. const container = resolver.getReferencedExportContainer(node, /*prefixLocals*/ false); - if (container) { + if (container && container.kind !== SyntaxKind.SourceFile) { const substitute = (applicableSubstitutions & TypeScriptSubstitutionFlags.NamespaceExports && container.kind === SyntaxKind.ModuleDeclaration) || (applicableSubstitutions & TypeScriptSubstitutionFlags.NonQualifiedEnumMembers && container.kind === SyntaxKind.EnumDeclaration); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 93fd9afb79c0e..2c3765210e758 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -362,6 +362,7 @@ namespace ts { // Transformation nodes NotEmittedStatement, PartiallyEmittedExpression, + MergeDeclarationMarker, EndOfDeclarationMarker, // Enum value count @@ -1156,6 +1157,21 @@ namespace ts { right: Expression; } + export interface AssignmentExpression extends BinaryExpression { + left: LeftHandSideExpression; + operatorToken: Token; + } + + export interface ObjectDestructuringAssignment extends AssignmentExpression { + left: ObjectLiteralExpression; + } + + export interface ArrayDestructuringAssignment extends AssignmentExpression { + left: ArrayLiteralExpression; + } + + export type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment; + export interface ConditionalExpression extends Expression { kind: SyntaxKind.ConditionalExpression; condition: Expression; @@ -1436,6 +1452,14 @@ namespace ts { kind: SyntaxKind.EndOfDeclarationMarker; } + /** + * Marks the beginning of a merged transformed declaration. + */ + /* @internal */ + export interface MergeDeclarationMarker extends Statement { + kind: SyntaxKind.MergeDeclarationMarker; + } + export interface EmptyStatement extends Statement { kind: SyntaxKind.EmptyStatement; } @@ -3380,22 +3404,23 @@ namespace ts { Generator = 1 << 10, ContainsGenerator = 1 << 11, DestructuringAssignment = 1 << 12, + ContainsDestructuringAssignment = 1 << 13, // Markers // - Flags used to indicate that a subtree contains a specific transformation. - ContainsDecorators = 1 << 13, - ContainsPropertyInitializer = 1 << 14, - ContainsLexicalThis = 1 << 15, - ContainsCapturedLexicalThis = 1 << 16, - ContainsLexicalThisInComputedPropertyName = 1 << 17, - ContainsDefaultValueAssignments = 1 << 18, - ContainsParameterPropertyAssignments = 1 << 19, - ContainsSpreadElementExpression = 1 << 20, - ContainsComputedPropertyName = 1 << 21, - ContainsBlockScopedBinding = 1 << 22, - ContainsBindingPattern = 1 << 23, - ContainsYield = 1 << 24, - ContainsHoistedDeclarationOrCompletion = 1 << 25, + ContainsDecorators = 1 << 14, + ContainsPropertyInitializer = 1 << 15, + ContainsLexicalThis = 1 << 16, + ContainsCapturedLexicalThis = 1 << 17, + ContainsLexicalThisInComputedPropertyName = 1 << 18, + ContainsDefaultValueAssignments = 1 << 19, + ContainsParameterPropertyAssignments = 1 << 20, + ContainsSpreadElementExpression = 1 << 21, + ContainsComputedPropertyName = 1 << 22, + ContainsBlockScopedBinding = 1 << 23, + ContainsBindingPattern = 1 << 24, + ContainsYield = 1 << 25, + ContainsHoistedDeclarationOrCompletion = 1 << 26, HasComputedFlags = 1 << 29, // Transform flags have been computed. @@ -3407,6 +3432,7 @@ namespace ts { AssertES2016 = ES2016 | ContainsES2016, AssertES2015 = ES2015 | ContainsES2015, AssertGenerator = Generator | ContainsGenerator, + AssertDestructuringAssignment = DestructuringAssignment | ContainsDestructuringAssignment, // Scope Exclusions // - Bitmasks that exclude flags from propagating out of a specific context @@ -3464,7 +3490,6 @@ namespace ts { NoNestedComments = 1 << 16, ExportName = 1 << 17, // Ensure an export prefix is added for an identifier that points to an exported declaration with a local name (see SymbolFlags.ExportHasLocal). LocalName = 1 << 18, // Ensure an export prefix is not added for an identifier that points to an exported declaration. - ExportBindingName = LocalName | ExportName, Indented = 1 << 19, // Adds an explicit extra indentation level for class and function bodies when printing (used to match old emitter). NoIndentation = 1 << 20, // Do not indent the node. AsyncFunctionBody = 1 << 21, diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index ac0dd1af72062..91e95873a3f62 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -3084,7 +3084,13 @@ namespace ts { } } - export function isDestructuringAssignment(node: Node): node is BinaryExpression { + export function isAssignmentExpression(node: Node): node is AssignmentExpression { + return isBinaryExpression(node) + && isAssignmentOperator(node.operatorToken.kind) + && isLeftHandSideExpression(node.left); + } + + export function isDestructuringAssignment(node: Node): node is DestructuringAssignment { if (isBinaryExpression(node)) { if (node.operatorToken.kind === SyntaxKind.EqualsToken) { const kind = node.left.kind; @@ -3522,6 +3528,7 @@ namespace ts { const exportSpecifiers = createMap(); const exportedBindings = createMap(); const uniqueExports = createMap(); + let hasExportDefault = false; let exportEquals: ExportAssignment = undefined; let hasExportStarsToExportValues = false; for (const node of sourceFile.statements) { @@ -3540,15 +3547,6 @@ namespace ts { externalImports.push(node); } - if (hasModifier(node, ModifierFlags.Export)) { - // export import x = ... - const name = (node).name; - if (!uniqueExports[name.text]) { - multiMapAdd(exportedBindings, getOriginalNodeId(node), name); - uniqueExports[name.text] = name; - } - } - break; case SyntaxKind.ExportDeclaration: @@ -3590,11 +3588,10 @@ namespace ts { } break; - case SyntaxKind.VariableDeclaration: - // export var x + case SyntaxKind.VariableStatement: if (hasModifier(node, ModifierFlags.Export)) { for (const decl of (node).declarationList.declarations) { - collectExportedVariableInfo(decl, exportedBindings, uniqueExports); + collectExportedVariableInfo(decl, uniqueExports); } } break; @@ -3603,9 +3600,9 @@ namespace ts { if (hasModifier(node, ModifierFlags.Export)) { if (hasModifier(node, ModifierFlags.Default)) { // export default function() { } - if (!uniqueExports["default"]) { + if (!hasExportDefault) { multiMapAdd(exportedBindings, getOriginalNodeId(node), getDeclarationName(node)); - uniqueExports["default"] = createIdentifier("default"); + hasExportDefault = true; } } else { @@ -3623,8 +3620,9 @@ namespace ts { if (hasModifier(node, ModifierFlags.Export)) { if (hasModifier(node, ModifierFlags.Default)) { // export default class { } - if (!uniqueExports["default"]) { + if (!hasExportDefault) { multiMapAdd(exportedBindings, getOriginalNodeId(node), getDeclarationName(node)); + hasExportDefault = true; } } else { @@ -3640,25 +3638,24 @@ namespace ts { } } - const exportedNames: Identifier[] = []; + let exportedNames: Identifier[]; for (const key in uniqueExports) { - exportedNames.push(uniqueExports[key]); + exportedNames = ts.append(exportedNames, uniqueExports[key]); } return { externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues, exportedBindings, exportedNames }; } - function collectExportedVariableInfo(decl: VariableDeclaration | BindingElement, exportedNames: Map, uniqueExports: Map) { + function collectExportedVariableInfo(decl: VariableDeclaration | BindingElement, uniqueExports: Map) { if (isBindingPattern(decl.name)) { for (const element of decl.name.elements) { if (!isOmittedExpression(element)) { - collectExportedVariableInfo(element, exportedNames, uniqueExports); + collectExportedVariableInfo(element, uniqueExports); } } } else if (!isGeneratedIdentifier(decl.name)) { if (!uniqueExports[decl.name.text]) { - multiMapAdd(exportedNames, getOriginalNodeId(decl), decl.name); uniqueExports[decl.name.text] = decl.name; } } @@ -3901,6 +3898,14 @@ namespace ts { // Expression + export function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression { + return node.kind === SyntaxKind.ArrayLiteralExpression; + } + + export function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression { + return node.kind === SyntaxKind.ObjectLiteralExpression; + } + export function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression { return node.kind === SyntaxKind.PropertyAccessExpression; } @@ -4161,7 +4166,8 @@ namespace ts { || kind === SyntaxKind.WhileStatement || kind === SyntaxKind.WithStatement || kind === SyntaxKind.NotEmittedStatement - || kind === SyntaxKind.EndOfDeclarationMarker; + || kind === SyntaxKind.EndOfDeclarationMarker + || kind === SyntaxKind.MergeDeclarationMarker; } export function isDeclaration(node: Node): node is Declaration { diff --git a/tests/baselines/reference/capturedLetConstInLoop4.js b/tests/baselines/reference/capturedLetConstInLoop4.js index e3587ad64c6a3..2cade08f0a6d6 100644 --- a/tests/baselines/reference/capturedLetConstInLoop4.js +++ b/tests/baselines/reference/capturedLetConstInLoop4.js @@ -151,13 +151,13 @@ System.register([], function (exports_1, context_1) { function exportedFoo() { return v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8; } + exports_1("exportedFoo", exportedFoo); //======const function exportedFoo2() { return v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c + v8_c; } - var v0, v00, v1, v2, v3, v4, v5, v6, v7, v8, v0_c, v00_c, v1_c, v2_c, v3_c, v4_c, v5_c, v6_c, v7_c, v8_c; - exports_1("exportedFoo", exportedFoo); exports_1("exportedFoo2", exportedFoo2); + var v0, v00, v1, v2, v3, v4, v5, v6, v7, v8, v0_c, v00_c, v1_c, v2_c, v3_c, v4_c, v5_c, v6_c, v7_c, v8_c; return { setters: [], execute: function () { diff --git a/tests/baselines/reference/dottedNamesInSystem.js b/tests/baselines/reference/dottedNamesInSystem.js index e337e8cb1238a..257d7e616afe8 100644 --- a/tests/baselines/reference/dottedNamesInSystem.js +++ b/tests/baselines/reference/dottedNamesInSystem.js @@ -14,8 +14,8 @@ System.register([], function (exports_1, context_1) { function bar() { return A.B.C.foo(); } - var A; exports_1("bar", bar); + var A; return { setters: [], execute: function () { diff --git a/tests/baselines/reference/outFilerootDirModuleNamesSystem.js b/tests/baselines/reference/outFilerootDirModuleNamesSystem.js index 6754f3ef89a29..efc49f9020962 100644 --- a/tests/baselines/reference/outFilerootDirModuleNamesSystem.js +++ b/tests/baselines/reference/outFilerootDirModuleNamesSystem.js @@ -15,8 +15,8 @@ System.register("b", ["a"], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; function foo() { new a_1.default(); } - var a_1; exports_1("default", foo); + var a_1; return { setters: [ function (a_1_1) { diff --git a/tests/baselines/reference/systemModule10.js b/tests/baselines/reference/systemModule10.js index 10afa784ebb8b..a54afee15d79e 100644 --- a/tests/baselines/reference/systemModule10.js +++ b/tests/baselines/reference/systemModule10.js @@ -24,10 +24,10 @@ System.register(["file1", "file2"], function (exports_1, context_1) { } ], execute: function () { - exports_1("x", file1_1.x); - exports_1("y", file1_1.x); exports_1("n", file1_1["default"]); exports_1("n1", file1_1["default"]); + exports_1("x", file1_1.x); + exports_1("y", file1_1.x); exports_1("n2", n2); exports_1("n3", n2); } diff --git a/tests/baselines/reference/systemModule10_ES5.js b/tests/baselines/reference/systemModule10_ES5.js index 830c611bd3886..bac2a6003a421 100644 --- a/tests/baselines/reference/systemModule10_ES5.js +++ b/tests/baselines/reference/systemModule10_ES5.js @@ -24,10 +24,10 @@ System.register(["file1", "file2"], function (exports_1, context_1) { } ], execute: function () { - exports_1("x", file1_1.x); - exports_1("y", file1_1.x); exports_1("n", file1_1.default); exports_1("n1", file1_1.default); + exports_1("x", file1_1.x); + exports_1("y", file1_1.x); exports_1("n2", n2); exports_1("n3", n2); } diff --git a/tests/baselines/reference/systemModule11.js b/tests/baselines/reference/systemModule11.js index 7f120cec40d25..41574af1d9aa5 100644 --- a/tests/baselines/reference/systemModule11.js +++ b/tests/baselines/reference/systemModule11.js @@ -46,8 +46,8 @@ System.register(["bar"], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; function foo() { } - var x; exports_1("foo", foo); + var x; var exportedNames_1 = { "x": true, "foo": true @@ -95,8 +95,6 @@ System.register(["bar"], function (exports_1, context_1) { } ], execute: function () { - exports_1("x", x); - exports_1("y1", y); } }; }); @@ -139,10 +137,10 @@ System.register(["a"], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; function foo() { } - function default_1() { } - var x, z, z1; exports_1("foo", foo); + function default_1() { } exports_1("default", default_1); + var x, z, z1; return { setters: [ function (a_1_1) { @@ -153,8 +151,6 @@ System.register(["a"], function (exports_1, context_1) { } ], execute: function () { - exports_1("z", z); - exports_1("z2", z1); } }; }); diff --git a/tests/baselines/reference/systemModule13.js b/tests/baselines/reference/systemModule13.js index c527fd3e81183..d3fee049e0490 100644 --- a/tests/baselines/reference/systemModule13.js +++ b/tests/baselines/reference/systemModule13.js @@ -8,12 +8,12 @@ for ([x] of [[1]]) {} System.register([], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; - var x, y, z, _a, z0, z1, _b; + var x, y, z, z0, z1, _a, _b; return { setters: [], execute: function () { - _a = [1, 2, 3], exports_1("x", x = _a[0]), exports_1("y", y = _a[1]), exports_1("z", z = _a[2]); - _b = { a: true, b: { c: "123" } }, exports_1("z0", z0 = _b.a), exports_1("z1", z1 = _b.b.c); + exports_1("x", x = (_a = [1, 2, 3], _a[0])), exports_1("y", y = _a[1]), exports_1("z", z = _a[2]); + exports_1("z0", z0 = (_b = { a: true, b: { c: "123" } }, _b.a)), exports_1("z1", z1 = _b.b.c); for (var _i = 0, _a = [[1]]; _i < _a.length; _i++) { exports_1("x", x = _a[_i][0]); } diff --git a/tests/baselines/reference/systemModule14.js b/tests/baselines/reference/systemModule14.js index bebe9244e0731..ba4adc7aabcef 100644 --- a/tests/baselines/reference/systemModule14.js +++ b/tests/baselines/reference/systemModule14.js @@ -17,6 +17,8 @@ System.register(["foo"], function (exports_1, context_1) { function foo() { return foo_1.a; } + exports_1("foo", foo); + exports_1("b", foo); var foo_1, x; return { setters: [ @@ -25,9 +27,7 @@ System.register(["foo"], function (exports_1, context_1) { } ], execute: function () { - exports_1("foo", foo); x = 1; - exports_1("b", foo); } }; }); diff --git a/tests/baselines/reference/systemModule17.js b/tests/baselines/reference/systemModule17.js index df3d722f3d23c..bcdf661235639 100644 --- a/tests/baselines/reference/systemModule17.js +++ b/tests/baselines/reference/systemModule17.js @@ -71,18 +71,18 @@ System.register(["f1"], function (exports_1, context_1) { ], execute: function () { x = 1; + exports_1("x", x); + exports_1("x1", x); (function (N) { N.x = 1; })(N || (N = {})); IX = N.x; - exports_1("x", x); - exports_1("x1", x); + exports_1("IX", IX); + exports_1("IX1", IX); exports_1("A", f1_1.A); exports_1("A1", f1_1.A); exports_1("EA", f1_1.A); exports_1("EA1", f1_1.A); - exports_1("IX", IX); - exports_1("IX1", IX); } }; }); diff --git a/tests/baselines/reference/systemModule3.js b/tests/baselines/reference/systemModule3.js index a8f93941c89d8..109cbb7187cf3 100644 --- a/tests/baselines/reference/systemModule3.js +++ b/tests/baselines/reference/systemModule3.js @@ -67,9 +67,9 @@ System.register([], function (exports_1, context_1) { setters: [], execute: function () { default_1 = (function () { - function class_1() { + function default_1() { } - return class_1; + return default_1; }()); exports_1("default", default_1); } diff --git a/tests/baselines/reference/systemModule8.js b/tests/baselines/reference/systemModule8.js index 467c52298fb33..3065d4f35b301 100644 --- a/tests/baselines/reference/systemModule8.js +++ b/tests/baselines/reference/systemModule8.js @@ -62,7 +62,7 @@ System.register([], function (exports_1, context_1) { for (exports_1("x", x = 18);; exports_1("x", --x)) { } for (var x_1 = 50;;) { } exports_1("y", y = [1][0]); - _a = { a: true, b: { c: "123" } }, exports_1("z0", z0 = _a.a), exports_1("z1", z1 = _a.b.c); + exports_1("z0", z0 = (_a = { a: true, b: { c: "123" } }, _a.a)), exports_1("z1", z1 = _a.b.c); for (var _i = 0, _a = [[1]]; _i < _a.length; _i++) { exports_1("x", x = _a[_i][0]); } diff --git a/tests/baselines/reference/systemModule9.js b/tests/baselines/reference/systemModule9.js index e46b97a71a272..9e497140083ec 100644 --- a/tests/baselines/reference/systemModule9.js +++ b/tests/baselines/reference/systemModule9.js @@ -70,7 +70,6 @@ System.register(["file1", "file2", "file3", "file4", "file5", "file6", "file7"], ns2.f(); ns3.f(); y = true; - exports_1("x", x); exports_1("z", y); } }; diff --git a/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js b/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js index ca68d952ab3ab..132d27a4ea03c 100644 --- a/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js +++ b/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js @@ -20,8 +20,8 @@ System.register([], function (exports_1, context_1) { use(TopLevelConstEnum.X); use(M.NonTopLevelConstEnum.X); } - var TopLevelConstEnum, M; exports_1("foo", foo); + var TopLevelConstEnum, M; return { setters: [], execute: function () { diff --git a/tests/baselines/reference/systemModuleDeclarationMerging.js b/tests/baselines/reference/systemModuleDeclarationMerging.js index 27cdd9f157274..d60a315b0a67b 100644 --- a/tests/baselines/reference/systemModuleDeclarationMerging.js +++ b/tests/baselines/reference/systemModuleDeclarationMerging.js @@ -14,8 +14,8 @@ System.register([], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; function F() { } - var C, E; exports_1("F", F); + var C, E; return { setters: [], execute: function () { diff --git a/tests/baselines/reference/systemModuleExportDefault.js b/tests/baselines/reference/systemModuleExportDefault.js index 53f63ecb027e2..67341a04a0b92 100644 --- a/tests/baselines/reference/systemModuleExportDefault.js +++ b/tests/baselines/reference/systemModuleExportDefault.js @@ -48,9 +48,9 @@ System.register([], function (exports_1, context_1) { setters: [], execute: function () { default_1 = (function () { - function class_1() { + function default_1() { } - return class_1; + return default_1; }()); exports_1("default", default_1); } diff --git a/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js b/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js index c6d3c8295e01f..df68f32b3bd73 100644 --- a/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js +++ b/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js @@ -17,8 +17,8 @@ System.register([], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; function TopLevelFunction() { } - var TopLevelClass, TopLevelModule, TopLevelEnum, TopLevelModule2; exports_1("TopLevelFunction", TopLevelFunction); + var TopLevelClass, TopLevelModule, TopLevelEnum, TopLevelModule2; return { setters: [], execute: function () { diff --git a/tests/baselines/reference/systemModuleTargetES6.js b/tests/baselines/reference/systemModuleTargetES6.js index a049ea78395b6..2fe48f4c57b5d 100644 --- a/tests/baselines/reference/systemModuleTargetES6.js +++ b/tests/baselines/reference/systemModuleTargetES6.js @@ -20,12 +20,12 @@ System.register([], function (exports_1, context_1) { function myFunction() { return new MyClass(); } + exports_1("myFunction", myFunction); function myFunction2() { return new MyClass2(); } - var MyClass, MyClass2; - exports_1("myFunction", myFunction); exports_1("myFunction2", myFunction2); + var MyClass, MyClass2; return { setters: [], execute: function () { @@ -35,8 +35,8 @@ System.register([], function (exports_1, context_1) { MyClass2 = class MyClass2 { static getInstance() { return MyClass2.value; } }; - exports_1("MyClass2", MyClass2); MyClass2.value = 42; + exports_1("MyClass2", MyClass2); } }; }); From 35acd00fdb0a83861e1d94e2ab7cf730e0eb2ede Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 20 Oct 2016 17:15:23 -0700 Subject: [PATCH 09/18] Update baseline --- .../reference/variableDeclarationInStrictMode1.errors.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt b/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt index 46782aaa1d69d..9dd9a8d41a1bf 100644 --- a/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt +++ b/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt @@ -1,4 +1,4 @@ -lib.d.ts(32,18): error TS2300: Duplicate identifier 'eval'. +lib.d.ts(28,18): error TS2300: Duplicate identifier 'eval'. tests/cases/compiler/variableDeclarationInStrictMode1.ts(2,5): error TS1100: Invalid use of 'eval' in strict mode. tests/cases/compiler/variableDeclarationInStrictMode1.ts(2,5): error TS2300: Duplicate identifier 'eval'. From 82c300ab98052b5f5d99e8be0511cc0cb9aeb90e Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 20 Oct 2016 17:26:58 -0700 Subject: [PATCH 10/18] Revert baseline change due to stale output --- .../reference/variableDeclarationInStrictMode1.errors.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt b/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt index 9dd9a8d41a1bf..46782aaa1d69d 100644 --- a/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt +++ b/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt @@ -1,4 +1,4 @@ -lib.d.ts(28,18): error TS2300: Duplicate identifier 'eval'. +lib.d.ts(32,18): error TS2300: Duplicate identifier 'eval'. tests/cases/compiler/variableDeclarationInStrictMode1.ts(2,5): error TS1100: Invalid use of 'eval' in strict mode. tests/cases/compiler/variableDeclarationInStrictMode1.ts(2,5): error TS2300: Duplicate identifier 'eval'. From dc99355b5d44c5d2122c1262c3c1bb56e1a788a5 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Tue, 25 Oct 2016 08:02:16 -0700 Subject: [PATCH 11/18] Move most of resolveModuleNameForLsHost to lsHost --- src/compiler/moduleNameResolver.ts | 50 ++++++++++-------------------- src/server/lsHost.ts | 14 ++++++++- 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index f518070ad19b9..33b1db24fcecb 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -7,8 +7,7 @@ namespace ts { host.trace(formatMessage.apply(undefined, arguments)); } - /* @internal */ - export function isTraceEnabled(compilerOptions: CompilerOptions, host: ModuleResolutionHost): boolean { + function isTraceEnabled(compilerOptions: CompilerOptions, host: ModuleResolutionHost): boolean { return compilerOptions.traceResolution && host.trace !== undefined; } @@ -79,37 +78,6 @@ namespace ts { traceEnabled: boolean; } - /** LsHost uses a global cache of automatically-installed typings to help it resolve modules. */ - /* @internal */ - export function resolveModuleNameForLsHost(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, globalCache: string | undefined, projectName: string): ResolvedModuleWithFailedLookupLocations { - const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host); - if (primaryResult.resolvedModule && primaryResult.resolvedModule.resolvedTsFileName) { - // return result immediately only if it is .ts, .tsx or .d.ts - // otherwise try to load typings from @types - return primaryResult; - } - - // create different collection of failed lookup locations for second pass - // if it will fail and we've already found something during the first pass - we don't want to pollute its results - const secondaryLookupFailedLookupLocations: string[] = []; - if (globalCache !== undefined) { - const traceEnabled = isTraceEnabled(compilerOptions, host); - if (traceEnabled) { - trace(host, Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache); - } - const state: ModuleResolutionState = { compilerOptions, host, traceEnabled }; - const resolved = loadModuleFromNodeModules(Extensions.All, moduleName, globalCache, secondaryLookupFailedLookupLocations, state, /*checkOneLevel*/ true); - if (resolved) { - return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, primaryResult.failedLookupLocations.concat(secondaryLookupFailedLookupLocations)); - } - } - - if (!primaryResult.resolvedModule && secondaryLookupFailedLookupLocations.length) { - primaryResult.failedLookupLocations = primaryResult.failedLookupLocations.concat(secondaryLookupFailedLookupLocations); - } - return primaryResult; - } - function tryReadTypesSection(packageJsonPath: string, baseDirectory: string, state: ModuleResolutionState): string { const jsonContent = readJson(packageJsonPath, state.host); @@ -850,4 +818,20 @@ namespace ts { containingDirectory = parentPath; } } + + /** + * LSHost may load a module from a global cache of typings. + * This is the minumum code needed to expose that functionality; the rest is in LSHost. + */ + /* @internal */ + export function loadModuleFromGlobalCache(moduleName: string, projectName: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, globalCache: string): ResolvedModuleWithFailedLookupLocations { + const traceEnabled = isTraceEnabled(compilerOptions, host); + if (traceEnabled) { + trace(host, Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache); + } + const state: ModuleResolutionState = { compilerOptions, host, traceEnabled }; + const failedLookupLocations: string[] = []; + const resolved = loadModuleFromNodeModules(Extensions.All, moduleName, globalCache, failedLookupLocations, state, /*checkOneLevel*/ true); + return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, failedLookupLocations); + } } \ No newline at end of file diff --git a/src/server/lsHost.ts b/src/server/lsHost.ts index d6dfb67ed04b7..c95b834b8ebf6 100644 --- a/src/server/lsHost.ts +++ b/src/server/lsHost.ts @@ -23,7 +23,19 @@ namespace ts.server { const globalCache = this.project.getTypingOptions().enableAutoDiscovery ? this.project.projectService.typingsInstaller.globalTypingsCacheLocation : undefined; - return resolveModuleNameForLsHost(moduleName, containingFile, compilerOptions, host, globalCache, this.project.getProjectName()); + const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host); + // return result immediately only if it is .ts, .tsx or .d.ts + if (!(primaryResult.resolvedModule && primaryResult.resolvedModule.resolvedTsFileName) && globalCache !== undefined) { + // otherwise try to load typings from @types + + // create different collection of failed lookup locations for second pass + // if it will fail and we've already found something during the first pass - we don't want to pollute its results + const { resolvedModule, failedLookupLocations } = loadModuleFromGlobalCache(moduleName, this.project.getProjectName(), compilerOptions, host, globalCache); + if (resolvedModule) { + return { resolvedModule, failedLookupLocations: primaryResult.failedLookupLocations.concat(failedLookupLocations) }; + } + } + return primaryResult; }; } From 07bb2582b6d40108873664aa7ddcc1a109530408 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Tue, 25 Oct 2016 12:38:59 -0700 Subject: [PATCH 12/18] Don't require `resolvedTsFileName` and `resolvedJsFileName`, just `resolvedFileName` and `extension`. Also, change search order to do all TS searching before searching for JS. --- src/compiler/moduleNameResolver.ts | 283 ++++++++---------- src/compiler/program.ts | 37 ++- src/compiler/types.ts | 22 +- src/compiler/utilities.ts | 54 ++-- src/harness/unittests/moduleResolution.ts | 164 ++-------- .../unittests/reuseProgramStructure.ts | 6 +- .../unittests/tsserverProjectSystem.ts | 57 ++-- src/server/lsHost.ts | 2 +- src/services/shims.ts | 2 +- ...portWithTrailingSlash_noResolve.trace.json | 2 + ...NodeModuleJsDepthDefaultsToZero.trace.json | 12 +- .../moduleResolutionWithExtensions.trace.json | 4 - ...tionWithExtensions_notSupported.errors.txt | 4 +- ...tionWithExtensions_notSupported.trace.json | 12 +- ...ionWithExtensions_notSupported2.trace.json | 7 +- ...solutionWithExtensions_preferTs.trace.json | 2 - ...thExtensions_withAmbientPresent.trace.json | 12 +- .../moduleResolutionWithSymlinks.trace.json | 55 ++-- ...gBasedModuleResolution3_classic.trace.json | 6 - ...pingBasedModuleResolution3_node.trace.json | 22 -- ...gBasedModuleResolution4_classic.trace.json | 6 - ...pingBasedModuleResolution4_node.trace.json | 22 -- ...gBasedModuleResolution5_classic.trace.json | 10 - ...pingBasedModuleResolution5_node.trace.json | 30 -- ...gBasedModuleResolution6_classic.trace.json | 4 - ...pingBasedModuleResolution6_node.trace.json | 10 - ...gBasedModuleResolution7_classic.trace.json | 14 - ...pingBasedModuleResolution7_node.trace.json | 40 --- ...mMultipleNodeModulesDirectories.trace.json | 153 ++++++---- ...romNodeModulesInParentDirectory.trace.json | 33 +- .../reference/typingsLookup4.trace.json | 18 -- .../reference/typingsLookupAmd.trace.json | 36 --- 32 files changed, 407 insertions(+), 734 deletions(-) diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 33b1db24fcecb..1b0a579180270 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -16,51 +16,37 @@ namespace ts { * At least one of `ts` and `js` should be defined, or the whole thing should be `undefined`. */ interface Resolved { - ts: string | undefined; - js: string | undefined; + path: string; + extension: Extension; } /** - * Given a resolution result which does not have a resolvedTsFileName, combine it with second attempt. - * This should be used in the following pattern: - * - * const attemptA = foo(); - * return attemptA && attemptA.ts ? attemptA : combineAttempts(attemptA, bar()); - * - * Meaning, we stop early if we found a typed result. + * Kinds of file that we are currently looking for. + * Typically there is one pass with Extensions.TypeScript, then a second pass with Extensions.JavaScript. */ - function combineAttempts(firstAttempt: Resolved | undefined, secondAttempt: Resolved | undefined): Resolved | undefined { - Debug.assert(!(firstAttempt && firstAttempt.ts)); - return firstAttempt && secondAttempt - ? { ts: secondAttempt.ts, js: firstAttempt.js } - : (firstAttempt || secondAttempt); + const enum Extensions { + TypeScript, /** '.ts', '.tsx', or '.d.ts' */ + JavaScript, /** '.js' or '.jsx' */ + DtsOnly /** Only '.d.ts' */ } - /** - * Whether we are looking for all supported extensions or only `.d.ts` files. - * We look for tsx/jsx/js files even if the compiler settings do not allow them -- this will be a checker error. - */ - enum Extensions { All, DtsOnly } - - /** Used with `Extensions.DtsOnly` to use just the `ts` component, since `js` can't possibly be defined. */ - function resolvedTsOnly(resolved: Resolved | undefined): string | undefined { - Debug.assert(!(resolved && resolved.js)); - return resolved && resolved.ts; + /** Used with `Extensions.DtsOnly` to extract the path from TypeScript results. */ + function resolvedTypeScriptOnly(resolved: Resolved | undefined): string | undefined { + if (!resolved) { + return undefined; + } + Debug.assert(extensionIsTypeScript(resolved.extension)); + return resolved.path; } /** Create Resolved from a file with unknown extension. */ function resolvedFromAnyFile(path: string): Resolved | undefined { - return fileExtensionIsAny(path, supportedTypeScriptExtensions) ? { ts: path, js: undefined } : { ts: undefined, js: path }; - } - - /* @internal */ - export function resolvedModuleFromAnyFile(fileName: string, isExternalLibraryImport: boolean): ResolvedModule { - return resolvedModuleFromResolved(resolvedFromAnyFile(fileName), isExternalLibraryImport); + return { path, extension: extensionFromPath(path) }; } /** Adds `isExernalLibraryImport` to a Resolved to get a ResolvedModule. */ - function resolvedModuleFromResolved({ ts, js }: Resolved, isExternalLibraryImport: boolean): ResolvedModule { - return { resolvedFileName: ts || js, resolvedTsFileName: ts, resolvedJsFileName: js, isExternalLibraryImport }; + function resolvedModuleFromResolved({ path, extension }: Resolved, isExternalLibraryImport: boolean): ResolvedModule { + return { resolvedFileName: path, extension, isExternalLibraryImport }; } function createResolvedModuleWithFailedLookupLocations(resolved: Resolved | undefined, isExternalLibraryImport: boolean, failedLookupLocations: string[]): ResolvedModuleWithFailedLookupLocations { @@ -74,13 +60,28 @@ namespace ts { interface ModuleResolutionState { host: ModuleResolutionHost; // We only use this subset of the compiler options. - compilerOptions: { rootDirs?: string[], baseUrl?: string, paths?: MapLike; }; + compilerOptions: { rootDirs?: string[], baseUrl?: string, paths?: MapLike }; traceEnabled: boolean; } - function tryReadTypesSection(packageJsonPath: string, baseDirectory: string, state: ModuleResolutionState): string { + function tryReadTypesSection(extensions: Extensions, packageJsonPath: string, baseDirectory: string, state: ModuleResolutionState): string { const jsonContent = readJson(packageJsonPath, state.host); + switch (extensions) { + case Extensions.DtsOnly: + case Extensions.TypeScript: + return tryReadFromField("typings") || tryReadFromField("types"); + + case Extensions.JavaScript: + if (typeof jsonContent.main === "string") { + if (state.traceEnabled) { + trace(state.host, Diagnostics.No_types_specified_in_package_json_so_returning_main_value_of_0, jsonContent.main); + } + return normalizePath(combinePaths(baseDirectory, jsonContent.main)); + } + return undefined; + } + function tryReadFromField(fieldName: string) { if (hasProperty(jsonContent, fieldName)) { const typesFile = (jsonContent)[fieldName]; @@ -98,20 +99,6 @@ namespace ts { } } } - - const typesFilePath = tryReadFromField("typings") || tryReadFromField("types"); - if (typesFilePath) { - return typesFilePath; - } - - // Use the main module for inferring types if no types package specified and the allowJs is set - if (typeof jsonContent.main === "string") { - if (state.traceEnabled) { - trace(state.host, Diagnostics.No_types_specified_in_package_json_so_returning_main_value_of_0, jsonContent.main); - } - return normalizePath(combinePaths(baseDirectory, jsonContent.main)); - } - return undefined; } function readJson(path: string, host: ModuleResolutionHost): { typings?: string, types?: string, main?: string } { @@ -214,7 +201,7 @@ namespace ts { const candidate = combinePaths(typeRoot, typeReferenceDirectiveName); const candidateDirectory = getDirectoryPath(candidate); - const resolved = resolvedTsOnly( + const resolved = resolvedTypeScriptOnly( loadNodeModuleFromDirectory(Extensions.DtsOnly, candidate, failedLookupLocations, !directoryProbablyExists(candidateDirectory, host), moduleResolutionState)); @@ -243,7 +230,7 @@ namespace ts { if (traceEnabled) { trace(host, Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup); } - resolvedFile = resolvedTsOnly(loadModuleFromNodeModules(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, /*checkOneLevel*/ false)); + resolvedFile = resolvedTypeScriptOnly(loadModuleFromNodeModules(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, /*checkOneLevel*/ false)); if (traceEnabled) { if (resolvedFile) { trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolvedFile, false); @@ -351,7 +338,7 @@ namespace ts { * 'typings' entry or file 'index' with some supported extension * - Classic loader will only try to interpret '/a/b/c' as file. */ - type ResolutionKindSpecificLoader = (candidate: string, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState) => Resolved | undefined; + type ResolutionKindSpecificLoader = (extensions: Extensions, candidate: string, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState) => Resolved | undefined; /** * Any module resolution kind can be augmented with optional settings: 'baseUrl', 'paths' and 'rootDirs' - they are used to @@ -413,18 +400,18 @@ namespace ts { * be converted to a path relative to found rootDir entry './content/protocols/file2' (*). As a last step compiler will check all remaining * entries in 'rootDirs', use them to build absolute path out of (*) and try to resolve module from this location. */ - function tryLoadModuleUsingOptionalResolutionSettings(moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader, + function tryLoadModuleUsingOptionalResolutionSettings(extensions: Extensions, moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { if (moduleHasNonRelativeName(moduleName)) { - return tryLoadModuleUsingBaseUrl(moduleName, loader, failedLookupLocations, state); + return tryLoadModuleUsingBaseUrl(extensions, moduleName, loader, failedLookupLocations, state); } else { - return tryLoadModuleUsingRootDirs(moduleName, containingDirectory, loader, failedLookupLocations, state); + return tryLoadModuleUsingRootDirs(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state); } } - function tryLoadModuleUsingRootDirs(moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader, + function tryLoadModuleUsingRootDirs(extensions: Extensions, moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { if (!state.compilerOptions.rootDirs) { @@ -470,7 +457,7 @@ namespace ts { if (state.traceEnabled) { trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, matchedNormalizedPrefix, candidate); } - const resolvedFileName = loader(candidate, failedLookupLocations, !directoryProbablyExists(containingDirectory, state.host), state); + const resolvedFileName = loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(containingDirectory, state.host), state); if (resolvedFileName) { return resolvedFileName; } @@ -489,7 +476,7 @@ namespace ts { trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, rootDir, candidate); } const baseDirectory = getDirectoryPath(candidate); - const resolvedFileName = loader(candidate, failedLookupLocations, !directoryProbablyExists(baseDirectory, state.host), state); + const resolvedFileName = loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(baseDirectory, state.host), state); if (resolvedFileName) { return resolvedFileName; } @@ -501,7 +488,7 @@ namespace ts { return undefined; } - function tryLoadModuleUsingBaseUrl(moduleName: string, loader: ResolutionKindSpecificLoader, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { + function tryLoadModuleUsingBaseUrl(extensions: Extensions, moduleName: string, loader: ResolutionKindSpecificLoader, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { if (!state.compilerOptions.baseUrl) { return undefined; } @@ -530,7 +517,7 @@ namespace ts { if (state.traceEnabled) { trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path); } - const resolved = loader(candidate, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); + const resolved = loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); if (resolved) { return resolved; } @@ -544,7 +531,7 @@ namespace ts { trace(state.host, Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2, moduleName, state.compilerOptions.baseUrl, candidate); } - return loader(candidate, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); + return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); } } @@ -554,48 +541,54 @@ namespace ts { const failedLookupLocations: string[] = []; const state: ModuleResolutionState = { compilerOptions, host, traceEnabled }; - let resolved = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, nodeLoadModuleByRelativeName, failedLookupLocations, state); - let isExternalLibraryImport = false; - if (!resolved) { + const result = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript); + if (result) { + const { resolved, isExternalLibraryImport } = result; + return createResolvedModuleWithFailedLookupLocations(resolved && resolvedWithRealpath(resolved, host, traceEnabled), isExternalLibraryImport, failedLookupLocations); + } + return { resolvedModule: undefined, failedLookupLocations }; + + function tryResolve(extensions: Extensions): { resolved: Resolved, isExternalLibraryImport: boolean } | undefined { + const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, nodeLoadModuleByRelativeName, failedLookupLocations, state); + if (resolved) { + return { resolved, isExternalLibraryImport: false }; + } + if (moduleHasNonRelativeName(moduleName)) { if (traceEnabled) { trace(host, Diagnostics.Loading_module_0_from_node_modules_folder, moduleName); } - resolved = loadModuleFromNodeModules(Extensions.All, moduleName, containingDirectory, failedLookupLocations, state, /*checkOneLevel*/ false); - isExternalLibraryImport = resolved !== undefined; + const resolved = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state, /*checkOneLevel*/ false); + return resolved && { resolved, isExternalLibraryImport: true }; } else { const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - resolved = nodeLoadModuleByRelativeName(candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state); + const resolved = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state); + return resolved && { resolved, isExternalLibraryImport: false }; } } - - return createResolvedModuleWithFailedLookupLocations(resolved && resolvedWithRealpath(resolved, host, traceEnabled), isExternalLibraryImport, failedLookupLocations); } function resolvedWithRealpath(resolved: Resolved, host: ModuleResolutionHost, traceEnabled: boolean): Resolved { - return host.realpath ? { ts: resolved.ts && realpath(resolved.ts), js: resolved.js && realpath(resolved.js) } : resolved; + if (!host.realpath) { + return resolved; + } - function realpath(path: string): string { - const real = normalizePath(host.realpath(path)); - if (traceEnabled) { - trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path, real); - } - return real; + const real = normalizePath(host.realpath(resolved.path)); + if (traceEnabled) { + trace(host, Diagnostics.Resolving_real_path_for_0_result_1, resolved.path, real); } + return { path: real, extension: resolved.extension }; } - function nodeLoadModuleByRelativeName(candidate: string, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): Resolved | undefined { + function nodeLoadModuleByRelativeName(extensions: Extensions, candidate: string, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): Resolved | undefined { if (state.traceEnabled) { trace(state.host, Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0, candidate); } - const resolvedFromFile = !pathEndsWithDirectorySeparator(candidate) && loadModuleFromFile(Extensions.All, candidate, failedLookupLocations, onlyRecordFailures, state); - return resolvedFromFile && resolvedFromFile.ts - ? resolvedFromFile - : combineAttempts(resolvedFromFile, - loadNodeModuleFromDirectory(Extensions.All, candidate, failedLookupLocations, onlyRecordFailures, state)); + const resolvedFromFile = !pathEndsWithDirectorySeparator(candidate) && loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state); + return resolvedFromFile || loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state); } /* @internal */ @@ -604,10 +597,6 @@ namespace ts { return !host.directoryExists || host.directoryExists(directoryName); } - function loadModuleFromFileAnyExtension(candidate: string, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): Resolved | undefined { - return loadModuleFromFile(Extensions.All, candidate, failedLookupLocations, onlyRecordFailures, state); - } - /** * @param {boolean} onlyRecordFailures - if true then function won't try to actually load files but instead record all attempts as failures. This flag is necessary * in cases when we know upfront that all load attempts will fail (because containing folder does not exists) however we still need to record all failed lookup locations. @@ -627,7 +616,7 @@ namespace ts { const extension = candidate.substring(extensionless.length); trace(state.host, Diagnostics.File_name_0_has_a_1_extension_stripping_it, candidate, extension); } - return tryAddingExtensions(extensionless, Extensions.All, failedLookupLocations, onlyRecordFailures, state); + return tryAddingExtensions(extensionless, extensions, failedLookupLocations, onlyRecordFailures, state); } } @@ -642,23 +631,17 @@ namespace ts { } switch (extensions) { - case Extensions.DtsOnly: { - const dts = tryExtension(".d.ts"); - return dts && { ts: dts, js: undefined }; - } - case Extensions.All: { - const ts = forEach(supportedTypeScriptExtensions, tryExtension); - if (ts) { - return { ts, js: undefined }; - } - - const js = forEach(supportedJavascriptExtensions, tryExtension); - return js && { ts: undefined, js }; - } + case Extensions.DtsOnly: + return tryExtension(".d.ts", Extension.Dts); + case Extensions.TypeScript: + return tryExtension(".ts", Extension.Ts) || tryExtension(".tsx", Extension.Tsx) || tryExtension(".d.ts", Extension.Dts); + case Extensions.JavaScript: + return tryExtension(".js", Extension.Js) || tryExtension(".jsx", Extension.Jsx); } - function tryExtension(ext: string): string | undefined { - return tryFile(candidate + ext, failedLookupLocations, onlyRecordFailures, state); + function tryExtension(ext: string, extension: Extension): Resolved | undefined { + const path = tryFile(candidate + ext, failedLookupLocations, onlyRecordFailures, state); + return path && { path, extension }; } } @@ -683,23 +666,22 @@ namespace ts { const packageJsonPath = pathToPackageJson(candidate); const directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, state.host); - let fromPackageJson: Resolved | undefined; - if (directoryExists && state.host.fileExists(packageJsonPath)) { if (state.traceEnabled) { trace(state.host, Diagnostics.Found_package_json_at_0, packageJsonPath); } - const typesFile = tryReadTypesSection(packageJsonPath, candidate, state); + const typesFile = tryReadTypesSection(extensions, packageJsonPath, candidate, state); if (typesFile) { const onlyRecordFailures = !directoryProbablyExists(getDirectoryPath(typesFile), state.host); // A package.json "typings" may specify an exact filename, or may choose to omit an extension. const fromFile = tryFile(typesFile, failedLookupLocation, onlyRecordFailures, state); if (fromFile) { + // Note: this would allow a package.json to specify a ".js" file as typings. Maybe that should be forbidden. return resolvedFromAnyFile(fromFile); } - fromPackageJson = tryAddingExtensions(typesFile, Extensions.All, failedLookupLocation, onlyRecordFailures, state); - if (fromPackageJson && fromPackageJson.ts) { - return fromPackageJson; + const x = tryAddingExtensions(typesFile, Extensions.TypeScript, failedLookupLocation, onlyRecordFailures, state); + if (x) { + return x; } } else { @@ -716,7 +698,7 @@ namespace ts { failedLookupLocation.push(packageJsonPath); } - return combineAttempts(fromPackageJson, loadModuleFromFile(extensions, combinePaths(candidate, "index"), failedLookupLocation, !directoryExists, state)); + return loadModuleFromFile(extensions, combinePaths(candidate, "index"), failedLookupLocation, !directoryExists, state); } function pathToPackageJson(directory: string): string { @@ -728,54 +710,39 @@ namespace ts { const nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host); const candidate = normalizePath(combinePaths(nodeModulesFolder, moduleName)); - let result = loadModuleFromFile(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state); - if (result) { - return result; - } - result = loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state); - if (result) { - return result; - } + return loadModuleFromFile(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state) || + loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state); } function loadModuleFromNodeModules(extensions: Extensions, moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState, checkOneLevel: boolean): Resolved | undefined { return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, checkOneLevel, /*typesOnly*/ false); } function loadModuleFromNodeModulesAtTypes(moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { - return loadModuleFromNodeModulesWorker(Extensions.All, moduleName, directory, failedLookupLocations, state, /*checkOneLevel*/ false, /*typesOnly*/ true); + return loadModuleFromNodeModulesWorker(Extensions.TypeScript, moduleName, directory, failedLookupLocations, state, /*checkOneLevel*/ false, /*typesOnly*/ true); } function loadModuleFromNodeModulesWorker(extensions: Extensions, moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState, checkOneLevel: boolean, typesOnly: boolean): Resolved | undefined { directory = normalizeSlashes(directory); while (true) { - const baseName = getBaseFileName(directory); - if (baseName !== "node_modules") { - let packageResult: Resolved | undefined; - if (!typesOnly) { - // Try to load source from the package - packageResult = loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state); - if (packageResult && packageResult.ts) { - // Always prefer a TypeScript (.ts, .tsx, .d.ts) file shipped with the package - return packageResult; - } - } - - // Else prefer a types package over non-TypeScript results (e.g. JavaScript files) - const typesResult = loadModuleFromNodeModulesFolder(extensions, combinePaths("@types", moduleName), directory, failedLookupLocations, state); - if (typesResult || packageResult) { - return combineAttempts(packageResult, typesResult); + if (getBaseFileName(directory) !== "node_modules") { + const resolved = tryInDirectory(); + if (resolved) { + return resolved; } - // TODO (anhans): We should remember JS results and use them for untyped results. } const parentPath = getDirectoryPath(directory); if (parentPath === directory || checkOneLevel) { - break; + return undefined; } directory = parentPath; } - return undefined; + + function tryInDirectory(): Resolved | undefined { + const packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state); + return packageResult || loadModuleFromNodeModulesFolder(extensions, combinePaths("@types", moduleName), directory, failedLookupLocations, state); + } } export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { @@ -784,30 +751,37 @@ namespace ts { const failedLookupLocations: string[] = []; const containingDirectory = getDirectoryPath(containingFile); - const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, loadModuleFromFileAnyExtension, failedLookupLocations, state); - if (resolvedUsingSettings) { - return createResolvedModuleWithFailedLookupLocations(resolvedUsingSettings, /*isExternalLibraryImport*/ false, failedLookupLocations); - } + const resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript); + return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ false, failedLookupLocations); - let resolved: Resolved | undefined; - if (moduleHasNonRelativeName(moduleName)) { - resolved = loadModuleFromAncestorDirectories(moduleName, containingDirectory, failedLookupLocations, state) || - // If we didn't find the file normally, look it up in @types. - loadModuleFromNodeModulesAtTypes(moduleName, containingDirectory, failedLookupLocations, state); - } - else { - const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - resolved = loadModuleFromFileAnyExtension(candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state); - } + function tryResolve(extensions: Extensions): Resolved | undefined { + const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, state); + if (resolvedUsingSettings) { + return resolvedUsingSettings; + } - return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ false, failedLookupLocations); + if (moduleHasNonRelativeName(moduleName)) { + const resolved = loadModuleFromAncestorDirectories(extensions, moduleName, containingDirectory, failedLookupLocations, state); + if (resolved) { + return resolved; + } + if (extensions === Extensions.TypeScript) { + // If we didn't find the file normally, look it up in @types. + return loadModuleFromNodeModulesAtTypes(moduleName, containingDirectory, failedLookupLocations, state); + } + } + else { + const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); + return loadModuleFromFile(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state); + } + } } /** Climb up parent directories looking for a module. */ - function loadModuleFromAncestorDirectories(moduleName: string, containingDirectory: string, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { + function loadModuleFromAncestorDirectories(extensions: Extensions, moduleName: string, containingDirectory: string, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { while (true) { const searchName = normalizePath(combinePaths(containingDirectory, moduleName)); - const referencedSourceFile = loadModuleFromFileAnyExtension(searchName, failedLookupLocations, /*onlyRecordFailures*/ false, state); + const referencedSourceFile = loadModuleFromFile(extensions, searchName, failedLookupLocations, /*onlyRecordFailures*/ false, state); if (referencedSourceFile) { return referencedSourceFile; } @@ -831,7 +805,8 @@ namespace ts { } const state: ModuleResolutionState = { compilerOptions, host, traceEnabled }; const failedLookupLocations: string[] = []; - const resolved = loadModuleFromNodeModules(Extensions.All, moduleName, globalCache, failedLookupLocations, state, /*checkOneLevel*/ true); + const resolved = loadModuleFromNodeModules(Extensions.TypeScript, moduleName, globalCache, failedLookupLocations, state, /*checkOneLevel*/ true) || + loadModuleFromNodeModules(Extensions.JavaScript, moduleName, globalCache, failedLookupLocations, state, /*checkOneLevel*/ true); return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, failedLookupLocations); } } \ No newline at end of file diff --git a/src/compiler/program.ts b/src/compiler/program.ts index a0cfe222c09d2..b2f8ab98f810b 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -331,7 +331,15 @@ namespace ts { let resolveModuleNamesWorker: (moduleNames: string[], containingFile: string) => ResolvedModule[]; if (host.resolveModuleNames) { - resolveModuleNamesWorker = (moduleNames, containingFile) => host.resolveModuleNames(moduleNames, containingFile).map(convertResolvedModuleFromHost); + resolveModuleNamesWorker = (moduleNames, containingFile) => host.resolveModuleNames(moduleNames, containingFile).map(resolved => { + // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. + if (!resolved || resolved.extension) { + return resolved; + } + resolved = clone(resolved); + resolved.extension = extensionFromPath(resolved.resolvedFileName); + return resolved; + }); } else { const loader = (moduleName: string, containingFile: string) => resolveModuleName(moduleName, containingFile, options, host).resolvedModule; @@ -1317,7 +1325,7 @@ namespace ts { } const isFromNodeModulesSearch = resolution.isExternalLibraryImport; - const isJsFileFromNodeModules = isFromNodeModulesSearch && !resolution.resolvedTsFileName; + const isJsFileFromNodeModules = isFromNodeModulesSearch && !extensionIsTypeScript(resolution.extension); const resolvedFileName = resolution.resolvedFileName; if (isFromNodeModulesSearch) { @@ -1581,20 +1589,19 @@ namespace ts { * Returns a DiagnosticMessage if we can't use a resolved module due to its extension. * The DiagnosticMessage's parameters are the imported module name, and the filename it resolved to. */ - export function getResolutionDiagnostic(options: CompilerOptions, { resolvedTsFileName: ts, resolvedJsFileName: js }: ResolvedModule): DiagnosticMessage | undefined { - if (ts) { - return !options.jsx && fileExtensionIs(ts, ".tsx") ? Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set : undefined; - } - else { - if (!options.allowJs) { - return Diagnostics.Module_0_was_resolved_to_1_but_allowJs_is_not_set; - } - else if (!options.jsx && fileExtensionIs(js!, ".jsx")) { - return Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set; - } - else { + export function getResolutionDiagnostic(options: CompilerOptions, { extension }: ResolvedModule): DiagnosticMessage | undefined { + switch (extension) { + case Extension.Ts: + case Extension.Dts: + // These are always allowed. return undefined; - } + + case Extension.Tsx: + case Extension.Jsx: + return options.jsx ? undefined : Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set; + + case Extension.Js: + return options.allowJs ? undefined : Diagnostics.Module_0_was_resolved_to_1_but_allowJs_is_not_set; } } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 3e43d3ddf1052..88e42c0388a63 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3296,22 +3296,26 @@ namespace ts { * else resolution should just return `undefined` instead of a ResolvedModule. */ export interface ResolvedModule { - /** - * This should always be set to `resolvedTsFileName || resolvedJsFileName`. - * Present for backwards compatibility. - */ + /** Path of the file the module was resolved to. */ resolvedFileName: string; - /** TypeScript (.d.ts, .ts, .tsx) file that the module was resolved to. This will be preferred over a JS file. */ - resolvedTsFileName?: string; - /** JavaScript (or .jsx) file that the module was resolved to. This should be returned even if '--allowJs' (or '--jsx') is disabled. */ - resolvedJsFileName?: string; + /** Extension of resolvedFileName. This must match what's at the end of resolvedFileName. */ + extension: Extension; /** * Denotes if 'resolvedFileName' is isExternalLibraryImport and thus should be a proper external module: * - be a .d.ts file * - use top level imports\exports * - don't use tripleslash references */ - isExternalLibraryImport: boolean; + isExternalLibraryImport?: boolean; + } + + export enum Extension { + Ts, + Tsx, + Dts, + Js, + Jsx, + LastTypeScriptExtension = Dts } export interface ResolvedModuleWithFailedLookupLocations { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index cd75ca6d4d488..8398aa1aa1962 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -118,30 +118,6 @@ namespace ts { sourceFile.resolvedModules[moduleNameText] = resolvedModule; } - /** An older host may have omitted resolvedTsFileName and resolvedJsFileName, in which case we should infer them from the file extension of resolvedFileName. */ - export function convertResolvedModuleFromHost(resolved: ResolvedModule | undefined): ResolvedModule | undefined { - if (resolved === undefined) { - return undefined; - } - // At least one of `resolevdTsFileName` or `resolvedJsFileName` should be defined. - else if (resolved.resolvedTsFileName || resolved.resolvedJsFileName) { - const { resolvedFileName, resolvedTsFileName, resolvedJsFileName } = resolved as ResolvedModule; - Debug.assert(resolvedFileName === (resolvedTsFileName || resolvedJsFileName)); - return resolved; - } - else { - // For backwards compatibility, if both `resolvedTsFileName` and `resolvedJsFileName` are undefined, we infer one of them to define. - const { resolvedFileName, isExternalLibraryImport } = resolved; - if (fileExtensionIsAny(resolvedFileName, supportedTypeScriptExtensions)) { - return { resolvedFileName, resolvedTsFileName: resolvedFileName, resolvedJsFileName: undefined, isExternalLibraryImport }; - } - else { - Debug.assert(fileExtensionIsAny(resolvedFileName, supportedJavascriptExtensions)); - return { resolvedFileName, resolvedTsFileName: undefined, resolvedJsFileName: resolvedFileName, isExternalLibraryImport }; - } - } - } - export function setResolvedTypeReferenceDirective(sourceFile: SourceFile, typeReferenceDirectiveName: string, resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective): void { if (!sourceFile.resolvedTypeReferenceDirectiveNames) { sourceFile.resolvedTypeReferenceDirectiveNames = createMap(); @@ -157,9 +133,39 @@ namespace ts { */ export function moduleResolutionIsEqualTo(oldResolution: ResolvedModule, newResolution: ResolvedModule): boolean { return oldResolution.isExternalLibraryImport === newResolution.isExternalLibraryImport && + oldResolution.extension === newResolution.extension && oldResolution.resolvedFileName === newResolution.resolvedFileName; } + /** True if an extension is one of the supported TypeScript extensions. */ + export function extensionIsTypeScript(ext: Extension): boolean { + return ext <= Extension.LastTypeScriptExtension; + } + + /** + * Gets the extension from a path. + * Path must have a valid extension. + */ + export function extensionFromPath(path: string): Extension { + if (fileExtensionIs(path, ".d.ts")) { + return Extension.Dts; + } + if (fileExtensionIs(path, ".ts")) { + return Extension.Ts; + } + if (fileExtensionIs(path, ".tsx")) { + return Extension.Tsx; + } + if (fileExtensionIs(path, ".js")) { + return Extension.Js; + } + if (fileExtensionIs(path, ".jsx")) { + return Extension.Jsx; + } + Debug.fail(`File ${path} has unknown extension.`); + return Extension.Js; + } + /* @internal */ export function typeDirectiveIsEqualTo(oldResolution: ResolvedTypeReferenceDirective, newResolution: ResolvedTypeReferenceDirective): boolean { return oldResolution.resolvedFileName === newResolution.resolvedFileName && oldResolution.primary === newResolution.primary; diff --git a/src/harness/unittests/moduleResolution.ts b/src/harness/unittests/moduleResolution.ts index 21e7f6f990d4c..a713d93cfe072 100644 --- a/src/harness/unittests/moduleResolution.ts +++ b/src/harness/unittests/moduleResolution.ts @@ -4,8 +4,8 @@ namespace ts { export function checkResolvedModule(expected: ResolvedModule, actual: ResolvedModule): boolean { if (!expected === !actual) { if (expected) { - assert.isTrue(expected.resolvedTsFileName === actual.resolvedTsFileName, `'resolvedTsFileName': expected '${expected.resolvedTsFileName}' to be equal to '${actual.resolvedTsFileName}'`); - assert.isTrue(expected.resolvedJsFileName === actual.resolvedJsFileName, `'resolvedTsFileName': expected '${expected.resolvedJsFileName}' to be equal to '${actual.resolvedJsFileName}'`); + assert.isTrue(expected.resolvedFileName === actual.resolvedFileName, `'resolvedFileName': expected '${expected.resolvedFileName}' to be equal to '${actual.resolvedFileName}'`); + assert.isTrue(expected.extension === actual.extension, `'ext': expected '${Extension[expected.extension]}' to be equal to '${Extension[actual.extension]}'`); assert.isTrue(expected.isExternalLibraryImport === actual.isExternalLibraryImport, `'isExternalLibraryImport': expected '${expected.isExternalLibraryImport}' to be equal to '${actual.isExternalLibraryImport}'`); } return true; @@ -19,8 +19,8 @@ namespace ts { assert.deepEqual(actual.failedLookupLocations, expectedFailedLookupLocations); } - export function createTsResolvedModule(resolvedTsFileName: string, isExternalLibraryImport = false): ResolvedModule { - return { resolvedFileName: resolvedTsFileName, resolvedTsFileName, resolvedJsFileName: undefined, isExternalLibraryImport }; + export function createResolvedModule(resolvedFileName: string, isExternalLibraryImport = false): ResolvedModule { + return { resolvedFileName, extension: extensionFromPath(resolvedFileName), isExternalLibraryImport }; } interface File { @@ -75,7 +75,7 @@ namespace ts { const containingFile = { name: containingFileName }; const moduleFile = { name: moduleFileNameNoExt + ext }; const resolution = nodeModuleNameResolver(moduleName, containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, moduleFile)); - checkResolvedModule(resolution.resolvedModule, createTsResolvedModule(moduleFile.name)); + checkResolvedModule(resolution.resolvedModule, createResolvedModule(moduleFile.name)); const failedLookupLocations: string[] = []; const dir = getDirectoryPath(containingFileName); @@ -118,9 +118,9 @@ namespace ts { const packageJson = { name: packageJsonFileName, content: JSON.stringify({ "typings": fieldRef }) }; const moduleFile = { name: moduleFileName }; const resolution = nodeModuleNameResolver(moduleName, containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, packageJson, moduleFile)); - checkResolvedModule(resolution.resolvedModule, createTsResolvedModule(moduleFile.name)); + checkResolvedModule(resolution.resolvedModule, createResolvedModule(moduleFile.name)); // expect three failed lookup location - attempt to load module as file with all supported extensions - assert.equal(resolution.failedLookupLocations.length, allSupportedExtensions.length); + assert.equal(resolution.failedLookupLocations.length, supportedTypeScriptExtensions.length); } } @@ -145,7 +145,7 @@ namespace ts { const resolution = nodeModuleNameResolver("b", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, packageJson, moduleFile, indexFile)); - checkResolvedModule(resolution.resolvedModule, createTsResolvedModule(indexPath, /*isExternalLibraryImport*/true)); + checkResolvedModule(resolution.resolvedModule, createResolvedModule(indexPath, /*isExternalLibraryImport*/true)); } } @@ -167,18 +167,10 @@ namespace ts { const packageJson = { name: "/a/b/foo/package.json", content: JSON.stringify({ main: "/c/d" }) }; const indexFile = { name: "/a/b/foo/index.d.ts" }; const resolution = nodeModuleNameResolver("./foo", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, packageJson, indexFile)); - checkResolvedModuleWithFailedLookupLocations(resolution, createTsResolvedModule(indexFile.name), [ + checkResolvedModuleWithFailedLookupLocations(resolution, createResolvedModule(indexFile.name), [ "/a/b/foo.ts", "/a/b/foo.tsx", "/a/b/foo.d.ts", - "/a/b/foo.js", - "/a/b/foo.jsx", - "/c/d", - "/c/d.ts", - "/c/d.tsx", - "/c/d.d.ts", - "/c/d.js", - "/c/d.jsx", "/a/b/foo/index.ts", "/a/b/foo/index.tsx", ]); @@ -195,58 +187,42 @@ namespace ts { const containingFile = { name: "/a/b/c/d/e.ts" }; const moduleFile = { name: "/a/b/node_modules/foo.ts" }; const resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, moduleFile)); - checkResolvedModuleWithFailedLookupLocations(resolution, createTsResolvedModule(moduleFile.name, /*isExternalLibraryImport*/ true), [ + checkResolvedModuleWithFailedLookupLocations(resolution, createResolvedModule(moduleFile.name, /*isExternalLibraryImport*/ true), [ "/a/b/c/d/node_modules/foo.ts", "/a/b/c/d/node_modules/foo.tsx", "/a/b/c/d/node_modules/foo.d.ts", - "/a/b/c/d/node_modules/foo.js", - "/a/b/c/d/node_modules/foo.jsx", "/a/b/c/d/node_modules/foo/package.json", "/a/b/c/d/node_modules/foo/index.ts", "/a/b/c/d/node_modules/foo/index.tsx", "/a/b/c/d/node_modules/foo/index.d.ts", - "/a/b/c/d/node_modules/foo/index.js", - "/a/b/c/d/node_modules/foo/index.jsx", "/a/b/c/d/node_modules/@types/foo.ts", "/a/b/c/d/node_modules/@types/foo.tsx", "/a/b/c/d/node_modules/@types/foo.d.ts", - "/a/b/c/d/node_modules/@types/foo.js", - "/a/b/c/d/node_modules/@types/foo.jsx", "/a/b/c/d/node_modules/@types/foo/package.json", "/a/b/c/d/node_modules/@types/foo/index.ts", "/a/b/c/d/node_modules/@types/foo/index.tsx", "/a/b/c/d/node_modules/@types/foo/index.d.ts", - "/a/b/c/d/node_modules/@types/foo/index.js", - "/a/b/c/d/node_modules/@types/foo/index.jsx", "/a/b/c/node_modules/foo.ts", "/a/b/c/node_modules/foo.tsx", "/a/b/c/node_modules/foo.d.ts", - "/a/b/c/node_modules/foo.js", - "/a/b/c/node_modules/foo.jsx", "/a/b/c/node_modules/foo/package.json", "/a/b/c/node_modules/foo/index.ts", "/a/b/c/node_modules/foo/index.tsx", "/a/b/c/node_modules/foo/index.d.ts", - "/a/b/c/node_modules/foo/index.js", - "/a/b/c/node_modules/foo/index.jsx", "/a/b/c/node_modules/@types/foo.ts", "/a/b/c/node_modules/@types/foo.tsx", "/a/b/c/node_modules/@types/foo.d.ts", - "/a/b/c/node_modules/@types/foo.js", - "/a/b/c/node_modules/@types/foo.jsx", "/a/b/c/node_modules/@types/foo/package.json", "/a/b/c/node_modules/@types/foo/index.ts", "/a/b/c/node_modules/@types/foo/index.tsx", "/a/b/c/node_modules/@types/foo/index.d.ts", - "/a/b/c/node_modules/@types/foo/index.js", - "/a/b/c/node_modules/@types/foo/index.jsx", ]); } }); @@ -259,7 +235,7 @@ namespace ts { const containingFile = { name: "/a/b/c/d/e.ts" }; const moduleFile = { name: "/a/b/node_modules/foo.d.ts" }; const resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, moduleFile)); - checkResolvedModule(resolution.resolvedModule, createTsResolvedModule(moduleFile.name, /*isExternalLibraryImport*/ true)); + checkResolvedModule(resolution.resolvedModule, createResolvedModule(moduleFile.name, /*isExternalLibraryImport*/ true)); } }); @@ -271,90 +247,64 @@ namespace ts { const containingFile = { name: "/a/node_modules/b/c/node_modules/d/e.ts" }; const moduleFile = { name: "/a/node_modules/foo/index.d.ts" }; const resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, moduleFile)); - checkResolvedModuleWithFailedLookupLocations(resolution, createTsResolvedModule(moduleFile.name, /*isExternalLibraryImport*/ true), [ + checkResolvedModuleWithFailedLookupLocations(resolution, createResolvedModule(moduleFile.name, /*isExternalLibraryImport*/ true), [ "/a/node_modules/b/c/node_modules/d/node_modules/foo.ts", "/a/node_modules/b/c/node_modules/d/node_modules/foo.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/foo.d.ts", - "/a/node_modules/b/c/node_modules/d/node_modules/foo.js", - "/a/node_modules/b/c/node_modules/d/node_modules/foo.jsx", "/a/node_modules/b/c/node_modules/d/node_modules/foo/package.json", "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.ts", "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.d.ts", - "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.js", - "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.jsx", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.ts", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.d.ts", - "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.js", - "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.jsx", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/package.json", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.ts", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.d.ts", - "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.js", - "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.jsx", "/a/node_modules/b/c/node_modules/foo.ts", "/a/node_modules/b/c/node_modules/foo.tsx", "/a/node_modules/b/c/node_modules/foo.d.ts", - "/a/node_modules/b/c/node_modules/foo.js", - "/a/node_modules/b/c/node_modules/foo.jsx", "/a/node_modules/b/c/node_modules/foo/package.json", "/a/node_modules/b/c/node_modules/foo/index.ts", "/a/node_modules/b/c/node_modules/foo/index.tsx", "/a/node_modules/b/c/node_modules/foo/index.d.ts", - "/a/node_modules/b/c/node_modules/foo/index.js", - "/a/node_modules/b/c/node_modules/foo/index.jsx", "/a/node_modules/b/c/node_modules/@types/foo.ts", "/a/node_modules/b/c/node_modules/@types/foo.tsx", "/a/node_modules/b/c/node_modules/@types/foo.d.ts", - "/a/node_modules/b/c/node_modules/@types/foo.js", - "/a/node_modules/b/c/node_modules/@types/foo.jsx", "/a/node_modules/b/c/node_modules/@types/foo/package.json", "/a/node_modules/b/c/node_modules/@types/foo/index.ts", "/a/node_modules/b/c/node_modules/@types/foo/index.tsx", "/a/node_modules/b/c/node_modules/@types/foo/index.d.ts", - "/a/node_modules/b/c/node_modules/@types/foo/index.js", - "/a/node_modules/b/c/node_modules/@types/foo/index.jsx", "/a/node_modules/b/node_modules/foo.ts", "/a/node_modules/b/node_modules/foo.tsx", "/a/node_modules/b/node_modules/foo.d.ts", - "/a/node_modules/b/node_modules/foo.js", - "/a/node_modules/b/node_modules/foo.jsx", "/a/node_modules/b/node_modules/foo/package.json", "/a/node_modules/b/node_modules/foo/index.ts", "/a/node_modules/b/node_modules/foo/index.tsx", "/a/node_modules/b/node_modules/foo/index.d.ts", - "/a/node_modules/b/node_modules/foo/index.js", - "/a/node_modules/b/node_modules/foo/index.jsx", "/a/node_modules/b/node_modules/@types/foo.ts", "/a/node_modules/b/node_modules/@types/foo.tsx", "/a/node_modules/b/node_modules/@types/foo.d.ts", - "/a/node_modules/b/node_modules/@types/foo.js", - "/a/node_modules/b/node_modules/@types/foo.jsx", "/a/node_modules/b/node_modules/@types/foo/package.json", "/a/node_modules/b/node_modules/@types/foo/index.ts", "/a/node_modules/b/node_modules/@types/foo/index.tsx", "/a/node_modules/b/node_modules/@types/foo/index.d.ts", - "/a/node_modules/b/node_modules/@types/foo/index.js", - "/a/node_modules/b/node_modules/@types/foo/index.jsx", "/a/node_modules/foo.ts", "/a/node_modules/foo.tsx", "/a/node_modules/foo.d.ts", - "/a/node_modules/foo.js", - "/a/node_modules/foo.jsx", "/a/node_modules/foo/package.json", "/a/node_modules/foo/index.ts", @@ -564,15 +514,15 @@ import b = require("./moduleB"); const options: CompilerOptions = { moduleResolution, baseUrl: "/root" }; { const result = resolveModuleName("folder2/file2", file1.name, options, host); - checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(file2.name), []); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(file2.name), []); } { const result = resolveModuleName("./file3", file2.name, options, host); - checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(file3.name), []); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(file3.name), []); } { const result = resolveModuleName("/root/folder1/file1", file2.name, options, host); - checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(file1.name), []); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(file1.name), []); } } } @@ -601,7 +551,7 @@ import b = require("./moduleB"); function check(name: string, caller: File, expected: File, isExternalLibraryImport = false) { const result = resolveModuleName(name, caller.name, options, host); - checkResolvedModule(result.resolvedModule, createTsResolvedModule(expected.name, isExternalLibraryImport)); + checkResolvedModule(result.resolvedModule, createResolvedModule(expected.name, isExternalLibraryImport)); } } }); @@ -623,7 +573,7 @@ import b = require("./moduleB"); function check(name: string, caller: File, expected: File) { const result = resolveModuleName(name, caller.name, options, host); - checkResolvedModule(result.resolvedModule, createTsResolvedModule(expected.name)); + checkResolvedModule(result.resolvedModule, createResolvedModule(expected.name)); } } }); @@ -664,15 +614,11 @@ import b = require("./moduleB"); "/root/folder1/file2.ts", "/root/folder1/file2.tsx", "/root/folder1/file2.d.ts", - "/root/folder1/file2.js", - "/root/folder1/file2.jsx", "/root/folder1/file2/package.json", "/root/folder1/file2/index.ts", "/root/folder1/file2/index.tsx", "/root/folder1/file2/index.d.ts", - "/root/folder1/file2/index.js", - "/root/folder1/file2/index.jsx", // then first attempt on 'generated/*' was successful ]); check("folder2/file3", file3, [ @@ -680,22 +626,16 @@ import b = require("./moduleB"); "/root/folder2/file3.ts", "/root/folder2/file3.tsx", "/root/folder2/file3.d.ts", - "/root/folder2/file3.js", - "/root/folder2/file3.jsx", "/root/folder2/file3/package.json", "/root/folder2/file3/index.ts", "/root/folder2/file3/index.tsx", "/root/folder2/file3/index.d.ts", - "/root/folder2/file3/index.js", - "/root/folder2/file3/index.jsx", // then use remapped location "/root/generated/folder2/file3.ts", "/root/generated/folder2/file3.tsx", "/root/generated/folder2/file3.d.ts", - "/root/generated/folder2/file3.js", - "/root/generated/folder2/file3.jsx", "/root/generated/folder2/file3/package.json", "/root/generated/folder2/file3/index.ts", @@ -707,22 +647,16 @@ import b = require("./moduleB"); "/root/folder2/file4.ts", "/root/folder2/file4.tsx", "/root/folder2/file4.d.ts", - "/root/folder2/file4.js", - "/root/folder2/file4.jsx", "/root/folder2/file4/package.json", "/root/folder2/file4/index.ts", "/root/folder2/file4/index.tsx", "/root/folder2/file4/index.d.ts", - "/root/folder2/file4/index.js", - "/root/folder2/file4/index.jsx", // try to load from file from remapped location "/root/generated/folder2/file4.ts", "/root/generated/folder2/file4.tsx", "/root/generated/folder2/file4.d.ts", - "/root/generated/folder2/file4.js", - "/root/generated/folder2/file4.jsx", // success on loading as from folder ]); check("somefolder/file5", file5, [ @@ -731,8 +665,6 @@ import b = require("./moduleB"); "/root/someanotherfolder/file5.ts", "/root/someanotherfolder/file5.tsx", "/root/someanotherfolder/file5.d.ts", - "/root/someanotherfolder/file5.js", - "/root/someanotherfolder/file5.jsx", // load from folder "/root/someanotherfolder/file5/package.json", @@ -746,67 +678,51 @@ import b = require("./moduleB"); "/root/file6.ts", "/root/file6.tsx", "/root/file6.d.ts", - "/root/file6.js", - "/root/file6.jsx", // load from folder "/root/file6/package.json", "/root/file6/index.ts", "/root/file6/index.tsx", "/root/file6/index.d.ts", - "/root/file6/index.js", - "/root/file6/index.jsx", // then try 'generated/*' // load from file "/root/generated/file6.ts", "/root/generated/file6.tsx", "/root/generated/file6.d.ts", - "/root/generated/file6.js", - "/root/generated/file6.jsx", // load from folder "/root/generated/file6/package.json", "/root/generated/file6/index.ts", "/root/generated/file6/index.tsx", "/root/generated/file6/index.d.ts", - "/root/generated/file6/index.js", - "/root/generated/file6/index.jsx", // fallback to standard node behavior // load from file "/root/folder1/node_modules/file6.ts", "/root/folder1/node_modules/file6.tsx", "/root/folder1/node_modules/file6.d.ts", - "/root/folder1/node_modules/file6.js", - "/root/folder1/node_modules/file6.jsx", // load from folder "/root/folder1/node_modules/file6/package.json", "/root/folder1/node_modules/file6/index.ts", "/root/folder1/node_modules/file6/index.tsx", "/root/folder1/node_modules/file6/index.d.ts", - "/root/folder1/node_modules/file6/index.js", - "/root/folder1/node_modules/file6/index.jsx", "/root/folder1/node_modules/@types/file6.ts", "/root/folder1/node_modules/@types/file6.tsx", "/root/folder1/node_modules/@types/file6.d.ts", - "/root/folder1/node_modules/@types/file6.js", - "/root/folder1/node_modules/@types/file6.jsx", "/root/folder1/node_modules/@types/file6/package.json", "/root/folder1/node_modules/@types/file6/index.ts", "/root/folder1/node_modules/@types/file6/index.tsx", "/root/folder1/node_modules/@types/file6/index.d.ts", - "/root/folder1/node_modules/@types/file6/index.js", - "/root/folder1/node_modules/@types/file6/index.jsx", // success on /root/node_modules/file6.ts ], /*isExternalLibraryImport*/ true); function check(name: string, expected: File, expectedFailedLookups: string[], isExternalLibraryImport = false) { const result = resolveModuleName(name, main.name, options, host); - checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(expected.name, isExternalLibraryImport), expectedFailedLookups); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(expected.name, isExternalLibraryImport), expectedFailedLookups); } } }); @@ -843,8 +759,6 @@ import b = require("./moduleB"); "/root/folder1/file2.ts", "/root/folder1/file2.tsx", "/root/folder1/file2.d.ts", - "/root/folder1/file2.js", - "/root/folder1/file2.jsx", // success when using 'generated/*' ]); check("folder1/file3", file3, [ @@ -852,30 +766,22 @@ import b = require("./moduleB"); "/root/folder1/file3.ts", "/root/folder1/file3.tsx", "/root/folder1/file3.d.ts", - "/root/folder1/file3.js", - "/root/folder1/file3.jsx", // then try 'generated/*' "/root/generated/folder1/file3.ts", "/root/generated/folder1/file3.tsx", "/root/generated/folder1/file3.d.ts", - "/root/generated/folder1/file3.js", - "/root/generated/folder1/file3.jsx", // fallback to classic "/root/folder1/folder1/file3.ts", "/root/folder1/folder1/file3.tsx", "/root/folder1/folder1/file3.d.ts", - "/root/folder1/folder1/file3.js", - "/root/folder1/folder1/file3.jsx", "/root/folder1/file3.ts", "/root/folder1/file3.tsx", "/root/folder1/file3.d.ts", - "/root/folder1/file3.js", - "/root/folder1/file3.jsx", ]); function check(name: string, expected: File, expectedFailedLookups: string[]) { const result = resolveModuleName(name, main.name, options, host); - checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(expected.name), expectedFailedLookups); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(expected.name), expectedFailedLookups); } } }); @@ -903,15 +809,11 @@ import b = require("./moduleB"); "/root/folder1/file2.ts", "/root/folder1/file2.tsx", "/root/folder1/file2.d.ts", - "/root/folder1/file2.js", - "/root/folder1/file2.jsx", // load from folder "/root/folder1/file2/package.json", "/root/folder1/file2/index.ts", "/root/folder1/file2/index.tsx", "/root/folder1/file2/index.d.ts", - "/root/folder1/file2/index.js", - "/root/folder1/file2/index.jsx", // success after using alternative rootDir entry ]); check("../folder1/file1", file3, file1, [ @@ -920,15 +822,11 @@ import b = require("./moduleB"); "/root/generated/folder1/file1.ts", "/root/generated/folder1/file1.tsx", "/root/generated/folder1/file1.d.ts", - "/root/generated/folder1/file1.js", - "/root/generated/folder1/file1.jsx", // load from module "/root/generated/folder1/file1/package.json", "/root/generated/folder1/file1/index.ts", "/root/generated/folder1/file1/index.tsx", "/root/generated/folder1/file1/index.d.ts", - "/root/generated/folder1/file1/index.js", - "/root/generated/folder1/file1/index.jsx", // success after using alternative rootDir entry ]); check("../folder1/file1_1", file3, file1_1, [ @@ -937,22 +835,16 @@ import b = require("./moduleB"); "/root/generated/folder1/file1_1.ts", "/root/generated/folder1/file1_1.tsx", "/root/generated/folder1/file1_1.d.ts", - "/root/generated/folder1/file1_1.js", - "/root/generated/folder1/file1_1.jsx", // load from folder "/root/generated/folder1/file1_1/package.json", "/root/generated/folder1/file1_1/index.ts", "/root/generated/folder1/file1_1/index.tsx", "/root/generated/folder1/file1_1/index.d.ts", - "/root/generated/folder1/file1_1/index.js", - "/root/generated/folder1/file1_1/index.jsx", // try alternative rootDir entry // load from file "/root/folder1/file1_1.ts", "/root/folder1/file1_1.tsx", "/root/folder1/file1_1.d.ts", - "/root/folder1/file1_1.js", - "/root/folder1/file1_1.jsx", // load from directory "/root/folder1/file1_1/package.json", "/root/folder1/file1_1/index.ts", @@ -962,7 +854,7 @@ import b = require("./moduleB"); function check(name: string, container: File, expected: File, expectedFailedLookups: string[]) { const result = resolveModuleName(name, container.name, options, host); - checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(expected.name), expectedFailedLookups); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(expected.name), expectedFailedLookups); } } }); @@ -989,8 +881,6 @@ import b = require("./moduleB"); "/root/folder1/file2.ts", "/root/folder1/file2.tsx", "/root/folder1/file2.d.ts", - "/root/folder1/file2.js", - "/root/folder1/file2.jsx", // then try alternative rootDir entry ]); check("../folder1/file1", file3, file1, [ @@ -998,8 +888,6 @@ import b = require("./moduleB"); "/root/generated/folder1/file1.ts", "/root/generated/folder1/file1.tsx", "/root/generated/folder1/file1.d.ts", - "/root/generated/folder1/file1.js", - "/root/generated/folder1/file1.jsx", // then try alternative rootDir entry ]); check("folder1/file1_1", file3, file4, [ @@ -1007,26 +895,20 @@ import b = require("./moduleB"); "/root/generated/folder2/folder1/file1_1.ts", "/root/generated/folder2/folder1/file1_1.tsx", "/root/generated/folder2/folder1/file1_1.d.ts", - "/root/generated/folder2/folder1/file1_1.js", - "/root/generated/folder2/folder1/file1_1.jsx", // other entry in rootDirs "/root/generated/folder1/file1_1.ts", "/root/generated/folder1/file1_1.tsx", "/root/generated/folder1/file1_1.d.ts", - "/root/generated/folder1/file1_1.js", - "/root/generated/folder1/file1_1.jsx", // fallback "/root/folder1/file1_1.ts", "/root/folder1/file1_1.tsx", "/root/folder1/file1_1.d.ts", - "/root/folder1/file1_1.js", - "/root/folder1/file1_1.jsx", // found one ]); function check(name: string, container: File, expected: File, expectedFailedLookups: string[]) { const result = resolveModuleName(name, container.name, options, host); - checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(expected.name), expectedFailedLookups); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(expected.name), expectedFailedLookups); } } }); @@ -1048,13 +930,11 @@ import b = require("./moduleB"); } }; const result = resolveModuleName("libs/guid", app.name, options, host); - checkResolvedModuleWithFailedLookupLocations(result, createTsResolvedModule(libsTypings.name), [ + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(libsTypings.name), [ // first try to load module as file "/root/src/libs/guid.ts", "/root/src/libs/guid.tsx", "/root/src/libs/guid.d.ts", - "/root/src/libs/guid.js", - "/root/src/libs/guid.jsx", ]); } }); diff --git a/src/harness/unittests/reuseProgramStructure.ts b/src/harness/unittests/reuseProgramStructure.ts index 66b966aed16ff..f3457b61145a7 100644 --- a/src/harness/unittests/reuseProgramStructure.ts +++ b/src/harness/unittests/reuseProgramStructure.ts @@ -295,7 +295,7 @@ namespace ts { const options: CompilerOptions = { target }; const program_1 = newProgram(files, ["a.ts"], options); - checkResolvedModulesCache(program_1, "a.ts", createMap({ "b": createTsResolvedModule("b.ts") })); + checkResolvedModulesCache(program_1, "a.ts", createMap({ "b": createResolvedModule("b.ts") })); checkResolvedModulesCache(program_1, "b.ts", undefined); const program_2 = updateProgram(program_1, ["a.ts"], options, files => { @@ -304,7 +304,7 @@ namespace ts { assert.isTrue(program_1.structureIsReused); // content of resolution cache should not change - checkResolvedModulesCache(program_1, "a.ts", createMap({ "b": createTsResolvedModule("b.ts") })); + checkResolvedModulesCache(program_1, "a.ts", createMap({ "b": createResolvedModule("b.ts") })); checkResolvedModulesCache(program_1, "b.ts", undefined); // imports has changed - program is not reused @@ -321,7 +321,7 @@ namespace ts { files[0].text = files[0].text.updateImportsAndExports(newImports); }); assert.isTrue(!program_3.structureIsReused); - checkResolvedModulesCache(program_4, "a.ts", createMap({ "b": createTsResolvedModule("b.ts"), "c": undefined })); + checkResolvedModulesCache(program_4, "a.ts", createMap({ "b": createResolvedModule("b.ts"), "c": undefined })); }); it("resolved type directives cache follows type directives", () => { diff --git a/src/harness/unittests/tsserverProjectSystem.ts b/src/harness/unittests/tsserverProjectSystem.ts index c3962c7749419..c65d85c9405ed 100644 --- a/src/harness/unittests/tsserverProjectSystem.ts +++ b/src/harness/unittests/tsserverProjectSystem.ts @@ -1667,67 +1667,74 @@ namespace ts.projectSystem { "File '/a/b/node_modules/lib.ts' does not exist.", "File '/a/b/node_modules/lib.tsx' does not exist.", "File '/a/b/node_modules/lib.d.ts' does not exist.", - "File '/a/b/node_modules/lib.js' does not exist.", - "File '/a/b/node_modules/lib.jsx' does not exist.", "File '/a/b/node_modules/lib/package.json' does not exist.", "File '/a/b/node_modules/lib/index.ts' does not exist.", "File '/a/b/node_modules/lib/index.tsx' does not exist.", "File '/a/b/node_modules/lib/index.d.ts' does not exist.", - "File '/a/b/node_modules/lib/index.js' does not exist.", - "File '/a/b/node_modules/lib/index.jsx' does not exist.", "File '/a/b/node_modules/@types/lib.ts' does not exist.", "File '/a/b/node_modules/@types/lib.tsx' does not exist.", "File '/a/b/node_modules/@types/lib.d.ts' does not exist.", - "File '/a/b/node_modules/@types/lib.js' does not exist.", - "File '/a/b/node_modules/@types/lib.jsx' does not exist.", "File '/a/b/node_modules/@types/lib/package.json' does not exist.", "File '/a/b/node_modules/@types/lib/index.ts' does not exist.", "File '/a/b/node_modules/@types/lib/index.tsx' does not exist.", "File '/a/b/node_modules/@types/lib/index.d.ts' does not exist.", - "File '/a/b/node_modules/@types/lib/index.js' does not exist.", - "File '/a/b/node_modules/@types/lib/index.jsx' does not exist.", "File '/a/node_modules/lib.ts' does not exist.", "File '/a/node_modules/lib.tsx' does not exist.", "File '/a/node_modules/lib.d.ts' does not exist.", - "File '/a/node_modules/lib.js' does not exist.", - "File '/a/node_modules/lib.jsx' does not exist.", "File '/a/node_modules/lib/package.json' does not exist.", "File '/a/node_modules/lib/index.ts' does not exist.", "File '/a/node_modules/lib/index.tsx' does not exist.", "File '/a/node_modules/lib/index.d.ts' does not exist.", - "File '/a/node_modules/lib/index.js' does not exist.", - "File '/a/node_modules/lib/index.jsx' does not exist.", "File '/a/node_modules/@types/lib.ts' does not exist.", "File '/a/node_modules/@types/lib.tsx' does not exist.", "File '/a/node_modules/@types/lib.d.ts' does not exist.", - "File '/a/node_modules/@types/lib.js' does not exist.", - "File '/a/node_modules/@types/lib.jsx' does not exist.", "File '/a/node_modules/@types/lib/package.json' does not exist.", "File '/a/node_modules/@types/lib/index.ts' does not exist.", "File '/a/node_modules/@types/lib/index.tsx' does not exist.", "File '/a/node_modules/@types/lib/index.d.ts' does not exist.", - "File '/a/node_modules/@types/lib/index.js' does not exist.", - "File '/a/node_modules/@types/lib/index.jsx' does not exist.", "File '/node_modules/lib.ts' does not exist.", "File '/node_modules/lib.tsx' does not exist.", "File '/node_modules/lib.d.ts' does not exist.", - "File '/node_modules/lib.js' does not exist.", - "File '/node_modules/lib.jsx' does not exist.", "File '/node_modules/lib/package.json' does not exist.", "File '/node_modules/lib/index.ts' does not exist.", "File '/node_modules/lib/index.tsx' does not exist.", "File '/node_modules/lib/index.d.ts' does not exist.", - "File '/node_modules/lib/index.js' does not exist.", - "File '/node_modules/lib/index.jsx' does not exist.", "File '/node_modules/@types/lib.ts' does not exist.", "File '/node_modules/@types/lib.tsx' does not exist.", "File '/node_modules/@types/lib.d.ts' does not exist.", - "File '/node_modules/@types/lib.js' does not exist.", - "File '/node_modules/@types/lib.jsx' does not exist.", "File '/node_modules/@types/lib/package.json' does not exist.", "File '/node_modules/@types/lib/index.ts' does not exist.", "File '/node_modules/@types/lib/index.tsx' does not exist.", "File '/node_modules/@types/lib/index.d.ts' does not exist.", + "Loading module 'lib' from 'node_modules' folder.", + "File '/a/b/node_modules/lib.js' does not exist.", + "File '/a/b/node_modules/lib.jsx' does not exist.", + "File '/a/b/node_modules/lib/package.json' does not exist.", + "File '/a/b/node_modules/lib/index.js' does not exist.", + "File '/a/b/node_modules/lib/index.jsx' does not exist.", + "File '/a/b/node_modules/@types/lib.js' does not exist.", + "File '/a/b/node_modules/@types/lib.jsx' does not exist.", + "File '/a/b/node_modules/@types/lib/package.json' does not exist.", + "File '/a/b/node_modules/@types/lib/index.js' does not exist.", + "File '/a/b/node_modules/@types/lib/index.jsx' does not exist.", + "File '/a/node_modules/lib.js' does not exist.", + "File '/a/node_modules/lib.jsx' does not exist.", + "File '/a/node_modules/lib/package.json' does not exist.", + "File '/a/node_modules/lib/index.js' does not exist.", + "File '/a/node_modules/lib/index.jsx' does not exist.", + "File '/a/node_modules/@types/lib.js' does not exist.", + "File '/a/node_modules/@types/lib.jsx' does not exist.", + "File '/a/node_modules/@types/lib/package.json' does not exist.", + "File '/a/node_modules/@types/lib/index.js' does not exist.", + "File '/a/node_modules/@types/lib/index.jsx' does not exist.", + "File '/node_modules/lib.js' does not exist.", + "File '/node_modules/lib.jsx' does not exist.", + "File '/node_modules/lib/package.json' does not exist.", + "File '/node_modules/lib/index.js' does not exist.", + "File '/node_modules/lib/index.jsx' does not exist.", + "File '/node_modules/@types/lib.js' does not exist.", + "File '/node_modules/@types/lib.jsx' does not exist.", + "File '/node_modules/@types/lib/package.json' does not exist.", "File '/node_modules/@types/lib/index.js' does not exist.", "File '/node_modules/@types/lib/index.jsx' does not exist.", "======== Module name 'lib' was not resolved. ========", @@ -1735,19 +1742,13 @@ namespace ts.projectSystem { "File '/a/cache/node_modules/lib.ts' does not exist.", "File '/a/cache/node_modules/lib.tsx' does not exist.", "File '/a/cache/node_modules/lib.d.ts' does not exist.", - "File '/a/cache/node_modules/lib.js' does not exist.", - "File '/a/cache/node_modules/lib.jsx' does not exist.", "File '/a/cache/node_modules/lib/package.json' does not exist.", "File '/a/cache/node_modules/lib/index.ts' does not exist.", "File '/a/cache/node_modules/lib/index.tsx' does not exist.", "File '/a/cache/node_modules/lib/index.d.ts' does not exist.", - "File '/a/cache/node_modules/lib/index.js' does not exist.", - "File '/a/cache/node_modules/lib/index.jsx' does not exist.", "File '/a/cache/node_modules/@types/lib.ts' does not exist.", "File '/a/cache/node_modules/@types/lib.tsx' does not exist.", "File '/a/cache/node_modules/@types/lib.d.ts' does not exist.", - "File '/a/cache/node_modules/@types/lib.js' does not exist.", - "File '/a/cache/node_modules/@types/lib.jsx' does not exist.", "File '/a/cache/node_modules/@types/lib/package.json' does not exist.", "File '/a/cache/node_modules/@types/lib/index.ts' does not exist.", "File '/a/cache/node_modules/@types/lib/index.tsx' does not exist.", diff --git a/src/server/lsHost.ts b/src/server/lsHost.ts index c95b834b8ebf6..8a8861e412e4a 100644 --- a/src/server/lsHost.ts +++ b/src/server/lsHost.ts @@ -25,7 +25,7 @@ namespace ts.server { : undefined; const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host); // return result immediately only if it is .ts, .tsx or .d.ts - if (!(primaryResult.resolvedModule && primaryResult.resolvedModule.resolvedTsFileName) && globalCache !== undefined) { + if (!(primaryResult.resolvedModule && extensionIsTypeScript(primaryResult.resolvedModule.extension)) && globalCache !== undefined) { // otherwise try to load typings from @types // create different collection of failed lookup locations for second pass diff --git a/src/services/shims.ts b/src/services/shims.ts index a525ff4398638..82e3d5971f3fb 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -328,7 +328,7 @@ namespace ts { const resolutionsInFile = >JSON.parse(this.shimHost.getModuleResolutionsForFile(containingFile)); return map(moduleNames, name => { const result = getProperty(resolutionsInFile, name); - return result ? resolvedModuleFromAnyFile(result, /*isExternalLibraryImport*/ false) : undefined; + return result ? { resolvedFileName: result, extension: extensionFromPath(result), isExternalLibraryImport: false } : undefined; }); }; } diff --git a/tests/baselines/reference/importWithTrailingSlash_noResolve.trace.json b/tests/baselines/reference/importWithTrailingSlash_noResolve.trace.json index db316e5db74cd..55b75c57dde4b 100644 --- a/tests/baselines/reference/importWithTrailingSlash_noResolve.trace.json +++ b/tests/baselines/reference/importWithTrailingSlash_noResolve.trace.json @@ -6,6 +6,8 @@ "File '/foo/index.ts' does not exist.", "File '/foo/index.tsx' does not exist.", "File '/foo/index.d.ts' does not exist.", + "Loading module as file / folder, candidate module location '/foo/'.", + "File '/foo/package.json' does not exist.", "File '/foo/index.js' does not exist.", "File '/foo/index.jsx' does not exist.", "======== Module name './foo/' was not resolved. ========" diff --git a/tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.trace.json b/tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.trace.json index e53b2a0934fe7..3a9d8c4ea79b1 100644 --- a/tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.trace.json +++ b/tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.trace.json @@ -5,24 +5,22 @@ "File '/node_modules/shortid.ts' does not exist.", "File '/node_modules/shortid.tsx' does not exist.", "File '/node_modules/shortid.d.ts' does not exist.", - "File '/node_modules/shortid.js' does not exist.", - "File '/node_modules/shortid.jsx' does not exist.", "File '/node_modules/shortid/package.json' does not exist.", "File '/node_modules/shortid/index.ts' does not exist.", "File '/node_modules/shortid/index.tsx' does not exist.", "File '/node_modules/shortid/index.d.ts' does not exist.", - "File '/node_modules/shortid/index.js' exist - use it as a name resolution result.", "File '/node_modules/@types/shortid.ts' does not exist.", "File '/node_modules/@types/shortid.tsx' does not exist.", "File '/node_modules/@types/shortid.d.ts' does not exist.", - "File '/node_modules/@types/shortid.js' does not exist.", - "File '/node_modules/@types/shortid.jsx' does not exist.", "File '/node_modules/@types/shortid/package.json' does not exist.", "File '/node_modules/@types/shortid/index.ts' does not exist.", "File '/node_modules/@types/shortid/index.tsx' does not exist.", "File '/node_modules/@types/shortid/index.d.ts' does not exist.", - "File '/node_modules/@types/shortid/index.js' does not exist.", - "File '/node_modules/@types/shortid/index.jsx' does not exist.", + "Loading module 'shortid' from 'node_modules' folder.", + "File '/node_modules/shortid.js' does not exist.", + "File '/node_modules/shortid.jsx' does not exist.", + "File '/node_modules/shortid/package.json' does not exist.", + "File '/node_modules/shortid/index.js' exist - use it as a name resolution result.", "Resolving real path for '/node_modules/shortid/index.js', result '/node_modules/shortid/index.js'", "======== Module name 'shortid' was successfully resolved to '/node_modules/shortid/index.js'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions.trace.json index 924860326b891..5060006ac56bd 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions.trace.json +++ b/tests/baselines/reference/moduleResolutionWithExtensions.trace.json @@ -11,8 +11,6 @@ "File '/src/a.js.ts' does not exist.", "File '/src/a.js.tsx' does not exist.", "File '/src/a.js.d.ts' does not exist.", - "File '/src/a.js.js' does not exist.", - "File '/src/a.js.jsx' does not exist.", "File name '/src/a.js' has a '.js' extension - stripping it", "File '/src/a.ts' exist - use it as a name resolution result.", "Resolving real path for '/src/a.ts', result '/src/a.ts'", @@ -23,8 +21,6 @@ "File '/src/jquery.js.ts' does not exist.", "File '/src/jquery.js.tsx' does not exist.", "File '/src/jquery.js.d.ts' does not exist.", - "File '/src/jquery.js.js' does not exist.", - "File '/src/jquery.js.jsx' does not exist.", "File name '/src/jquery.js' has a '.js' extension - stripping it", "File '/src/jquery.ts' does not exist.", "File '/src/jquery.tsx' does not exist.", diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.errors.txt b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.errors.txt index f1da7b7728dc2..aa415a95b1b90 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.errors.txt +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.errors.txt @@ -1,5 +1,5 @@ /a.ts(1,17): error TS6142: Module './tsx' was resolved to '/tsx.tsx', but '--jsx' is not set. -/a.ts(2,17): error TS6143: Module './jsx' was resolved to '/jsx.jsx', but '--allowJs' is not set. +/a.ts(2,17): error TS6142: Module './jsx' was resolved to '/jsx.jsx', but '--jsx' is not set. /a.ts(3,16): error TS6143: Module './js' was resolved to '/js.js', but '--allowJs' is not set. @@ -9,7 +9,7 @@ !!! error TS6142: Module './tsx' was resolved to '/tsx.tsx', but '--jsx' is not set. import jsx from "./jsx"; ~~~~~~~ -!!! error TS6143: Module './jsx' was resolved to '/jsx.jsx', but '--allowJs' is not set. +!!! error TS6142: Module './jsx' was resolved to '/jsx.jsx', but '--jsx' is not set. import js from "./js"; ~~~~~~ !!! error TS6143: Module './js' was resolved to '/js.js', but '--allowJs' is not set. diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.trace.json index 5628c6fb7afc5..0073abaca3a8a 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.trace.json +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.trace.json @@ -12,14 +12,13 @@ "File '/jsx.ts' does not exist.", "File '/jsx.tsx' does not exist.", "File '/jsx.d.ts' does not exist.", - "File '/jsx.js' does not exist.", - "File '/jsx.jsx' exist - use it as a name resolution result.", "File '/jsx/package.json' does not exist.", "File '/jsx/index.ts' does not exist.", "File '/jsx/index.tsx' does not exist.", "File '/jsx/index.d.ts' does not exist.", - "File '/jsx/index.js' does not exist.", - "File '/jsx/index.jsx' does not exist.", + "Loading module as file / folder, candidate module location '/jsx'.", + "File '/jsx.js' does not exist.", + "File '/jsx.jsx' exist - use it as a name resolution result.", "Resolving real path for '/jsx.jsx', result '/jsx.jsx'", "======== Module name './jsx' was successfully resolved to '/jsx.jsx'. ========", "======== Resolving module './js' from '/a.ts'. ========", @@ -28,13 +27,12 @@ "File '/js.ts' does not exist.", "File '/js.tsx' does not exist.", "File '/js.d.ts' does not exist.", - "File '/js.js' exist - use it as a name resolution result.", "File '/js/package.json' does not exist.", "File '/js/index.ts' does not exist.", "File '/js/index.tsx' does not exist.", "File '/js/index.d.ts' does not exist.", - "File '/js/index.js' does not exist.", - "File '/js/index.jsx' does not exist.", + "Loading module as file / folder, candidate module location '/js'.", + "File '/js.js' exist - use it as a name resolution result.", "Resolving real path for '/js.js', result '/js.js'", "======== Module name './js' was successfully resolved to '/js.js'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.trace.json index 2d6170f9946b4..c366843ce86e6 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.trace.json +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.trace.json @@ -5,14 +5,13 @@ "File '/jsx.ts' does not exist.", "File '/jsx.tsx' does not exist.", "File '/jsx.d.ts' does not exist.", - "File '/jsx.js' does not exist.", - "File '/jsx.jsx' exist - use it as a name resolution result.", "File '/jsx/package.json' does not exist.", "File '/jsx/index.ts' does not exist.", "File '/jsx/index.tsx' does not exist.", "File '/jsx/index.d.ts' does not exist.", - "File '/jsx/index.js' does not exist.", - "File '/jsx/index.jsx' does not exist.", + "Loading module as file / folder, candidate module location '/jsx'.", + "File '/jsx.js' does not exist.", + "File '/jsx.jsx' exist - use it as a name resolution result.", "Resolving real path for '/jsx.jsx', result '/jsx.jsx'", "======== Module name './jsx' was successfully resolved to '/jsx.jsx'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.trace.json index 150d492145c8c..292472c710c7d 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.trace.json +++ b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.trace.json @@ -5,10 +5,8 @@ "File '/b.ts' does not exist.", "File '/b.tsx' does not exist.", "File '/b.d.ts' does not exist.", - "File '/b.js' exist - use it as a name resolution result.", "File '/b/package.json' does not exist.", "File '/b/index.ts' exist - use it as a name resolution result.", "Resolving real path for '/b/index.ts', result '/b/index.ts'", - "Resolving real path for '/b.js', result '/b.js'", "======== Module name './b' was successfully resolved to '/b/index.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json index b2b46649529e2..9c6d96fc1907f 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json +++ b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json @@ -5,24 +5,22 @@ "File '/node_modules/js.ts' does not exist.", "File '/node_modules/js.tsx' does not exist.", "File '/node_modules/js.d.ts' does not exist.", - "File '/node_modules/js.js' does not exist.", - "File '/node_modules/js.jsx' does not exist.", "File '/node_modules/js/package.json' does not exist.", "File '/node_modules/js/index.ts' does not exist.", "File '/node_modules/js/index.tsx' does not exist.", "File '/node_modules/js/index.d.ts' does not exist.", - "File '/node_modules/js/index.js' exist - use it as a name resolution result.", "File '/node_modules/@types/js.ts' does not exist.", "File '/node_modules/@types/js.tsx' does not exist.", "File '/node_modules/@types/js.d.ts' does not exist.", - "File '/node_modules/@types/js.js' does not exist.", - "File '/node_modules/@types/js.jsx' does not exist.", "File '/node_modules/@types/js/package.json' does not exist.", "File '/node_modules/@types/js/index.ts' does not exist.", "File '/node_modules/@types/js/index.tsx' does not exist.", "File '/node_modules/@types/js/index.d.ts' does not exist.", - "File '/node_modules/@types/js/index.js' does not exist.", - "File '/node_modules/@types/js/index.jsx' does not exist.", + "Loading module 'js' from 'node_modules' folder.", + "File '/node_modules/js.js' does not exist.", + "File '/node_modules/js.jsx' does not exist.", + "File '/node_modules/js/package.json' does not exist.", + "File '/node_modules/js/index.js' exist - use it as a name resolution result.", "Resolving real path for '/node_modules/js/index.js', result '/node_modules/js/index.js'", "======== Module name 'js' was successfully resolved to '/node_modules/js/index.js'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json b/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json index d69fa7bfb50db..0f4dd90569a05 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json +++ b/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json @@ -5,8 +5,6 @@ "File '/src/library-a.ts' does not exist.", "File '/src/library-a.tsx' does not exist.", "File '/src/library-a.d.ts' does not exist.", - "File '/src/library-a.js' does not exist.", - "File '/src/library-a.jsx' does not exist.", "File '/src/library-a/package.json' does not exist.", "File '/src/library-a/index.ts' exist - use it as a name resolution result.", "Resolving real path for '/src/library-a/index.ts', result '/src/library-a/index.ts'", @@ -17,8 +15,6 @@ "File '/src/library-b.ts' does not exist.", "File '/src/library-b.tsx' does not exist.", "File '/src/library-b.d.ts' does not exist.", - "File '/src/library-b.js' does not exist.", - "File '/src/library-b.jsx' does not exist.", "File '/src/library-b/package.json' does not exist.", "File '/src/library-b/index.ts' exist - use it as a name resolution result.", "Resolving real path for '/src/library-b/index.ts', result '/src/library-b/index.ts'", @@ -29,67 +25,74 @@ "File '/src/library-b/node_modules/library-a.ts' does not exist.", "File '/src/library-b/node_modules/library-a.tsx' does not exist.", "File '/src/library-b/node_modules/library-a.d.ts' does not exist.", - "File '/src/library-b/node_modules/library-a.js' does not exist.", - "File '/src/library-b/node_modules/library-a.jsx' does not exist.", "File '/src/library-b/node_modules/library-a/package.json' does not exist.", "File '/src/library-b/node_modules/library-a/index.ts' does not exist.", "File '/src/library-b/node_modules/library-a/index.tsx' does not exist.", "File '/src/library-b/node_modules/library-a/index.d.ts' does not exist.", - "File '/src/library-b/node_modules/library-a/index.js' does not exist.", - "File '/src/library-b/node_modules/library-a/index.jsx' does not exist.", "File '/src/library-b/node_modules/@types/library-a.ts' does not exist.", "File '/src/library-b/node_modules/@types/library-a.tsx' does not exist.", "File '/src/library-b/node_modules/@types/library-a.d.ts' does not exist.", - "File '/src/library-b/node_modules/@types/library-a.js' does not exist.", - "File '/src/library-b/node_modules/@types/library-a.jsx' does not exist.", "File '/src/library-b/node_modules/@types/library-a/package.json' does not exist.", "File '/src/library-b/node_modules/@types/library-a/index.ts' does not exist.", "File '/src/library-b/node_modules/@types/library-a/index.tsx' does not exist.", "File '/src/library-b/node_modules/@types/library-a/index.d.ts' does not exist.", - "File '/src/library-b/node_modules/@types/library-a/index.js' does not exist.", - "File '/src/library-b/node_modules/@types/library-a/index.jsx' does not exist.", "File '/src/node_modules/library-a.ts' does not exist.", "File '/src/node_modules/library-a.tsx' does not exist.", "File '/src/node_modules/library-a.d.ts' does not exist.", - "File '/src/node_modules/library-a.js' does not exist.", - "File '/src/node_modules/library-a.jsx' does not exist.", "File '/src/node_modules/library-a/package.json' does not exist.", "File '/src/node_modules/library-a/index.ts' does not exist.", "File '/src/node_modules/library-a/index.tsx' does not exist.", "File '/src/node_modules/library-a/index.d.ts' does not exist.", - "File '/src/node_modules/library-a/index.js' does not exist.", - "File '/src/node_modules/library-a/index.jsx' does not exist.", "File '/src/node_modules/@types/library-a.ts' does not exist.", "File '/src/node_modules/@types/library-a.tsx' does not exist.", "File '/src/node_modules/@types/library-a.d.ts' does not exist.", - "File '/src/node_modules/@types/library-a.js' does not exist.", - "File '/src/node_modules/@types/library-a.jsx' does not exist.", "File '/src/node_modules/@types/library-a/package.json' does not exist.", "File '/src/node_modules/@types/library-a/index.ts' does not exist.", "File '/src/node_modules/@types/library-a/index.tsx' does not exist.", "File '/src/node_modules/@types/library-a/index.d.ts' does not exist.", - "File '/src/node_modules/@types/library-a/index.js' does not exist.", - "File '/src/node_modules/@types/library-a/index.jsx' does not exist.", "File '/node_modules/library-a.ts' does not exist.", "File '/node_modules/library-a.tsx' does not exist.", "File '/node_modules/library-a.d.ts' does not exist.", - "File '/node_modules/library-a.js' does not exist.", - "File '/node_modules/library-a.jsx' does not exist.", "File '/node_modules/library-a/package.json' does not exist.", "File '/node_modules/library-a/index.ts' does not exist.", "File '/node_modules/library-a/index.tsx' does not exist.", "File '/node_modules/library-a/index.d.ts' does not exist.", - "File '/node_modules/library-a/index.js' does not exist.", - "File '/node_modules/library-a/index.jsx' does not exist.", "File '/node_modules/@types/library-a.ts' does not exist.", "File '/node_modules/@types/library-a.tsx' does not exist.", "File '/node_modules/@types/library-a.d.ts' does not exist.", - "File '/node_modules/@types/library-a.js' does not exist.", - "File '/node_modules/@types/library-a.jsx' does not exist.", "File '/node_modules/@types/library-a/package.json' does not exist.", "File '/node_modules/@types/library-a/index.ts' does not exist.", "File '/node_modules/@types/library-a/index.tsx' does not exist.", "File '/node_modules/@types/library-a/index.d.ts' does not exist.", + "Loading module 'library-a' from 'node_modules' folder.", + "File '/src/library-b/node_modules/library-a.js' does not exist.", + "File '/src/library-b/node_modules/library-a.jsx' does not exist.", + "File '/src/library-b/node_modules/library-a/package.json' does not exist.", + "File '/src/library-b/node_modules/library-a/index.js' does not exist.", + "File '/src/library-b/node_modules/library-a/index.jsx' does not exist.", + "File '/src/library-b/node_modules/@types/library-a.js' does not exist.", + "File '/src/library-b/node_modules/@types/library-a.jsx' does not exist.", + "File '/src/library-b/node_modules/@types/library-a/package.json' does not exist.", + "File '/src/library-b/node_modules/@types/library-a/index.js' does not exist.", + "File '/src/library-b/node_modules/@types/library-a/index.jsx' does not exist.", + "File '/src/node_modules/library-a.js' does not exist.", + "File '/src/node_modules/library-a.jsx' does not exist.", + "File '/src/node_modules/library-a/package.json' does not exist.", + "File '/src/node_modules/library-a/index.js' does not exist.", + "File '/src/node_modules/library-a/index.jsx' does not exist.", + "File '/src/node_modules/@types/library-a.js' does not exist.", + "File '/src/node_modules/@types/library-a.jsx' does not exist.", + "File '/src/node_modules/@types/library-a/package.json' does not exist.", + "File '/src/node_modules/@types/library-a/index.js' does not exist.", + "File '/src/node_modules/@types/library-a/index.jsx' does not exist.", + "File '/node_modules/library-a.js' does not exist.", + "File '/node_modules/library-a.jsx' does not exist.", + "File '/node_modules/library-a/package.json' does not exist.", + "File '/node_modules/library-a/index.js' does not exist.", + "File '/node_modules/library-a/index.jsx' does not exist.", + "File '/node_modules/@types/library-a.js' does not exist.", + "File '/node_modules/@types/library-a.jsx' does not exist.", + "File '/node_modules/@types/library-a/package.json' does not exist.", "File '/node_modules/@types/library-a/index.js' does not exist.", "File '/node_modules/@types/library-a/index.jsx' does not exist.", "======== Module name 'library-a' was not resolved. ========" diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json index 22d93809b1bdd..90b8620e36cf9 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json @@ -16,18 +16,12 @@ "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", - "File 'c:/root/file4.js' does not exist.", - "File 'c:/root/file4.jsx' does not exist.", "File 'c:/root/folder2/file4.ts' does not exist.", "File 'c:/root/folder2/file4.tsx' does not exist.", "File 'c:/root/folder2/file4.d.ts' does not exist.", - "File 'c:/root/folder2/file4.js' does not exist.", - "File 'c:/root/folder2/file4.jsx' does not exist.", "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", - "File 'c:/root/file4.js' does not exist.", - "File 'c:/root/file4.jsx' does not exist.", "File 'c:/file4.ts' exist - use it as a name resolution result.", "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json index 220f0f9c04b04..ab7210d7d020c 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json @@ -21,64 +21,42 @@ "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", - "File 'c:/root/file4.js' does not exist.", - "File 'c:/root/file4.jsx' does not exist.", "File 'c:/root/file4/package.json' does not exist.", "File 'c:/root/file4/index.ts' does not exist.", "File 'c:/root/file4/index.tsx' does not exist.", "File 'c:/root/file4/index.d.ts' does not exist.", - "File 'c:/root/file4/index.js' does not exist.", - "File 'c:/root/file4/index.jsx' does not exist.", "Loading module 'file4' from 'node_modules' folder.", "File 'c:/root/folder2/node_modules/file4.ts' does not exist.", "File 'c:/root/folder2/node_modules/file4.tsx' does not exist.", "File 'c:/root/folder2/node_modules/file4.d.ts' does not exist.", - "File 'c:/root/folder2/node_modules/file4.js' does not exist.", - "File 'c:/root/folder2/node_modules/file4.jsx' does not exist.", "File 'c:/root/folder2/node_modules/file4/package.json' does not exist.", "File 'c:/root/folder2/node_modules/file4/index.ts' does not exist.", "File 'c:/root/folder2/node_modules/file4/index.tsx' does not exist.", "File 'c:/root/folder2/node_modules/file4/index.d.ts' does not exist.", - "File 'c:/root/folder2/node_modules/file4/index.js' does not exist.", - "File 'c:/root/folder2/node_modules/file4/index.jsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4.ts' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4.tsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4.d.ts' does not exist.", - "File 'c:/root/folder2/node_modules/@types/file4.js' does not exist.", - "File 'c:/root/folder2/node_modules/@types/file4.jsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/package.json' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/index.ts' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/index.tsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/index.d.ts' does not exist.", - "File 'c:/root/folder2/node_modules/@types/file4/index.js' does not exist.", - "File 'c:/root/folder2/node_modules/@types/file4/index.jsx' does not exist.", "File 'c:/root/node_modules/file4.ts' does not exist.", "File 'c:/root/node_modules/file4.tsx' does not exist.", "File 'c:/root/node_modules/file4.d.ts' does not exist.", - "File 'c:/root/node_modules/file4.js' does not exist.", - "File 'c:/root/node_modules/file4.jsx' does not exist.", "File 'c:/root/node_modules/file4/package.json' does not exist.", "File 'c:/root/node_modules/file4/index.ts' does not exist.", "File 'c:/root/node_modules/file4/index.tsx' does not exist.", "File 'c:/root/node_modules/file4/index.d.ts' does not exist.", - "File 'c:/root/node_modules/file4/index.js' does not exist.", - "File 'c:/root/node_modules/file4/index.jsx' does not exist.", "File 'c:/root/node_modules/@types/file4.ts' does not exist.", "File 'c:/root/node_modules/@types/file4.tsx' does not exist.", "File 'c:/root/node_modules/@types/file4.d.ts' does not exist.", - "File 'c:/root/node_modules/@types/file4.js' does not exist.", - "File 'c:/root/node_modules/@types/file4.jsx' does not exist.", "File 'c:/root/node_modules/@types/file4/package.json' does not exist.", "File 'c:/root/node_modules/@types/file4/index.ts' does not exist.", "File 'c:/root/node_modules/@types/file4/index.tsx' does not exist.", "File 'c:/root/node_modules/@types/file4/index.d.ts' does not exist.", - "File 'c:/root/node_modules/@types/file4/index.js' does not exist.", - "File 'c:/root/node_modules/@types/file4/index.jsx' does not exist.", "File 'c:/node_modules/file4.ts' does not exist.", "File 'c:/node_modules/file4.tsx' does not exist.", "File 'c:/node_modules/file4.d.ts' does not exist.", - "File 'c:/node_modules/file4.js' does not exist.", - "File 'c:/node_modules/file4.jsx' does not exist.", "File 'c:/node_modules/file4/package.json' does not exist.", "File 'c:/node_modules/file4/index.ts' does not exist.", "File 'c:/node_modules/file4/index.tsx' does not exist.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json index 22d93809b1bdd..90b8620e36cf9 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json @@ -16,18 +16,12 @@ "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", - "File 'c:/root/file4.js' does not exist.", - "File 'c:/root/file4.jsx' does not exist.", "File 'c:/root/folder2/file4.ts' does not exist.", "File 'c:/root/folder2/file4.tsx' does not exist.", "File 'c:/root/folder2/file4.d.ts' does not exist.", - "File 'c:/root/folder2/file4.js' does not exist.", - "File 'c:/root/folder2/file4.jsx' does not exist.", "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", - "File 'c:/root/file4.js' does not exist.", - "File 'c:/root/file4.jsx' does not exist.", "File 'c:/file4.ts' exist - use it as a name resolution result.", "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json index 220f0f9c04b04..ab7210d7d020c 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json @@ -21,64 +21,42 @@ "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", - "File 'c:/root/file4.js' does not exist.", - "File 'c:/root/file4.jsx' does not exist.", "File 'c:/root/file4/package.json' does not exist.", "File 'c:/root/file4/index.ts' does not exist.", "File 'c:/root/file4/index.tsx' does not exist.", "File 'c:/root/file4/index.d.ts' does not exist.", - "File 'c:/root/file4/index.js' does not exist.", - "File 'c:/root/file4/index.jsx' does not exist.", "Loading module 'file4' from 'node_modules' folder.", "File 'c:/root/folder2/node_modules/file4.ts' does not exist.", "File 'c:/root/folder2/node_modules/file4.tsx' does not exist.", "File 'c:/root/folder2/node_modules/file4.d.ts' does not exist.", - "File 'c:/root/folder2/node_modules/file4.js' does not exist.", - "File 'c:/root/folder2/node_modules/file4.jsx' does not exist.", "File 'c:/root/folder2/node_modules/file4/package.json' does not exist.", "File 'c:/root/folder2/node_modules/file4/index.ts' does not exist.", "File 'c:/root/folder2/node_modules/file4/index.tsx' does not exist.", "File 'c:/root/folder2/node_modules/file4/index.d.ts' does not exist.", - "File 'c:/root/folder2/node_modules/file4/index.js' does not exist.", - "File 'c:/root/folder2/node_modules/file4/index.jsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4.ts' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4.tsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4.d.ts' does not exist.", - "File 'c:/root/folder2/node_modules/@types/file4.js' does not exist.", - "File 'c:/root/folder2/node_modules/@types/file4.jsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/package.json' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/index.ts' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/index.tsx' does not exist.", "File 'c:/root/folder2/node_modules/@types/file4/index.d.ts' does not exist.", - "File 'c:/root/folder2/node_modules/@types/file4/index.js' does not exist.", - "File 'c:/root/folder2/node_modules/@types/file4/index.jsx' does not exist.", "File 'c:/root/node_modules/file4.ts' does not exist.", "File 'c:/root/node_modules/file4.tsx' does not exist.", "File 'c:/root/node_modules/file4.d.ts' does not exist.", - "File 'c:/root/node_modules/file4.js' does not exist.", - "File 'c:/root/node_modules/file4.jsx' does not exist.", "File 'c:/root/node_modules/file4/package.json' does not exist.", "File 'c:/root/node_modules/file4/index.ts' does not exist.", "File 'c:/root/node_modules/file4/index.tsx' does not exist.", "File 'c:/root/node_modules/file4/index.d.ts' does not exist.", - "File 'c:/root/node_modules/file4/index.js' does not exist.", - "File 'c:/root/node_modules/file4/index.jsx' does not exist.", "File 'c:/root/node_modules/@types/file4.ts' does not exist.", "File 'c:/root/node_modules/@types/file4.tsx' does not exist.", "File 'c:/root/node_modules/@types/file4.d.ts' does not exist.", - "File 'c:/root/node_modules/@types/file4.js' does not exist.", - "File 'c:/root/node_modules/@types/file4.jsx' does not exist.", "File 'c:/root/node_modules/@types/file4/package.json' does not exist.", "File 'c:/root/node_modules/@types/file4/index.ts' does not exist.", "File 'c:/root/node_modules/@types/file4/index.tsx' does not exist.", "File 'c:/root/node_modules/@types/file4/index.d.ts' does not exist.", - "File 'c:/root/node_modules/@types/file4/index.js' does not exist.", - "File 'c:/root/node_modules/@types/file4/index.jsx' does not exist.", "File 'c:/node_modules/file4.ts' does not exist.", "File 'c:/node_modules/file4.tsx' does not exist.", "File 'c:/node_modules/file4.d.ts' does not exist.", - "File 'c:/node_modules/file4.js' does not exist.", - "File 'c:/node_modules/file4.jsx' does not exist.", "File 'c:/node_modules/file4/package.json' does not exist.", "File 'c:/node_modules/file4/index.ts' does not exist.", "File 'c:/node_modules/file4/index.tsx' does not exist.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json index 8fd0dee8e747e..6c899bf028e62 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json @@ -16,8 +16,6 @@ "File 'c:/root/folder3/file2.ts' does not exist.", "File 'c:/root/folder3/file2.tsx' does not exist.", "File 'c:/root/folder3/file2.d.ts' does not exist.", - "File 'c:/root/folder3/file2.js' does not exist.", - "File 'c:/root/folder3/file2.jsx' does not exist.", "Trying substitution 'generated/*', candidate module location: 'generated/folder3/file2'.", "File 'c:/root/generated/folder3/file2.ts' exist - use it as a name resolution result.", "======== Module name 'folder3/file2' was successfully resolved to 'c:/root/generated/folder3/file2.ts'. ========", @@ -38,24 +36,16 @@ "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", - "File 'c:/root/file4.js' does not exist.", - "File 'c:/root/file4.jsx' does not exist.", "Trying substitution 'generated/*', candidate module location: 'generated/file4'.", "File 'c:/root/generated/file4.ts' does not exist.", "File 'c:/root/generated/file4.tsx' does not exist.", "File 'c:/root/generated/file4.d.ts' does not exist.", - "File 'c:/root/generated/file4.js' does not exist.", - "File 'c:/root/generated/file4.jsx' does not exist.", "File 'c:/root/folder1/file4.ts' does not exist.", "File 'c:/root/folder1/file4.tsx' does not exist.", "File 'c:/root/folder1/file4.d.ts' does not exist.", - "File 'c:/root/folder1/file4.js' does not exist.", - "File 'c:/root/folder1/file4.jsx' does not exist.", "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", - "File 'c:/root/file4.js' does not exist.", - "File 'c:/root/file4.jsx' does not exist.", "File 'c:/file4.ts' exist - use it as a name resolution result.", "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json index 8201ed793523e..2efeefa24e5ca 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json @@ -19,14 +19,10 @@ "File 'c:/root/folder3/file2.ts' does not exist.", "File 'c:/root/folder3/file2.tsx' does not exist.", "File 'c:/root/folder3/file2.d.ts' does not exist.", - "File 'c:/root/folder3/file2.js' does not exist.", - "File 'c:/root/folder3/file2.jsx' does not exist.", "File 'c:/root/folder3/file2/package.json' does not exist.", "File 'c:/root/folder3/file2/index.ts' does not exist.", "File 'c:/root/folder3/file2/index.tsx' does not exist.", "File 'c:/root/folder3/file2/index.d.ts' does not exist.", - "File 'c:/root/folder3/file2/index.js' does not exist.", - "File 'c:/root/folder3/file2/index.jsx' does not exist.", "Trying substitution 'generated/*', candidate module location: 'generated/folder3/file2'.", "Loading module as file / folder, candidate module location 'c:/root/generated/folder3/file2'.", "File 'c:/root/generated/folder3/file2.ts' exist - use it as a name resolution result.", @@ -42,8 +38,6 @@ "File 'c:/root/shared/components/file3.ts' does not exist.", "File 'c:/root/shared/components/file3.tsx' does not exist.", "File 'c:/root/shared/components/file3.d.ts' does not exist.", - "File 'c:/root/shared/components/file3.js' does not exist.", - "File 'c:/root/shared/components/file3.jsx' does not exist.", "File 'c:/root/shared/components/file3/package.json' does not exist.", "File 'c:/root/shared/components/file3/index.ts' does not exist.", "File 'c:/root/shared/components/file3/index.tsx' does not exist.", @@ -60,72 +54,48 @@ "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", - "File 'c:/root/file4.js' does not exist.", - "File 'c:/root/file4.jsx' does not exist.", "File 'c:/root/file4/package.json' does not exist.", "File 'c:/root/file4/index.ts' does not exist.", "File 'c:/root/file4/index.tsx' does not exist.", "File 'c:/root/file4/index.d.ts' does not exist.", - "File 'c:/root/file4/index.js' does not exist.", - "File 'c:/root/file4/index.jsx' does not exist.", "Trying substitution 'generated/*', candidate module location: 'generated/file4'.", "Loading module as file / folder, candidate module location 'c:/root/generated/file4'.", "File 'c:/root/generated/file4.ts' does not exist.", "File 'c:/root/generated/file4.tsx' does not exist.", "File 'c:/root/generated/file4.d.ts' does not exist.", - "File 'c:/root/generated/file4.js' does not exist.", - "File 'c:/root/generated/file4.jsx' does not exist.", "File 'c:/root/generated/file4/package.json' does not exist.", "File 'c:/root/generated/file4/index.ts' does not exist.", "File 'c:/root/generated/file4/index.tsx' does not exist.", "File 'c:/root/generated/file4/index.d.ts' does not exist.", - "File 'c:/root/generated/file4/index.js' does not exist.", - "File 'c:/root/generated/file4/index.jsx' does not exist.", "Loading module 'file4' from 'node_modules' folder.", "File 'c:/root/folder1/node_modules/file4.ts' does not exist.", "File 'c:/root/folder1/node_modules/file4.tsx' does not exist.", "File 'c:/root/folder1/node_modules/file4.d.ts' does not exist.", - "File 'c:/root/folder1/node_modules/file4.js' does not exist.", - "File 'c:/root/folder1/node_modules/file4.jsx' does not exist.", "File 'c:/root/folder1/node_modules/file4/package.json' does not exist.", "File 'c:/root/folder1/node_modules/file4/index.ts' does not exist.", "File 'c:/root/folder1/node_modules/file4/index.tsx' does not exist.", "File 'c:/root/folder1/node_modules/file4/index.d.ts' does not exist.", - "File 'c:/root/folder1/node_modules/file4/index.js' does not exist.", - "File 'c:/root/folder1/node_modules/file4/index.jsx' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4.ts' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4.tsx' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4.d.ts' does not exist.", - "File 'c:/root/folder1/node_modules/@types/file4.js' does not exist.", - "File 'c:/root/folder1/node_modules/@types/file4.jsx' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4/package.json' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4/index.ts' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4/index.tsx' does not exist.", "File 'c:/root/folder1/node_modules/@types/file4/index.d.ts' does not exist.", - "File 'c:/root/folder1/node_modules/@types/file4/index.js' does not exist.", - "File 'c:/root/folder1/node_modules/@types/file4/index.jsx' does not exist.", "File 'c:/root/node_modules/file4.ts' does not exist.", "File 'c:/root/node_modules/file4.tsx' does not exist.", "File 'c:/root/node_modules/file4.d.ts' does not exist.", - "File 'c:/root/node_modules/file4.js' does not exist.", - "File 'c:/root/node_modules/file4.jsx' does not exist.", "File 'c:/root/node_modules/file4/package.json' does not exist.", "File 'c:/root/node_modules/file4/index.ts' does not exist.", "File 'c:/root/node_modules/file4/index.tsx' does not exist.", "File 'c:/root/node_modules/file4/index.d.ts' does not exist.", - "File 'c:/root/node_modules/file4/index.js' does not exist.", - "File 'c:/root/node_modules/file4/index.jsx' does not exist.", "File 'c:/root/node_modules/@types/file4.ts' does not exist.", "File 'c:/root/node_modules/@types/file4.tsx' does not exist.", "File 'c:/root/node_modules/@types/file4.d.ts' does not exist.", - "File 'c:/root/node_modules/@types/file4.js' does not exist.", - "File 'c:/root/node_modules/@types/file4.jsx' does not exist.", "File 'c:/root/node_modules/@types/file4/package.json' does not exist.", "File 'c:/root/node_modules/@types/file4/index.ts' does not exist.", "File 'c:/root/node_modules/@types/file4/index.tsx' does not exist.", "File 'c:/root/node_modules/@types/file4/index.d.ts' does not exist.", - "File 'c:/root/node_modules/@types/file4/index.js' does not exist.", - "File 'c:/root/node_modules/@types/file4/index.jsx' does not exist.", "File 'c:/node_modules/file4.ts' exist - use it as a name resolution result.", "Resolving real path for 'c:/node_modules/file4.ts', result 'c:/node_modules/file4.ts'", "======== Module name 'file4' was successfully resolved to 'c:/node_modules/file4.ts'. ========" diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json index d6c6b1a45bcc7..d50a6c78ed710 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json @@ -9,8 +9,6 @@ "File 'c:/root/src/project/file3.ts' does not exist.", "File 'c:/root/src/project/file3.tsx' does not exist.", "File 'c:/root/src/project/file3.d.ts' does not exist.", - "File 'c:/root/src/project/file3.js' does not exist.", - "File 'c:/root/src/project/file3.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'project/file3' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file3'", "File 'c:/root/generated/src/project/file3.ts' exist - use it as a name resolution result.", @@ -25,8 +23,6 @@ "File 'c:/root/generated/src/file2.ts' does not exist.", "File 'c:/root/generated/src/file2.tsx' does not exist.", "File 'c:/root/generated/src/file2.d.ts' does not exist.", - "File 'c:/root/generated/src/file2.js' does not exist.", - "File 'c:/root/generated/src/file2.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'file2' from the root dir 'c:/root/src', candidate location 'c:/root/src/file2'", "File 'c:/root/src/file2.ts' does not exist.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json index 92eb9ad072cb2..28e51a119152d 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json @@ -10,14 +10,10 @@ "File 'c:/root/src/project/file3.ts' does not exist.", "File 'c:/root/src/project/file3.tsx' does not exist.", "File 'c:/root/src/project/file3.d.ts' does not exist.", - "File 'c:/root/src/project/file3.js' does not exist.", - "File 'c:/root/src/project/file3.jsx' does not exist.", "File 'c:/root/src/project/file3/package.json' does not exist.", "File 'c:/root/src/project/file3/index.ts' does not exist.", "File 'c:/root/src/project/file3/index.tsx' does not exist.", "File 'c:/root/src/project/file3/index.d.ts' does not exist.", - "File 'c:/root/src/project/file3/index.js' does not exist.", - "File 'c:/root/src/project/file3/index.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'project/file3' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file3'", "Loading module as file / folder, candidate module location 'c:/root/generated/src/project/file3'.", @@ -35,22 +31,16 @@ "File 'c:/root/generated/src/file2.ts' does not exist.", "File 'c:/root/generated/src/file2.tsx' does not exist.", "File 'c:/root/generated/src/file2.d.ts' does not exist.", - "File 'c:/root/generated/src/file2.js' does not exist.", - "File 'c:/root/generated/src/file2.jsx' does not exist.", "File 'c:/root/generated/src/file2/package.json' does not exist.", "File 'c:/root/generated/src/file2/index.ts' does not exist.", "File 'c:/root/generated/src/file2/index.tsx' does not exist.", "File 'c:/root/generated/src/file2/index.d.ts' does not exist.", - "File 'c:/root/generated/src/file2/index.js' does not exist.", - "File 'c:/root/generated/src/file2/index.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'file2' from the root dir 'c:/root/src', candidate location 'c:/root/src/file2'", "Loading module as file / folder, candidate module location 'c:/root/src/file2'.", "File 'c:/root/src/file2.ts' does not exist.", "File 'c:/root/src/file2.tsx' does not exist.", "File 'c:/root/src/file2.d.ts' does not exist.", - "File 'c:/root/src/file2.js' does not exist.", - "File 'c:/root/src/file2.jsx' does not exist.", "File 'c:/root/src/file2/package.json' does not exist.", "File 'c:/root/src/file2/index.ts' does not exist.", "File 'c:/root/src/file2/index.tsx' does not exist.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json index 24d43809bab14..85373855eb584 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json @@ -9,8 +9,6 @@ "File 'c:/root/src/project/file2.ts' does not exist.", "File 'c:/root/src/project/file2.tsx' does not exist.", "File 'c:/root/src/project/file2.d.ts' does not exist.", - "File 'c:/root/src/project/file2.js' does not exist.", - "File 'c:/root/src/project/file2.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'project/file2' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file2'", "File 'c:/root/generated/src/project/file2.ts' exist - use it as a name resolution result.", @@ -24,24 +22,16 @@ "File 'c:/root/module3.ts' does not exist.", "File 'c:/root/module3.tsx' does not exist.", "File 'c:/root/module3.d.ts' does not exist.", - "File 'c:/root/module3.js' does not exist.", - "File 'c:/root/module3.jsx' does not exist.", "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module3'.", "File 'c:/shared/module3.ts' does not exist.", "File 'c:/shared/module3.tsx' does not exist.", "File 'c:/shared/module3.d.ts' does not exist.", - "File 'c:/shared/module3.js' does not exist.", - "File 'c:/shared/module3.jsx' does not exist.", "File 'c:/root/src/module3.ts' does not exist.", "File 'c:/root/src/module3.tsx' does not exist.", "File 'c:/root/src/module3.d.ts' does not exist.", - "File 'c:/root/src/module3.js' does not exist.", - "File 'c:/root/src/module3.jsx' does not exist.", "File 'c:/root/module3.ts' does not exist.", "File 'c:/root/module3.tsx' does not exist.", "File 'c:/root/module3.d.ts' does not exist.", - "File 'c:/root/module3.js' does not exist.", - "File 'c:/root/module3.jsx' does not exist.", "File 'c:/module3.ts' does not exist.", "File 'c:/module3.tsx' does not exist.", "File 'c:/module3.d.ts' exist - use it as a name resolution result.", @@ -55,8 +45,6 @@ "File 'c:/root/module1.ts' does not exist.", "File 'c:/root/module1.tsx' does not exist.", "File 'c:/root/module1.d.ts' does not exist.", - "File 'c:/root/module1.js' does not exist.", - "File 'c:/root/module1.jsx' does not exist.", "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module1'.", "File 'c:/shared/module1.ts' does not exist.", "File 'c:/shared/module1.tsx' does not exist.", @@ -80,8 +68,6 @@ "File 'c:/root/generated/src/file3.ts' does not exist.", "File 'c:/root/generated/src/file3.tsx' does not exist.", "File 'c:/root/generated/src/file3.d.ts' does not exist.", - "File 'c:/root/generated/src/file3.js' does not exist.", - "File 'c:/root/generated/src/file3.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'file3' from the root dir 'c:/root/src', candidate location 'c:/root/src/file3'", "File 'c:/root/src/file3.ts' does not exist.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json index 003f56463fb05..48633c85e3b48 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json @@ -10,14 +10,10 @@ "File 'c:/root/src/project/file2.ts' does not exist.", "File 'c:/root/src/project/file2.tsx' does not exist.", "File 'c:/root/src/project/file2.d.ts' does not exist.", - "File 'c:/root/src/project/file2.js' does not exist.", - "File 'c:/root/src/project/file2.jsx' does not exist.", "File 'c:/root/src/project/file2/package.json' does not exist.", "File 'c:/root/src/project/file2/index.ts' does not exist.", "File 'c:/root/src/project/file2/index.tsx' does not exist.", "File 'c:/root/src/project/file2/index.d.ts' does not exist.", - "File 'c:/root/src/project/file2/index.js' does not exist.", - "File 'c:/root/src/project/file2/index.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'project/file2' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file2'", "Loading module as file / folder, candidate module location 'c:/root/generated/src/project/file2'.", @@ -34,72 +30,48 @@ "File 'c:/root/module3.ts' does not exist.", "File 'c:/root/module3.tsx' does not exist.", "File 'c:/root/module3.d.ts' does not exist.", - "File 'c:/root/module3.js' does not exist.", - "File 'c:/root/module3.jsx' does not exist.", "File 'c:/root/module3/package.json' does not exist.", "File 'c:/root/module3/index.ts' does not exist.", "File 'c:/root/module3/index.tsx' does not exist.", "File 'c:/root/module3/index.d.ts' does not exist.", - "File 'c:/root/module3/index.js' does not exist.", - "File 'c:/root/module3/index.jsx' does not exist.", "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module3'.", "Loading module as file / folder, candidate module location 'c:/shared/module3'.", "File 'c:/shared/module3.ts' does not exist.", "File 'c:/shared/module3.tsx' does not exist.", "File 'c:/shared/module3.d.ts' does not exist.", - "File 'c:/shared/module3.js' does not exist.", - "File 'c:/shared/module3.jsx' does not exist.", "File 'c:/shared/module3/package.json' does not exist.", "File 'c:/shared/module3/index.ts' does not exist.", "File 'c:/shared/module3/index.tsx' does not exist.", "File 'c:/shared/module3/index.d.ts' does not exist.", - "File 'c:/shared/module3/index.js' does not exist.", - "File 'c:/shared/module3/index.jsx' does not exist.", "Loading module 'module3' from 'node_modules' folder.", "File 'c:/root/src/node_modules/module3.ts' does not exist.", "File 'c:/root/src/node_modules/module3.tsx' does not exist.", "File 'c:/root/src/node_modules/module3.d.ts' does not exist.", - "File 'c:/root/src/node_modules/module3.js' does not exist.", - "File 'c:/root/src/node_modules/module3.jsx' does not exist.", "File 'c:/root/src/node_modules/module3/package.json' does not exist.", "File 'c:/root/src/node_modules/module3/index.ts' does not exist.", "File 'c:/root/src/node_modules/module3/index.tsx' does not exist.", "File 'c:/root/src/node_modules/module3/index.d.ts' does not exist.", - "File 'c:/root/src/node_modules/module3/index.js' does not exist.", - "File 'c:/root/src/node_modules/module3/index.jsx' does not exist.", "File 'c:/root/src/node_modules/@types/module3.ts' does not exist.", "File 'c:/root/src/node_modules/@types/module3.tsx' does not exist.", "File 'c:/root/src/node_modules/@types/module3.d.ts' does not exist.", - "File 'c:/root/src/node_modules/@types/module3.js' does not exist.", - "File 'c:/root/src/node_modules/@types/module3.jsx' does not exist.", "File 'c:/root/src/node_modules/@types/module3/package.json' does not exist.", "File 'c:/root/src/node_modules/@types/module3/index.ts' does not exist.", "File 'c:/root/src/node_modules/@types/module3/index.tsx' does not exist.", "File 'c:/root/src/node_modules/@types/module3/index.d.ts' does not exist.", - "File 'c:/root/src/node_modules/@types/module3/index.js' does not exist.", - "File 'c:/root/src/node_modules/@types/module3/index.jsx' does not exist.", "File 'c:/root/node_modules/module3.ts' does not exist.", "File 'c:/root/node_modules/module3.tsx' does not exist.", "File 'c:/root/node_modules/module3.d.ts' does not exist.", - "File 'c:/root/node_modules/module3.js' does not exist.", - "File 'c:/root/node_modules/module3.jsx' does not exist.", "File 'c:/root/node_modules/module3/package.json' does not exist.", "File 'c:/root/node_modules/module3/index.ts' does not exist.", "File 'c:/root/node_modules/module3/index.tsx' does not exist.", "File 'c:/root/node_modules/module3/index.d.ts' does not exist.", - "File 'c:/root/node_modules/module3/index.js' does not exist.", - "File 'c:/root/node_modules/module3/index.jsx' does not exist.", "File 'c:/root/node_modules/@types/module3.ts' does not exist.", "File 'c:/root/node_modules/@types/module3.tsx' does not exist.", "File 'c:/root/node_modules/@types/module3.d.ts' does not exist.", - "File 'c:/root/node_modules/@types/module3.js' does not exist.", - "File 'c:/root/node_modules/@types/module3.jsx' does not exist.", "File 'c:/root/node_modules/@types/module3/package.json' does not exist.", "File 'c:/root/node_modules/@types/module3/index.ts' does not exist.", "File 'c:/root/node_modules/@types/module3/index.tsx' does not exist.", "File 'c:/root/node_modules/@types/module3/index.d.ts' does not exist.", - "File 'c:/root/node_modules/@types/module3/index.js' does not exist.", - "File 'c:/root/node_modules/@types/module3/index.jsx' does not exist.", "File 'c:/node_modules/module3.ts' does not exist.", "File 'c:/node_modules/module3.tsx' does not exist.", "File 'c:/node_modules/module3.d.ts' exist - use it as a name resolution result.", @@ -115,21 +87,15 @@ "File 'c:/root/module1.ts' does not exist.", "File 'c:/root/module1.tsx' does not exist.", "File 'c:/root/module1.d.ts' does not exist.", - "File 'c:/root/module1.js' does not exist.", - "File 'c:/root/module1.jsx' does not exist.", "File 'c:/root/module1/package.json' does not exist.", "File 'c:/root/module1/index.ts' does not exist.", "File 'c:/root/module1/index.tsx' does not exist.", "File 'c:/root/module1/index.d.ts' does not exist.", - "File 'c:/root/module1/index.js' does not exist.", - "File 'c:/root/module1/index.jsx' does not exist.", "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module1'.", "Loading module as file / folder, candidate module location 'c:/shared/module1'.", "File 'c:/shared/module1.ts' does not exist.", "File 'c:/shared/module1.tsx' does not exist.", "File 'c:/shared/module1.d.ts' does not exist.", - "File 'c:/shared/module1.js' does not exist.", - "File 'c:/shared/module1.jsx' does not exist.", "File 'c:/shared/module1/package.json' does not exist.", "File 'c:/shared/module1/index.ts' does not exist.", "File 'c:/shared/module1/index.tsx' does not exist.", @@ -157,22 +123,16 @@ "File 'c:/root/generated/src/file3.ts' does not exist.", "File 'c:/root/generated/src/file3.tsx' does not exist.", "File 'c:/root/generated/src/file3.d.ts' does not exist.", - "File 'c:/root/generated/src/file3.js' does not exist.", - "File 'c:/root/generated/src/file3.jsx' does not exist.", "File 'c:/root/generated/src/file3/package.json' does not exist.", "File 'c:/root/generated/src/file3/index.ts' does not exist.", "File 'c:/root/generated/src/file3/index.tsx' does not exist.", "File 'c:/root/generated/src/file3/index.d.ts' does not exist.", - "File 'c:/root/generated/src/file3/index.js' does not exist.", - "File 'c:/root/generated/src/file3/index.jsx' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'file3' from the root dir 'c:/root/src', candidate location 'c:/root/src/file3'", "Loading module as file / folder, candidate module location 'c:/root/src/file3'.", "File 'c:/root/src/file3.ts' does not exist.", "File 'c:/root/src/file3.tsx' does not exist.", "File 'c:/root/src/file3.d.ts' does not exist.", - "File 'c:/root/src/file3.js' does not exist.", - "File 'c:/root/src/file3.jsx' does not exist.", "File 'c:/root/src/file3/package.json' does not exist.", "File 'c:/root/src/file3/index.ts' does not exist.", "File 'c:/root/src/file3/index.tsx' does not exist.", diff --git a/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json b/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json index a541ee310ef7a..eec78e4019200 100644 --- a/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json +++ b/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json @@ -5,67 +5,74 @@ "File '/foo/bar/node_modules/xyz.ts' does not exist.", "File '/foo/bar/node_modules/xyz.tsx' does not exist.", "File '/foo/bar/node_modules/xyz.d.ts' does not exist.", - "File '/foo/bar/node_modules/xyz.js' does not exist.", - "File '/foo/bar/node_modules/xyz.jsx' does not exist.", "File '/foo/bar/node_modules/xyz/package.json' does not exist.", "File '/foo/bar/node_modules/xyz/index.ts' does not exist.", "File '/foo/bar/node_modules/xyz/index.tsx' does not exist.", "File '/foo/bar/node_modules/xyz/index.d.ts' does not exist.", - "File '/foo/bar/node_modules/xyz/index.js' does not exist.", - "File '/foo/bar/node_modules/xyz/index.jsx' does not exist.", "File '/foo/bar/node_modules/@types/xyz.ts' does not exist.", "File '/foo/bar/node_modules/@types/xyz.tsx' does not exist.", "File '/foo/bar/node_modules/@types/xyz.d.ts' does not exist.", - "File '/foo/bar/node_modules/@types/xyz.js' does not exist.", - "File '/foo/bar/node_modules/@types/xyz.jsx' does not exist.", "File '/foo/bar/node_modules/@types/xyz/package.json' does not exist.", "File '/foo/bar/node_modules/@types/xyz/index.ts' does not exist.", "File '/foo/bar/node_modules/@types/xyz/index.tsx' does not exist.", "File '/foo/bar/node_modules/@types/xyz/index.d.ts' does not exist.", - "File '/foo/bar/node_modules/@types/xyz/index.js' does not exist.", - "File '/foo/bar/node_modules/@types/xyz/index.jsx' does not exist.", "File '/foo/node_modules/xyz.ts' does not exist.", "File '/foo/node_modules/xyz.tsx' does not exist.", "File '/foo/node_modules/xyz.d.ts' does not exist.", - "File '/foo/node_modules/xyz.js' does not exist.", - "File '/foo/node_modules/xyz.jsx' does not exist.", "File '/foo/node_modules/xyz/package.json' does not exist.", "File '/foo/node_modules/xyz/index.ts' does not exist.", "File '/foo/node_modules/xyz/index.tsx' does not exist.", "File '/foo/node_modules/xyz/index.d.ts' does not exist.", - "File '/foo/node_modules/xyz/index.js' does not exist.", - "File '/foo/node_modules/xyz/index.jsx' does not exist.", "File '/foo/node_modules/@types/xyz.ts' does not exist.", "File '/foo/node_modules/@types/xyz.tsx' does not exist.", "File '/foo/node_modules/@types/xyz.d.ts' does not exist.", - "File '/foo/node_modules/@types/xyz.js' does not exist.", - "File '/foo/node_modules/@types/xyz.jsx' does not exist.", "File '/foo/node_modules/@types/xyz/package.json' does not exist.", "File '/foo/node_modules/@types/xyz/index.ts' does not exist.", "File '/foo/node_modules/@types/xyz/index.tsx' does not exist.", "File '/foo/node_modules/@types/xyz/index.d.ts' does not exist.", - "File '/foo/node_modules/@types/xyz/index.js' does not exist.", - "File '/foo/node_modules/@types/xyz/index.jsx' does not exist.", "File '/node_modules/xyz.ts' does not exist.", "File '/node_modules/xyz.tsx' does not exist.", "File '/node_modules/xyz.d.ts' does not exist.", - "File '/node_modules/xyz.js' does not exist.", - "File '/node_modules/xyz.jsx' does not exist.", "File '/node_modules/xyz/package.json' does not exist.", "File '/node_modules/xyz/index.ts' does not exist.", "File '/node_modules/xyz/index.tsx' does not exist.", "File '/node_modules/xyz/index.d.ts' does not exist.", - "File '/node_modules/xyz/index.js' does not exist.", - "File '/node_modules/xyz/index.jsx' does not exist.", "File '/node_modules/@types/xyz.ts' does not exist.", "File '/node_modules/@types/xyz.tsx' does not exist.", "File '/node_modules/@types/xyz.d.ts' does not exist.", - "File '/node_modules/@types/xyz.js' does not exist.", - "File '/node_modules/@types/xyz.jsx' does not exist.", "File '/node_modules/@types/xyz/package.json' does not exist.", "File '/node_modules/@types/xyz/index.ts' does not exist.", "File '/node_modules/@types/xyz/index.tsx' does not exist.", "File '/node_modules/@types/xyz/index.d.ts' does not exist.", + "Loading module 'xyz' from 'node_modules' folder.", + "File '/foo/bar/node_modules/xyz.js' does not exist.", + "File '/foo/bar/node_modules/xyz.jsx' does not exist.", + "File '/foo/bar/node_modules/xyz/package.json' does not exist.", + "File '/foo/bar/node_modules/xyz/index.js' does not exist.", + "File '/foo/bar/node_modules/xyz/index.jsx' does not exist.", + "File '/foo/bar/node_modules/@types/xyz.js' does not exist.", + "File '/foo/bar/node_modules/@types/xyz.jsx' does not exist.", + "File '/foo/bar/node_modules/@types/xyz/package.json' does not exist.", + "File '/foo/bar/node_modules/@types/xyz/index.js' does not exist.", + "File '/foo/bar/node_modules/@types/xyz/index.jsx' does not exist.", + "File '/foo/node_modules/xyz.js' does not exist.", + "File '/foo/node_modules/xyz.jsx' does not exist.", + "File '/foo/node_modules/xyz/package.json' does not exist.", + "File '/foo/node_modules/xyz/index.js' does not exist.", + "File '/foo/node_modules/xyz/index.jsx' does not exist.", + "File '/foo/node_modules/@types/xyz.js' does not exist.", + "File '/foo/node_modules/@types/xyz.jsx' does not exist.", + "File '/foo/node_modules/@types/xyz/package.json' does not exist.", + "File '/foo/node_modules/@types/xyz/index.js' does not exist.", + "File '/foo/node_modules/@types/xyz/index.jsx' does not exist.", + "File '/node_modules/xyz.js' does not exist.", + "File '/node_modules/xyz.jsx' does not exist.", + "File '/node_modules/xyz/package.json' does not exist.", + "File '/node_modules/xyz/index.js' does not exist.", + "File '/node_modules/xyz/index.jsx' does not exist.", + "File '/node_modules/@types/xyz.js' does not exist.", + "File '/node_modules/@types/xyz.jsx' does not exist.", + "File '/node_modules/@types/xyz/package.json' does not exist.", "File '/node_modules/@types/xyz/index.js' does not exist.", "File '/node_modules/@types/xyz/index.jsx' does not exist.", "======== Module name 'xyz' was not resolved. ========", @@ -75,67 +82,74 @@ "File '/foo/bar/node_modules/pdq.ts' does not exist.", "File '/foo/bar/node_modules/pdq.tsx' does not exist.", "File '/foo/bar/node_modules/pdq.d.ts' does not exist.", - "File '/foo/bar/node_modules/pdq.js' does not exist.", - "File '/foo/bar/node_modules/pdq.jsx' does not exist.", "File '/foo/bar/node_modules/pdq/package.json' does not exist.", "File '/foo/bar/node_modules/pdq/index.ts' does not exist.", "File '/foo/bar/node_modules/pdq/index.tsx' does not exist.", "File '/foo/bar/node_modules/pdq/index.d.ts' does not exist.", - "File '/foo/bar/node_modules/pdq/index.js' does not exist.", - "File '/foo/bar/node_modules/pdq/index.jsx' does not exist.", "File '/foo/bar/node_modules/@types/pdq.ts' does not exist.", "File '/foo/bar/node_modules/@types/pdq.tsx' does not exist.", "File '/foo/bar/node_modules/@types/pdq.d.ts' does not exist.", - "File '/foo/bar/node_modules/@types/pdq.js' does not exist.", - "File '/foo/bar/node_modules/@types/pdq.jsx' does not exist.", "File '/foo/bar/node_modules/@types/pdq/package.json' does not exist.", "File '/foo/bar/node_modules/@types/pdq/index.ts' does not exist.", "File '/foo/bar/node_modules/@types/pdq/index.tsx' does not exist.", "File '/foo/bar/node_modules/@types/pdq/index.d.ts' does not exist.", - "File '/foo/bar/node_modules/@types/pdq/index.js' does not exist.", - "File '/foo/bar/node_modules/@types/pdq/index.jsx' does not exist.", "File '/foo/node_modules/pdq.ts' does not exist.", "File '/foo/node_modules/pdq.tsx' does not exist.", "File '/foo/node_modules/pdq.d.ts' does not exist.", - "File '/foo/node_modules/pdq.js' does not exist.", - "File '/foo/node_modules/pdq.jsx' does not exist.", "File '/foo/node_modules/pdq/package.json' does not exist.", "File '/foo/node_modules/pdq/index.ts' does not exist.", "File '/foo/node_modules/pdq/index.tsx' does not exist.", "File '/foo/node_modules/pdq/index.d.ts' does not exist.", - "File '/foo/node_modules/pdq/index.js' does not exist.", - "File '/foo/node_modules/pdq/index.jsx' does not exist.", "File '/foo/node_modules/@types/pdq.ts' does not exist.", "File '/foo/node_modules/@types/pdq.tsx' does not exist.", "File '/foo/node_modules/@types/pdq.d.ts' does not exist.", - "File '/foo/node_modules/@types/pdq.js' does not exist.", - "File '/foo/node_modules/@types/pdq.jsx' does not exist.", "File '/foo/node_modules/@types/pdq/package.json' does not exist.", "File '/foo/node_modules/@types/pdq/index.ts' does not exist.", "File '/foo/node_modules/@types/pdq/index.tsx' does not exist.", "File '/foo/node_modules/@types/pdq/index.d.ts' does not exist.", - "File '/foo/node_modules/@types/pdq/index.js' does not exist.", - "File '/foo/node_modules/@types/pdq/index.jsx' does not exist.", "File '/node_modules/pdq.ts' does not exist.", "File '/node_modules/pdq.tsx' does not exist.", "File '/node_modules/pdq.d.ts' does not exist.", - "File '/node_modules/pdq.js' does not exist.", - "File '/node_modules/pdq.jsx' does not exist.", "File '/node_modules/pdq/package.json' does not exist.", "File '/node_modules/pdq/index.ts' does not exist.", "File '/node_modules/pdq/index.tsx' does not exist.", "File '/node_modules/pdq/index.d.ts' does not exist.", - "File '/node_modules/pdq/index.js' does not exist.", - "File '/node_modules/pdq/index.jsx' does not exist.", "File '/node_modules/@types/pdq.ts' does not exist.", "File '/node_modules/@types/pdq.tsx' does not exist.", "File '/node_modules/@types/pdq.d.ts' does not exist.", - "File '/node_modules/@types/pdq.js' does not exist.", - "File '/node_modules/@types/pdq.jsx' does not exist.", "File '/node_modules/@types/pdq/package.json' does not exist.", "File '/node_modules/@types/pdq/index.ts' does not exist.", "File '/node_modules/@types/pdq/index.tsx' does not exist.", "File '/node_modules/@types/pdq/index.d.ts' does not exist.", + "Loading module 'pdq' from 'node_modules' folder.", + "File '/foo/bar/node_modules/pdq.js' does not exist.", + "File '/foo/bar/node_modules/pdq.jsx' does not exist.", + "File '/foo/bar/node_modules/pdq/package.json' does not exist.", + "File '/foo/bar/node_modules/pdq/index.js' does not exist.", + "File '/foo/bar/node_modules/pdq/index.jsx' does not exist.", + "File '/foo/bar/node_modules/@types/pdq.js' does not exist.", + "File '/foo/bar/node_modules/@types/pdq.jsx' does not exist.", + "File '/foo/bar/node_modules/@types/pdq/package.json' does not exist.", + "File '/foo/bar/node_modules/@types/pdq/index.js' does not exist.", + "File '/foo/bar/node_modules/@types/pdq/index.jsx' does not exist.", + "File '/foo/node_modules/pdq.js' does not exist.", + "File '/foo/node_modules/pdq.jsx' does not exist.", + "File '/foo/node_modules/pdq/package.json' does not exist.", + "File '/foo/node_modules/pdq/index.js' does not exist.", + "File '/foo/node_modules/pdq/index.jsx' does not exist.", + "File '/foo/node_modules/@types/pdq.js' does not exist.", + "File '/foo/node_modules/@types/pdq.jsx' does not exist.", + "File '/foo/node_modules/@types/pdq/package.json' does not exist.", + "File '/foo/node_modules/@types/pdq/index.js' does not exist.", + "File '/foo/node_modules/@types/pdq/index.jsx' does not exist.", + "File '/node_modules/pdq.js' does not exist.", + "File '/node_modules/pdq.jsx' does not exist.", + "File '/node_modules/pdq/package.json' does not exist.", + "File '/node_modules/pdq/index.js' does not exist.", + "File '/node_modules/pdq/index.jsx' does not exist.", + "File '/node_modules/@types/pdq.js' does not exist.", + "File '/node_modules/@types/pdq.jsx' does not exist.", + "File '/node_modules/@types/pdq/package.json' does not exist.", "File '/node_modules/@types/pdq/index.js' does not exist.", "File '/node_modules/@types/pdq/index.jsx' does not exist.", "======== Module name 'pdq' was not resolved. ========", @@ -145,67 +159,74 @@ "File '/foo/bar/node_modules/abc.ts' does not exist.", "File '/foo/bar/node_modules/abc.tsx' does not exist.", "File '/foo/bar/node_modules/abc.d.ts' does not exist.", - "File '/foo/bar/node_modules/abc.js' does not exist.", - "File '/foo/bar/node_modules/abc.jsx' does not exist.", "File '/foo/bar/node_modules/abc/package.json' does not exist.", "File '/foo/bar/node_modules/abc/index.ts' does not exist.", "File '/foo/bar/node_modules/abc/index.tsx' does not exist.", "File '/foo/bar/node_modules/abc/index.d.ts' does not exist.", - "File '/foo/bar/node_modules/abc/index.js' does not exist.", - "File '/foo/bar/node_modules/abc/index.jsx' does not exist.", "File '/foo/bar/node_modules/@types/abc.ts' does not exist.", "File '/foo/bar/node_modules/@types/abc.tsx' does not exist.", "File '/foo/bar/node_modules/@types/abc.d.ts' does not exist.", - "File '/foo/bar/node_modules/@types/abc.js' does not exist.", - "File '/foo/bar/node_modules/@types/abc.jsx' does not exist.", "File '/foo/bar/node_modules/@types/abc/package.json' does not exist.", "File '/foo/bar/node_modules/@types/abc/index.ts' does not exist.", "File '/foo/bar/node_modules/@types/abc/index.tsx' does not exist.", "File '/foo/bar/node_modules/@types/abc/index.d.ts' does not exist.", - "File '/foo/bar/node_modules/@types/abc/index.js' does not exist.", - "File '/foo/bar/node_modules/@types/abc/index.jsx' does not exist.", "File '/foo/node_modules/abc.ts' does not exist.", "File '/foo/node_modules/abc.tsx' does not exist.", "File '/foo/node_modules/abc.d.ts' does not exist.", - "File '/foo/node_modules/abc.js' does not exist.", - "File '/foo/node_modules/abc.jsx' does not exist.", "File '/foo/node_modules/abc/package.json' does not exist.", "File '/foo/node_modules/abc/index.ts' does not exist.", "File '/foo/node_modules/abc/index.tsx' does not exist.", "File '/foo/node_modules/abc/index.d.ts' does not exist.", - "File '/foo/node_modules/abc/index.js' does not exist.", - "File '/foo/node_modules/abc/index.jsx' does not exist.", "File '/foo/node_modules/@types/abc.ts' does not exist.", "File '/foo/node_modules/@types/abc.tsx' does not exist.", "File '/foo/node_modules/@types/abc.d.ts' does not exist.", - "File '/foo/node_modules/@types/abc.js' does not exist.", - "File '/foo/node_modules/@types/abc.jsx' does not exist.", "File '/foo/node_modules/@types/abc/package.json' does not exist.", "File '/foo/node_modules/@types/abc/index.ts' does not exist.", "File '/foo/node_modules/@types/abc/index.tsx' does not exist.", "File '/foo/node_modules/@types/abc/index.d.ts' does not exist.", - "File '/foo/node_modules/@types/abc/index.js' does not exist.", - "File '/foo/node_modules/@types/abc/index.jsx' does not exist.", "File '/node_modules/abc.ts' does not exist.", "File '/node_modules/abc.tsx' does not exist.", "File '/node_modules/abc.d.ts' does not exist.", - "File '/node_modules/abc.js' does not exist.", - "File '/node_modules/abc.jsx' does not exist.", "File '/node_modules/abc/package.json' does not exist.", "File '/node_modules/abc/index.ts' does not exist.", "File '/node_modules/abc/index.tsx' does not exist.", "File '/node_modules/abc/index.d.ts' does not exist.", - "File '/node_modules/abc/index.js' does not exist.", - "File '/node_modules/abc/index.jsx' does not exist.", "File '/node_modules/@types/abc.ts' does not exist.", "File '/node_modules/@types/abc.tsx' does not exist.", "File '/node_modules/@types/abc.d.ts' does not exist.", - "File '/node_modules/@types/abc.js' does not exist.", - "File '/node_modules/@types/abc.jsx' does not exist.", "File '/node_modules/@types/abc/package.json' does not exist.", "File '/node_modules/@types/abc/index.ts' does not exist.", "File '/node_modules/@types/abc/index.tsx' does not exist.", "File '/node_modules/@types/abc/index.d.ts' does not exist.", + "Loading module 'abc' from 'node_modules' folder.", + "File '/foo/bar/node_modules/abc.js' does not exist.", + "File '/foo/bar/node_modules/abc.jsx' does not exist.", + "File '/foo/bar/node_modules/abc/package.json' does not exist.", + "File '/foo/bar/node_modules/abc/index.js' does not exist.", + "File '/foo/bar/node_modules/abc/index.jsx' does not exist.", + "File '/foo/bar/node_modules/@types/abc.js' does not exist.", + "File '/foo/bar/node_modules/@types/abc.jsx' does not exist.", + "File '/foo/bar/node_modules/@types/abc/package.json' does not exist.", + "File '/foo/bar/node_modules/@types/abc/index.js' does not exist.", + "File '/foo/bar/node_modules/@types/abc/index.jsx' does not exist.", + "File '/foo/node_modules/abc.js' does not exist.", + "File '/foo/node_modules/abc.jsx' does not exist.", + "File '/foo/node_modules/abc/package.json' does not exist.", + "File '/foo/node_modules/abc/index.js' does not exist.", + "File '/foo/node_modules/abc/index.jsx' does not exist.", + "File '/foo/node_modules/@types/abc.js' does not exist.", + "File '/foo/node_modules/@types/abc.jsx' does not exist.", + "File '/foo/node_modules/@types/abc/package.json' does not exist.", + "File '/foo/node_modules/@types/abc/index.js' does not exist.", + "File '/foo/node_modules/@types/abc/index.jsx' does not exist.", + "File '/node_modules/abc.js' does not exist.", + "File '/node_modules/abc.jsx' does not exist.", + "File '/node_modules/abc/package.json' does not exist.", + "File '/node_modules/abc/index.js' does not exist.", + "File '/node_modules/abc/index.jsx' does not exist.", + "File '/node_modules/@types/abc.js' does not exist.", + "File '/node_modules/@types/abc.jsx' does not exist.", + "File '/node_modules/@types/abc/package.json' does not exist.", "File '/node_modules/@types/abc/index.js' does not exist.", "File '/node_modules/@types/abc/index.jsx' does not exist.", "======== Module name 'abc' was not resolved. ========", diff --git a/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json b/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json index 12a0bc0d23ab9..4bb62bc255a0e 100644 --- a/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json +++ b/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json @@ -5,45 +5,50 @@ "File '/src/node_modules/xyz.ts' does not exist.", "File '/src/node_modules/xyz.tsx' does not exist.", "File '/src/node_modules/xyz.d.ts' does not exist.", - "File '/src/node_modules/xyz.js' does not exist.", - "File '/src/node_modules/xyz.jsx' does not exist.", "File '/src/node_modules/xyz/package.json' does not exist.", "File '/src/node_modules/xyz/index.ts' does not exist.", "File '/src/node_modules/xyz/index.tsx' does not exist.", "File '/src/node_modules/xyz/index.d.ts' does not exist.", - "File '/src/node_modules/xyz/index.js' does not exist.", - "File '/src/node_modules/xyz/index.jsx' does not exist.", "File '/src/node_modules/@types/xyz.ts' does not exist.", "File '/src/node_modules/@types/xyz.tsx' does not exist.", "File '/src/node_modules/@types/xyz.d.ts' does not exist.", - "File '/src/node_modules/@types/xyz.js' does not exist.", - "File '/src/node_modules/@types/xyz.jsx' does not exist.", "File '/src/node_modules/@types/xyz/package.json' does not exist.", "File '/src/node_modules/@types/xyz/index.ts' does not exist.", "File '/src/node_modules/@types/xyz/index.tsx' does not exist.", "File '/src/node_modules/@types/xyz/index.d.ts' does not exist.", - "File '/src/node_modules/@types/xyz/index.js' does not exist.", - "File '/src/node_modules/@types/xyz/index.jsx' does not exist.", "File '/node_modules/xyz.ts' does not exist.", "File '/node_modules/xyz.tsx' does not exist.", "File '/node_modules/xyz.d.ts' does not exist.", - "File '/node_modules/xyz.js' does not exist.", - "File '/node_modules/xyz.jsx' does not exist.", "File '/node_modules/xyz/package.json' does not exist.", "File '/node_modules/xyz/index.ts' does not exist.", "File '/node_modules/xyz/index.tsx' does not exist.", "File '/node_modules/xyz/index.d.ts' does not exist.", - "File '/node_modules/xyz/index.js' does not exist.", - "File '/node_modules/xyz/index.jsx' does not exist.", "File '/node_modules/@types/xyz.ts' does not exist.", "File '/node_modules/@types/xyz.tsx' does not exist.", "File '/node_modules/@types/xyz.d.ts' does not exist.", - "File '/node_modules/@types/xyz.js' does not exist.", - "File '/node_modules/@types/xyz.jsx' does not exist.", "File '/node_modules/@types/xyz/package.json' does not exist.", "File '/node_modules/@types/xyz/index.ts' does not exist.", "File '/node_modules/@types/xyz/index.tsx' does not exist.", "File '/node_modules/@types/xyz/index.d.ts' does not exist.", + "Loading module 'xyz' from 'node_modules' folder.", + "File '/src/node_modules/xyz.js' does not exist.", + "File '/src/node_modules/xyz.jsx' does not exist.", + "File '/src/node_modules/xyz/package.json' does not exist.", + "File '/src/node_modules/xyz/index.js' does not exist.", + "File '/src/node_modules/xyz/index.jsx' does not exist.", + "File '/src/node_modules/@types/xyz.js' does not exist.", + "File '/src/node_modules/@types/xyz.jsx' does not exist.", + "File '/src/node_modules/@types/xyz/package.json' does not exist.", + "File '/src/node_modules/@types/xyz/index.js' does not exist.", + "File '/src/node_modules/@types/xyz/index.jsx' does not exist.", + "File '/node_modules/xyz.js' does not exist.", + "File '/node_modules/xyz.jsx' does not exist.", + "File '/node_modules/xyz/package.json' does not exist.", + "File '/node_modules/xyz/index.js' does not exist.", + "File '/node_modules/xyz/index.jsx' does not exist.", + "File '/node_modules/@types/xyz.js' does not exist.", + "File '/node_modules/@types/xyz.jsx' does not exist.", + "File '/node_modules/@types/xyz/package.json' does not exist.", "File '/node_modules/@types/xyz/index.js' does not exist.", "File '/node_modules/@types/xyz/index.jsx' does not exist.", "======== Module name 'xyz' was not resolved. ========", diff --git a/tests/baselines/reference/typingsLookup4.trace.json b/tests/baselines/reference/typingsLookup4.trace.json index e5ad33fd0d2d4..bb9d94f43b510 100644 --- a/tests/baselines/reference/typingsLookup4.trace.json +++ b/tests/baselines/reference/typingsLookup4.trace.json @@ -5,19 +5,13 @@ "File '/node_modules/jquery.ts' does not exist.", "File '/node_modules/jquery.tsx' does not exist.", "File '/node_modules/jquery.d.ts' does not exist.", - "File '/node_modules/jquery.js' does not exist.", - "File '/node_modules/jquery.jsx' does not exist.", "File '/node_modules/jquery/package.json' does not exist.", "File '/node_modules/jquery/index.ts' does not exist.", "File '/node_modules/jquery/index.tsx' does not exist.", "File '/node_modules/jquery/index.d.ts' does not exist.", - "File '/node_modules/jquery/index.js' does not exist.", - "File '/node_modules/jquery/index.jsx' does not exist.", "File '/node_modules/@types/jquery.ts' does not exist.", "File '/node_modules/@types/jquery.tsx' does not exist.", "File '/node_modules/@types/jquery.d.ts' does not exist.", - "File '/node_modules/@types/jquery.js' does not exist.", - "File '/node_modules/@types/jquery.jsx' does not exist.", "Found 'package.json' at '/node_modules/@types/jquery/package.json'.", "'package.json' has 'typings' field 'jquery.d.ts' that references '/node_modules/@types/jquery/jquery.d.ts'.", "File '/node_modules/@types/jquery/jquery.d.ts' exist - use it as a name resolution result.", @@ -29,19 +23,13 @@ "File '/node_modules/kquery.ts' does not exist.", "File '/node_modules/kquery.tsx' does not exist.", "File '/node_modules/kquery.d.ts' does not exist.", - "File '/node_modules/kquery.js' does not exist.", - "File '/node_modules/kquery.jsx' does not exist.", "File '/node_modules/kquery/package.json' does not exist.", "File '/node_modules/kquery/index.ts' does not exist.", "File '/node_modules/kquery/index.tsx' does not exist.", "File '/node_modules/kquery/index.d.ts' does not exist.", - "File '/node_modules/kquery/index.js' does not exist.", - "File '/node_modules/kquery/index.jsx' does not exist.", "File '/node_modules/@types/kquery.ts' does not exist.", "File '/node_modules/@types/kquery.tsx' does not exist.", "File '/node_modules/@types/kquery.d.ts' does not exist.", - "File '/node_modules/@types/kquery.js' does not exist.", - "File '/node_modules/@types/kquery.jsx' does not exist.", "Found 'package.json' at '/node_modules/@types/kquery/package.json'.", "'package.json' has 'typings' field 'kquery' that references '/node_modules/@types/kquery/kquery'.", "File '/node_modules/@types/kquery/kquery' does not exist.", @@ -56,19 +44,13 @@ "File '/node_modules/lquery.ts' does not exist.", "File '/node_modules/lquery.tsx' does not exist.", "File '/node_modules/lquery.d.ts' does not exist.", - "File '/node_modules/lquery.js' does not exist.", - "File '/node_modules/lquery.jsx' does not exist.", "File '/node_modules/lquery/package.json' does not exist.", "File '/node_modules/lquery/index.ts' does not exist.", "File '/node_modules/lquery/index.tsx' does not exist.", "File '/node_modules/lquery/index.d.ts' does not exist.", - "File '/node_modules/lquery/index.js' does not exist.", - "File '/node_modules/lquery/index.jsx' does not exist.", "File '/node_modules/@types/lquery.ts' does not exist.", "File '/node_modules/@types/lquery.tsx' does not exist.", "File '/node_modules/@types/lquery.d.ts' does not exist.", - "File '/node_modules/@types/lquery.js' does not exist.", - "File '/node_modules/@types/lquery.jsx' does not exist.", "Found 'package.json' at '/node_modules/@types/lquery/package.json'.", "'package.json' has 'typings' field 'lquery' that references '/node_modules/@types/lquery/lquery'.", "File '/node_modules/@types/lquery/lquery' does not exist.", diff --git a/tests/baselines/reference/typingsLookupAmd.trace.json b/tests/baselines/reference/typingsLookupAmd.trace.json index 732e990065841..496166926a804 100644 --- a/tests/baselines/reference/typingsLookupAmd.trace.json +++ b/tests/baselines/reference/typingsLookupAmd.trace.json @@ -4,34 +4,22 @@ "File '/x/y/b.ts' does not exist.", "File '/x/y/b.tsx' does not exist.", "File '/x/y/b.d.ts' does not exist.", - "File '/x/y/b.js' does not exist.", - "File '/x/y/b.jsx' does not exist.", "File '/x/b.ts' does not exist.", "File '/x/b.tsx' does not exist.", "File '/x/b.d.ts' does not exist.", - "File '/x/b.js' does not exist.", - "File '/x/b.jsx' does not exist.", "File '/b.ts' does not exist.", "File '/b.tsx' does not exist.", "File '/b.d.ts' does not exist.", - "File '/b.js' does not exist.", - "File '/b.jsx' does not exist.", "File '/x/y/node_modules/@types/b.ts' does not exist.", "File '/x/y/node_modules/@types/b.tsx' does not exist.", "File '/x/y/node_modules/@types/b.d.ts' does not exist.", - "File '/x/y/node_modules/@types/b.js' does not exist.", - "File '/x/y/node_modules/@types/b.jsx' does not exist.", "File '/x/y/node_modules/@types/b/package.json' does not exist.", "File '/x/y/node_modules/@types/b/index.ts' does not exist.", "File '/x/y/node_modules/@types/b/index.tsx' does not exist.", "File '/x/y/node_modules/@types/b/index.d.ts' does not exist.", - "File '/x/y/node_modules/@types/b/index.js' does not exist.", - "File '/x/y/node_modules/@types/b/index.jsx' does not exist.", "File '/x/node_modules/@types/b.ts' does not exist.", "File '/x/node_modules/@types/b.tsx' does not exist.", "File '/x/node_modules/@types/b.d.ts' does not exist.", - "File '/x/node_modules/@types/b.js' does not exist.", - "File '/x/node_modules/@types/b.jsx' does not exist.", "File '/x/node_modules/@types/b/package.json' does not exist.", "File '/x/node_modules/@types/b/index.ts' does not exist.", "File '/x/node_modules/@types/b/index.tsx' does not exist.", @@ -42,66 +30,42 @@ "File '/x/node_modules/@types/b/a.ts' does not exist.", "File '/x/node_modules/@types/b/a.tsx' does not exist.", "File '/x/node_modules/@types/b/a.d.ts' does not exist.", - "File '/x/node_modules/@types/b/a.js' does not exist.", - "File '/x/node_modules/@types/b/a.jsx' does not exist.", "File '/x/node_modules/@types/a.ts' does not exist.", "File '/x/node_modules/@types/a.tsx' does not exist.", "File '/x/node_modules/@types/a.d.ts' does not exist.", - "File '/x/node_modules/@types/a.js' does not exist.", - "File '/x/node_modules/@types/a.jsx' does not exist.", "File '/x/node_modules/a.ts' does not exist.", "File '/x/node_modules/a.tsx' does not exist.", "File '/x/node_modules/a.d.ts' does not exist.", - "File '/x/node_modules/a.js' does not exist.", - "File '/x/node_modules/a.jsx' does not exist.", "File '/x/a.ts' does not exist.", "File '/x/a.tsx' does not exist.", "File '/x/a.d.ts' does not exist.", - "File '/x/a.js' does not exist.", - "File '/x/a.jsx' does not exist.", "File '/a.ts' does not exist.", "File '/a.tsx' does not exist.", "File '/a.d.ts' does not exist.", - "File '/a.js' does not exist.", - "File '/a.jsx' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a.ts' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a.tsx' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a.d.ts' does not exist.", - "File '/x/node_modules/@types/b/node_modules/@types/a.js' does not exist.", - "File '/x/node_modules/@types/b/node_modules/@types/a.jsx' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a/package.json' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a/index.ts' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a/index.tsx' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a/index.d.ts' does not exist.", - "File '/x/node_modules/@types/b/node_modules/@types/a/index.js' does not exist.", - "File '/x/node_modules/@types/b/node_modules/@types/a/index.jsx' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a.ts' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a.tsx' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a.d.ts' does not exist.", - "File '/x/node_modules/@types/node_modules/@types/a.js' does not exist.", - "File '/x/node_modules/@types/node_modules/@types/a.jsx' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a/package.json' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a/index.ts' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a/index.tsx' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a/index.d.ts' does not exist.", - "File '/x/node_modules/@types/node_modules/@types/a/index.js' does not exist.", - "File '/x/node_modules/@types/node_modules/@types/a/index.jsx' does not exist.", "File '/x/node_modules/@types/a.ts' does not exist.", "File '/x/node_modules/@types/a.tsx' does not exist.", "File '/x/node_modules/@types/a.d.ts' does not exist.", - "File '/x/node_modules/@types/a.js' does not exist.", - "File '/x/node_modules/@types/a.jsx' does not exist.", "File '/x/node_modules/@types/a/package.json' does not exist.", "File '/x/node_modules/@types/a/index.ts' does not exist.", "File '/x/node_modules/@types/a/index.tsx' does not exist.", "File '/x/node_modules/@types/a/index.d.ts' does not exist.", - "File '/x/node_modules/@types/a/index.js' does not exist.", - "File '/x/node_modules/@types/a/index.jsx' does not exist.", "File '/node_modules/@types/a.ts' does not exist.", "File '/node_modules/@types/a.tsx' does not exist.", "File '/node_modules/@types/a.d.ts' does not exist.", - "File '/node_modules/@types/a.js' does not exist.", - "File '/node_modules/@types/a.jsx' does not exist.", "File '/node_modules/@types/a/package.json' does not exist.", "File '/node_modules/@types/a/index.ts' does not exist.", "File '/node_modules/@types/a/index.tsx' does not exist.", From 718d57ff3c0f2dc20cc30bed8dee271b6813801e Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Wed, 26 Oct 2016 10:13:34 -0700 Subject: [PATCH 13/18] Move helper functions to core (fix build) --- src/compiler/core.ts | 29 +++++++++++++++++++++++++++++ src/compiler/utilities.ts | 29 ----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index ff32f48e65ed1..001401a8a965a 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -2094,4 +2094,33 @@ namespace ts { // pos === undefined || pos === null || isNaN(pos) || pos < 0; return !(pos >= 0); } + + /** True if an extension is one of the supported TypeScript extensions. */ + export function extensionIsTypeScript(ext: Extension): boolean { + return ext <= Extension.LastTypeScriptExtension; + } + + /** + * Gets the extension from a path. + * Path must have a valid extension. + */ + export function extensionFromPath(path: string): Extension { + if (fileExtensionIs(path, ".d.ts")) { + return Extension.Dts; + } + if (fileExtensionIs(path, ".ts")) { + return Extension.Ts; + } + if (fileExtensionIs(path, ".tsx")) { + return Extension.Tsx; + } + if (fileExtensionIs(path, ".js")) { + return Extension.Js; + } + if (fileExtensionIs(path, ".jsx")) { + return Extension.Jsx; + } + Debug.fail(`File ${path} has unknown extension.`); + return Extension.Js; + } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index a29007edc014e..5f7c91b3b1c9e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -118,35 +118,6 @@ namespace ts { oldResolution.resolvedFileName === newResolution.resolvedFileName; } - /** True if an extension is one of the supported TypeScript extensions. */ - export function extensionIsTypeScript(ext: Extension): boolean { - return ext <= Extension.LastTypeScriptExtension; - } - - /** - * Gets the extension from a path. - * Path must have a valid extension. - */ - export function extensionFromPath(path: string): Extension { - if (fileExtensionIs(path, ".d.ts")) { - return Extension.Dts; - } - if (fileExtensionIs(path, ".ts")) { - return Extension.Ts; - } - if (fileExtensionIs(path, ".tsx")) { - return Extension.Tsx; - } - if (fileExtensionIs(path, ".js")) { - return Extension.Js; - } - if (fileExtensionIs(path, ".jsx")) { - return Extension.Jsx; - } - Debug.fail(`File ${path} has unknown extension.`); - return Extension.Js; - } - /* @internal */ export function typeDirectiveIsEqualTo(oldResolution: ResolvedTypeReferenceDirective, newResolution: ResolvedTypeReferenceDirective): boolean { return oldResolution.resolvedFileName === newResolution.resolvedFileName && oldResolution.primary === newResolution.primary; From 3e18aba36adb7cca5b3376fb8eddf72a8f46d679 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 26 Oct 2016 16:48:29 -0700 Subject: [PATCH 14/18] rewrite void-returning statements in constructors that capture result of super call (#11868) * rewrite void-returning statements in constructors that capture result of super call * linter --- src/compiler/transformers/es2015.ts | 30 ++++- .../reference/constructorWithCapturedSuper.js | 123 ++++++++++++++++++ .../constructorWithCapturedSuper.symbols | 96 ++++++++++++++ .../constructorWithCapturedSuper.types | 113 ++++++++++++++++ .../compiler/constructorWithCapturedSuper.ts | 52 ++++++++ 5 files changed, 410 insertions(+), 4 deletions(-) create mode 100644 tests/baselines/reference/constructorWithCapturedSuper.js create mode 100644 tests/baselines/reference/constructorWithCapturedSuper.symbols create mode 100644 tests/baselines/reference/constructorWithCapturedSuper.types create mode 100644 tests/cases/compiler/constructorWithCapturedSuper.ts diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index b48539e872200..c0916d3233987 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -186,6 +186,7 @@ namespace ts { let enclosingFunction: FunctionLikeDeclaration; let enclosingNonArrowFunction: FunctionLikeDeclaration; let enclosingNonAsyncFunctionBody: FunctionLikeDeclaration | ClassElement; + let isInConstructorWithCapturedSuper: boolean; /** * Used to track if we are emitting body of the converted loop @@ -231,14 +232,17 @@ namespace ts { const savedCurrentParent = currentParent; const savedCurrentNode = currentNode; const savedConvertedLoopState = convertedLoopState; + const savedIsInConstructorWithCapturedSuper = isInConstructorWithCapturedSuper; if (nodeStartsNewLexicalEnvironment(node)) { - // don't treat content of nodes that start new lexical environment as part of converted loop copy + // don't treat content of nodes that start new lexical environment as part of converted loop copy or constructor body + isInConstructorWithCapturedSuper = false; convertedLoopState = undefined; } onBeforeVisitNode(node); const visited = f(node); + isInConstructorWithCapturedSuper = savedIsInConstructorWithCapturedSuper; convertedLoopState = savedConvertedLoopState; enclosingFunction = savedEnclosingFunction; enclosingNonArrowFunction = savedEnclosingNonArrowFunction; @@ -251,6 +255,14 @@ namespace ts { return visited; } + function returnCapturedThis(node: Node): Node { + return setOriginalNode(createReturn(createIdentifier("_this")), node); + } + + function isReturnVoidStatementInConstructorWithCapturedSuper(node: Node): boolean { + return isInConstructorWithCapturedSuper && node.kind === SyntaxKind.ReturnStatement && !(node).expression; + } + function shouldCheckNode(node: Node): boolean { return (node.transformFlags & TransformFlags.ES2015) !== 0 || node.kind === SyntaxKind.LabeledStatement || @@ -258,10 +270,16 @@ namespace ts { } function visitorWorker(node: Node): VisitResult { - if (shouldCheckNode(node)) { + if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) { + return returnCapturedThis(node); + } + else if (shouldCheckNode(node)) { return visitJavaScript(node); } - else if (node.transformFlags & TransformFlags.ContainsES2015) { + else if (node.transformFlags & TransformFlags.ContainsES2015 || (isInConstructorWithCapturedSuper && !isExpression(node))) { + // we want to dive in this branch either if node has children with ES2015 specific syntax + // or we are inside constructor that captures result of the super call so all returns without expression should be + // rewritten. Note: we skip expressions since returns should never appear there return visitEachChild(node, visitor, context); } else { @@ -283,6 +301,7 @@ namespace ts { function visitNodesInConvertedLoop(node: Node): VisitResult { switch (node.kind) { case SyntaxKind.ReturnStatement: + node = isReturnVoidStatementInConstructorWithCapturedSuper(node) ? returnCapturedThis(node) : node; return visitReturnStatement(node); case SyntaxKind.VariableStatement: @@ -864,7 +883,10 @@ namespace ts { } if (constructor) { - const body = saveStateAndInvoke(constructor, constructor => visitNodes(constructor.body.statements, visitor, isStatement, /*start*/ statementOffset)); + const body = saveStateAndInvoke(constructor, constructor => { + isInConstructorWithCapturedSuper = superCaptureStatus === SuperCaptureResult.ReplaceSuperCapture; + return visitNodes(constructor.body.statements, visitor, isStatement, /*start*/ statementOffset); + }); addRange(statements, body); } diff --git a/tests/baselines/reference/constructorWithCapturedSuper.js b/tests/baselines/reference/constructorWithCapturedSuper.js new file mode 100644 index 0000000000000..895f78eb04b8b --- /dev/null +++ b/tests/baselines/reference/constructorWithCapturedSuper.js @@ -0,0 +1,123 @@ +//// [constructorWithCapturedSuper.ts] +let oneA: A; + +class A { + constructor() { + return oneA; + } +} + +class B extends A { + constructor(x: number) { + super(); + if (x === 1) { + return; + } + while (x < 2) { + return; + } + try { + return + } + catch (e) { + return; + } + finally { + return; + } + } +} + +class C extends A { + constructor(x: number) { + super(); + for (let i = 0; i < 10; ++i) { + () => i + x; + if (x === 1) { + return; + } + } + } +} + +class D extends A { + constructor(x: number) { + super(); + () => { + return; + } + function foo() { + return; + } + } +} + +//// [constructorWithCapturedSuper.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var oneA; +var A = (function () { + function A() { + return oneA; + } + return A; +}()); +var B = (function (_super) { + __extends(B, _super); + function B(x) { + var _this = _super.call(this) || this; + if (x === 1) { + return _this; + } + while (x < 2) { + return _this; + } + try { + return _this; + } + catch (e) { + return _this; + } + finally { + return _this; + } + return _this; + } + return B; +}(A)); +var C = (function (_super) { + __extends(C, _super); + function C(x) { + var _this = _super.call(this) || this; + var _loop_1 = function (i) { + (function () { return i + x; }); + if (x === 1) { + return { value: _this }; + } + }; + for (var i = 0; i < 10; ++i) { + var state_1 = _loop_1(i); + if (typeof state_1 === "object") + return state_1.value; + } + return _this; + } + return C; +}(A)); +var D = (function (_super) { + __extends(D, _super); + function D(x) { + var _this = _super.call(this) || this; + (function () { + return; + }); + function foo() { + return; + } + return _this; + } + return D; +}(A)); diff --git a/tests/baselines/reference/constructorWithCapturedSuper.symbols b/tests/baselines/reference/constructorWithCapturedSuper.symbols new file mode 100644 index 0000000000000..1743ee61612e0 --- /dev/null +++ b/tests/baselines/reference/constructorWithCapturedSuper.symbols @@ -0,0 +1,96 @@ +=== tests/cases/compiler/constructorWithCapturedSuper.ts === +let oneA: A; +>oneA : Symbol(oneA, Decl(constructorWithCapturedSuper.ts, 0, 3)) +>A : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + +class A { +>A : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + constructor() { + return oneA; +>oneA : Symbol(oneA, Decl(constructorWithCapturedSuper.ts, 0, 3)) + } +} + +class B extends A { +>B : Symbol(B, Decl(constructorWithCapturedSuper.ts, 6, 1)) +>A : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + constructor(x: number) { +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 9, 16)) + + super(); +>super : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + if (x === 1) { +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 9, 16)) + + return; + } + while (x < 2) { +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 9, 16)) + + return; + } + try { + return + } + catch (e) { +>e : Symbol(e, Decl(constructorWithCapturedSuper.ts, 20, 15)) + + return; + } + finally { + return; + } + } +} + +class C extends A { +>C : Symbol(C, Decl(constructorWithCapturedSuper.ts, 27, 1)) +>A : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + constructor(x: number) { +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 30, 16)) + + super(); +>super : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + for (let i = 0; i < 10; ++i) { +>i : Symbol(i, Decl(constructorWithCapturedSuper.ts, 32, 16)) +>i : Symbol(i, Decl(constructorWithCapturedSuper.ts, 32, 16)) +>i : Symbol(i, Decl(constructorWithCapturedSuper.ts, 32, 16)) + + () => i + x; +>i : Symbol(i, Decl(constructorWithCapturedSuper.ts, 32, 16)) +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 30, 16)) + + if (x === 1) { +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 30, 16)) + + return; + } + } + } +} + +class D extends A { +>D : Symbol(D, Decl(constructorWithCapturedSuper.ts, 39, 1)) +>A : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + constructor(x: number) { +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 42, 16)) + + super(); +>super : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + () => { + return; + } + function foo() { +>foo : Symbol(foo, Decl(constructorWithCapturedSuper.ts, 46, 9)) + + return; + } + } +} diff --git a/tests/baselines/reference/constructorWithCapturedSuper.types b/tests/baselines/reference/constructorWithCapturedSuper.types new file mode 100644 index 0000000000000..13696029d536f --- /dev/null +++ b/tests/baselines/reference/constructorWithCapturedSuper.types @@ -0,0 +1,113 @@ +=== tests/cases/compiler/constructorWithCapturedSuper.ts === +let oneA: A; +>oneA : A +>A : A + +class A { +>A : A + + constructor() { + return oneA; +>oneA : A + } +} + +class B extends A { +>B : B +>A : A + + constructor(x: number) { +>x : number + + super(); +>super() : void +>super : typeof A + + if (x === 1) { +>x === 1 : boolean +>x : number +>1 : 1 + + return; + } + while (x < 2) { +>x < 2 : boolean +>x : number +>2 : 2 + + return; + } + try { + return + } + catch (e) { +>e : any + + return; + } + finally { + return; + } + } +} + +class C extends A { +>C : C +>A : A + + constructor(x: number) { +>x : number + + super(); +>super() : void +>super : typeof A + + for (let i = 0; i < 10; ++i) { +>i : number +>0 : 0 +>i < 10 : boolean +>i : number +>10 : 10 +>++i : number +>i : number + + () => i + x; +>() => i + x : () => number +>i + x : number +>i : number +>x : number + + if (x === 1) { +>x === 1 : boolean +>x : number +>1 : 1 + + return; + } + } + } +} + +class D extends A { +>D : D +>A : A + + constructor(x: number) { +>x : number + + super(); +>super() : void +>super : typeof A + + () => { +>() => { return; } : () => void + + return; + } + function foo() { +>foo : () => void + + return; + } + } +} diff --git a/tests/cases/compiler/constructorWithCapturedSuper.ts b/tests/cases/compiler/constructorWithCapturedSuper.ts new file mode 100644 index 0000000000000..942803e771de6 --- /dev/null +++ b/tests/cases/compiler/constructorWithCapturedSuper.ts @@ -0,0 +1,52 @@ +let oneA: A; + +class A { + constructor() { + return oneA; + } +} + +class B extends A { + constructor(x: number) { + super(); + if (x === 1) { + return; + } + while (x < 2) { + return; + } + try { + return + } + catch (e) { + return; + } + finally { + return; + } + } +} + +class C extends A { + constructor(x: number) { + super(); + for (let i = 0; i < 10; ++i) { + () => i + x; + if (x === 1) { + return; + } + } + } +} + +class D extends A { + constructor(x: number) { + super(); + () => { + return; + } + function foo() { + return; + } + } +} \ No newline at end of file From 50e2fd87daf9b0f7fceaae27661b42c5b3240256 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 26 Oct 2016 17:15:04 -0700 Subject: [PATCH 15/18] only emit /// types reference for a symbol in d.ts file if all declarations of a symbol come from type reference directives (#11872) * only emit /// types reference for a symbol in d.ts file if all declarations of a symbol come from type reference directives * pass proper value for current directory when compiling .d.ts files --- src/compiler/checker.ts | 4 ++++ src/harness/harness.ts | 2 +- .../declarationFilesWithTypeReferences1.js | 22 +++++++++++++++++ ...eclarationFilesWithTypeReferences1.symbols | 18 ++++++++++++++ .../declarationFilesWithTypeReferences1.types | 18 ++++++++++++++ .../declarationFilesWithTypeReferences2.js | 23 ++++++++++++++++++ ...eclarationFilesWithTypeReferences2.symbols | 18 ++++++++++++++ .../declarationFilesWithTypeReferences2.types | 18 ++++++++++++++ .../declarationFilesWithTypeReferences3.js | 24 +++++++++++++++++++ ...eclarationFilesWithTypeReferences3.symbols | 18 ++++++++++++++ .../declarationFilesWithTypeReferences3.types | 18 ++++++++++++++ .../declarationFilesWithTypeReferences4.js | 23 ++++++++++++++++++ ...eclarationFilesWithTypeReferences4.symbols | 18 ++++++++++++++ .../declarationFilesWithTypeReferences4.types | 18 ++++++++++++++ .../declarationFilesWithTypeReferences1.ts | 14 +++++++++++ .../declarationFilesWithTypeReferences2.ts | 14 +++++++++++ .../declarationFilesWithTypeReferences3.ts | 12 ++++++++++ .../declarationFilesWithTypeReferences4.ts | 12 ++++++++++ 18 files changed, 293 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/declarationFilesWithTypeReferences1.js create mode 100644 tests/baselines/reference/declarationFilesWithTypeReferences1.symbols create mode 100644 tests/baselines/reference/declarationFilesWithTypeReferences1.types create mode 100644 tests/baselines/reference/declarationFilesWithTypeReferences2.js create mode 100644 tests/baselines/reference/declarationFilesWithTypeReferences2.symbols create mode 100644 tests/baselines/reference/declarationFilesWithTypeReferences2.types create mode 100644 tests/baselines/reference/declarationFilesWithTypeReferences3.js create mode 100644 tests/baselines/reference/declarationFilesWithTypeReferences3.symbols create mode 100644 tests/baselines/reference/declarationFilesWithTypeReferences3.types create mode 100644 tests/baselines/reference/declarationFilesWithTypeReferences4.js create mode 100644 tests/baselines/reference/declarationFilesWithTypeReferences4.symbols create mode 100644 tests/baselines/reference/declarationFilesWithTypeReferences4.types create mode 100644 tests/cases/compiler/declarationFilesWithTypeReferences1.ts create mode 100644 tests/cases/compiler/declarationFilesWithTypeReferences2.ts create mode 100644 tests/cases/compiler/declarationFilesWithTypeReferences3.ts create mode 100644 tests/cases/compiler/declarationFilesWithTypeReferences4.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3c98513423af2..4fa146584943b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -19505,6 +19505,10 @@ namespace ts { if (typeReferenceDirective) { (typeReferenceDirectives || (typeReferenceDirectives = [])).push(typeReferenceDirective); } + else { + // found at least one entry that does not originate from type reference directive + return undefined; + } } } return typeReferenceDirectives; diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 409ab9e2fcc9a..47b76793af6af 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1238,7 +1238,7 @@ namespace Harness { if (options.declaration && result.errors.length === 0 && result.declFilesCode.length > 0) { ts.forEach(inputFiles, file => addDtsFile(file, declInputFiles)); ts.forEach(otherFiles, file => addDtsFile(file, declOtherFiles)); - const output = compileFiles(declInputFiles, declOtherFiles, harnessSettings, options, currentDirectory); + const output = compileFiles(declInputFiles, declOtherFiles, harnessSettings, options, currentDirectory || harnessSettings["currentDirectory"]); return { declInputFiles, declOtherFiles, declResult: output.result }; } diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences1.js b/tests/baselines/reference/declarationFilesWithTypeReferences1.js new file mode 100644 index 0000000000000..b4695f28f134f --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences1.js @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/declarationFilesWithTypeReferences1.ts] //// + +//// [index.d.ts] + +interface Error { + stack2: string; +} + +//// [app.ts] + +function foo(): Error { + return undefined; +} + +//// [app.js] +function foo() { + return undefined; +} + + +//// [app.d.ts] +declare function foo(): Error; diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences1.symbols b/tests/baselines/reference/declarationFilesWithTypeReferences1.symbols new file mode 100644 index 0000000000000..3d3df3c162280 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences1.symbols @@ -0,0 +1,18 @@ +=== /node_modules/@types/node/index.d.ts === + +interface Error { +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(index.d.ts, 0, 0)) + + stack2: string; +>stack2 : Symbol(Error.stack2, Decl(index.d.ts, 1, 17)) +} + +=== /app.ts === + +function foo(): Error { +>foo : Symbol(foo, Decl(app.ts, 0, 0)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(index.d.ts, 0, 0)) + + return undefined; +>undefined : Symbol(undefined) +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences1.types b/tests/baselines/reference/declarationFilesWithTypeReferences1.types new file mode 100644 index 0000000000000..7837b7b3a6c0e --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences1.types @@ -0,0 +1,18 @@ +=== /node_modules/@types/node/index.d.ts === + +interface Error { +>Error : Error + + stack2: string; +>stack2 : string +} + +=== /app.ts === + +function foo(): Error { +>foo : () => Error +>Error : Error + + return undefined; +>undefined : undefined +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences2.js b/tests/baselines/reference/declarationFilesWithTypeReferences2.js new file mode 100644 index 0000000000000..b85dcc4510757 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences2.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationFilesWithTypeReferences2.ts] //// + +//// [index.d.ts] + +interface Error2 { + stack2: string; +} + +//// [app.ts] + +function foo(): Error2 { + return undefined; +} + +//// [app.js] +function foo() { + return undefined; +} + + +//// [app.d.ts] +/// +declare function foo(): Error2; diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences2.symbols b/tests/baselines/reference/declarationFilesWithTypeReferences2.symbols new file mode 100644 index 0000000000000..dc6d8a3a6de2b --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences2.symbols @@ -0,0 +1,18 @@ +=== /node_modules/@types/node/index.d.ts === + +interface Error2 { +>Error2 : Symbol(Error2, Decl(index.d.ts, 0, 0)) + + stack2: string; +>stack2 : Symbol(Error2.stack2, Decl(index.d.ts, 1, 18)) +} + +=== /app.ts === + +function foo(): Error2 { +>foo : Symbol(foo, Decl(app.ts, 0, 0)) +>Error2 : Symbol(Error2, Decl(index.d.ts, 0, 0)) + + return undefined; +>undefined : Symbol(undefined) +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences2.types b/tests/baselines/reference/declarationFilesWithTypeReferences2.types new file mode 100644 index 0000000000000..c56f4ba6a67d2 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences2.types @@ -0,0 +1,18 @@ +=== /node_modules/@types/node/index.d.ts === + +interface Error2 { +>Error2 : Error2 + + stack2: string; +>stack2 : string +} + +=== /app.ts === + +function foo(): Error2 { +>foo : () => Error2 +>Error2 : Error2 + + return undefined; +>undefined : undefined +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences3.js b/tests/baselines/reference/declarationFilesWithTypeReferences3.js new file mode 100644 index 0000000000000..3a18859c61090 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences3.js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/declarationFilesWithTypeReferences3.ts] //// + +//// [index.d.ts] + +interface Error2 { + stack2: string; +} + +//// [app.ts] +/// +function foo(): Error2 { + return undefined; +} + +//// [app.js] +/// +function foo() { + return undefined; +} + + +//// [app.d.ts] +/// +declare function foo(): Error2; diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences3.symbols b/tests/baselines/reference/declarationFilesWithTypeReferences3.symbols new file mode 100644 index 0000000000000..78335f988e9b7 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences3.symbols @@ -0,0 +1,18 @@ +=== /a/node_modules/@types/node/index.d.ts === + +interface Error2 { +>Error2 : Symbol(Error2, Decl(index.d.ts, 0, 0)) + + stack2: string; +>stack2 : Symbol(Error2.stack2, Decl(index.d.ts, 1, 18)) +} + +=== /a/app.ts === +/// +function foo(): Error2 { +>foo : Symbol(foo, Decl(app.ts, 0, 0)) +>Error2 : Symbol(Error2, Decl(index.d.ts, 0, 0)) + + return undefined; +>undefined : Symbol(undefined) +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences3.types b/tests/baselines/reference/declarationFilesWithTypeReferences3.types new file mode 100644 index 0000000000000..9ac0105890abc --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences3.types @@ -0,0 +1,18 @@ +=== /a/node_modules/@types/node/index.d.ts === + +interface Error2 { +>Error2 : Error2 + + stack2: string; +>stack2 : string +} + +=== /a/app.ts === +/// +function foo(): Error2 { +>foo : () => Error2 +>Error2 : Error2 + + return undefined; +>undefined : undefined +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences4.js b/tests/baselines/reference/declarationFilesWithTypeReferences4.js new file mode 100644 index 0000000000000..b45860be9bb82 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences4.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationFilesWithTypeReferences4.ts] //// + +//// [index.d.ts] + +interface Error { + stack2: string; +} + +//// [app.ts] +/// +function foo(): Error { + return undefined; +} + +//// [app.js] +/// +function foo() { + return undefined; +} + + +//// [app.d.ts] +declare function foo(): Error; diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences4.symbols b/tests/baselines/reference/declarationFilesWithTypeReferences4.symbols new file mode 100644 index 0000000000000..216bd2a6a1c7d --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences4.symbols @@ -0,0 +1,18 @@ +=== /a/node_modules/@types/node/index.d.ts === + +interface Error { +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(index.d.ts, 0, 0)) + + stack2: string; +>stack2 : Symbol(Error.stack2, Decl(index.d.ts, 1, 17)) +} + +=== /a/app.ts === +/// +function foo(): Error { +>foo : Symbol(foo, Decl(app.ts, 0, 0)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(index.d.ts, 0, 0)) + + return undefined; +>undefined : Symbol(undefined) +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences4.types b/tests/baselines/reference/declarationFilesWithTypeReferences4.types new file mode 100644 index 0000000000000..0ae603716b100 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences4.types @@ -0,0 +1,18 @@ +=== /a/node_modules/@types/node/index.d.ts === + +interface Error { +>Error : Error + + stack2: string; +>stack2 : string +} + +=== /a/app.ts === +/// +function foo(): Error { +>foo : () => Error +>Error : Error + + return undefined; +>undefined : undefined +} diff --git a/tests/cases/compiler/declarationFilesWithTypeReferences1.ts b/tests/cases/compiler/declarationFilesWithTypeReferences1.ts new file mode 100644 index 0000000000000..e499543057e97 --- /dev/null +++ b/tests/cases/compiler/declarationFilesWithTypeReferences1.ts @@ -0,0 +1,14 @@ +// @types: node +// @declaration: true +// @currentDirectory: / + +// @filename: /node_modules/@types/node/index.d.ts +interface Error { + stack2: string; +} + +// @filename: /app.ts + +function foo(): Error { + return undefined; +} \ No newline at end of file diff --git a/tests/cases/compiler/declarationFilesWithTypeReferences2.ts b/tests/cases/compiler/declarationFilesWithTypeReferences2.ts new file mode 100644 index 0000000000000..0514895563774 --- /dev/null +++ b/tests/cases/compiler/declarationFilesWithTypeReferences2.ts @@ -0,0 +1,14 @@ +// @types: node +// @declaration: true +// @currentDirectory: / + +// @filename: /node_modules/@types/node/index.d.ts +interface Error2 { + stack2: string; +} + +// @filename: /app.ts + +function foo(): Error2 { + return undefined; +} \ No newline at end of file diff --git a/tests/cases/compiler/declarationFilesWithTypeReferences3.ts b/tests/cases/compiler/declarationFilesWithTypeReferences3.ts new file mode 100644 index 0000000000000..6653fb11f8b44 --- /dev/null +++ b/tests/cases/compiler/declarationFilesWithTypeReferences3.ts @@ -0,0 +1,12 @@ +// @declaration: true + +// @filename: /a/node_modules/@types/node/index.d.ts +interface Error2 { + stack2: string; +} + +// @filename: /a/app.ts +/// +function foo(): Error2 { + return undefined; +} \ No newline at end of file diff --git a/tests/cases/compiler/declarationFilesWithTypeReferences4.ts b/tests/cases/compiler/declarationFilesWithTypeReferences4.ts new file mode 100644 index 0000000000000..4719feb56642e --- /dev/null +++ b/tests/cases/compiler/declarationFilesWithTypeReferences4.ts @@ -0,0 +1,12 @@ +// @declaration: true + +// @filename: /a/node_modules/@types/node/index.d.ts +interface Error { + stack2: string; +} + +// @filename: /a/app.ts +/// +function foo(): Error { + return undefined; +} \ No newline at end of file From 91885266acea1fb835eec00c066c20ef12e0ca49 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Thu, 27 Oct 2016 08:09:59 -0700 Subject: [PATCH 16/18] Remove a comment about a parameter that no longer exists --- src/compiler/program.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index fab35141ba4af..6f6c5e3ee3b86 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1078,9 +1078,6 @@ namespace ts { } } - /** - * 'isReference' indicates whether the file was brought in via a reference directive (rather than an import declaration) - */ function processSourceFile(fileName: string, isDefaultLib: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number) { let diagnosticArgument: string[]; let diagnostic: DiagnosticMessage; From ed82fddb8cc540966f109d486de950a29132814d Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Thu, 27 Oct 2016 08:14:08 -0700 Subject: [PATCH 17/18] Fix bug: We want to test for existence of the enum value, not whether it's non-zero --- src/compiler/program.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index fab35141ba4af..6273d2b3117cd 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -333,7 +333,7 @@ namespace ts { if (host.resolveModuleNames) { resolveModuleNamesWorker = (moduleNames, containingFile) => host.resolveModuleNames(moduleNames, containingFile).map(resolved => { // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. - if (!resolved || resolved.extension) { + if (!resolved || resolved.extension === undefined) { return resolved; } resolved = clone(resolved); From 4e20882ac01df80fff4b9ab97fca968bc0bcc3bf Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Thu, 27 Oct 2016 08:43:22 -0700 Subject: [PATCH 18/18] Fix: test for presence, not absence --- src/compiler/program.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 6273d2b3117cd..8c0da2562e91e 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -333,7 +333,7 @@ namespace ts { if (host.resolveModuleNames) { resolveModuleNamesWorker = (moduleNames, containingFile) => host.resolveModuleNames(moduleNames, containingFile).map(resolved => { // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. - if (!resolved || resolved.extension === undefined) { + if (!resolved || resolved.extension !== undefined) { return resolved; } resolved = clone(resolved);