1
0

120243: ng update @angular/core @angular/cli --force

This commit is contained in:
Andreas Awouters
2024-11-19 09:25:25 +01:00
committed by Yury Bondarenko
parent 16eb620f4f
commit 5e7b066af1
31 changed files with 6948 additions and 2346 deletions

8862
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,12 +11,10 @@
"start:mirador:prod": "npm run build:mirador && npm run start:prod", "start:mirador:prod": "npm run build:mirador && npm run start:prod",
"preserve": "npm run base-href", "preserve": "npm run base-href",
"serve": "ts-node --project ./tsconfig.ts-node.json scripts/serve.ts", "serve": "ts-node --project ./tsconfig.ts-node.json scripts/serve.ts",
"serve:ssr": "node dist/server/main",
"analyze": "webpack-bundle-analyzer dist/browser/stats.json", "analyze": "webpack-bundle-analyzer dist/browser/stats.json",
"build": "ng build --configuration development", "build": "ng build --configuration development",
"build:stats": "ng build --stats-json", "build:stats": "ng build --stats-json",
"build:prod": "cross-env NODE_ENV=production npm run build:ssr", "build:prod": "cross-env NODE_ENV=production npm run build:ssr",
"build:ssr": "ng build --configuration production && ng run dspace-angular:server:production",
"build:lint": "rimraf 'lint/dist/**/*.js' 'lint/dist/**/*.js.map' && tsc -b lint/tsconfig.json", "build:lint": "rimraf 'lint/dist/**/*.js' 'lint/dist/**/*.js.map' && tsc -b lint/tsconfig.json",
"test": "ng test --source-map=true --watch=false --configuration test", "test": "ng test --source-map=true --watch=false --configuration test",
"test:watch": "nodemon --exec \"ng test --source-map=true --watch=true --configuration test\"", "test:watch": "nodemon --exec \"ng test --source-map=true --watch=true --configuration test\"",
@@ -98,19 +96,19 @@
} }
}, },
"dependencies": { "dependencies": {
"@angular/animations": "^17.3.12", "@angular/animations": "^18.2.12",
"@angular/cdk": "^17.3.10", "@angular/cdk": "^17.3.10",
"@angular/common": "^17.3.12", "@angular/common": "^18.2.12",
"@angular/compiler": "^17.3.12", "@angular/compiler": "^18.2.12",
"@angular/core": "^17.3.12", "@angular/core": "^18.2.12",
"@angular/forms": "^17.3.12", "@angular/forms": "^18.2.12",
"@angular/localize": "^17.3.12", "@angular/localize": "^18.2.12",
"@angular/platform-browser": "^17.3.12", "@angular/platform-browser": "^18.2.12",
"@angular/platform-browser-dynamic": "^17.3.12", "@angular/platform-browser-dynamic": "^18.2.12",
"@angular/platform-server": "^17.3.12", "@angular/platform-server": "^18.2.12",
"@angular/router": "^17.3.12", "@angular/router": "^18.2.12",
"@angular/ssr": "^17.3.11", "@angular/ssr": "^18.2.12",
"@babel/runtime": "7.26.7", "@babel/runtime": "7.26.0",
"@kolkov/ngx-gallery": "^2.0.1", "@kolkov/ngx-gallery": "^2.0.1",
"@ng-bootstrap/ng-bootstrap": "^12.0.0", "@ng-bootstrap/ng-bootstrap": "^12.0.0",
"@ng-dynamic-forms/core": "^16.0.0", "@ng-dynamic-forms/core": "^16.0.0",
@@ -168,7 +166,7 @@
}, },
"devDependencies": { "devDependencies": {
"@angular-builders/custom-webpack": "~17.0.2", "@angular-builders/custom-webpack": "~17.0.2",
"@angular-devkit/build-angular": "^17.3.11", "@angular-devkit/build-angular": "^18.2.12",
"@angular-eslint/builder": "^18.4.1", "@angular-eslint/builder": "^18.4.1",
"@angular-eslint/bundled-angular-compiler": "^18.4.1", "@angular-eslint/bundled-angular-compiler": "^18.4.1",
"@angular-eslint/eslint-plugin": "^18.4.1", "@angular-eslint/eslint-plugin": "^18.4.1",
@@ -176,9 +174,9 @@
"@angular-eslint/schematics": "^18.4.1", "@angular-eslint/schematics": "^18.4.1",
"@angular-eslint/template-parser": "^18.4.1", "@angular-eslint/template-parser": "^18.4.1",
"@angular-eslint/utils": "^18.4.1", "@angular-eslint/utils": "^18.4.1",
"@angular/cli": "^17.3.11", "@angular/cli": "^18.2.12",
"@angular/compiler-cli": "^17.3.11", "@angular/compiler-cli": "^18.2.12",
"@angular/language-service": "^17.3.12", "@angular/language-service": "^18.2.12",
"@cypress/schematic": "^1.5.0", "@cypress/schematic": "^1.5.0",
"@fortawesome/fontawesome-free": "^6.7.2", "@fortawesome/fontawesome-free": "^6.7.2",
"@ngrx/store-devtools": "^17.1.1", "@ngrx/store-devtools": "^17.1.1",

View File

@@ -1,4 +1,4 @@
import { HttpClientTestingModule } from '@angular/common/http/testing'; import { provideHttpClientTesting } from '@angular/common/http/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core'; import { NO_ERRORS_SCHEMA } from '@angular/core';
import { import {
ComponentFixture, ComponentFixture,
@@ -20,6 +20,7 @@ import { RawRestResponse } from 'src/app/core/dspace-rest/raw-rest-response.mode
import { TranslateLoaderMock } from 'src/app/shared/mocks/translate-loader.mock'; import { TranslateLoaderMock } from 'src/app/shared/mocks/translate-loader.mock';
import { FilteredCollectionsComponent } from './filtered-collections.component'; import { FilteredCollectionsComponent } from './filtered-collections.component';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
describe('FiltersComponent', () => { describe('FiltersComponent', () => {
let component: FilteredCollectionsComponent; let component: FilteredCollectionsComponent;
@@ -39,22 +40,21 @@ describe('FiltersComponent', () => {
beforeEach(waitForAsync(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ schemas: [NO_ERRORS_SCHEMA],
NgbAccordionModule, imports: [NgbAccordionModule,
TranslateModule.forRoot({ TranslateModule.forRoot({
loader: { loader: {
provide: TranslateLoader, provide: TranslateLoader,
useClass: TranslateLoaderMock, useClass: TranslateLoaderMock,
}, },
}), }),
HttpClientTestingModule, FilteredCollectionsComponent],
FilteredCollectionsComponent,
],
providers: [ providers: [
FormBuilder, FormBuilder,
DspaceRestService, DspaceRestService,
], provideHttpClient(withInterceptorsFromDi()),
schemas: [NO_ERRORS_SCHEMA], provideHttpClientTesting(),
]
}); });
})); }));

View File

@@ -1,8 +1,5 @@
import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing'; import { TestBed } from '@angular/core/testing';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
@@ -28,7 +25,7 @@ describe(`AuthInterceptor`, () => {
beforeEach(() => { beforeEach(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [HttpClientTestingModule], imports: [],
providers: [ providers: [
DspaceRestService, DspaceRestService,
{ provide: AuthService, useValue: authServiceStub }, { provide: AuthService, useValue: authServiceStub },
@@ -39,7 +36,9 @@ describe(`AuthInterceptor`, () => {
multi: true, multi: true,
}, },
{ provide: Store, useValue: store }, { provide: Store, useValue: store },
], provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
]
}); });
service = TestBed.inject(DspaceRestService); service = TestBed.inject(DspaceRestService);

View File

@@ -1,13 +1,4 @@
import { import { HttpErrorResponse, HttpEvent, HttpHandler, HttpHeaders, HttpInterceptor, HttpRequest, HttpResponse, HttpResponseBase } from '@angular/common/http';
HttpErrorResponse,
HttpEvent,
HttpHandler,
HttpHeaders,
HttpInterceptor,
HttpRequest,
HttpResponse,
HttpResponseBase,
} from '@angular/common/http';
import { import {
Injectable, Injectable,
Injector, Injector,

View File

@@ -1,8 +1,4 @@
import { import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
HttpClient,
HttpHeaders,
HttpResponse,
} from '@angular/common/http';
import { import {
Observable, Observable,
of as observableOf, of as observableOf,

View File

@@ -1,8 +1,4 @@
import { import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
HttpClient,
HttpHeaders,
HttpResponse,
} from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';

View File

@@ -1,7 +1,4 @@
import { import { HttpHeaders, HttpParams } from '@angular/common/http';
HttpHeaders,
HttpParams,
} from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { import {

View File

@@ -1,8 +1,4 @@
import { import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
HttpClient,
HttpHeaders,
HttpParams,
} from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';

View File

@@ -1,11 +1,5 @@
import { import { HttpErrorResponse, HttpHeaders, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
HttpErrorResponse, import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
HttpHeaders,
} from '@angular/common/http';
import {
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
import { import {
inject, inject,
TestBed, TestBed,
@@ -33,8 +27,8 @@ describe('DspaceRestService', () => {
beforeEach(() => { beforeEach(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [HttpClientTestingModule], imports: [],
providers: [DspaceRestService], providers: [DspaceRestService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
}); });
dspaceRestService = TestBed.inject(DspaceRestService); dspaceRestService = TestBed.inject(DspaceRestService);

View File

@@ -1,10 +1,4 @@
import { import { HttpClient, HttpErrorResponse, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
HttpClient,
HttpErrorResponse,
HttpHeaders,
HttpParams,
HttpResponse,
} from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { import {
Observable, Observable,

View File

@@ -1,8 +1,5 @@
import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing'; import { TestBed } from '@angular/core/testing';
import { REQUEST } from '../../../express.tokens'; import { REQUEST } from '../../../express.tokens';
@@ -21,7 +18,7 @@ describe('ForwardClientIpInterceptor', () => {
clientIp = '1.2.3.4'; clientIp = '1.2.3.4';
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [HttpClientTestingModule], imports: [],
providers: [ providers: [
DspaceRestService, DspaceRestService,
{ {
@@ -30,7 +27,9 @@ describe('ForwardClientIpInterceptor', () => {
multi: true, multi: true,
}, },
{ provide: REQUEST, useValue: { get: () => undefined, connection: { remoteAddress: clientIp } } }, { provide: REQUEST, useValue: { get: () => undefined, connection: { remoteAddress: clientIp } } },
], provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
]
}); });
service = TestBed.inject(DspaceRestService); service = TestBed.inject(DspaceRestService);

View File

@@ -1,9 +1,4 @@
import { import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
HttpEvent,
HttpHandler,
HttpInterceptor,
HttpRequest,
} from '@angular/common/http';
import { import {
Inject, Inject,
Injectable, Injectable,

View File

@@ -1,8 +1,5 @@
import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing'; import { TestBed } from '@angular/core/testing';
import { of } from 'rxjs'; import { of } from 'rxjs';
@@ -25,7 +22,7 @@ describe(`LocaleInterceptor`, () => {
beforeEach(() => { beforeEach(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [HttpClientTestingModule], imports: [],
providers: [ providers: [
DspaceRestService, DspaceRestService,
{ {
@@ -34,7 +31,9 @@ describe(`LocaleInterceptor`, () => {
multi: true, multi: true,
}, },
{ provide: LocaleService, useValue: mockLocaleService }, { provide: LocaleService, useValue: mockLocaleService },
], provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
]
}); });
service = TestBed.inject(DspaceRestService); service = TestBed.inject(DspaceRestService);

View File

@@ -1,9 +1,4 @@
import { import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
HttpEvent,
HttpHandler,
HttpInterceptor,
HttpRequest,
} from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { import {

View File

@@ -1,8 +1,5 @@
import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing'; import { TestBed } from '@angular/core/testing';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { StoreModule } from '@ngrx/store'; import { StoreModule } from '@ngrx/store';
@@ -39,10 +36,7 @@ describe('LogInterceptor', () => {
beforeEach(() => { beforeEach(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ imports: [StoreModule.forRoot(appReducers, storeModuleConfig)],
HttpClientTestingModule,
StoreModule.forRoot(appReducers, storeModuleConfig),
],
providers: [ providers: [
DspaceRestService, DspaceRestService,
// LogInterceptor, // LogInterceptor,
@@ -55,7 +49,9 @@ describe('LogInterceptor', () => {
{ provide: Router, useValue: router }, { provide: Router, useValue: router },
{ provide: CorrelationIdService, useClass: CorrelationIdService }, { provide: CorrelationIdService, useClass: CorrelationIdService },
{ provide: UUIDService, useClass: UUIDService }, { provide: UUIDService, useClass: UUIDService },
], provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
]
}); });
service = TestBed.inject(DspaceRestService); service = TestBed.inject(DspaceRestService);

View File

@@ -1,9 +1,4 @@
import { import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
HttpEvent,
HttpHandler,
HttpInterceptor,
HttpRequest,
} from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';

View File

@@ -1,7 +1,4 @@
import { import { HttpHeaders, HttpParams } from '@angular/common/http';
HttpHeaders,
HttpParams,
} from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { ReplaceOperation } from 'fast-json-patch'; import { ReplaceOperation } from 'fast-json-patch';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';

View File

@@ -1,7 +1,4 @@
import { import { HttpClient, HttpHeaders } from '@angular/common/http';
HttpClient,
HttpHeaders,
} from '@angular/common/http';
import { ReplaceOperation } from 'fast-json-patch'; import { ReplaceOperation } from 'fast-json-patch';
import { import {
cold, cold,

View File

@@ -1,7 +1,4 @@
import { import { HttpClient, HttpHeaders } from '@angular/common/http';
HttpClient,
HttpHeaders,
} from '@angular/common/http';
import { waitForAsync } from '@angular/core/testing'; import { waitForAsync } from '@angular/core/testing';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { import {

View File

@@ -1,7 +1,4 @@
import { import { HttpClient, HttpHeaders } from '@angular/common/http';
HttpClient,
HttpHeaders,
} from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';

View File

@@ -1,8 +1,5 @@
import { HttpClient } from '@angular/common/http'; import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing'; import { TestBed } from '@angular/core/testing';
import { RESTURLCombiner } from '../url-combiner/rest-url-combiner'; import { RESTURLCombiner } from '../url-combiner/rest-url-combiner';
@@ -17,8 +14,8 @@ describe(`BrowserXSRFService`, () => {
beforeEach(() => { beforeEach(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ HttpClientTestingModule ], imports: [],
providers: [ BrowserXSRFService ], providers: [BrowserXSRFService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
}); });
httpClient = TestBed.inject(HttpClient); httpClient = TestBed.inject(HttpClient);
httpTestingController = TestBed.inject(HttpTestingController); httpTestingController = TestBed.inject(HttpTestingController);

View File

@@ -1,12 +1,5 @@
import { import { HTTP_INTERCEPTORS, HttpHeaders, HttpXsrfTokenExtractor, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
HTTP_INTERCEPTORS, import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
HttpHeaders,
HttpXsrfTokenExtractor,
} from '@angular/common/http';
import {
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing'; import { TestBed } from '@angular/core/testing';
import { CookieServiceMock } from '../../shared/mocks/cookie.service.mock'; import { CookieServiceMock } from '../../shared/mocks/cookie.service.mock';
@@ -35,7 +28,7 @@ describe(`XsrfInterceptor`, () => {
beforeEach(() => { beforeEach(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [HttpClientTestingModule], imports: [],
providers: [ providers: [
DspaceRestService, DspaceRestService,
{ {
@@ -45,7 +38,9 @@ describe(`XsrfInterceptor`, () => {
}, },
{ provide: HttpXsrfTokenExtractor, useValue: new HttpXsrfTokenExtractorMock(testToken) }, { provide: HttpXsrfTokenExtractor, useValue: new HttpXsrfTokenExtractorMock(testToken) },
{ provide: CookieService, useValue: new CookieServiceMock() }, { provide: CookieService, useValue: new CookieServiceMock() },
], provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
]
}); });
service = TestBed.get(DspaceRestService); service = TestBed.get(DspaceRestService);

View File

@@ -1,12 +1,4 @@
import { import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse, HttpXsrfTokenExtractor } from '@angular/common/http';
HttpErrorResponse,
HttpEvent,
HttpHandler,
HttpInterceptor,
HttpRequest,
HttpResponse,
HttpXsrfTokenExtractor,
} from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { import {
Observable, Observable,

View File

@@ -1,7 +1,4 @@
import { import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
import { import {
DebugElement, DebugElement,
NO_ERRORS_SCHEMA, NO_ERRORS_SCHEMA,
@@ -25,6 +22,7 @@ import {
import { LangConfig } from '../../../config/lang-config.interface'; import { LangConfig } from '../../../config/lang-config.interface';
import { LocaleService } from '../../core/locale/locale.service'; import { LocaleService } from '../../core/locale/locale.service';
import { LangSwitchComponent } from './lang-switch.component'; import { LangSwitchComponent } from './lang-switch.component';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
// This test is completely independent from any message catalogs or keys in the codebase // This test is completely independent from any message catalogs or keys in the codebase
// The translation module is instantiated with these bogus messages that we aren't using anyway. // The translation module is instantiated with these bogus messages that we aren't using anyway.
@@ -83,14 +81,16 @@ describe('LangSwitchComponent', () => {
}; };
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [HttpClientTestingModule, TranslateModule.forRoot({ schemas: [NO_ERRORS_SCHEMA],
imports: [TranslateModule.forRoot({
loader: { provide: TranslateLoader, useClass: CustomLoader }, loader: { provide: TranslateLoader, useClass: CustomLoader },
}), LangSwitchComponent], }), LangSwitchComponent],
schemas: [NO_ERRORS_SCHEMA],
providers: [ providers: [
TranslateService, TranslateService,
{ provide: LocaleService, useValue: getMockLocaleService() }, { provide: LocaleService, useValue: getMockLocaleService() },
], provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
]
}).compileComponents() }).compileComponents()
.then(() => { .then(() => {
translate = TestBed.inject(TranslateService); translate = TestBed.inject(TranslateService);
@@ -166,14 +166,16 @@ describe('LangSwitchComponent', () => {
}; };
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [HttpClientTestingModule, TranslateModule.forRoot({ schemas: [NO_ERRORS_SCHEMA],
imports: [TranslateModule.forRoot({
loader: { provide: TranslateLoader, useClass: CustomLoader }, loader: { provide: TranslateLoader, useClass: CustomLoader },
}), LangSwitchComponent], }), LangSwitchComponent],
schemas: [NO_ERRORS_SCHEMA],
providers: [ providers: [
TranslateService, TranslateService,
{ provide: LocaleService, useValue: getMockLocaleService() }, { provide: LocaleService, useValue: getMockLocaleService() },
], provideHttpClient(withInterceptorsFromDi()),
provideHttpClientTesting(),
]
}).compileComponents(); }).compileComponents();
translate = TestBed.inject(TranslateService); translate = TestBed.inject(TranslateService);
translate.addLangs(mockConfig.languages.filter((MyLangConfig) => MyLangConfig.active === true).map((a) => a.code)); translate.addLangs(mockConfig.languages.filter((MyLangConfig) => MyLangConfig.active === true).map((a) => a.code));

View File

@@ -1,7 +1,4 @@
import { import { HttpHeaders, HttpResponse } from '@angular/common/http';
HttpHeaders,
HttpResponse,
} from '@angular/common/http';
import { of as observableOf } from 'rxjs'; import { of as observableOf } from 'rxjs';
import { RestRequestMethod } from '../../../core/data/rest-request-method'; import { RestRequestMethod } from '../../../core/data/rest-request-method';

View File

@@ -1,7 +1,4 @@
import { import { HttpClient, HttpHeaders } from '@angular/common/http';
HttpClient,
HttpHeaders,
} from '@angular/common/http';
import { import {
Inject, Inject,
Injectable, Injectable,

View File

@@ -1,8 +1,4 @@
import { import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
HttpClient,
provideHttpClient,
withInterceptorsFromDi,
} from '@angular/common/http';
import { import {
APP_ID, APP_ID,
APP_INITIALIZER, APP_INITIALIZER,

View File

@@ -1,6 +1,6 @@
import { DragDropModule } from '@angular/cdk/drag-drop'; import { DragDropModule } from '@angular/cdk/drag-drop';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http'; import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
@@ -203,13 +203,10 @@ const DECLARATIONS = [
SearchResultsSkeletonComponent, SearchResultsSkeletonComponent,
]; ];
@NgModule({ @NgModule({ imports: [RootModule,
imports: [
RootModule,
CommonModule, CommonModule,
DragDropModule, DragDropModule,
FormsModule, FormsModule,
HttpClientModule,
NgbModule, NgbModule,
RouterModule, RouterModule,
ScrollToModule, ScrollToModule,
@@ -218,9 +215,7 @@ const DECLARATIONS = [
TranslateModule, TranslateModule,
FormsModule, FormsModule,
NgxGalleryModule, NgxGalleryModule,
...DECLARATIONS, ...DECLARATIONS], providers: [provideHttpClient(withInterceptorsFromDi())] })
],
})
/** /**
* This module serves as an index for all the components in this theme. * This module serves as an index for all the components in this theme.

View File

@@ -1,6 +1,6 @@
import { DragDropModule } from '@angular/cdk/drag-drop'; import { DragDropModule } from '@angular/cdk/drag-drop';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http'; import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
@@ -15,23 +15,17 @@ import { RootModule } from '../../app/root.module';
const DECLARATIONS = [ const DECLARATIONS = [
]; ];
@NgModule({ @NgModule({ declarations: DECLARATIONS, imports: [RootModule,
imports: [
RootModule,
CommonModule, CommonModule,
DragDropModule, DragDropModule,
FormsModule, FormsModule,
HttpClientModule,
NgbModule, NgbModule,
RouterModule, RouterModule,
ScrollToModule, ScrollToModule,
StoreModule, StoreModule,
StoreRouterConnectingModule, StoreRouterConnectingModule,
TranslateModule, TranslateModule,
FormsModule, FormsModule], providers: [provideHttpClient(withInterceptorsFromDi())] })
],
declarations: DECLARATIONS,
})
/** /**
* This module serves as an index for all the components in this theme. * This module serves as an index for all the components in this theme.

View File

@@ -8,8 +8,8 @@
"baseUrl": "./", "baseUrl": "./",
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"declaration": false, "declaration": false,
"downlevelIteration": true,
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"sourceMap": true, "sourceMap": true,
"module": "es2020", "module": "es2020",
@@ -20,7 +20,6 @@
"strictNullChecks": false, "strictNullChecks": false,
"skipDefaultLibCheck": true, "skipDefaultLibCheck": true,
"pretty": true, "pretty": true,
"allowSyntheticDefaultImports": true,
"target": "ES2022", "target": "ES2022",
"typeRoots": [ "typeRoots": [
"node_modules/@types", "node_modules/@types",