Upgrade Angular to 9 (#151)

* Upgrade Angular to 8

* Upgrade Angular to 9

* Fix format

* Add ordered-imports tslint rule

* Upgrade Angular CDK to 9.2.4
This commit is contained in:
Oscar Hinton 2020-08-17 18:14:40 +02:00 committed by GitHub
parent 7bf00b4fb3
commit 8fe78916e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 78 additions and 86 deletions

107
package-lock.json generated
View File

@ -5,85 +5,52 @@
"requires": true,
"dependencies": {
"@angular/animations": {
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/@angular/animations/-/animations-7.2.1.tgz",
"integrity": "sha512-2AHc4HYz2cUVW3E0oYOTyUzBTnPJdtmVOx/Uo6+jnRqikvOGFOc5VXzFIYODe1Iiy+EYcSZ1lvQqwUbpZd6gwA==",
"requires": {
"tslib": "^1.9.0"
}
"version": "9.1.12",
"resolved": "https://registry.npmjs.org/@angular/animations/-/animations-9.1.12.tgz",
"integrity": "sha512-tphpf9QHnOPoL2Jl7KpR+R5aHNW3oifLEmRUTajJYJGvo1uzdUDE82+V9OGOinxJsYseCth9gYJhN24aYTB9NA=="
},
"@angular/cdk": {
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-7.2.1.tgz",
"integrity": "sha512-oU1Pjq3JkDtkXquLxWK84A2jOCeYRf352dVGbQCxWoSOQ5KBtMAd42huGidPiOSHN6/f7xZwL3n4fq3fVIut8A==",
"version": "9.2.4",
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-9.2.4.tgz",
"integrity": "sha512-iw2+qHMXHYVC6K/fttHeNHIieSKiTEodVutZoOEcBu9rmRTGbLB26V/CRsfIRmA1RBk+uFYWc6UQZnMC3RdnJQ==",
"requires": {
"parse5": "^5.0.0",
"tslib": "^1.7.1"
"parse5": "^5.0.0"
}
},
"@angular/common": {
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/@angular/common/-/common-7.2.1.tgz",
"integrity": "sha512-lYf3MeVMz69EriS5ANFY5PerJK0i4xHp/Jy67reb8ydZ+sfW320PUMuFtx3bZvk9PD7NdL3QZvXmla/ogrltTQ==",
"requires": {
"tslib": "^1.9.0"
}
"version": "9.1.12",
"resolved": "https://registry.npmjs.org/@angular/common/-/common-9.1.12.tgz",
"integrity": "sha512-XSIqkbM6VV1yixF9zuzeE5eqN1VsiXS517K2VU0XgCRSAzhVhLOeKsdYjeLf7PdSu/HgW/Tr81H+isi9A9I0YA=="
},
"@angular/compiler": {
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-7.2.1.tgz",
"integrity": "sha512-wf9w882hNoRaTDRqkEvQxV7nGB3liTX/LWEMunmm/Yz0nWkvgErR9pIHv3Sm4Ox0hyG3GdMpcVBzQ8qPomGOag==",
"requires": {
"tslib": "^1.9.0"
}
"version": "9.1.12",
"resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-9.1.12.tgz",
"integrity": "sha512-suefk0OFkaJpUUKnV+phbL4T8fmVGHvzkereY5eqybQlumOez8NPL1PJcygAylh/E6OIAYm8SWookYwM6ZY9dg=="
},
"@angular/core": {
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/@angular/core/-/core-7.2.1.tgz",
"integrity": "sha512-FYNAf4chxBoIVGCW2+fwR2MB2Ur5v1aG9L6zCcMXlZLbR64bu5j2m4e70RhXk/VptKvYWJ45od3xE5KfcaeEig==",
"requires": {
"tslib": "^1.9.0"
}
"version": "9.1.12",
"resolved": "https://registry.npmjs.org/@angular/core/-/core-9.1.12.tgz",
"integrity": "sha512-WVA/eh3fzjx0apOzkKot4YRRUsGkHj50zFQWrAOMgivGaj1YVrvhf+m3hpglj5fn/BkLiFDl8RT0wAE8z9X+gQ=="
},
"@angular/forms": {
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/@angular/forms/-/forms-7.2.1.tgz",
"integrity": "sha512-MxinNUvl02UfpY9gJtbTU6Mdt9fjIJYOGskcpwm+5u9jiMeRvOnG94ySoNrygg3EWwScX+P0mM4KN6fJWau7gQ==",
"requires": {
"tslib": "^1.9.0"
}
"version": "9.1.12",
"resolved": "https://registry.npmjs.org/@angular/forms/-/forms-9.1.12.tgz",
"integrity": "sha512-LhjnZlC4WEsEsAJfOZLte+Lks3WBAFVeRv2lzoQNFVr/IMzBNDVfjEaaSqKF1cei3cjY39Df2nYDMJM7HfqbJA=="
},
"@angular/platform-browser": {
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-7.2.1.tgz",
"integrity": "sha512-/6uHdFLmRkrkeOo+TzScrLG2YydG8kBNyT6ZpSOBf+bmB5DHyIGd55gh/tQJteKrnyadxRhqWCLBTYAbVX9Pnw==",
"requires": {
"tslib": "^1.9.0"
}
"version": "9.1.12",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-9.1.12.tgz",
"integrity": "sha512-rPa/hJcLfdId6bYB0b6pFUo3QIgjZlvUlmtKMGdrLNLYR8XQxPa2Y/UdN/5YeZ12htGw6GXrX9U8U7nTbUSpkw=="
},
"@angular/platform-browser-dynamic": {
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-7.2.1.tgz",
"integrity": "sha512-hrSkI7aESEkqYnu628Z/LvYNlUNMqIqkXYAkT3urxFdCw7UwNeZKrDmd9sRwK3gK3sC1VeD9pXtqaKmGsnBjOA==",
"requires": {
"tslib": "^1.9.0"
}
"version": "9.1.12",
"resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-9.1.12.tgz",
"integrity": "sha512-NmwUZaQeMnA6f+vP9Fp9P+qjL72H8dKlxLS76ujlKHVf75pP5oahWS8wfl7KXel1tKW3FQWMMffmKf5/NHRiSw=="
},
"@angular/router": {
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/@angular/router/-/router-7.2.1.tgz",
"integrity": "sha512-3qMZnhFr6xx3dMy14rKwIw9ISTOZlsp9jAkthXVsfA2/thffScXHPBrH4SipkySLmOAtPmF5m5jscy8mx/1mJQ==",
"requires": {
"tslib": "^1.9.0"
}
},
"@angular/upgrade": {
"version": "7.2.1",
"resolved": "https://registry.npmjs.org/@angular/upgrade/-/upgrade-7.2.1.tgz",
"integrity": "sha512-2y41RbGt1MCEEGjeEpS32hL2sCAI39/BtqPq9L2yGfKdehVTavsh86Fpy8KHhLqgM9WxcisLqpwqj3IjXXkGBg==",
"requires": {
"tslib": "^1.9.0"
}
"version": "9.1.12",
"resolved": "https://registry.npmjs.org/@angular/router/-/router-9.1.12.tgz",
"integrity": "sha512-+qCaXa9y0nsRhzjAYBqmGoQ2YkrdXgftZwuFDf6t4qEi30EXa0oS97KrlFq0M5GKdLIDGrbUm9PcdHSTOI+ZhA=="
},
"@babel/code-frame": {
"version": "7.0.0",
@ -7209,9 +7176,9 @@
"dev": true
},
"rxjs": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz",
"integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==",
"version": "6.6.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz",
"integrity": "sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==",
"requires": {
"tslib": "^1.9.0"
}
@ -8236,9 +8203,9 @@
}
},
"typescript": {
"version": "3.6.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.5.tgz",
"integrity": "sha512-BEjlc0Z06ORZKbtcxGrIvvwYs5hAnuo6TKdNFL55frVDlB+na3z5bsLhFaIxmT+dPWgBIjMo6aNnTOgHHmHgiQ==",
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz",
"integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==",
"dev": true
},
"uglify-js": {
@ -8766,9 +8733,9 @@
"dev": true
},
"zone.js": {
"version": "0.8.28",
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.28.tgz",
"integrity": "sha512-MjwlvV0wr65IQiT0WSHedo/zUhAqtypMdTUjqroV81RohGj1XANwHuC37dwYxphTRbZBYidk0gNS0dQrU2Q3Pw=="
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.9.1.tgz",
"integrity": "sha512-GkPiJL8jifSrKReKaTZ5jkhrMEgXbXYC+IPo1iquBjayRa0q86w3Dipjn8b415jpitMExe9lV8iTsv8tk3DGag=="
},
"zxcvbn": {
"version": "4.4.2",

View File

@ -59,19 +59,18 @@
"rimraf": "^2.6.2",
"tslint": "^6.1.3",
"typemoq": "^2.1.0",
"typescript": "3.6.5"
"typescript": "3.8.3"
},
"dependencies": {
"@angular/animations": "7.2.1",
"@angular/cdk": "7.2.1",
"@angular/common": "7.2.1",
"@angular/compiler": "7.2.1",
"@angular/core": "7.2.1",
"@angular/forms": "7.2.1",
"@angular/platform-browser": "7.2.1",
"@angular/platform-browser-dynamic": "7.2.1",
"@angular/router": "7.2.1",
"@angular/upgrade": "7.2.1",
"@angular/animations": "9.1.12",
"@angular/cdk": "9.2.4",
"@angular/common": "9.1.12",
"@angular/compiler": "9.1.12",
"@angular/core": "9.1.12",
"@angular/forms": "9.1.12",
"@angular/platform-browser": "9.1.12",
"@angular/platform-browser-dynamic": "9.1.12",
"@angular/router": "9.1.12",
"@microsoft/signalr": "3.1.0",
"@microsoft/signalr-protocol-msgpack": "3.1.0",
"@nodert-win10-rs4/windows.security.credentials.ui": "^0.4.4",
@ -95,9 +94,9 @@
"node-forge": "0.7.6",
"open": "7.1.0",
"papaparse": "4.6.0",
"rxjs": "6.3.3",
"rxjs": "6.6.2",
"tldjs": "2.3.1",
"zone.js": "0.8.28",
"zone.js": "0.9.1",
"zxcvbn": "4.4.2"
}
}

