From c1d948fb7502b597baed2a4ad6973730a30a901d Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 24 Aug 2023 16:20:55 +0300 Subject: [PATCH] Migrate angular core and cli to version 15 and update dependencies to be compatible with the newer version. --- package.json | 28 ++++++++++++++-------------- src/test.ts | 6 ------ tsconfig.json | 5 +++-- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index aa2e0b9..941ae28 100644 --- a/package.json +++ b/package.json @@ -15,32 +15,32 @@ }, "private": true, "dependencies": { - "@angular/animations": "^14.2.12", + "@angular/animations": "^15.2.9", "@angular/cdk": "^14.2.7", - "@angular/common": "^14.2.12", - "@angular/compiler": "^14.2.12", - "@angular/core": "^14.2.12", - "@angular/forms": "^14.2.12", - "@angular/localize": "^14.2.12", + "@angular/common": "^15.2.9", + "@angular/compiler": "^15.2.9", + "@angular/core": "^15.2.9", + "@angular/forms": "^15.2.9", + "@angular/localize": "^15.2.9", "@angular/material": "^14.2.7", - "@angular/platform-browser": "^14.2.12", - "@angular/platform-browser-dynamic": "^14.2.12", - "@angular/router": "^14.2.12", + "@angular/platform-browser": "^15.2.9", + "@angular/platform-browser-dynamic": "^15.2.9", + "@angular/router": "^15.2.9", "clipboard": "^1.5.16", "core-js": "^2.5.4", "express": "^4.15.2", "jquery": "^3.4.1", - "ng-recaptcha": "^10.0.0", + "ng-recaptcha": "^11.0.0", "rxjs": "^6.5.1", "ts-md5": "^1.2.0", "tslib": "^2.0.0", "zone.js": "~0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "^14.2.10", - "@angular/cli": "^14.2.10", - "@angular/compiler-cli": "^14.2.12", - "@angular/language-service": "^14.2.12", + "@angular-devkit/build-angular": "^15.2.9", + "@angular/cli": "^15.2.9", + "@angular/compiler-cli": "^15.2.9", + "@angular/language-service": "^15.2.9", "@types/node": "^12.11.1", "@types/express": "^4.17.0", "@types/jasmine": "~3.6.0", diff --git a/src/test.ts b/src/test.ts index 6b03dbe..ae25f27 100644 --- a/src/test.ts +++ b/src/test.ts @@ -7,8 +7,6 @@ import { platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; -declare const require: any; - // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( BrowserDynamicTestingModule, @@ -16,7 +14,3 @@ getTestBed().initTestEnvironment( teardown: { destroyAfterEach: false } } ); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/tsconfig.json b/tsconfig.json index fc8b4c1..668d981 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,13 +10,14 @@ "moduleResolution": "node", "experimentalDecorators": true, "importHelpers": true, - "target": "es2020", + "target": "ES2022", "typeRoots": [ "node_modules/@types" ], "lib": [ "es2018", "dom" - ] + ], + "useDefineForClassFields": false } }