build: update to rules_typescript 0.25.1 (#28625)

Updated a spot in the compiler which assumed es5 downlevelling get ready for es2015 devmode in the future.

PR Close #28625
This commit is contained in:
Greg Magolan
2019-02-08 14:01:51 -08:00
committed by Igor Minar
parent 9ae14db343
commit ebffde7143
90 changed files with 174 additions and 1940 deletions

View File

@ -811,6 +811,9 @@ function readUpdateOpCodes(
value += renderStringify(viewData[bindingsStartIndex - opCode]);
} else {
const nodeIndex = opCode >>> I18nUpdateOpCode.SHIFT_REF;
let tIcuIndex: number;
let tIcu: TIcu;
let icuTNode: TIcuContainerNode;
switch (opCode & I18nUpdateOpCode.MASK_OPCODE) {
case I18nUpdateOpCode.Attr:
const attrName = updateOpCodes[++j] as string;
@ -821,9 +824,9 @@ function readUpdateOpCodes(
textBinding(nodeIndex, value);
break;
case I18nUpdateOpCode.IcuSwitch:
let tIcuIndex = updateOpCodes[++j] as number;
let tIcu = icus ![tIcuIndex];
let icuTNode = getTNode(nodeIndex, viewData) as TIcuContainerNode;
tIcuIndex = updateOpCodes[++j] as number;
tIcu = icus ![tIcuIndex];
icuTNode = getTNode(nodeIndex, viewData) as TIcuContainerNode;
// If there is an active case, delete the old nodes
if (icuTNode.activeCaseIndex !== null) {
const removeCodes = tIcu.remove[icuTNode.activeCaseIndex];

View File

@ -3,7 +3,7 @@ package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "jasmine_node_test", "ng_module", "ng_rollup_bundle", "ts_library")
load("//tools/http-server:http_server.bzl", "http_server")
load("//tools/symbol-extractor:index.bzl", "js_expected_symbol_test")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
ng_module(
name = "todo",

View File

@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "jasmine_node_test", "ng_module", "ng_rollup_bundle", "ts_library")
load("//tools/http-server:http_server.bzl", "http_server")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
ng_module(
name = "todo_i18n",

View File

@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "jasmine_node_test", "ng_module", "ng_rollup_bundle", "ts_library")
load("//tools/http-server:http_server.bzl", "http_server")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
ng_module(
name = "todo",

View File

@ -11,6 +11,14 @@ import {Component, ContentChildren, Directive, Inject, NO_ERRORS_SCHEMA, NgModul
import {TestBed} from '@angular/core/testing';
import {expect} from '@angular/platform-browser/testing/src/matchers';
class Frame {
name: string = 'frame';
}
class ModuleFrame {
name: string = 'moduleFram';
}
describe('forwardRef integration', function() {
beforeEach(() => { TestBed.configureTestingModule({imports: [Module], declarations: [App]}); });
@ -51,14 +59,6 @@ class Door {
constructor(@Inject(forwardRef(() => Frame)) frame: Frame) { this.frame = frame; }
}
class Frame {
name: string = 'frame';
}
class ModuleFrame {
name: string = 'moduleFram';
}
@Directive({selector: 'lock'})
class Lock {
name: string = 'lock';

View File

@ -15,10 +15,6 @@ class TestObj {
someComplexFunc(a: any) { return a; }
}
class SpyTestObj extends SpyObject {
constructor() { super(TestObj); }
}
{
describe('testing', () => {
describe('should respect custom equality tester', () => {
@ -87,7 +83,7 @@ class SpyTestObj extends SpyObject {
describe('spy objects', () => {
let spyObj: any;
beforeEach(() => { spyObj = new SpyTestObj(); });
beforeEach(() => { spyObj = new SpyObject(TestObj); });
it('should return a new spy func with no calls',
() => { expect(spyObj.spy('someFunc')).not.toHaveBeenCalled(); });
@ -100,6 +96,7 @@ class SpyTestObj extends SpyObject {
});
it('should match multiple function calls', () => {
spyObj.spy('someFunc');
spyObj.someFunc(1, 2);
spyObj.someFunc(3, 4);
expect(spyObj.spy('someFunc')).toHaveBeenCalledWith(1, 2);
@ -107,11 +104,13 @@ class SpyTestObj extends SpyObject {
});
it('should match null arguments', () => {
spyObj.spy('someFunc');
spyObj.someFunc(null, 'hello');
expect(spyObj.spy('someFunc')).toHaveBeenCalledWith(null, 'hello');
});
it('should match using deep equality', () => {
spyObj.spy('someComplexFunc');
spyObj.someComplexFunc([1]);
expect(spyObj.spy('someComplexFunc')).toHaveBeenCalledWith([1]);
});
@ -122,8 +121,10 @@ class SpyTestObj extends SpyObject {
expect(s.b()).toEqual(2);
});
it('should create spys for all methods',
() => { expect(() => spyObj.someFunc()).not.toThrow(); });
it('should create spys for all methods', () => {
spyObj.spy('someFunc');
expect(() => spyObj.someFunc()).not.toThrow();
});
});
});
}