View File

@ -3,6 +3,7 @@ import {
moveItemInArray,
} from '@angular/cdk/drag-drop';
import {
Directive,
EventEmitter,
Input,
OnInit,
@ -41,6 +42,7 @@ import { SecureNoteView } from '../../models/view/secureNoteView';
import { Utils } from '../../misc/utils';
@Directive()
export class AddEditComponent implements OnInit {
@Input() cloneMode: boolean = false;
@Input() folderId: string = null;

View File

@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
OnInit,
@ -16,6 +17,7 @@ import { Cipher } from '../../models/domain/cipher';
import { AttachmentView } from '../../models/view/attachmentView';
import { CipherView } from '../../models/view/cipherView';
@Directive()
export class AttachmentsComponent implements OnInit {
@Input() cipherId: string;
@Output() onUploadedAttachment = new EventEmitter();

View File

@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
Output,
@ -8,6 +9,7 @@ import { SearchService } from '../../abstractions/search.service';
import { CipherView } from '../../models/view/cipherView';
@Directive()
export class CiphersComponent {
@Input() activeCipherId: string = null;
@Output() onCipherClicked = new EventEmitter<CipherView>();

View File

@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
OnInit,
@ -15,6 +16,7 @@ import { CollectionView } from '../../models/view/collectionView';
import { Cipher } from '../../models/domain/cipher';
@Directive()
export class CollectionsComponent implements OnInit {
@Input() cipherId: string;
@Input() allowSelectNone = false;

View File

@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Output,
} from '@angular/core';
@ -7,6 +8,7 @@ import { EnvironmentService } from '../../abstractions/environment.service';
import { I18nService } from '../../abstractions/i18n.service';
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
@Directive()
export class EnvironmentComponent {
@Output() onSaved = new EventEmitter();

View File

@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Output,
} from '@angular/core';
@ -10,6 +11,7 @@ import { I18nService } from '../../abstractions/i18n.service';
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
import { EventType } from '../../enums/eventType';
@Directive()
export class ExportComponent {
@Output() onSaved = new EventEmitter();

View File

@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
OnInit,
@ -11,6 +12,7 @@ import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
import { FolderView } from '../../models/view/folderView';
@Directive()
export class FolderAddEditComponent implements OnInit {
@Input() folderId: string;
@Output() onSavedFolder = new EventEmitter<FolderView>();

View File

@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
Output,
@ -18,6 +19,7 @@ import { UserService } from '../../abstractions/user.service';
import { ConstantsService } from '../../services/constants.service';
@Directive()
export class GroupingsComponent {
@Input() showFolders = true;
@Input() showCollections = true;

View File

@ -1,4 +1,5 @@
import {
Directive,
Input,
OnInit,
} from '@angular/core';
@ -25,6 +26,7 @@ const Keys = {
rememberEmail: 'rememberEmail',
};
@Directive()
export class LoginComponent implements OnInit {
@Input() email: string = '';
@Input() rememberEmail = true;

View File

@ -20,7 +20,7 @@ export class ModalComponent implements OnDestroy {
@Output() onClosed = new EventEmitter();
@Output() onShow = new EventEmitter();
@Output() onShown = new EventEmitter();
@ViewChild('container', { read: ViewContainerRef }) container: ViewContainerRef;
@ViewChild('container', { read: ViewContainerRef, static: true }) container: ViewContainerRef;
parentContainer: ViewContainerRef = null;
fade: boolean = true;

View File

@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
OnInit,
@ -11,6 +12,7 @@ import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
import { PasswordGeneratorPolicyOptions } from '../../models/domain/passwordGeneratorPolicyOptions';
@Directive()
export class PasswordGeneratorComponent implements OnInit {
@Input() showSelect: boolean = false;
@Output() onSelected = new EventEmitter<string>();

View File

@ -1,4 +1,5 @@
import {
Directive,
EventEmitter,
Input,
OnInit,
@ -19,6 +20,7 @@ import { CollectionView } from '../../models/view/collectionView';
import { Utils } from '../../misc/utils';
@Directive()
export class ShareComponent implements OnInit {
@Input() cipherId: string;
@Input() organizationId: string;

View File

@ -1,6 +1,6 @@
import {
Directive,
EventEmitter,
Input,
OnInit,
Output,
} from '@angular/core';
@ -12,6 +12,7 @@ import { AuthService } from '../../abstractions/auth.service';
import { I18nService } from '../../abstractions/i18n.service';
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
@Directive()
export class TwoFactorOptionsComponent implements OnInit {
@Output() onProviderSelected = new EventEmitter<TwoFactorProviderType>();
@Output() onRecoverSelected = new EventEmitter();

View File

@ -1,5 +1,6 @@
import {
ChangeDetectorRef,
Directive,
EventEmitter,
Input,
NgZone,
@ -30,6 +31,7 @@ import { BroadcasterService } from '../services/broadcaster.service';
const BroadcasterSubscriptionId = 'ViewComponent';
@Directive()
export class ViewComponent implements OnDestroy, OnInit {
@Input() cipherId: string;
@Output() onEditCipher = new EventEmitter<CipherView>();

View File

@ -8,8 +8,8 @@ import {
} from '@angular/core';
import {
ControlValueAccessor,
NG_VALUE_ACCESSOR,
NgControl,
NG_VALUE_ACCESSOR,
} from '@angular/forms';
// ref: https://juristr.com/blog/2018/02/ng-true-value-directive/

View File

@ -38,6 +38,7 @@
"no-empty": [ true, "allow-empty-catch" ],
"object-literal-sort-keys": false,
"object-literal-shorthand": [ true, "never" ],
"ordered-imports": true,
"prefer-for-of": false,
"quotemark": [ true, "single" ],
"whitespace": [