Skip to content

Commit 3def893

Browse files
committed
Changed the Angular dependency to v18 [#2312]
1 parent 6d06fae commit 3def893

38 files changed

+2942
-3241
lines changed

comixed-webui/angular.json

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"prefix": "cx",
1616
"architect": {
1717
"build": {
18-
"builder": "@angular-devkit/build-angular:browser",
18+
"builder": "@angular-devkit/build-angular:application",
1919
"options": {
2020
"allowedCommonJsDependencies": [
2121
"lodash",
@@ -27,20 +27,20 @@
2727
"stylePreprocessorOptions": {
2828
"includePaths": ["src"]
2929
},
30-
"outputPath": "target/classes/static",
30+
"outputPath": {
31+
"base": "target/classes/static"
32+
},
3133
"index": "src/index.html",
32-
"main": "src/main.ts",
33-
"polyfills": "src/polyfills.ts",
34+
"polyfills": ["src/polyfills.ts"],
3435
"tsConfig": "tsconfig.app.json",
3536
"assets": ["src/favicon.png", "src/assets"],
3637
"styles": ["src/styles.scss"],
3738
"scripts": ["./node_modules/sockjs-client/dist/sockjs.min.js"],
38-
"vendorChunk": true,
3939
"extractLicenses": false,
40-
"buildOptimizer": false,
4140
"sourceMap": true,
4241
"optimization": false,
43-
"namedChunks": true
42+
"namedChunks": true,
43+
"browser": "src/main.ts"
4444
},
4545
"configurations": {
4646
"production": {
@@ -55,8 +55,6 @@
5555
"sourceMap": false,
5656
"namedChunks": false,
5757
"extractLicenses": true,
58-
"vendorChunk": false,
59-
"buildOptimizer": true,
6058
"budgets": [
6159
{
6260
"type": "initial",
@@ -71,13 +69,11 @@
7169
]
7270
},
7371
"development": {
74-
"buildOptimizer": false,
7572
"optimization": {
7673
"scripts": false,
7774
"styles": false,
7875
"fonts": false
7976
},
80-
"vendorChunk": true,
8177
"extractLicenses": false,
8278
"sourceMap": true,
8379
"namedChunks": true

comixed-webui/package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@
3535
},
3636
"dependencies": {
3737
"@angular-ru/cdk": "^12.30.0",
38-
"@angular/animations": "^17",
39-
"@angular/cdk": "^17",
40-
"@angular/common": "^17",
41-
"@angular/compiler": "^17",
42-
"@angular/core": "^17",
43-
"@angular/forms": "^17",
44-
"@angular/material": "^17",
45-
"@angular/platform-browser": "^17",
46-
"@angular/platform-browser-dynamic": "^17",
47-
"@angular/router": "^17",
48-
"@messageformat/core": "^3.1.0",
38+
"@angular/animations": "^18.2.13",
39+
"@angular/cdk": "^18.2.14",
40+
"@angular/common": "^18.2.13",
41+
"@angular/compiler": "^18.2.13",
42+
"@angular/core": "^18.2.13",
43+
"@angular/forms": "^18.2.13",
44+
"@angular/material": "^18.2.14",
45+
"@angular/platform-browser": "^18.2.13",
46+
"@angular/platform-browser-dynamic": "^18.2.13",
47+
"@angular/router": "^18.2.13",
48+
"@messageformat/core": "^3.4.0",
4949
"@ngrx/effects": "^17.2.0",
5050
"@ngrx/router-store": "^17.2.0",
5151
"@ngrx/schematics": "^17.2.0",
@@ -79,7 +79,7 @@
7979
"messageformat": "^2.3.0",
8080
"ngx-filesaver": "^11.0.0",
8181
"ngx-gravatar": "^13.0.0",
82-
"ngx-translate-messageformat-compiler": "^6",
82+
"ngx-translate-messageformat-compiler": "^7.1.0",
8383
"ngx-translate-multi-http-loader": "^9",
8484
"node-forge": "^1.3.0",
8585
"normalize-url": "^4.5.1",
@@ -104,17 +104,17 @@
104104
"ws": "^8",
105105
"xml2js": "0.6.2",
106106
"xmlhttprequest-ssl": "^1.6.1",
107-
"zone.js": "~0.14.6"
107+
"zone.js": "~0.14.10"
108108
},
109109
"devDependencies": {
110-
"@angular-devkit/build-angular": "^17.3.7",
111-
"@angular-eslint/builder": "17.4.1",
112-
"@angular-eslint/eslint-plugin": "17.4.1",
113-
"@angular-eslint/eslint-plugin-template": "17.4.1",
114-
"@angular-eslint/schematics": "17.4.1",
115-
"@angular-eslint/template-parser": "17.4.1",
116-
"@angular/cli": "^17.3.7",
117-
"@angular/compiler-cli": "^17",
110+
"@angular-devkit/build-angular": "^18.2.12",
111+
"@angular-eslint/builder": "18.4.3",
112+
"@angular-eslint/eslint-plugin": "18.4.3",
113+
"@angular-eslint/eslint-plugin-template": "18.4.3",
114+
"@angular-eslint/schematics": "18.4.3",
115+
"@angular-eslint/template-parser": "18.4.3",
116+
"@angular/cli": "^18.2.12",
117+
"@angular/compiler-cli": "^18.2.13",
118118
"@ngrx/store-devtools": "^17.2.0",
119119
"@types/jasmine": "^5.1.5",
120120
"@types/jasminewd2": "~2.0.3",

comixed-webui/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</goals>
4242
<phase>initialize</phase>
4343
<configuration>
44-
<nodeVersion>v20.10.0</nodeVersion>
44+
<nodeVersion>v22.13.0</nodeVersion>
4545
<yarnVersion>v1.22.19</yarnVersion>
4646
</configuration>
4747
</execution>

comixed-webui/src/app/admin/services/batch-processes.service.spec.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import {
2323
BATCH_PROCESS_DETAIL_2
2424
} from '@app/admin/admin.fixtures';
2525
import {
26-
HttpClientTestingModule,
27-
HttpTestingController
26+
HttpTestingController,
27+
provideHttpClientTesting
2828
} from '@angular/common/http/testing';
2929
import { LoggerModule } from '@angular-ru/cdk/logger';
3030
import { interpolate } from '@app/core';
@@ -46,6 +46,10 @@ import {
4646
} from '@app/admin/actions/batch-processes.actions';
4747
import { WebSocketService } from '@app/messaging';
4848
import { DeleteSelectedJobsRequest } from '@app/admin/models/net/delete-selected-jobs-request';
49+
import {
50+
provideHttpClient,
51+
withInterceptorsFromDi
52+
} from '@angular/common/http';
4953

5054
describe('BatchProcessesService', () => {
5155
const ENTRIES = [BATCH_PROCESS_DETAIL_1, BATCH_PROCESS_DETAIL_2];
@@ -60,7 +64,7 @@ describe('BatchProcessesService', () => {
6064

6165
beforeEach(() => {
6266
TestBed.configureTestingModule({
63-
imports: [HttpClientTestingModule, LoggerModule.forRoot()],
67+
imports: [LoggerModule.forRoot()],
6468
providers: [
6569
provideMockStore({ initialState }),
6670
{
@@ -69,7 +73,9 @@ describe('BatchProcessesService', () => {
6973
send: jasmine.createSpy('WebSocketService.send()'),
7074
subscribe: jasmine.createSpy('WebSocketService.subscribe()')
7175
}
72-
}
76+
},
77+
provideHttpClient(withInterceptorsFromDi()),
78+
provideHttpClientTesting()
7379
]
7480
});
7581

comixed-webui/src/app/admin/services/configuration.service.spec.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import {
2626
CONFIGURATION_OPTION_5
2727
} from '@app/admin/admin.fixtures';
2828
import {
29-
HttpClientTestingModule,
30-
HttpTestingController
29+
HttpTestingController,
30+
provideHttpClientTesting
3131
} from '@angular/common/http/testing';
3232
import { LoggerModule } from '@angular-ru/cdk/logger';
3333
import { interpolate } from '@app/core';
@@ -39,6 +39,10 @@ import {
3939
import { SaveConfigurationOptionsResponse } from '@app/admin/models/net/save-configuration-options-response';
4040
import { SaveConfigurationOptionsRequest } from '@app/admin/models/net/save-configuration-options-request';
4141
import { FeatureEnabledResponse } from '@app/admin/models/net/feature-enabled-response';
42+
import {
43+
provideHttpClient,
44+
withInterceptorsFromDi
45+
} from '@angular/common/http';
4246

4347
describe('ConfigurationService', () => {
4448
const OPTIONS = [
@@ -56,7 +60,11 @@ describe('ConfigurationService', () => {
5660

5761
beforeEach(() => {
5862
TestBed.configureTestingModule({
59-
imports: [HttpClientTestingModule, LoggerModule.forRoot()]
63+
imports: [LoggerModule.forRoot()],
64+
providers: [
65+
provideHttpClient(withInterceptorsFromDi()),
66+
provideHttpClientTesting()
67+
]
6068
});
6169

6270
service = TestBed.inject(ConfigurationService);

comixed-webui/src/app/admin/services/filename-scraping-rules.service.spec.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import {
2727
} from '@app/admin/admin.fixtures';
2828
import { LoggerModule } from '@angular-ru/cdk/logger';
2929
import {
30-
HttpClientTestingModule,
31-
HttpTestingController
30+
HttpTestingController,
31+
provideHttpClientTesting
3232
} from '@angular/common/http/testing';
3333
import { interpolate } from '@app/core';
3434
import {
@@ -37,7 +37,11 @@ import {
3737
SAVE_FILENAME_SCRAPING_RULES_URL,
3838
UPLOAD_FILENAME_SCRAPING_RULES_URL
3939
} from '@app/admin/admin.constants';
40-
import { HttpResponse } from '@angular/common/http';
40+
import {
41+
HttpResponse,
42+
provideHttpClient,
43+
withInterceptorsFromDi
44+
} from '@angular/common/http';
4145

4246
describe('FilenameScrapingRulesService', () => {
4347
const RULES = [
@@ -53,7 +57,11 @@ describe('FilenameScrapingRulesService', () => {
5357

5458
beforeEach(() => {
5559
TestBed.configureTestingModule({
56-
imports: [HttpClientTestingModule, LoggerModule.forRoot()]
60+
imports: [LoggerModule.forRoot()],
61+
providers: [
62+
provideHttpClient(withInterceptorsFromDi()),
63+
provideHttpClientTesting()
64+
]
5765
});
5866
service = TestBed.inject(FilenameScrapingRulesService);
5967
httpMock = TestBed.inject(HttpTestingController);

comixed-webui/src/app/admin/services/metrics.service.spec.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import { TestBed } from '@angular/core/testing';
2020

2121
import { MetricsService } from './metrics.service';
2222
import {
23-
HttpClientTestingModule,
24-
HttpTestingController
23+
HttpTestingController,
24+
provideHttpClientTesting
2525
} from '@angular/common/http/testing';
2626
import { LoggerModule } from '@angular-ru/cdk/logger';
2727
import { METRIC_DETAIL, METRIC_LIST } from '@app/admin/admin.fixtures';
@@ -30,14 +30,22 @@ import {
3030
LOAD_METRIC_DETAIL_URL,
3131
LOAD_METRIC_LIST_URL
3232
} from '@app/admin/admin.constants';
33+
import {
34+
provideHttpClient,
35+
withInterceptorsFromDi
36+
} from '@angular/common/http';
3337

3438
describe('MetricsService', () => {
3539
let service: MetricsService;
3640
let httpMock: HttpTestingController;
3741

3842
beforeEach(() => {
3943
TestBed.configureTestingModule({
40-
imports: [HttpClientTestingModule, LoggerModule.forRoot()]
44+
imports: [LoggerModule.forRoot()],
45+
providers: [
46+
provideHttpClient(withInterceptorsFromDi()),
47+
provideHttpClientTesting()
48+
]
4149
});
4250

4351
service = TestBed.inject(MetricsService);

comixed-webui/src/app/admin/services/server-runtime.service.spec.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,19 @@ import { TestBed } from '@angular/core/testing';
2121
import { ServerRuntimeService } from './server-runtime.service';
2222
import { LoggerModule } from '@angular-ru/cdk/logger';
2323
import {
24-
HttpClientTestingModule,
25-
HttpTestingController
24+
HttpTestingController,
25+
provideHttpClientTesting
2626
} from '@angular/common/http/testing';
2727
import { interpolate } from '@app/core';
2828
import {
2929
LOAD_SERVER_HEALTH_URL,
3030
SHUTDOWN_SERVER_URL
3131
} from '@app/admin/admin.constants';
32-
import { HttpResponse } from '@angular/common/http';
32+
import {
33+
HttpResponse,
34+
provideHttpClient,
35+
withInterceptorsFromDi
36+
} from '@angular/common/http';
3337
import { SERVER_HEALTH } from '@app/admin/admin.fixtures';
3438

3539
describe('ServerRuntimeService', () => {
@@ -40,7 +44,11 @@ describe('ServerRuntimeService', () => {
4044

4145
beforeEach(() => {
4246
TestBed.configureTestingModule({
43-
imports: [HttpClientTestingModule, LoggerModule.forRoot()]
47+
imports: [LoggerModule.forRoot()],
48+
providers: [
49+
provideHttpClient(withInterceptorsFromDi()),
50+
provideHttpClientTesting()
51+
]
4452
});
4553
service = TestBed.inject(ServerRuntimeService);
4654
httpMock = TestBed.inject(HttpTestingController);

comixed-webui/src/app/collections/services/collection.service.spec.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,19 @@ import {
2626
COLLECTION_ENTRY_5
2727
} from '@app/collections/collections.fixtures';
2828
import {
29-
HttpClientTestingModule,
30-
HttpTestingController
29+
HttpTestingController,
30+
provideHttpClientTesting
3131
} from '@angular/common/http/testing';
3232
import { LoggerModule } from '@angular-ru/cdk/logger';
3333
import { TagType } from '@app/collections/models/comic-collection.enum';
3434
import { interpolate } from '@app/core';
3535
import { LOAD_COLLECTION_ENTRIES_URL } from '@app/collections/collections.constants';
3636
import { LoadCollectionEntriesRequest } from '@app/collections/models/net/load-collection-entries-request';
3737
import { LoadCollectionEntriesResponse } from '@app/collections/models/net/load-collection-entries-response';
38+
import {
39+
provideHttpClient,
40+
withInterceptorsFromDi
41+
} from '@angular/common/http';
3842

3943
describe('CollectionService', () => {
4044
const COLLECTION_LIST = [
@@ -56,7 +60,11 @@ describe('CollectionService', () => {
5660

5761
beforeEach(() => {
5862
TestBed.configureTestingModule({
59-
imports: [HttpClientTestingModule, LoggerModule.forRoot()]
63+
imports: [LoggerModule.forRoot()],
64+
providers: [
65+
provideHttpClient(withInterceptorsFromDi()),
66+
provideHttpClientTesting()
67+
]
6068
});
6169

6270
service = TestBed.inject(CollectionService);

comixed-webui/src/app/collections/services/publisher.service.spec.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import {
2929
SERIES_5
3030
} from '@app/collections/collections.fixtures';
3131
import {
32-
HttpClientTestingModule,
33-
HttpTestingController
32+
HttpTestingController,
33+
provideHttpClientTesting
3434
} from '@angular/common/http/testing';
3535
import { LoggerModule } from '@angular-ru/cdk/logger';
3636
import { interpolate } from '@app/core';
@@ -41,6 +41,10 @@ import {
4141
import { LoadPublisherListRequest } from '@app/collections/models/net/load-publisher-list-request';
4242
import { LoadPublisherListResponse } from '@app/collections/models/net/load-publisher-list-response';
4343
import { LoadPublisherDetailRequest } from '@app/collections/models/net/load-publisher-detail-request';
44+
import {
45+
provideHttpClient,
46+
withInterceptorsFromDi
47+
} from '@angular/common/http';
4448

4549
describe('PublisherService', () => {
4650
const PAGE_NUMBER = 3;
@@ -56,7 +60,11 @@ describe('PublisherService', () => {
5660

5761
beforeEach(() => {
5862
TestBed.configureTestingModule({
59-
imports: [HttpClientTestingModule, LoggerModule.forRoot()]
63+
imports: [LoggerModule.forRoot()],
64+
providers: [
65+
provideHttpClient(withInterceptorsFromDi()),
66+
provideHttpClientTesting()
67+
]
6068
});
6169

6270
service = TestBed.inject(PublisherService);

0 commit comments

Comments
 (0)