@angular/tsc-wrapped
Advanced tools
Comparing version 4.4.2 to 4.4.3
{ | ||
"name": "@angular/tsc-wrapped", | ||
"version": "4.4.2", | ||
"version": "4.4.3", | ||
"description": "Wraps the tsc CLI, allowing extensions.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/angular/angular/blob/master/tools/@angular/tsc-wrapped", |
@@ -192,3 +192,3 @@ "use strict"; | ||
var name_3 = symbol.name; | ||
var declaredName = symbol.declaration.name; | ||
var identifier = symbol.declaration.module + ":" + symbol.declaration.name; | ||
if (symbol.isPrivate && !symbol.privateName) { | ||
@@ -198,8 +198,8 @@ name_3 = newPrivateName(); | ||
} | ||
if (symbolsMap.has(declaredName)) { | ||
var names = symbolsMap.get(declaredName); | ||
if (symbolsMap.has(identifier)) { | ||
var names = symbolsMap.get(identifier); | ||
names.push(name_3); | ||
} | ||
else { | ||
symbolsMap.set(declaredName, [name_3]); | ||
symbolsMap.set(identifier, [name_3]); | ||
} | ||
@@ -210,4 +210,5 @@ result[name_3] = symbol.value; | ||
// check for duplicated entries | ||
symbolsMap.forEach(function (names, declaredName) { | ||
symbolsMap.forEach(function (names, identifier) { | ||
if (names.length > 1) { | ||
var _a = identifier.split(':'), module_1 = _a[0], declaredName = _a[1]; | ||
// prefer the export that uses the declared name (if any) | ||
@@ -235,3 +236,3 @@ var reference_1 = names.indexOf(declaredName); | ||
var declaration = symbol.declaration; | ||
var module_1 = declaration.module; | ||
var module_2 = declaration.module; | ||
if (declaration.name == '*') { | ||
@@ -243,6 +244,6 @@ // Reexport all the symbols. | ||
// Re-export the symbol as the exported name. | ||
var entry = modules.get(module_1); | ||
var entry = modules.get(module_2); | ||
if (!entry) { | ||
entry = []; | ||
modules.set(module_1, entry); | ||
modules.set(module_2, entry); | ||
} | ||
@@ -265,5 +266,5 @@ var as = symbol.name; | ||
var declaration = canonicalSymbol.declaration; | ||
var module_2 = this.getMetadata(declaration.module); | ||
if (module_2) { | ||
var value = module_2.metadata[declaration.name]; | ||
var module_3 = this.getMetadata(declaration.module); | ||
if (module_3) { | ||
var value = module_3.metadata[declaration.name]; | ||
if (value && !declaration.name.startsWith('___')) { | ||
@@ -270,0 +271,0 @@ canonicalSymbol.value = this.convertEntry(declaration.module, value); |
@@ -126,5 +126,6 @@ "use strict"; | ||
var host = new MockStringBundlerHost('/', { | ||
'public-api.ts': "\n export {A as A2, A, B as B1, B as B2} from './src/core';\n ", | ||
'public-api.ts': "\n export {A as A2, A, B as B1, B as B2} from './src/core';\n export {A as A3} from './src/alternate';\n ", | ||
'src': { | ||
'core.ts': "\n export class A {}\n export class B {}\n ", | ||
'alternate.ts': " \n export class A {} \n ", | ||
} | ||
@@ -134,6 +135,7 @@ }); | ||
var result = bundler.getMetadataBundle(); | ||
var _a = result.metadata.metadata, A = _a.A, A2 = _a.A2, B1 = _a.B1, B2 = _a.B2; | ||
var _a = result.metadata.metadata, A = _a.A, A2 = _a.A2, A3 = _a.A3, B1 = _a.B1, B2 = _a.B2; | ||
expect(A.__symbolic).toEqual('class'); | ||
expect(A2.__symbolic).toEqual('reference'); | ||
expect(A2.name).toEqual('A'); | ||
expect(A3.__symbolic).toEqual('class'); | ||
expect(B1.__symbolic).toEqual('class'); | ||
@@ -140,0 +142,0 @@ expect(B2.__symbolic).toEqual('reference'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
674104
5316