chore: migrate to Angular 17 (#2538)

* chore: migrate to Angular 17

* chore: update
This commit is contained in:
Alex Inkin
2023-12-11 18:06:55 +04:00
committed by GitHub
parent 0469aab433
commit ea6f70e3c5
15 changed files with 2688 additions and 2768 deletions

View File

@@ -17,7 +17,7 @@
"outputPath": "dist/raw/ui",
"index": "projects/ui/src/index.html",
"main": "projects/ui/src/main.ts",
"polyfills": "projects/ui/src/polyfills.ts",
"polyfills": ["zone.js"],
"tsConfig": "projects/ui/tsconfig.json",
"inlineStyleLanguage": "scss",
"assets": [
@@ -101,10 +101,10 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "ui:build:production"
"buildTarget": "ui:build:production"
},
"development": {
"browserTarget": "ui:build:development"
"buildTarget": "ui:build:development"
}
},
"defaultConfiguration": "development"
@@ -112,7 +112,7 @@
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ui:build"
"buildTarget": "ui:build"
}
},
"lint": {
@@ -163,7 +163,7 @@
"outputPath": "dist/raw/install-wizard",
"index": "projects/install-wizard/src/index.html",
"main": "projects/install-wizard/src/main.ts",
"polyfills": "projects/install-wizard/src/polyfills.ts",
"polyfills": ["zone.js"],
"tsConfig": "projects/install-wizard/tsconfig.json",
"inlineStyleLanguage": "scss",
"assets": [
@@ -234,14 +234,14 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "install-wizard:build"
"buildTarget": "install-wizard:build"
},
"configurations": {
"production": {
"browserTarget": "install-wizard:build:production"
"buildTarget": "install-wizard:build:production"
},
"development": {
"browserTarget": "install-wizard:build:development"
"buildTarget": "install-wizard:build:development"
}
},
"defaultConfiguration": "development"
@@ -249,7 +249,7 @@
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "install-wizard:build"
"buildTarget": "install-wizard:build"
}
},
"lint": {
@@ -300,7 +300,7 @@
"outputPath": "dist/raw/setup-wizard",
"index": "projects/setup-wizard/src/index.html",
"main": "projects/setup-wizard/src/main.ts",
"polyfills": "projects/setup-wizard/src/polyfills.ts",
"polyfills": ["zone.js"],
"tsConfig": "projects/setup-wizard/tsconfig.json",
"inlineStyleLanguage": "scss",
"assets": [
@@ -365,10 +365,10 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "setup-wizard:build:production"
"buildTarget": "setup-wizard:build:production"
},
"development": {
"browserTarget": "setup-wizard:build:development"
"buildTarget": "setup-wizard:build:development"
}
},
"defaultConfiguration": "development"
@@ -376,7 +376,7 @@
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "setup-wizard:build"
"buildTarget": "setup-wizard:build"
}
},
"lint": {

5161
web/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -30,17 +30,17 @@
"build-config": "node build-config.js"
},
"dependencies": {
"@angular/animations": "^16.1.4",
"@angular/cdk": "^16.1.4",
"@angular/common": "^16.1.4",
"@angular/compiler": "^16.1.4",
"@angular/core": "^16.1.4",
"@angular/forms": "^16.1.4",
"@angular/platform-browser": "^16.1.4",
"@angular/platform-browser-dynamic": "^16.1.4",
"@angular/pwa": "^16.1.4",
"@angular/router": "^16.1.4",
"@angular/service-worker": "^16.1.4",
"@angular/animations": "^17.0.6",
"@angular/cdk": "^17.0.3",
"@angular/common": "^17.0.6",
"@angular/compiler": "^17.0.6",
"@angular/core": "^17.0.6",
"@angular/forms": "^17.0.6",
"@angular/platform-browser": "^17.0.6",
"@angular/platform-browser-dynamic": "^17.0.6",
"@angular/pwa": "^17.0.6",
"@angular/router": "^17.0.6",
"@angular/service-worker": "^17.0.6",
"@ionic/angular": "^6.1.15",
"@materia-ui/ngx-monaco-editor": "^6.0.0",
"@start9labs/argon2": "^0.1.0",
@@ -71,7 +71,7 @@
"marked": "^4.0.0",
"monaco-editor": "^0.33.0",
"mustache": "^4.2.0",
"ng-qrcode": "^16.0.0",
"ng-qrcode": "^17.0.0",
"node-jose": "^2.1.1",
"patch-db-client": "file: ../../../patch-db/client",
"pbkdf2": "^3.1.2",
@@ -81,13 +81,13 @@
"ts-matches": "^5.2.1",
"tslib": "^2.3.0",
"uuid": "^8.3.2",
"zone.js": "^0.13.1"
"zone.js": "^0.14.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.1.4",
"@angular/cli": "^16.1.4",
"@angular/compiler-cli": "^16.1.4",
"@angular/language-service": "^16.1.4",
"@angular-devkit/build-angular": "^17.0.6",
"@angular/cli": "^17.0.6",
"@angular/compiler-cli": "^17.0.6",
"@angular/language-service": "^17.0.6",
"@ionic/cli": "^6.19.0",
"@types/dompurify": "^2.3.3",
"@types/estree": "^0.0.51",
@@ -101,14 +101,14 @@
"autoprefixer": "^10.4.14",
"husky": "^4.3.8",
"lint-staged": "^13.2.0",
"ng-packagr": "^16.1.0",
"ng-packagr": "^17.0.2",
"node-html-parser": "^5.3.3",
"postcss": "^8.4.21",
"prettier": "^2.6.1",
"prettier": "^3.1.1",
"raw-loader": "^4.0.2",
"ts-node": "^10.7.0",
"tslint": "^6.1.3",
"typescript": "^5.1.6",
"typescript": "^5.2.2",
"webpack-bundle-analyzer": "^4.8.0"
},
"husky": {

View File

@@ -1,64 +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
*/
/** 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';
*
* 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;
*
*/
import './zone-flags'
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone' // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

View File

@@ -1,6 +0,0 @@
/**
* Prevents Angular change detection from
* running with certain Web Component callbacks
*/
// eslint-disable-next-line no-underscore-dangle
(window as any).__Zone_disable_customElements = true

View File

@@ -4,6 +4,6 @@
"compilerOptions": {
"baseUrl": "./"
},
"files": ["src/main.ts", "src/polyfills.ts"],
"files": ["src/main.ts"],
"include": ["src/**/*.d.ts"]
}

