Skip to content

Commit

Permalink
build(docs-infra): update Angular framework to version 12.2.8
Browse files Browse the repository at this point in the history
This commit updates angular.io to the latest stable version of the
Angular framework (v12.2.8). Among other benefits, this version also
includes the ServiceWorker fix from angular#43518, which fixes angular#28114.

NOTE:
This commit also makes the necessary changes to more closely align
angular.io with new apps created with the latest stable Angular CLI.

Fixes angular#28114
  • Loading branch information
gkalpak committed Oct 2, 2021
1 parent c1e72ab commit 650aaee
Show file tree
Hide file tree
Showing 3 changed files with 716 additions and 475 deletions.
32 changes: 16 additions & 16 deletions aio/package.json
Expand Up @@ -87,32 +87,32 @@
},
"private": true,
"dependencies": {
"@angular/animations": "12.1.1",
"@angular/animations": "12.2.8",
"@angular/cdk": "12.1.1",
"@angular/common": "12.1.1",
"@angular/compiler": "12.1.1",
"@angular/core": "12.1.1",
"@angular/elements": "12.1.1",
"@angular/forms": "12.1.1",
"@angular/common": "12.2.8",
"@angular/compiler": "12.2.8",
"@angular/core": "12.2.8",
"@angular/elements": "12.2.8",
"@angular/forms": "12.2.8",
"@angular/material": "12.1.1",
"@angular/platform-browser": "12.1.1",
"@angular/platform-browser-dynamic": "12.1.1",
"@angular/router": "12.1.1",
"@angular/service-worker": "12.1.1",
"@angular/platform-browser": "12.2.8",
"@angular/platform-browser-dynamic": "12.2.8",
"@angular/router": "12.2.8",
"@angular/service-worker": "12.2.8",
"@webcomponents/custom-elements": "1.4.3",
"rxjs": "^6.6.7",
"safevalues": "^0.1.8",
"tslib": "^2.2.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "12.1.1",
"@angular-devkit/build-angular": "12.2.8",
"@angular-eslint/builder": "12.2.2",
"@angular-eslint/eslint-plugin": "12.2.2",
"@angular-eslint/eslint-plugin-template": "12.2.2",
"@angular-eslint/template-parser": "12.2.2",
"@angular/cli": "12.1.1",
"@angular/compiler-cli": "12.1.1",
"@angular/cli": "12.2.8",
"@angular/compiler-cli": "12.2.8",
"@swc/cli": "^0.1.36",
"@swc/core": "^1.2.51",
"@types/jasmine": "~3.8.0",
Expand Down Expand Up @@ -160,7 +160,7 @@
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-jasmine-html-reporter": "~1.7.0",
"light-server": "^2.9.1",
"lighthouse": "^8.1.0",
"lighthouse-logger": "^1.2.0",
Expand All @@ -181,7 +181,7 @@
"ts-node": "^10.0.0",
"tsec": "^0.1.5",
"tslint": "~6.1.3",
"typescript": "~4.3.4",
"typescript": "~4.3.5",
"uglify-js": "^3.13.3",
"unist-util-filter": "^2.0.3",
"unist-util-source": "^3.0.0",
Expand Down
19 changes: 13 additions & 6 deletions aio/src/test.ts
Expand Up @@ -3,24 +3,31 @@
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

// Needed for `assert` polyfill uses `process`.
// See: https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/assert/assertion_error.js#L138
// The `assert` polyfill is needed because of `timezone-mock` which is a Node.JS library but in being used in Browser.
(globalThis as any).process = {
env: {},
env: {},
};

declare const require: any;
declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
{ teardown: { destroyAfterEach: true }},
);

// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
Expand Down

0 comments on commit 650aaee

Please sign in to comment.