Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration/typings_test_ts27/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-integration",
"description": "Assert that users with TypeScript 2.6 can type-check an Angular application",
"description": "Assert that users with TypeScript 2.7 can type-check an Angular application",
"version": "0.0.0",
"license": "MIT",
"dependencies": {
Expand Down
47 changes: 47 additions & 0 deletions integration/typings_test_ts28/include-all.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import * as compiler from '@angular/compiler';
import * as compilerTesting from '@angular/compiler/testing';
import * as core from '@angular/core';
import * as coreTesting from '@angular/core/testing';
import * as forms from '@angular/forms';
import * as http from '@angular/http';
import * as httpTesting from '@angular/http/testing';
import * as platformBrowser from '@angular/platform-browser';
import * as platformBrowserTesting from '@angular/platform-browser/testing';
import * as platformBrowserDynamic from '@angular/platform-browser-dynamic';
import * as platformServer from '@angular/platform-server';
import * as platformServerTesting from '@angular/platform-server/testing';
import * as platformWebworker from '@angular/platform-webworker';
import * as platformWebworkerDynamic from '@angular/platform-webworker-dynamic';
import * as router from '@angular/router';
import * as routerTesting from '@angular/router/testing';
import * as serviceWorker from '@angular/service-worker';
import * as upgrade from '@angular/upgrade';

export default {
compiler,
compilerTesting,
core,
coreTesting,
forms,
http,
httpTesting,
platformBrowser,
platformBrowserTesting,
platformBrowserDynamic,
platformServer,
platformServerTesting,
platformWebworker,
platformWebworkerDynamic,
router,
routerTesting,
serviceWorker,
upgrade,
};
30 changes: 30 additions & 0 deletions integration/typings_test_ts28/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "angular-integration",
"description": "Assert that users with TypeScript 2.8 can type-check an Angular application",
"version": "0.0.0",
"license": "MIT",
"dependencies": {
"@angular/animations": "file:../../dist/packages-dist/animations",
"@angular/common": "file:../../dist/packages-dist/common",
"@angular/compiler": "file:../../dist/packages-dist/compiler",
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
"@angular/core": "file:../../dist/packages-dist/core",
"@angular/forms": "file:../../dist/packages-dist/forms",
"@angular/http": "file:../../dist/packages-dist/http",
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
"@angular/platform-webworker": "file:../../dist/packages-dist/platform-webworker",
"@angular/platform-webworker-dynamic": "file:../../dist/packages-dist/platform-webworker-dynamic",
"@angular/router": "file:../../dist/packages-dist/router",
"@angular/service-worker": "file:../../dist/packages-dist/service-worker",
"@angular/upgrade": "file:../../dist/packages-dist/upgrade",
"@types/jasmine": "2.5.41",
"rxjs": "file:../../node_modules/rxjs",
"typescript": "2.8.x",
"zone.js": "file:../../node_modules/zone.js"
},
"scripts": {
"test": "tsc"
}
}
24 changes: 24 additions & 0 deletions integration/typings_test_ts28/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": "../../dist/typings_test_ts28/",
"rootDir": ".",
"target": "es5",
"lib": [
"es5",
"dom",
"es2015.collection",
"es2015.iterable",
"es2015.promise"
],
"types": [],
"strictNullChecks": true
},
"files": [
"include-all.ts",
"node_modules/@types/jasmine/index.d.ts"
]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@
"source-map": "0.5.7",
"source-map-support": "0.4.18",
"systemjs": "0.18.10",
"tsickle": "^0.27.2",
"tsickle": "^0.28.0",
"tslint": "5.7.0",
"tslint-eslint-rules": "4.1.1",
"tsutils": "2.20.0",
"typescript": "2.7.x",
"typescript": "2.8.x",
"uglify-es": "^3.3.9",
"universal-analytics": "0.4.15",
"vlq": "0.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/bazel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"peerDependencies": {
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
"typescript": ">=2.7.2 <2.8"
"typescript": ">=2.7.2 <2.9"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"chokidar": "^1.4.2"
},
"peerDependencies": {
"typescript": ">=2.7.2 <2.8",
"typescript": ">=2.7.2 <2.9",
"@angular/compiler": "0.0.0-PLACEHOLDER"
},
"engines" : {
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler-cli/src/transformers/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const MIN_TS_VERSION = '2.7.2';
* ∀ supported typescript version v, v < MAX_TS_VERSION
* MAX_TS_VERSION is not considered as a supported TypeScript version
*/
const MAX_TS_VERSION = '2.8.0';
const MAX_TS_VERSION = '2.9.0';

class AngularCompilerProgram implements Program {
private rootNames: string[];
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/sanitization/html_sanitizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ class SanitizingHtmlSerializer {
const elAttrs = element.attributes;
for (let i = 0; i < elAttrs.length; i++) {
const elAttr = elAttrs.item(i);
const attrName = elAttr.name;
const attrName = elAttr !.name;
const lower = attrName.toLowerCase();
if (!VALID_ATTRS.hasOwnProperty(lower)) {
this.sanitizedSomething = true;
continue;
}
let value = elAttr.value;
let value = elAttr !.value;
// TODO(martinprobst): Special case image URIs for data:image/...
if (URI_ATTRS[lower]) value = _sanitizeUrl(value);
if (SRCSET_ATTRS[lower]) value = sanitizeSrcset(value);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/sanitization/inert_body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class InertBodyHelper {
// loop backwards so that we can support removals.
for (let i = elAttrs.length - 1; 0 < i; i--) {
const attrib = elAttrs.item(i);
const attrName = attrib.name;
const attrName = attrib !.name;
if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {
el.removeAttribute(attrName);
}
Expand Down
11 changes: 8 additions & 3 deletions packages/language-service/src/ts_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
}

function typescriptOnly(ls: ts.LanguageService): ts.LanguageService {
return {
const languageService: ts.LanguageService = {
cleanupSemanticCache: () => ls.cleanupSemanticCache(),
getSyntacticDiagnostics: tryFilenameCall(ls.getSyntacticDiagnostics),
getSemanticDiagnostics: tryFilenameCall(ls.getSemanticDiagnostics),
Expand Down Expand Up @@ -117,8 +117,13 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
getDefinitionAndBoundSpan: tryFilenameOneCall(ls.getDefinitionAndBoundSpan),
getCombinedCodeFix:
(scope: ts.CombinedCodeFixScope, fixId: {}, formatOptions: ts.FormatCodeSettings) =>
tryCall(undefined, () => ls.getCombinedCodeFix(scope, fixId, formatOptions))
};
tryCall(undefined, () => ls.getCombinedCodeFix(scope, fixId, formatOptions)),
// TODO(kyliau): dummy implementation to compile with ts 2.8, create real one
getSuggestionDiagnostics: (fileName: string) => [],
// TODO(kyliau): dummy implementation to compile with ts 2.8, create real one
organizeImports: (scope: ts.CombinedCodeFixScope, formatOptions: ts.FormatCodeSettings) => [],
} as ts.LanguageService;
return languageService;
}

oldLS = typescriptOnly(oldLS);
Expand Down
3 changes: 2 additions & 1 deletion packages/service-worker/worker/testing/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ export class MockCache {
headers: {},
} as DehydratedResponse;

resp.headers.forEach((value, name) => { dehydratedResp.headers[name] = value; });
resp.headers.forEach(
(value: string, name: string) => { dehydratedResp.headers[name] = value; });

dehydrated[url] = dehydratedResp;
});
Expand Down
2 changes: 1 addition & 1 deletion packages/upgrade/src/common/downgrade_component_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {ApplicationRef, ChangeDetectorRef, ComponentFactory, ComponentRef, Event
import * as angular from './angular1';
import {PropertyBinding} from './component_info';
import {$SCOPE} from './constants';
import {getAttributesAsArray, getComponentName, hookupNgModel, strictEquals} from './util';
import {getComponentName, hookupNgModel, strictEquals} from './util';

const INITIAL_VALUE = {
__UNINITIALIZED__: true
Expand Down
13 changes: 0 additions & 13 deletions packages/upgrade/src/common/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@ export function directiveNormalize(name: string): string {
.replace(DIRECTIVE_SPECIAL_CHARS_REGEXP, (_, letter) => letter.toUpperCase());
}

export function getAttributesAsArray(node: Node): [string, string][] {
const attributes = node.attributes;
let asArray: [string, string][] = undefined !;
if (attributes) {
let attrLen = attributes.length;
asArray = new Array(attrLen);
for (let i = 0; i < attrLen; i++) {
asArray[i] = [attributes[i].nodeName, attributes[i].nodeValue !];
}
}
return asArray || [];
}

export function getComponentName(component: Type<any>): string {
// Return the name of the component or the first line of its stringified version.
return (component as any).overriddenName || component.name || component.toString().split('\n')[0];
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5886,9 +5886,9 @@ trim-off-newlines@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"

tsickle@^0.27.2:
version "0.27.2"
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.27.2.tgz#f33d46d046f73dd5c155a37922e422816e878736"
tsickle@^0.28.0:
version "0.28.0"
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.28.0.tgz#6cd6fa004766c6ad9261b599c83866ee97cc7875"
dependencies:
minimist "^1.2.0"
mkdirp "^0.5.1"
Expand Down Expand Up @@ -5989,9 +5989,9 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"

typescript@2.7.x:
version "2.7.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.2.tgz#2d615a1ef4aee4f574425cdff7026edf81919836"
typescript@2.8.x:
version "2.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.3.tgz#5d817f9b6f31bb871835f4edf0089f21abe6c170"

typescript@~2.6.2:
version "2.6.2"
Expand Down