Update to angular 17

This commit is contained in:
Lorenzo Iovino 2024-01-10 00:06:57 +01:00
parent c736ec8e07
commit 066d00a8e0
5 changed files with 2000 additions and 4248 deletions

View file

@ -16,7 +16,9 @@
"outputPath": "dist", "outputPath": "dist",
"index": "./src/index.html", "index": "./src/index.html",
"main": "./src/main.ts", "main": "./src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json", "tsConfig": "tsconfig.app.json",
"aot": true, "aot": true,
"assets": [ "assets": [
@ -61,25 +63,28 @@
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
"options": { "options": {
"browserTarget": "dev:build" "buildTarget": "dev:build"
}, },
"configurations": { "configurations": {
"production": { "production": {
"browserTarget": "dev:build:production" "buildTarget": "dev:build:production"
} }
} }
}, },
"extract-i18n": { "extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n", "builder": "@angular-devkit/build-angular:extract-i18n",
"options": { "options": {
"browserTarget": "dev:build" "buildTarget": "dev:build"
} }
}, },
"test": { "test": {
"builder": "@angular-devkit/build-angular:karma", "builder": "@angular-devkit/build-angular:karma",
"options": { "options": {
"main": "src/test.ts", "main": "src/test.ts",
"polyfills": "src/polyfills.ts", "polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json", "tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js", "karmaConfig": "karma.conf.js",
"assets": [ "assets": [
@ -97,25 +102,12 @@
"options": { "options": {
"tsConfig": [ "tsConfig": [
"tsconfig.app.json", "tsconfig.app.json",
"tsconfig.spec.json", "tsconfig.spec.json"
"e2e/tsconfig.json"
], ],
"exclude": [ "exclude": [
"**/node_modules/**" "**/node_modules/**"
] ]
} }
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "dev:serve"
},
"configurations": {
"production": {
"devServerTarget": "dev:serve:production"
}
}
} }
} }
} }

6122
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -9,7 +9,6 @@
"test:headless": "node node_modules/@angular/cli/bin/ng test --browsers=ChromeHeadlessDebug", "test:headless": "node node_modules/@angular/cli/bin/ng test --browsers=ChromeHeadlessDebug",
"test:headless:singleRun": "node node_modules/@angular/cli/bin/ng test --browsers=ChromeHeadlessDebug --watch false", "test:headless:singleRun": "node node_modules/@angular/cli/bin/ng test --browsers=ChromeHeadlessDebug --watch false",
"lint": "node node_modules/@angular/cli/bin/ng lint", "lint": "node node_modules/@angular/cli/bin/ng lint",
"e2e": "node node_modules/@angular/cli/bin/ng e2e",
"release:minor": "cd ./src/lib/ && npm version minor", "release:minor": "cd ./src/lib/ && npm version minor",
"release:major": "cd ./src/lib/ && npm version major", "release:major": "cd ./src/lib/ && npm version major",
"release:patch": "cd ./src/lib/ && npm version patch", "release:patch": "cd ./src/lib/ && npm version patch",
@ -17,23 +16,23 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^16.2.12", "@angular/animations": "^17.0.8",
"@angular/common": "^16.2.12", "@angular/common": "^17.0.8",
"@angular/compiler": "^16.2.12", "@angular/compiler": "^17.0.8",
"@angular/core": "^16.2.12", "@angular/core": "^17.0.8",
"@angular/forms": "^16.2.12", "@angular/forms": "^17.0.8",
"@angular/platform-browser": "^16.2.12", "@angular/platform-browser": "^17.0.8",
"@angular/platform-browser-dynamic": "^16.2.12", "@angular/platform-browser-dynamic": "^17.0.8",
"@angular/router": "^16.2.12", "@angular/router": "^17.0.8",
"rxjs": "~6.5.4", "rxjs": "~7.8.0",
"tslib": "^2.3.0", "tslib": "^2.3.0",
"zone.js": "^0.14.1" "zone.js": "~0.14.2"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^16.2.11", "@angular-devkit/build-angular": "^17.0.9",
"@angular/cli": "^16.2.11", "@angular/cli": "^17.0.9",
"@angular/compiler-cli": "^16.2.12", "@angular/compiler-cli": "^17.0.8",
"@angular/language-service": "^16.2.12", "@angular/language-service": "^17.0.8",
"@types/jasmine": "~3.5.0", "@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
@ -45,9 +44,8 @@
"karma-coverage-istanbul-reporter": "~2.1.0", "karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~5.1.0", "karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "^2.0.0", "karma-jasmine-html-reporter": "^2.0.0",
"ng-packagr": "^16.2.3", "ng-packagr": "^17.0.3",
"prettier": "^1.19.1", "prettier": "^1.19.1",
"protractor": "^7.0.0",
"ts-node": "~8.3.0", "ts-node": "~8.3.0",
"tslint": "~5.18.0", "tslint": "~5.18.0",
"typescript": "5.2.2" "typescript": "5.2.2"

View file

@ -1,63 +0,0 @@
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

View file

@ -10,7 +10,6 @@
}, },
"files": [ "files": [
"./src/test.ts", "./src/test.ts",
"./src/polyfills.ts"
], ],
"include": [ "include": [
"**/*.spec.ts", "**/*.spec.ts",