ci: update build to use TypeScript 2.3.2 (#16707)

This commit is contained in:
Chuck Jazdzewski 2017-05-16 13:29:38 -07:00 committed by Jason Aden
parent af99cf2a41
commit 9a7f5d580f
11 changed files with 31 additions and 19 deletions

View File

@ -5,5 +5,6 @@ vendor/
*/src/*.js
**/*.ngfactory.ts
**/*.ngsummary.json
**/*.ngsummary.ts
*/yarn*
*/.yarn_local_cache*

View File

@ -1,6 +1,6 @@
{
"name": "angular-srcs",
"version": "4.1.0",
"version": "4.2.0-beta.0",
"dependencies": {
"@types/angularjs": {
"version": "1.5.13-alpha",
@ -6279,8 +6279,7 @@
"dev": true
},
"typescript": {
"version": "2.1.5",
"dev": true
"version": "2.3.2"
},
"ua-parser-js": {
"version": "0.7.10",

13
npm-shrinkwrap.json generated
View File

@ -1,6 +1,6 @@
{
"name": "angular-srcs",
"version": "4.1.0",
"version": "4.2.0-beta.0",
"dependencies": {
"@types/angularjs": {
"version": "1.5.13-alpha",
@ -2741,7 +2741,7 @@
},
"canonical-path": {
"version": "0.0.2",
"from": "canonical-path@>=0.0.2 <0.0.3",
"from": "canonical-path@0.0.2",
"resolved": "https://registry.npmjs.org/canonical-path/-/canonical-path-0.0.2.tgz",
"dev": true
},
@ -3488,7 +3488,7 @@
},
"dgeni-packages": {
"version": "0.16.5",
"from": "dgeni-packages@>=0.16.0 <0.17.0",
"from": "dgeni-packages@>=0.16.5 <0.17.0",
"resolved": "https://registry.npmjs.org/dgeni-packages/-/dgeni-packages-0.16.5.tgz",
"dev": true,
"dependencies": {
@ -9183,10 +9183,9 @@
"dev": true
},
"typescript": {
"version": "2.1.5",
"from": "typescript@>=2.1.0 <2.2.0",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.1.5.tgz",
"dev": true
"version": "2.3.2",
"from": "typescript@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.2.tgz"
},
"ua-parser-js": {
"version": "0.7.10",

View File

@ -24,6 +24,7 @@
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.3",
"rxjs": "^5.0.1",
"typescript": "^2.3.2",
"zone.js": "^0.8.9"
},
"optionalDependencies": {

View File

@ -456,7 +456,7 @@ class _Visitor implements html.Visitor {
0);
if (significantChildren == 1) {
for (let i = this._messages.length - 1; i >= startIndex; i--) {
for (let i = this._messages.length - 1; i >= startIndex !; i--) {
const ast = this._messages[i].nodes;
if (!(ast.length == 1 && ast[0] instanceof i18n.Text)) {
this._messages.splice(i, 1);

View File

@ -669,7 +669,7 @@ class _DuplicateItemRecordList<V> {
get(trackById: any, afterIndex: number|null): IterableChangeRecord_<V>|null {
let record: IterableChangeRecord_<V>|null;
for (record = this._head; record !== null; record = record._nextDup) {
if ((afterIndex === null || afterIndex < record.currentIndex) &&
if ((afterIndex === null || afterIndex < record.currentIndex !) &&
looseIdentical(record.trackById, trackById)) {
return record;
}

View File

@ -10,7 +10,7 @@ import {Injector, RenderComponentType, RootRenderer, Sanitizer, SecurityContext,
import {ArgumentType, BindingFlags, NodeCheckFn, NodeDef, NodeFlags, OutputType, RootData, Services, ViewData, ViewDefinition, ViewFlags, ViewHandleEventFn, ViewState, ViewUpdateFn, anchorDef, asElementData, asProviderData, directiveDef, elementDef, rootRenderNodes, textDef, viewDef} from '@angular/core/src/view/index';
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
import {createRootView, isBrowser, removeNodes} from './helper';
import {createRootView, isBrowser, recordNodeToRemove} from './helper';
export function main() {
describe(`Component Views`, () => {
@ -56,7 +56,7 @@ export function main() {
beforeEach(() => {
rootNode = document.createElement('root');
document.body.appendChild(rootNode);
removeNodes.push(rootNode);
recordNodeToRemove(rootNode);
});
it('should select root elements based on a selector', () => {

View File

@ -12,7 +12,7 @@ import {ArgumentType, BindingFlags, DebugContext, NodeDef, NodeFlags, OutputType
import {TestBed} from '@angular/core/testing';
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
import {ARG_TYPE_VALUES, checkNodeInlineOrDynamic, createRootView, isBrowser, removeNodes} from './helper';
import {ARG_TYPE_VALUES, checkNodeInlineOrDynamic, createRootView, isBrowser, recordNodeToRemove} from './helper';
export function main() {
describe(`View Elements`, () => {
@ -182,7 +182,7 @@ export function main() {
// won't work in IE.
result.rootNodes.forEach((node) => {
document.body.appendChild(node);
removeNodes.push(node);
recordNodeToRemove(node);
});
return result;
}

View File

@ -41,6 +41,11 @@ export function createEmbeddedView(parent: ViewData, anchorDef: NodeDef, context
return Services.createEmbeddedView(parent, anchorDef, anchorDef.element !.template !, context);
}
export let removeNodes: Node[];
let removeNodes: Node[];
beforeEach(() => { removeNodes = []; });
afterEach(() => { removeNodes.forEach((node) => getDOM().remove(node)); });
export function recordNodeToRemove(node: Node) {
removeNodes.push(node);
}

View File

@ -334,7 +334,7 @@ export function main() {
it('should use FormData body and detect content type header to the request', () => {
const body = new FormData();
body.append('test1', 'val1');
body.append('test2', 123456);
body.append('test2', '123456');
const blob = createBlob(['body { color: red; }'], 'text/css');
body.append('userfile', blob);
const base = new BaseRequestOptions();

View File

@ -110,6 +110,13 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
return (fileName, p1, p2, p3) => tryCall(fileName, () => <T>(m.call(ls, fileName, p1, p2, p3)));
}
function tryFilenameFourCall<T, P1, P2, P3, P4>(
m: (fileName: string, p1: P1, p2: P2, p3: P3, p4: P4) =>
T): (fileName: string, p1: P1, p2: P2, p3: P3, p4: P4) => T {
return (fileName, p1, p2, p3, p4) =>
tryCall(fileName, () => <T>(m.call(ls, fileName, p1, p2, p3, p4)));
}
function typescriptOnly(ls: ts.LanguageService): ts.LanguageService {
return {
cleanupSemanticCache: () => ls.cleanupSemanticCache(),
@ -152,7 +159,7 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
getFormattingEditsAfterKeystroke: tryFilenameThreeCall(ls.getFormattingEditsAfterKeystroke),
getDocCommentTemplateAtPosition: tryFilenameOneCall(ls.getDocCommentTemplateAtPosition),
isValidBraceCompletionAtPosition: tryFilenameTwoCall(ls.isValidBraceCompletionAtPosition),
getCodeFixesAtPosition: tryFilenameThreeCall(ls.getCodeFixesAtPosition),
getCodeFixesAtPosition: tryFilenameFourCall(ls.getCodeFixesAtPosition),
getEmitOutput: tryFilenameCall(ls.getEmitOutput),
getProgram: () => ls.getProgram(),
dispose: () => ls.dispose()