From 29f60d57bda6cbcd27a1da4885745a4df12cb307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20L=C3=BCckel?= Date: Fri, 28 Apr 2023 11:25:43 +0200 Subject: [PATCH] Upgrade to Angular 15 --- package.json | 28 ++++++++++++++-------------- src/test.ts | 11 ----------- tsconfig.json | 45 +++++++++++++++++++++++---------------------- tsconfig.lib.json | 1 - 4 files changed, 37 insertions(+), 48 deletions(-) diff --git a/package.json b/package.json index 810b3f3..70c35e2 100644 --- a/package.json +++ b/package.json @@ -37,19 +37,19 @@ "tslib": "^2.3.1" }, "devDependencies": { - "@angular-devkit/build-angular": "^14.2.11", - "@angular-devkit/core": "^14.2.11", - "@angular/animations": "^14.3.0", - "@angular/cli": "^14.2.11", - "@angular/common": "^14.3.0", - "@angular/compiler": "^14.3.0", - "@angular/compiler-cli": "^14.3.0", - "@angular/core": "^14.3.0", - "@angular/forms": "^14.3.0", - "@angular/language-service": "^14.3.0", - "@angular/platform-browser": "^14.3.0", - "@angular/platform-browser-dynamic": "^14.3.0", - "@angular/router": "^14.3.0", + "@angular-devkit/build-angular": "^15.2.7", + "@angular-devkit/core": "^15.2.7", + "@angular/animations": "^15.2.8", + "@angular/cli": "^15.2.7", + "@angular/common": "^15.2.8", + "@angular/compiler": "^15.2.8", + "@angular/compiler-cli": "^15.2.8", + "@angular/core": "^15.2.8", + "@angular/forms": "^15.2.8", + "@angular/language-service": "^15.2.8", + "@angular/platform-browser": "^15.2.8", + "@angular/platform-browser-dynamic": "^15.2.8", + "@angular/router": "^15.2.8", "@types/jasmine": "~3.10.3", "@types/jasminewd2": "~2.0.10", "@types/node": "^17.0.14", @@ -61,7 +61,7 @@ "karma-coverage-istanbul-reporter": "~3.0.3", "karma-jasmine": "~4.0.1", "karma-jasmine-html-reporter": "^1.7.0", - "ng-packagr": "^14.2.2", + "ng-packagr": "^15.2.2", "protractor": "~7.0.0", "rxjs": "~7.5.2", "ts-node": "~10.4.0", diff --git a/src/test.ts b/src/test.ts index 303b32a..0e1e630 100644 --- a/src/test.ts +++ b/src/test.ts @@ -8,19 +8,8 @@ import { platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; -declare const require: { - context(path: string, deep?: boolean, filter?: RegExp): { - keys(): string[]; - (id: string): T; - }; -}; - // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( BrowserDynamicTestingModule, platformBrowserDynamicTesting() ); -// 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 1c9ad0d..b0c0976 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,28 +1,29 @@ { "compileOnSave": false, "compilerOptions": { - "baseUrl": "./", - "outDir": "./dist/out-tsc", - "sourceMap": true, - "declaration": false, - "downlevelIteration": true, - "experimentalDecorators": true, - "module": "es2020", - "moduleResolution": "node", - "importHelpers": true, - "target": "es2020", - "typeRoots": [ - "node_modules/@types" - ], - "lib": [ - "es2018", - "dom" - ], - "paths": { - "angular2-hotkeys": [ - "dist/" - ] - } + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "module": "es2020", + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "typeRoots": [ + "node_modules/@types" + ], + "lib": [ + "es2018", + "dom" + ], + "paths": { + "angular2-hotkeys": [ + "dist/" + ] + }, + "useDefineForClassFields": false }, "angularCompilerOptions": { "fullTemplateTypeCheck": true, diff --git a/tsconfig.lib.json b/tsconfig.lib.json index 048fe0c..8da19f8 100644 --- a/tsconfig.lib.json +++ b/tsconfig.lib.json @@ -2,7 +2,6 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/lib", - "target": "es2020", "declaration": true, "inlineSources": true, "types": [],