View File

@@ -1,65 +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
*/
/** 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';
*
* 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;
*
*/
import './zone-flags'
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone' // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

View File

@@ -1,6 +0,0 @@
/**
* Prevents Angular change detection from
* running with certain Web Component callbacks
*/
// eslint-disable-next-line no-underscore-dangle
(window as any).__Zone_disable_customElements = true

View File

@@ -4,6 +4,6 @@
"compilerOptions": {
"baseUrl": "./"
},
"files": ["src/main.ts", "src/polyfills.ts"],
"files": ["src/main.ts"],
"include": ["src/**/*.d.ts"]
}

View File

@@ -47,7 +47,7 @@ import { EmailInfoComponent } from './info.component'
[(ngModel)]="testAddress"
[ngModelOptions]="{ standalone: true }"
>
Firstname Lastname <email@example.com>
Firstname Lastname <email@example.com>
<input tuiTextfield inputmode="email" />
</tui-input>
<div class="ion-text-right ion-padding-top">

View File

@@ -44,7 +44,7 @@
[(ngModel)]="testAddress"
[ngModelOptions]="{standalone: true}"
>
Firstname Lastname &lt;email@example.com&gt;
Firstname Lastname &lt;email&#64;example.com&gt;
<input tuiTextfield inputmode="email" />
</tui-input>
<div class="ion-text-right ion-padding-top">

View File

@@ -4,9 +4,12 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
import { AppModule } from './app/app.module'
import { environment } from './environments/environment'
; (window as any).global = window
if (environment.production) {
enableProdMode()
}
platformBrowserDynamic().bootstrapModule(AppModule)
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err))

View File

@@ -1,68 +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__BLACK_LISTED_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;
*
*/
(window as any).global = window
; (window as any).process = { env: { DEBUG: undefined }, browser: true }
import './zone-flags'
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone' // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

View File

@@ -1,5 +0,0 @@
/**
* Prevents Angular change detection from
* running with certain Web Component callbacks
*/
(window as any).__Zone_disable_customElements = true

View File

@@ -3,6 +3,6 @@
"compilerOptions": {
"baseUrl": "./"
},
"files": ["src/main.ts", "src/polyfills.ts"],
"files": ["src/main.ts"],
"include": ["src/**/*.d.ts"]
}