[angular-18] upgrade angular core and cli to v18

This commit is contained in:
Alex Martzios 2024-09-20 14:34:02 +03:00
parent 601b9c03ea
commit a8ec1e292c
2 changed files with 43 additions and 49 deletions

View File

@ -22,19 +22,19 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^17.3.12", "@angular/animations": "^18.2.5",
"@angular/cdk": "^17.3.10", "@angular/cdk": "^17.3.10",
"@angular/common": "^17.3.12", "@angular/common": "^18.2.5",
"@angular/compiler": "^17.3.12", "@angular/compiler": "^18.2.5",
"@angular/core": "^17.3.12", "@angular/core": "^18.2.5",
"@angular/forms": "^17.3.12", "@angular/forms": "^18.2.5",
"@angular/localize": "^17.3.12", "@angular/localize": "^18.2.5",
"@angular/material": "^17.3.10", "@angular/material": "^17.3.10",
"@angular/platform-browser": "^17.3.12", "@angular/platform-browser": "^18.2.5",
"@angular/platform-browser-dynamic": "^17.3.12", "@angular/platform-browser-dynamic": "^18.2.5",
"@angular/platform-server": "^17.3.12", "@angular/platform-server": "^18.2.5",
"@angular/router": "^17.3.12", "@angular/router": "^18.2.5",
"@angular/ssr": "^17.3.9", "@angular/ssr": "^18.2.5",
"clipboard": "^1.5.16", "clipboard": "^1.5.16",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"express": "^4.15.2", "express": "^4.15.2",
@ -48,10 +48,10 @@
"zone.js": "~0.14.0" "zone.js": "~0.14.0"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^17.3.9", "@angular-devkit/build-angular": "^18.2.5",
"@angular/cli": "^17.3.9", "@angular/cli": "^18.2.5",
"@angular/compiler-cli": "^17.3.12", "@angular/compiler-cli": "^18.2.5",
"@angular/language-service": "^17.3.12", "@angular/language-service": "^18.2.5",
"@types/compression": "^1.7.0", "@types/compression": "^1.7.0",
"@types/express": "^4.17.0", "@types/express": "^4.17.0",
"@types/jasmine": "~3.6.0", "@types/jasmine": "~3.6.0",

View File

@ -3,7 +3,7 @@ import {SharedModule} from './shared/shared.module';
import {BrowserModule} from '@angular/platform-browser'; import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {CommonModule} from '@angular/common'; import {CommonModule} from '@angular/common';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http'; import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import {AppComponent} from './app.component'; import {AppComponent} from './app.component';
import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module'; import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module';
import {CookieLawModule} from './openaireLibrary/sharedComponents/cookie-law/cookie-law.module'; import {CookieLawModule} from './openaireLibrary/sharedComponents/cookie-law/cookie-law.module';
@ -17,38 +17,32 @@ import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.servi
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service"; import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service"; import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service";
@NgModule({ @NgModule({ declarations: [AppComponent, OpenaireErrorPageComponent],
imports: [ exports: [AppComponent],
SharedModule, bootstrap: [AppComponent], imports: [SharedModule,
BrowserAnimationsModule, BrowserAnimationsModule,
CommonModule, CommonModule,
HttpClientModule, ErrorModule,
ErrorModule, NavigationBarModule, FeedbackModule, BottomModule,
NavigationBarModule, FeedbackModule, BottomModule, CookieLawModule,
CookieLawModule, BrowserAnimationsModule,
BrowserAnimationsModule, BrowserModule,
BrowserModule, AppRoutingModule], providers: [
AppRoutingModule ConfigurationService,
], { provide: APP_ID, useValue: 'eosc' },
declarations: [AppComponent, OpenaireErrorPageComponent], {
exports: [AppComponent], provide: HTTP_INTERCEPTORS,
providers: [ useClass: HttpInterceptorService,
ConfigurationService, multi: true
{provide: APP_ID, useValue: 'eosc'}, },
{ {
provide: HTTP_INTERCEPTORS, provide: HTTP_INTERCEPTORS,
useClass: HttpInterceptorService, useClass: ErrorInterceptorService,
multi: true multi: true
}, },
{ [{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }],
provide: HTTP_INTERCEPTORS, [{ provide: DEFAULT_TIMEOUT, useValue: 30000 }],
useClass: ErrorInterceptorService, provideHttpClient(withInterceptorsFromDi())
multi: true ] })
},
[{provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true}],
[{provide: DEFAULT_TIMEOUT, useValue: 30000}]
],
bootstrap: [AppComponent]
})
export class AppModule { export class AppModule {
} }