ci: update build to use TypeScript 2.3.2 (#16707)
This commit is contained in:
parent
af99cf2a41
commit
9a7f5d580f
|
@ -5,5 +5,6 @@ vendor/
|
||||||
*/src/*.js
|
*/src/*.js
|
||||||
**/*.ngfactory.ts
|
**/*.ngfactory.ts
|
||||||
**/*.ngsummary.json
|
**/*.ngsummary.json
|
||||||
|
**/*.ngsummary.ts
|
||||||
*/yarn*
|
*/yarn*
|
||||||
*/.yarn_local_cache*
|
*/.yarn_local_cache*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "angular-srcs",
|
"name": "angular-srcs",
|
||||||
"version": "4.1.0",
|
"version": "4.2.0-beta.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/angularjs": {
|
"@types/angularjs": {
|
||||||
"version": "1.5.13-alpha",
|
"version": "1.5.13-alpha",
|
||||||
|
@ -6279,8 +6279,7 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "2.1.5",
|
"version": "2.3.2"
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"ua-parser-js": {
|
"ua-parser-js": {
|
||||||
"version": "0.7.10",
|
"version": "0.7.10",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "angular-srcs",
|
"name": "angular-srcs",
|
||||||
"version": "4.1.0",
|
"version": "4.2.0-beta.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/angularjs": {
|
"@types/angularjs": {
|
||||||
"version": "1.5.13-alpha",
|
"version": "1.5.13-alpha",
|
||||||
|
@ -2741,7 +2741,7 @@
|
||||||
},
|
},
|
||||||
"canonical-path": {
|
"canonical-path": {
|
||||||
"version": "0.0.2",
|
"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",
|
"resolved": "https://registry.npmjs.org/canonical-path/-/canonical-path-0.0.2.tgz",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
@ -3488,7 +3488,7 @@
|
||||||
},
|
},
|
||||||
"dgeni-packages": {
|
"dgeni-packages": {
|
||||||
"version": "0.16.5",
|
"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",
|
"resolved": "https://registry.npmjs.org/dgeni-packages/-/dgeni-packages-0.16.5.tgz",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -9183,10 +9183,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "2.1.5",
|
"version": "2.3.2",
|
||||||
"from": "typescript@>=2.1.0 <2.2.0",
|
"from": "typescript@>=2.3.0 <2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.2.tgz"
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"ua-parser-js": {
|
"ua-parser-js": {
|
||||||
"version": "0.7.10",
|
"version": "0.7.10",
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
"core-js": "^2.4.1",
|
"core-js": "^2.4.1",
|
||||||
"reflect-metadata": "^0.1.3",
|
"reflect-metadata": "^0.1.3",
|
||||||
"rxjs": "^5.0.1",
|
"rxjs": "^5.0.1",
|
||||||
|
"typescript": "^2.3.2",
|
||||||
"zone.js": "^0.8.9"
|
"zone.js": "^0.8.9"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
|
|
@ -456,7 +456,7 @@ class _Visitor implements html.Visitor {
|
||||||
0);
|
0);
|
||||||
|
|
||||||
if (significantChildren == 1) {
|
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;
|
const ast = this._messages[i].nodes;
|
||||||
if (!(ast.length == 1 && ast[0] instanceof i18n.Text)) {
|
if (!(ast.length == 1 && ast[0] instanceof i18n.Text)) {
|
||||||
this._messages.splice(i, 1);
|
this._messages.splice(i, 1);
|
||||||
|
|
|
@ -669,7 +669,7 @@ class _DuplicateItemRecordList<V> {
|
||||||
get(trackById: any, afterIndex: number|null): IterableChangeRecord_<V>|null {
|
get(trackById: any, afterIndex: number|null): IterableChangeRecord_<V>|null {
|
||||||
let record: IterableChangeRecord_<V>|null;
|
let record: IterableChangeRecord_<V>|null;
|
||||||
for (record = this._head; record !== null; record = record._nextDup) {
|
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)) {
|
looseIdentical(record.trackById, trackById)) {
|
||||||
return record;
|
return record;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {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 {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||||
|
|
||||||
import {createRootView, isBrowser, removeNodes} from './helper';
|
import {createRootView, isBrowser, recordNodeToRemove} from './helper';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe(`Component Views`, () => {
|
describe(`Component Views`, () => {
|
||||||
|
@ -56,7 +56,7 @@ export function main() {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
rootNode = document.createElement('root');
|
rootNode = document.createElement('root');
|
||||||
document.body.appendChild(rootNode);
|
document.body.appendChild(rootNode);
|
||||||
removeNodes.push(rootNode);
|
recordNodeToRemove(rootNode);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should select root elements based on a selector', () => {
|
it('should select root elements based on a selector', () => {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import {ArgumentType, BindingFlags, DebugContext, NodeDef, NodeFlags, OutputType
|
||||||
import {TestBed} from '@angular/core/testing';
|
import {TestBed} from '@angular/core/testing';
|
||||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
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() {
|
export function main() {
|
||||||
describe(`View Elements`, () => {
|
describe(`View Elements`, () => {
|
||||||
|
@ -182,7 +182,7 @@ export function main() {
|
||||||
// won't work in IE.
|
// won't work in IE.
|
||||||
result.rootNodes.forEach((node) => {
|
result.rootNodes.forEach((node) => {
|
||||||
document.body.appendChild(node);
|
document.body.appendChild(node);
|
||||||
removeNodes.push(node);
|
recordNodeToRemove(node);
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,11 @@ export function createEmbeddedView(parent: ViewData, anchorDef: NodeDef, context
|
||||||
return Services.createEmbeddedView(parent, anchorDef, anchorDef.element !.template !, context);
|
return Services.createEmbeddedView(parent, anchorDef, anchorDef.element !.template !, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
export let removeNodes: Node[];
|
let removeNodes: Node[];
|
||||||
|
|
||||||
beforeEach(() => { removeNodes = []; });
|
beforeEach(() => { removeNodes = []; });
|
||||||
afterEach(() => { removeNodes.forEach((node) => getDOM().remove(node)); });
|
afterEach(() => { removeNodes.forEach((node) => getDOM().remove(node)); });
|
||||||
|
|
||||||
|
export function recordNodeToRemove(node: Node) {
|
||||||
|
removeNodes.push(node);
|
||||||
|
}
|
|
@ -334,7 +334,7 @@ export function main() {
|
||||||
it('should use FormData body and detect content type header to the request', () => {
|
it('should use FormData body and detect content type header to the request', () => {
|
||||||
const body = new FormData();
|
const body = new FormData();
|
||||||
body.append('test1', 'val1');
|
body.append('test1', 'val1');
|
||||||
body.append('test2', 123456);
|
body.append('test2', '123456');
|
||||||
const blob = createBlob(['body { color: red; }'], 'text/css');
|
const blob = createBlob(['body { color: red; }'], 'text/css');
|
||||||
body.append('userfile', blob);
|
body.append('userfile', blob);
|
||||||
const base = new BaseRequestOptions();
|
const base = new BaseRequestOptions();
|
||||||
|
|
|
@ -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)));
|
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 {
|
function typescriptOnly(ls: ts.LanguageService): ts.LanguageService {
|
||||||
return {
|
return {
|
||||||
cleanupSemanticCache: () => ls.cleanupSemanticCache(),
|
cleanupSemanticCache: () => ls.cleanupSemanticCache(),
|
||||||
|
@ -152,7 +159,7 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
|
||||||
getFormattingEditsAfterKeystroke: tryFilenameThreeCall(ls.getFormattingEditsAfterKeystroke),
|
getFormattingEditsAfterKeystroke: tryFilenameThreeCall(ls.getFormattingEditsAfterKeystroke),
|
||||||
getDocCommentTemplateAtPosition: tryFilenameOneCall(ls.getDocCommentTemplateAtPosition),
|
getDocCommentTemplateAtPosition: tryFilenameOneCall(ls.getDocCommentTemplateAtPosition),
|
||||||
isValidBraceCompletionAtPosition: tryFilenameTwoCall(ls.isValidBraceCompletionAtPosition),
|
isValidBraceCompletionAtPosition: tryFilenameTwoCall(ls.isValidBraceCompletionAtPosition),
|
||||||
getCodeFixesAtPosition: tryFilenameThreeCall(ls.getCodeFixesAtPosition),
|
getCodeFixesAtPosition: tryFilenameFourCall(ls.getCodeFixesAtPosition),
|
||||||
getEmitOutput: tryFilenameCall(ls.getEmitOutput),
|
getEmitOutput: tryFilenameCall(ls.getEmitOutput),
|
||||||
getProgram: () => ls.getProgram(),
|
getProgram: () => ls.getProgram(),
|
||||||
dispose: () => ls.dispose()
|
dispose: () => ls.dispose()
|
||||||
|
|
Loading…
Reference in New Issue