From 77e7e151bfd824699893584a1cb9e05c18b882d2 Mon Sep 17 00:00:00 2001 From: David Czeck Date: Mon, 21 Nov 2022 20:04:38 -0800 Subject: [PATCH] Ng15 (#144) * Update ng15 * Update ng15 --- README.md | 3 ++- package.json | 30 ++++++++++----------- projects/angular-svg-icon/package.json | 8 +++--- projects/angular-svg-icon/src/test.ts | 6 ----- projects/angular-svg-icon/tsconfig.lib.json | 1 - src/test.ts | 6 ----- tsconfig.json | 7 ++--- 7 files changed, 25 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 3b9ec84..3b09d9b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Angular SVG Icon ========= -The **angular-svg-icon** is an Angular 14 service and component that provides a +The **angular-svg-icon** is an Angular 15 service and component that provides a means to inline SVG files to allow for them to be easily styled by CSS and code. The service provides an icon registery that loads and caches a SVG indexed by @@ -19,6 +19,7 @@ This [demo](https://czeckd.github.io/angular-svg-icon/) shows this module in act $ npm i angular-svg-icon --save ``` **Note on earlier versions of Angular:** +- For Angular 14, use angular-svg-icon@14.0.0 - For Angular 13, use angular-svg-icon@13.0.0 - For Angular 12, use angular-svg-icon@12.0.0 - For Angular 11, use angular-svg-icon@11.2.0 diff --git a/package.json b/package.json index 9088b04..88e9e63 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "svg-icon", - "description": "Angular 14 component and service for inlining SVGs allowing them to be easily styled with CSS.", - "version": "14.0.0", + "description": "Angular 15 component and service for inlining SVGs allowing them to be easily styled with CSS.", + "version": "15.0.0", "repository": { "type": "git", "url": "https://github.com/czeckd/angular-svg-icon.git" @@ -25,22 +25,22 @@ }, "private": true, "dependencies": { - "@angular/animations": "^14.0.1", - "@angular/common": "^14.0.1", - "@angular/compiler": "^14.0.1", - "@angular/core": "^14.0.1", - "@angular/forms": "^14.0.1", - "@angular/platform-browser": "^14.0.1", - "@angular/platform-browser-dynamic": "^14.0.1", - "@angular/router": "^14.0.1", + "@angular/animations": "^15.0.0", + "@angular/common": "^15.0.0", + "@angular/compiler": "^15.0.0", + "@angular/core": "^15.0.0", + "@angular/forms": "^15.0.0", + "@angular/platform-browser": "^15.0.0", + "@angular/platform-browser-dynamic": "^15.0.0", + "@angular/router": "^15.0.0", "rxjs": "~6.6.3", "tslib": "^2.3.1", "zone.js": "~0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "^14.0.1", - "@angular/cli": "^14.0.1", - "@angular/compiler-cli": "^14.0.1", + "@angular-devkit/build-angular": "^15.0.0", + "@angular/cli": "^15.0.0", + "@angular/compiler-cli": "^15.0.0", "@types/jasmine": "~4.0.0", "@types/node": "^12.11.1", "jasmine-core": "~4.1.0", @@ -49,7 +49,7 @@ "karma-coverage": "~2.2.0", "karma-jasmine": "~5.0.0", "karma-jasmine-html-reporter": "~1.7.0", - "ng-packagr": "^14.0.2", - "typescript": "~4.7.3" + "ng-packagr": "^15.0.0", + "typescript": "~4.8.4" } } diff --git a/projects/angular-svg-icon/package.json b/projects/angular-svg-icon/package.json index 60b6a33..6931b13 100644 --- a/projects/angular-svg-icon/package.json +++ b/projects/angular-svg-icon/package.json @@ -1,7 +1,7 @@ { "name": "angular-svg-icon", - "description": "Angular 14 component and service for inlining SVGs allowing them to be easily styled with CSS.", - "version": "14.0.0", + "description": "Angular 15 component and service for inlining SVGs allowing them to be easily styled with CSS.", + "version": "15.0.0", "repository": { "type": "git", "url": "https://github.com/czeckd/angular-svg-icon.git" @@ -14,8 +14,8 @@ "icon" ], "peerDependencies": { - "@angular/core": ">=14.0.0", - "@angular/common": ">=14.0.0", + "@angular/core": ">=15.0.0", + "@angular/common": ">=15.0.0", "rxjs": ">=6.6.3" }, "dependencies": { diff --git a/projects/angular-svg-icon/src/test.ts b/projects/angular-svg-icon/src/test.ts index c9a05ef..0fd0417 100644 --- a/projects/angular-svg-icon/src/test.ts +++ b/projects/angular-svg-icon/src/test.ts @@ -8,8 +8,6 @@ import { platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; -declare const require: any; - // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( BrowserDynamicTestingModule, @@ -17,10 +15,6 @@ 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); /** * Get typed object as a jasmine spy, so each method of the spied object is changed to a jasmyne.Spy type! diff --git a/projects/angular-svg-icon/tsconfig.lib.json b/projects/angular-svg-icon/tsconfig.lib.json index ced4e5c..307caea 100644 --- a/projects/angular-svg-icon/tsconfig.lib.json +++ b/projects/angular-svg-icon/tsconfig.lib.json @@ -3,7 +3,6 @@ "compilerOptions": { "outDir": "../../out-tsc/lib", "declarationMap": true, - "target": "es2020", "declaration": true, "inlineSources": true, "types": [], diff --git a/src/test.ts b/src/test.ts index 0b7b09e..22ee23a 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 022900f..170e3ba 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,7 @@ "removeComments": false, "noImplicitAny": true, "suppressImplicitAnyIndexErrors": true, - "target": "es2020", + "target": "ES2022", "typeRoots": [ "node_modules/@types" ], @@ -24,13 +24,14 @@ "dom" ], "paths": { - "angular-svg-icon": [ + "angular-svg-icon": [ "dist/angular-svg-icon" ], "angular-svg-icon/*": [ "dist/angular-svg-icon/*" ] - } + }, + "useDefineForClassFields": false }, "angularCompilerOptions": { "strictInjectionParameters": true,