Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Upgrade angular to 16): #114

Merged
merged 5 commits into from
Jan 18, 2024
Merged
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
11 changes: 3 additions & 8 deletions .betterer.results
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
// BETTERER RESULTS V1.
exports[`stricter compilation`] = {
timestamp: 1619240872304,
timestamp: 1705378026461,
value: `{
"node_modules/@types/jasmine/index.d.ts:2472745569": [
[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"]
],
"src/app/google-charts.service.ts:1308226900": [
[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"]
],
"src/app/multiple-worker-pool/log-line/log-line.component.ts:1269916813": [
"src/app/multiple-worker-pool/log-line/log-line.component.ts:1179533322": [
[10, 11, 7, "Property \'message\' has no initializer and is not definitely assigned in the constructor.", "1236122734"],
[11, 11, 5, "Property \'files\' has no initializer and is not definitely assigned in the constructor.", "171232592"],
[13, 9, 5, "Property \'color\' has no initializer and is not definitely assigned in the constructor.", "176948952"],
[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"]
[13, 9, 5, "Property \'color\' has no initializer and is not definitely assigned in the constructor.", "176948952"]
],
"src/app/multiple-worker-pool/multiple-worker-pool.component.ts:816086637": [
[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"]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
with:
fail_ci_if_error: true # optional (default = false)
directory: coverage
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build
run: yarn lib:build:prod
- name: Incremental code quality checking
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist
node_modules
coverage
.history
.angular
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,30 @@
"lint": "ng lint"
},
"dependencies": {
"@angular/animations": "^14.3.0",
"@angular/common": "^14.3.0",
"@angular/compiler": "^14.3.0",
"@angular/core": "^14.3.0",
"@angular/forms": "^14.3.0",
"@angular/platform-browser": "^14.3.0",
"@angular/platform-browser-dynamic": "^14.3.0",
"@angular/router": "^14.3.0",
"@angular/animations": "^16.2.12",
"@angular/common": "^16.2.12",
"@angular/compiler": "^16.2.12",
"@angular/core": "^16.2.12",
"@angular/forms": "^16.2.12",
"@angular/platform-browser": "^16.2.12",
"@angular/platform-browser-dynamic": "^16.2.12",
"@angular/router": "^16.2.12",
"google-charts": "2.0.0",
"js-md5": "0.7.3",
"rxjs": "~6.6.3",
"tslib": "^2.3.1",
"zone.js": "~0.11.4"
"zone.js": "~0.13.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.13",
"@angular-eslint/builder": "^14.0.0",
"@angular-eslint/eslint-plugin": "^14.0.0",
"@angular-eslint/eslint-plugin-template": "^14.0.0",
"@angular-eslint/schematics": "^14.0.0",
"@angular-eslint/template-parser": "^14.0.0",
"@angular/cli": "^14.2.13",
"@angular/compiler-cli": "^14.3.0",
"@angular/language-service": "^14.3.0",
"@angular-devkit/build-angular": "^16.2.11",
"@angular-eslint/builder": "^16.0.0",
"@angular-eslint/eslint-plugin": "^16.0.0",
"@angular-eslint/eslint-plugin-template": "^16.0.0",
"@angular-eslint/schematics": "^16.0.0",
"@angular-eslint/template-parser": "^16.0.0",
"@angular/cli": "^16.2.11",
"@angular/compiler-cli": "^16.2.12",
"@angular/language-service": "^16.2.12",
"@betterer/cli": "^1.1.3",
"@betterer/typescript": "^1.1.2",
"@types/google.visualization": "0.0.48",
Expand All @@ -76,18 +76,18 @@
"cz-conventional-changelog": "2.1.0",
"embedme": "1.6.0",
"eslint": "^8.2.0",
"jasmine-core": "~3.6.0",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.11",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "14.2.2",
"ng-packagr": "16.2.3",
"prettier": "2.2.1",
"semantic-release": "^17.2.3",
"ts-node": "~7.0.0",
"typescript": "~4.8.4"
"typescript": "~5.1.6"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { Notification } from 'rxjs/internal/Notification';
import { reduce } from 'rxjs/operators';
import { fromWorkerPool } from './from-worker-pool';

/* eslint-disable @typescript-eslint/no-non-null-assertion */

describe('fromWorkerPool', () => {
let stubbedWorkers: Worker[];

Expand Down
2 changes: 0 additions & 2 deletions projects/observable-webworker/src/lib/from-worker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { Observable, Observer, of, Subject } from 'rxjs';
import { Notification } from 'rxjs/internal/Notification';
import { fromWorker } from './from-worker';

/* eslint-disable @typescript-eslint/no-non-null-assertion */

describe('fromWorker', () => {
let input$: Subject<number>;

Expand Down
6 changes: 0 additions & 6 deletions projects/observable-webworker/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
1 change: 0 additions & 1 deletion projects/observable-webworker/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"declarationMap": true,
"target": "es2020",
"declaration": true,
"inlineSources": true,
"types": [],
Expand Down
18 changes: 10 additions & 8 deletions src/app/multiple-worker-pool/log-line/log-line.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<span class="timestamp">{{ message.timestamp | date: 'HH:mm:ss.SSS' }}</span>
<span class="timedelta" *ngIf="message.millisSinceLast !== null; else nodelta">
+{{ message.millisSinceLast / 1000 | number: '1.3-3' }}s
</span>
<ng-template #nodelta><span class="timedelta"></span></ng-template>
<span class="file" [style.background-color]="color">{{ message.file }}</span>
<span class="thread {{ message.thread }}">[{{ message.thread }}]</span>
<span class="message">{{ message.message }}</span>
<ng-container *ngIf="message">
<span class="timestamp">{{ message.timestamp | date: 'HH:mm:ss.SSS' }}</span>
<span class="timedelta" *ngIf="message.millisSinceLast !== null; else nodelta">
+{{ message.millisSinceLast / 1000 | number: '1.3-3' }}s
</span>
<ng-template #nodelta><span class="timedelta"></span></ng-template>
<span class="file" [style.background-color]="color">{{ message.file }}</span>
<span class="thread {{ message.thread }}">[{{ message.thread }}]</span>
<span class="message">{{ message.message }}</span>
</ng-container>
4 changes: 3 additions & 1 deletion src/app/multiple-worker-pool/log-line/log-line.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export class LogLineComponent implements OnInit {
constructor() {}

ngOnInit() {
this.color = `hsl(${(this.files.indexOf(this.message.file) / this.files.length) * 360}, 70%, 60%)`;
if (this.message?.file) {
this.color = `hsl(${(this.files.indexOf(this.message.file) / this.files.length) * 360}, 70%, 60%)`;
}
}
}
6 changes: 0 additions & 6 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
"moduleResolution": "node",
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2020",
"target": "ES2022",
"typeRoots": ["node_modules/@types"],
"lib": ["es2018", "dom"],
"paths": {
"observable-webworker": ["dist/observable-webworker"],
"observable-webworker/*": ["dist/observable-webworker/*"]
}
},
"useDefineForClassFields": false
}
}
Loading
Loading