From 4337c80ce19ad7ea757e1a129bb410251bdfe320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Sat, 5 Mar 2022 09:11:18 +0100 Subject: [PATCH] Upgraded angular version --- .gitignore | 1 + package.json | 49 ++++++++++++++++--------------- src/app/app.module.ts | 67 +++++++++++++++++++++---------------------- src/polyfills.ts | 13 +-------- src/styles.scss | 2 +- src/test.ts | 4 ++- 6 files changed, 62 insertions(+), 74 deletions(-) diff --git a/.gitignore b/.gitignore index b4edd44..276eeb1 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ yarn.lock !.vscode/extensions.json # misc +/.angular/cache /.sass-cache /connect.lock /coverage diff --git a/package.json b/package.json index cf50236..e3281a6 100644 --- a/package.json +++ b/package.json @@ -15,42 +15,41 @@ }, "private": true, "dependencies": { - "@angular/animations": "^12.2.4", - "@angular/cdk": "^12.2.4", - "@angular/common": "^12.2.4", - "@angular/compiler": "^12.2.4", - "@angular/core": "^12.2.4", - "@angular/forms": "^12.2.4", - "@angular/material": "^12.2.4", - "@angular/platform-browser": "^12.2.4", - "@angular/platform-browser-dynamic": "^12.2.4", - "@angular/router": "^12.2.4", + "@angular/animations": "^13.2.5", + "@angular/cdk": "^13.2.5", + "@angular/common": "^13.2.5", + "@angular/compiler": "^13.2.5", + "@angular/core": "^13.2.5", + "@angular/forms": "^13.2.5", + "@angular/material": "^13.2.5", + "@angular/platform-browser": "^13.2.5", + "@angular/platform-browser-dynamic": "^13.2.5", + "@angular/router": "^13.2.5", "cookieconsent": "^3.1.1", "core-js": "^3.2.1", "rxjs": "^6.6.3", "tslib": "^2.0.0", - "web-animations-js": "^2.3.2", "zone.js": "~0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "~12.2.4", - "@angular-eslint/builder": "^12.0.0", - "@angular-eslint/eslint-plugin": "^12.0.0", - "@angular-eslint/eslint-plugin-template": "^12.0.0", - "@angular-eslint/schematics": "12.3.1", - "@angular-eslint/template-parser": "^12.0.0", - "@angular/cli": "^12.2.4", - "@angular/compiler-cli": "^12.2.4", - "@angular/language-service": "^12.2.4", + "@angular-devkit/build-angular": "~13.2.5", + "@angular-eslint/builder": "^13.1.0", + "@angular-eslint/eslint-plugin": "^13.1.0", + "@angular-eslint/eslint-plugin-template": "^13.1.0", + "@angular-eslint/schematics": "13.1.0", + "@angular-eslint/template-parser": "^13.1.0", + "@angular/cli": "^13.2.5", + "@angular/compiler-cli": "^13.2.5", + "@angular/language-service": "^13.2.5", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.6", "@types/node": "^12.11.1", - "@typescript-eslint/eslint-plugin": "4.23.0", - "@typescript-eslint/parser": "4.23.0", + "@typescript-eslint/eslint-plugin": "5.3.0", + "@typescript-eslint/parser": "5.3.0", "codelyzer": "^6.0.0", - "eslint": "^7.26.0", + "eslint": "^8.2.0", "eslint-config-prettier": "^8.1.0", - "eslint-plugin-import": "2.22.1", + "eslint-plugin-import": "2.25.2", "eslint-plugin-jsdoc": "30.7.6", "eslint-plugin-prefer-arrow": "1.2.2", "eslint-plugin-prettier": "^3.3.1", @@ -65,6 +64,6 @@ "prettier-eslint": "^12.0.0", "protractor": "~7.0.0", "ts-node": "~8.4.1", - "typescript": "~4.3.4" + "typescript": "~4.5.5" } } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 489742a..57f8e4d 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -41,40 +41,37 @@ import { FilterComponent } from './gui/components/filter/filter.component'; @NgModule({ - declarations: [ - AppComponent, - NavbarComponent, - TranslateDirective, - LoginComponent, - ClientDownloadComponent, - ServicesComponent, - ServiceComponent, - ServicesGroupComponent, - ModalComponent, - SafeHtmlPipe, - FooterComponent, - ErrorComponent, - AboutComponent, - DownloadsComponent, - LauncherComponent, - StaffInfoComponent, - FilterComponent, - ], - imports: [ - BrowserModule, - LayoutModule, - HttpClientModule, - AppRoutingModule, - BrowserAnimationsModule, - AppMaterialModule, - ], - providers: [ - UDSApiService, - UDSGuiService, - ], - bootstrap: [AppComponent], - entryComponents: [ - ModalComponent - ] + declarations: [ + AppComponent, + NavbarComponent, + TranslateDirective, + LoginComponent, + ClientDownloadComponent, + ServicesComponent, + ServiceComponent, + ServicesGroupComponent, + ModalComponent, + SafeHtmlPipe, + FooterComponent, + ErrorComponent, + AboutComponent, + DownloadsComponent, + LauncherComponent, + StaffInfoComponent, + FilterComponent, + ], + imports: [ + BrowserModule, + LayoutModule, + HttpClientModule, + AppRoutingModule, + BrowserAnimationsModule, + AppMaterialModule, + ], + providers: [ + UDSApiService, + UDSGuiService, + ], + bootstrap: [AppComponent] }) export class AppModule { } diff --git a/src/polyfills.ts b/src/polyfills.ts index d452b9b..a412169 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -18,19 +18,8 @@ * BROWSER POLYFILLS */ - -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - /** IE10 and IE11 requires the following for the Reflect API. */ -import 'core-js/es/reflect'; - - -/** - * Required to support Web Animations `@angular/platform-browser/animations`. - * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation - **/ -import 'web-animations-js'; // Run `npm install --save web-animations-js`. +import 'core-js/es/reflect'; // Run `npm install --save web-animations-js`. /** * By default, zone.js will patch all possible macroTask and DomEvents diff --git a/src/styles.scss b/src/styles.scss index 4fb267a..f12fc91 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -1,6 +1,6 @@ /* You can add global styles to this file, and also import other style files */ /* Materials */ -@import '~@angular/material/prebuilt-themes/indigo-pink.css'; +@import '@angular/material/prebuilt-themes/indigo-pink.css'; /* Cookie consent */ @import "~cookieconsent/build/cookieconsent.min.css"; diff --git a/src/test.ts b/src/test.ts index a6f15af..6b03dbe 100644 --- a/src/test.ts +++ b/src/test.ts @@ -12,7 +12,9 @@ declare const require: any; // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( BrowserDynamicTestingModule, - platformBrowserDynamicTesting() + platformBrowserDynamicTesting(), { + teardown: { destroyAfterEach: false } +} ); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/);