Skip to content

Commit

Permalink
build: update to TypeScript 4.6 (#2582)
Browse files Browse the repository at this point in the history
* build: update to TypeScript 4.6

Closes #2544

* build: update version to 13.1.0

Bumps up the version to 13.1.0-rc.0 so the tooling can pick it up.
  • Loading branch information
alan-agius4 committed Mar 17, 2022
1 parent 5219c4d commit 891cbbd
Show file tree
Hide file tree
Showing 5 changed files with 1,569 additions and 264 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ interface TransferHttpResponse {
export class TransferHttpCacheInterceptor implements HttpInterceptor {
private isCacheActive = true;

private makeCacheKey(method: string, url: string, params: HttpParams): StateKey<string> {
private makeCacheKey(
method: string,
url: string,
params: HttpParams,
): StateKey<TransferHttpResponse> {
// make the params encoded same as a url so it's easy to identify
const encodedParams = params
.keys()
Expand Down Expand Up @@ -66,7 +70,7 @@ export class TransferHttpCacheInterceptor implements HttpInterceptor {

if (this.transferState.hasKey(storeKey)) {
// Request found in cache. Respond using it.
const response = this.transferState.get<TransferHttpResponse>(storeKey, {});
const response = this.transferState.get(storeKey, {});

return of(
new HttpResponse<any>({
Expand Down
10 changes: 7 additions & 3 deletions modules/common/src/transfer_http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ export class TransferHttpCacheInterceptor implements HttpInterceptor {
);
}

private makeCacheKey(method: string, url: string, params: HttpParams): StateKey<string> {
private makeCacheKey(
method: string,
url: string,
params: HttpParams,
): StateKey<TransferHttpResponse> {
// make the params encoded same as a url so it's easy to identify
const encodedParams = params
.keys()
Expand All @@ -65,7 +69,7 @@ export class TransferHttpCacheInterceptor implements HttpInterceptor {
.join('&');
const key = (method === 'GET' ? 'G.' : 'H.') + url + '?' + encodedParams;

return makeStateKey<TransferHttpResponse>(key);
return makeStateKey(key);
}

constructor(appRef: ApplicationRef, private transferState: TransferState) {
Expand Down Expand Up @@ -97,7 +101,7 @@ export class TransferHttpCacheInterceptor implements HttpInterceptor {

if (this.transferState.hasKey(storeKey)) {
// Request found in cache. Respond using it.
const response = this.transferState.get<TransferHttpResponse>(storeKey, {});
const response = this.transferState.get(storeKey, {});

return observableOf(
new HttpResponse<any>({
Expand Down
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nguniversal",
"main": "index.js",
"version": "13.0.2",
"version": "13.1.0-rc.0",
"private": true,
"description": "Universal (isomorphic) JavaScript support for Angular",
"homepage": "https://github.com/angular/universal",
Expand Down Expand Up @@ -36,23 +36,23 @@
"@types/node": "12.12.37"
},
"devDependencies": {
"@angular-devkit/architect": "0.1301.3",
"@angular-devkit/build-angular": "13.1.3",
"@angular-devkit/core": "13.1.3",
"@angular-devkit/schematics": "13.1.3",
"@angular/animations": "13.1.2",
"@angular/bazel": "13.1.2",
"@angular/cli": "13.1.3",
"@angular/common": "13.1.2",
"@angular/compiler": "13.1.2",
"@angular/compiler-cli": "13.1.2",
"@angular/core": "13.1.2",
"@angular-devkit/architect": "0.1303.0",
"@angular-devkit/build-angular": "13.3.0",
"@angular-devkit/core": "13.3.0",
"@angular-devkit/schematics": "13.3.0",
"@angular/animations": "13.3.0",
"@angular/bazel": "13.3.0",
"@angular/cli": "13.3.0",
"@angular/common": "13.3.0",
"@angular/compiler": "13.3.0",
"@angular/compiler-cli": "13.3.0",
"@angular/core": "13.3.0",
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#002770be8f5bf15c02293da454193bb0846969c1",
"@angular/platform-browser": "13.1.2",
"@angular/platform-browser-dynamic": "13.1.2",
"@angular/platform-server": "13.1.2",
"@angular/router": "13.1.2",
"@angular/service-worker": "13.1.2",
"@angular/platform-browser": "13.3.0",
"@angular/platform-browser-dynamic": "13.3.0",
"@angular/platform-server": "13.3.0",
"@angular/router": "13.3.0",
"@angular/service-worker": "13.3.0",
"@bazel/bazelisk": "1.11.0",
"@bazel/buildifier": "4.2.4",
"@bazel/esbuild": "4.4.6",
Expand All @@ -62,7 +62,7 @@
"@hapi/hapi": "^18.4.0",
"@rollup/plugin-commonjs": "^21.0.0",
"@rollup/plugin-node-resolve": "^13.0.5",
"@schematics/angular": "13.1.3",
"@schematics/angular": "13.3.0",
"@types/browser-sync": "^2.26.1",
"@types/express": "~4.17.6",
"@types/fs-extra": "^9.0.0",
Expand Down Expand Up @@ -104,7 +104,7 @@
"ts-node": "10.4.0",
"tslib": "~2.3.0",
"tsutils": "^3.0.0",
"typescript": "~4.5.4",
"typescript": "~4.6.2",
"xhr2": "^0.2.0",
"zone.js": "^0.11.0"
}
Expand Down
8 changes: 4 additions & 4 deletions tools/defaults.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ def ts_library(
**kwargs
)

NG_VERSION = "^13.1.0"
NG_VERSION = "^13.3.0"
RXJS_VERSION = "^6.5.5"
HAPI_VERSION = "^18.4.0"
EXPRESS_VERSION = "^4.15.2"
EXPRESS_TYPES_VERSION = "^4.17.0"
DEVKIT_CORE_VERSION = "^13.1.0"
DEVKIT_ARCHITECT_VERSION = "^0.1301.0"
DEVKIT_BUILD_ANGULAR_VERSION = "^13.1.0"
DEVKIT_CORE_VERSION = "^13.3.0"
DEVKIT_ARCHITECT_VERSION = "^0.1303.0"
DEVKIT_BUILD_ANGULAR_VERSION = "^13.3.0"
TSLIB_VERSION = "^2.3.0"

NGUNIVERSAL_SCOPED_PACKAGES = ["@nguniversal/%s" % p for p in [
Expand Down

0 comments on commit 891cbbd

Please sign in to comment.