Skip to content

Commit f5fe049

Browse files
authored
Merge pull request #114 from cloudnc/chore/upgrade-angular
feat(Upgrade angular to 16):
2 parents 0d29659 + 808bca2 commit f5fe049

13 files changed

Lines changed: 3364 additions & 3138 deletions

File tree

.betterer.results

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
// BETTERER RESULTS V1.
22
exports[`stricter compilation`] = {
3-
timestamp: 1619240872304,
3+
timestamp: 1705378026461,
44
value: `{
5-
"node_modules/@types/jasmine/index.d.ts:2472745569": [
6-
[669, 14, 16, "Interface \'FunctionMatchers<Fn>\' incorrectly extends interface \'Matchers<any>\'.\\n The types returned by \'toHaveBeenCalledWith(...)\' are incompatible between these types.\\n Type \'boolean\' is not assignable to type \'Promise<void>\'.", "2718731728"]
7-
],
85
"src/app/google-charts.service.ts:1308226900": [
96
[3, 29, 15, "Could not find a declaration file for module \'google-charts\'. \'./node_modules/google-charts/dist/googleCharts.js\' implicitly has an \'any\' type.\\n Try \`npm i --save-dev @types/google-charts\` if it exists or add a new declaration (.d.ts) file containing \`declare module \'google-charts\';\`", "2535818334"]
107
],
11-
"src/app/multiple-worker-pool/log-line/log-line.component.ts:1269916813": [
8+
"src/app/multiple-worker-pool/log-line/log-line.component.ts:1179533322": [
129
[10, 11, 7, "Property \'message\' has no initializer and is not definitely assigned in the constructor.", "1236122734"],
13-
[11, 11, 5, "Property \'files\' has no initializer and is not definitely assigned in the constructor.", "171232592"],
14-
[13, 9, 5, "Property \'color\' has no initializer and is not definitely assigned in the constructor.", "176948952"],
15-
[18, 44, 17, "Argument of type \'string | undefined\' is not assignable to parameter of type \'string\'.\\n Type \'undefined\' is not assignable to type \'string\'.", "463397358"]
10+
[13, 9, 5, "Property \'color\' has no initializer and is not definitely assigned in the constructor.", "176948952"]
1611
],
1712
"src/app/multiple-worker-pool/multiple-worker-pool.component.ts:816086637": [
1813
[90, 9, 14, "Type \'Observable<{ millisSinceLast: number | null; file?: string | undefined; timestamp: Date; message: string; thread: Thread; fileEventType: FileHashEvent | null; }[]>\' is not assignable to type \'Observable<HashWorkerMessage[]>\'.\\n Type \'{ millisSinceLast: number | null; file?: string | undefined; timestamp: Date; message: string; thread: Thread; fileEventType: FileHashEvent | null; }[]\' is not assignable to type \'HashWorkerMessage[]\'.\\n Type \'{ millisSinceLast: number | null; file?: string | undefined; timestamp: Date; message: string; thread: Thread; fileEventType: FileHashEvent | null; }\' is not assignable to type \'HashWorkerMessage\'.\\n Types of property \'millisSinceLast\' are incompatible.\\n Type \'number | null\' is not assignable to type \'number | undefined\'.\\n Type \'null\' is not assignable to type \'number | undefined\'.", "463576723"]

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
with:
3535
fail_ci_if_error: true # optional (default = false)
3636
directory: coverage
37+
token: ${{ secrets.CODECOV_TOKEN }}
3738
- name: Build
3839
run: yarn lib:build:prod
3940
- name: Incremental code quality checking

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ dist
33
node_modules
44
coverage
55
.history
6+
.angular

package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,30 +38,30 @@
3838
"lint": "ng lint"
3939
},
4040
"dependencies": {
41-
"@angular/animations": "^14.3.0",
42-
"@angular/common": "^14.3.0",
43-
"@angular/compiler": "^14.3.0",
44-
"@angular/core": "^14.3.0",
45-
"@angular/forms": "^14.3.0",
46-
"@angular/platform-browser": "^14.3.0",
47-
"@angular/platform-browser-dynamic": "^14.3.0",
48-
"@angular/router": "^14.3.0",
41+
"@angular/animations": "^16.2.12",
42+
"@angular/common": "^16.2.12",
43+
"@angular/compiler": "^16.2.12",
44+
"@angular/core": "^16.2.12",
45+
"@angular/forms": "^16.2.12",
46+
"@angular/platform-browser": "^16.2.12",
47+
"@angular/platform-browser-dynamic": "^16.2.12",
48+
"@angular/router": "^16.2.12",
4949
"google-charts": "2.0.0",
5050
"js-md5": "0.7.3",
5151
"rxjs": "~6.6.3",
5252
"tslib": "^2.3.1",
53-
"zone.js": "~0.11.4"
53+
"zone.js": "~0.13.3"
5454
},
5555
"devDependencies": {
56-
"@angular-devkit/build-angular": "^14.2.13",
57-
"@angular-eslint/builder": "^14.0.0",
58-
"@angular-eslint/eslint-plugin": "^14.0.0",
59-
"@angular-eslint/eslint-plugin-template": "^14.0.0",
60-
"@angular-eslint/schematics": "^14.0.0",
61-
"@angular-eslint/template-parser": "^14.0.0",
62-
"@angular/cli": "^14.2.13",
63-
"@angular/compiler-cli": "^14.3.0",
64-
"@angular/language-service": "^14.3.0",
56+
"@angular-devkit/build-angular": "^16.2.11",
57+
"@angular-eslint/builder": "^16.0.0",
58+
"@angular-eslint/eslint-plugin": "^16.0.0",
59+
"@angular-eslint/eslint-plugin-template": "^16.0.0",
60+
"@angular-eslint/schematics": "^16.0.0",
61+
"@angular-eslint/template-parser": "^16.0.0",
62+
"@angular/cli": "^16.2.11",
63+
"@angular/compiler-cli": "^16.2.12",
64+
"@angular/language-service": "^16.2.12",
6565
"@betterer/cli": "^1.1.3",
6666
"@betterer/typescript": "^1.1.2",
6767
"@types/google.visualization": "0.0.48",
@@ -76,18 +76,18 @@
7676
"cz-conventional-changelog": "2.1.0",
7777
"embedme": "1.6.0",
7878
"eslint": "^8.2.0",
79-
"jasmine-core": "~3.6.0",
79+
"jasmine-core": "~3.8.0",
8080
"jasmine-spec-reporter": "~5.0.0",
8181
"karma": "~6.3.11",
8282
"karma-chrome-launcher": "~3.1.0",
8383
"karma-coverage": "2.1.0",
8484
"karma-jasmine": "~4.0.0",
8585
"karma-jasmine-html-reporter": "^1.5.0",
86-
"ng-packagr": "14.2.2",
86+
"ng-packagr": "16.2.3",
8787
"prettier": "2.2.1",
8888
"semantic-release": "^17.2.3",
8989
"ts-node": "~7.0.0",
90-
"typescript": "~4.8.4"
90+
"typescript": "~5.1.6"
9191
},
9292
"repository": {
9393
"type": "git",

projects/observable-webworker/src/lib/from-worker-pool.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { Notification } from 'rxjs/internal/Notification';
44
import { reduce } from 'rxjs/operators';
55
import { fromWorkerPool } from './from-worker-pool';
66

7-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
8-
97
describe('fromWorkerPool', () => {
108
let stubbedWorkers: Worker[];
119

projects/observable-webworker/src/lib/from-worker.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { Observable, Observer, of, Subject } from 'rxjs';
22
import { Notification } from 'rxjs/internal/Notification';
33
import { fromWorker } from './from-worker';
44

5-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
6-
75
describe('fromWorker', () => {
86
let input$: Subject<number>;
97

projects/observable-webworker/src/test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@ import 'zone.js/testing';
55
import { getTestBed } from '@angular/core/testing';
66
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
77

8-
declare const require: any;
9-
108
// First, initialize the Angular testing environment.
119
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
1210
teardown: { destroyAfterEach: false },
1311
});
14-
// Then we find all the tests.
15-
const context = require.context('./', true, /\.spec\.ts$/);
16-
// And load the modules.
17-
context.keys().map(context);

projects/observable-webworker/tsconfig.lib.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"compilerOptions": {
44
"outDir": "../../out-tsc/lib",
55
"declarationMap": true,
6-
"target": "es2020",
76
"declaration": true,
87
"inlineSources": true,
98
"types": [],
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<span class="timestamp">{{ message.timestamp | date: 'HH:mm:ss.SSS' }}</span>
2-
<span class="timedelta" *ngIf="message.millisSinceLast !== null; else nodelta">
3-
+{{ message.millisSinceLast / 1000 | number: '1.3-3' }}s
4-
</span>
5-
<ng-template #nodelta><span class="timedelta"></span></ng-template>
6-
<span class="file" [style.background-color]="color">{{ message.file }}</span>
7-
<span class="thread {{ message.thread }}">[{{ message.thread }}]</span>
8-
<span class="message">{{ message.message }}</span>
1+
<ng-container *ngIf="message">
2+
<span class="timestamp">{{ message.timestamp | date: 'HH:mm:ss.SSS' }}</span>
3+
<span class="timedelta" *ngIf="message.millisSinceLast !== null; else nodelta">
4+
+{{ message.millisSinceLast / 1000 | number: '1.3-3' }}s
5+
</span>
6+
<ng-template #nodelta><span class="timedelta"></span></ng-template>
7+
<span class="file" [style.background-color]="color">{{ message.file }}</span>
8+
<span class="thread {{ message.thread }}">[{{ message.thread }}]</span>
9+
<span class="message">{{ message.message }}</span>
10+
</ng-container>

src/app/multiple-worker-pool/log-line/log-line.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export class LogLineComponent implements OnInit {
1616
constructor() {}
1717

1818
ngOnInit() {
19-
this.color = `hsl(${(this.files.indexOf(this.message.file) / this.files.length) * 360}, 70%, 60%)`;
19+
if (this.message?.file) {
20+
this.color = `hsl(${(this.files.indexOf(this.message.file) / this.files.length) * 360}, 70%, 60%)`;
21+
}
2022
}
2123
}

0 commit comments

Comments
 (0)