refactor: update to Angular 17

This commit is contained in:
2023-11-08 15:44:00 +01:00
parent 6dc01b538c
commit d3fe9a2f85
28 changed files with 2494 additions and 1561 deletions

View File

@@ -101,7 +101,7 @@
"supertest": "6.3.3", "supertest": "6.3.3",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "7.2.0", "tsup": "7.2.0",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"prettier": "@openstapps/prettier-config", "prettier": "@openstapps/prettier-config",
"eslintConfig": { "eslintConfig": {

View File

@@ -57,7 +57,7 @@
"nock": "13.3.1", "nock": "13.3.1",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "7.2.0", "tsup": "7.2.0",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"tsup": { "tsup": {
"entry": [ "entry": [

View File

@@ -66,7 +66,7 @@
"nock": "13.3.1", "nock": "13.3.1",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "7.2.0", "tsup": "7.2.0",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"tsup": { "tsup": {
"entry": [ "entry": [

View File

@@ -51,7 +51,7 @@
"is-cidr": "4.0.2", "is-cidr": "4.0.2",
"mustache": "4.2.0", "mustache": "4.2.0",
"semver": "7.3.8", "semver": "7.3.8",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"devDependencies": { "devDependencies": {
"@openstapps/eslint-config": "workspace:*", "@openstapps/eslint-config": "workspace:*",

View File

@@ -19,7 +19,7 @@
"@openstapps/tsconfig": "workspace:*", "@openstapps/tsconfig": "workspace:*",
"@types/node": "18.15.3", "@types/node": "18.15.3",
"eslint": "8.53.0", "eslint": "8.53.0",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"peerDependencies": { "peerDependencies": {
"@typescript-eslint/eslint-plugin": "6.10.0", "@typescript-eslint/eslint-plugin": "6.10.0",

View File

@@ -19,6 +19,6 @@
"test": "npx prettier --config index.json --check \"test/*.js\"" "test": "npx prettier --config index.json --check \"test/*.js\""
}, },
"peerDependencies": { "peerDependencies": {
"prettier": "2.8.6" "prettier": "3.0.3"
} }
} }

View File

@@ -65,7 +65,7 @@
"mocha-junit-reporter": "2.2.0", "mocha-junit-reporter": "2.2.0",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "7.2.0", "tsup": "7.2.0",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"tsup": { "tsup": {
"entry": [ "entry": [

View File

@@ -54,7 +54,7 @@
"nock": "13.3.1", "nock": "13.3.1",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "7.2.0", "tsup": "7.2.0",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"tsup": { "tsup": {
"entry": [ "entry": [

View File

@@ -44,7 +44,7 @@
"@types/express": "4.17.17", "@types/express": "4.17.17",
"@types/node": "18.15.3", "@types/node": "18.15.3",
"tsup": "7.2.0", "tsup": "7.2.0",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"prettier": "@openstapps/prettier-config", "prettier": "@openstapps/prettier-config",
"eslintConfig": { "eslintConfig": {

View File

@@ -11,12 +11,12 @@
"schematics": {}, "schematics": {},
"architect": { "architect": {
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser-esbuild", "builder": "@angular-devkit/build-angular:application",
"options": { "options": {
"outputPath": "www", "outputPath": "www",
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "browser": "src/main.ts",
"polyfills": "zone.js", "polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json", "tsConfig": "tsconfig.app.json",
"allowedCommonJsDependencies": [ "allowedCommonJsDependencies": [
"moment", "moment",
@@ -84,17 +84,13 @@
"with": "src/environments/environment.local.ts" "with": "src/environments/environment.local.ts"
} }
], ],
"buildOptimizer": false,
"optimization": false, "optimization": false,
"vendorChunk": true,
"extractLicenses": false, "extractLicenses": false,
"sourceMap": true, "sourceMap": true,
"namedChunks": true "namedChunks": true
}, },
"development": { "development": {
"buildOptimizer": false,
"optimization": false, "optimization": false,
"vendorChunk": true,
"extractLicenses": false, "extractLicenses": false,
"sourceMap": true, "sourceMap": true,
"namedChunks": true "namedChunks": true
@@ -114,20 +110,20 @@
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
"options": { "options": {
"browserTarget": "app:build" "buildTarget": "app:build"
}, },
"configurations": { "configurations": {
"production": { "production": {
"browserTarget": "app:build:production" "buildTarget": "app:build:production"
}, },
"development": { "development": {
"browserTarget": "app:build:development" "buildTarget": "app:build:development"
}, },
"ci": { "ci": {
"browserTarget": "app:build" "buildTarget": "app:build"
}, },
"fake": { "fake": {
"browserTarget": "app:build:fake" "buildTarget": "app:build:fake"
} }
}, },
"defaultConfiguration": "development" "defaultConfiguration": "development"

View File

@@ -53,13 +53,13 @@
"test:integration": "sh integration-test.sh" "test:integration": "sh integration-test.sh"
}, },
"dependencies": { "dependencies": {
"@angular/animations": "16.1.4", "@angular/animations": "17.0.0",
"@angular/cdk": "16.1.4", "@angular/cdk": "16.1.4",
"@angular/common": "16.1.4", "@angular/common": "17.0.0",
"@angular/core": "16.1.4", "@angular/core": "17.0.0",
"@angular/forms": "16.1.4", "@angular/forms": "17.0.0",
"@angular/platform-browser": "16.1.4", "@angular/platform-browser": "17.0.0",
"@angular/router": "16.1.4", "@angular/router": "17.0.0",
"@asymmetrik/ngx-leaflet": "16.0.1", "@asymmetrik/ngx-leaflet": "16.0.1",
"@asymmetrik/ngx-leaflet-markercluster": "16.0.0", "@asymmetrik/ngx-leaflet-markercluster": "16.0.0",
"@awesome-cordova-plugins/calendar": "5.45.0", "@awesome-cordova-plugins/calendar": "5.45.0",
@@ -112,23 +112,23 @@
"rxjs": "7.8.1", "rxjs": "7.8.1",
"swiper": "8.4.5", "swiper": "8.4.5",
"tslib": "2.4.1", "tslib": "2.4.1",
"zone.js": "0.13.1" "zone.js": "0.14.2"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/architect": "0.1601.4", "@angular-devkit/architect": "0.1700.0",
"@angular-devkit/build-angular": "16.1.4", "@angular-devkit/build-angular": "17.0.0",
"@angular-devkit/core": "16.1.4", "@angular-devkit/core": "17.0.0",
"@angular-devkit/schematics": "16.1.4", "@angular-devkit/schematics": "17.0.0",
"@angular-eslint/builder": "16.1.0", "@angular-eslint/builder": "16.1.0",
"@angular-eslint/eslint-plugin": "16.1.0", "@angular-eslint/eslint-plugin": "16.1.0",
"@angular-eslint/eslint-plugin-template": "16.1.0", "@angular-eslint/eslint-plugin-template": "16.1.0",
"@angular-eslint/schematics": "16.1.0", "@angular-eslint/schematics": "16.1.0",
"@angular-eslint/template-parser": "16.1.0", "@angular-eslint/template-parser": "16.1.0",
"@angular/cli": "17.0.0", "@angular/cli": "17.0.0",
"@angular/compiler": "16.1.4", "@angular/compiler": "17.0.0",
"@angular/compiler-cli": "16.1.4", "@angular/compiler-cli": "17.0.0",
"@angular/language-service": "16.1.4", "@angular/language-service": "17.0.0",
"@angular/platform-browser-dynamic": "16.1.4", "@angular/platform-browser-dynamic": "17.0.0",
"@capacitor/android": "4.6.1", "@capacitor/android": "4.6.1",
"@capacitor/cli": "4.6.1", "@capacitor/cli": "4.6.1",
"@capacitor/ios": "4.6.1", "@capacitor/ios": "4.6.1",
@@ -180,7 +180,7 @@
"stylelint-config-standard-scss": "10.0.0", "stylelint-config-standard-scss": "10.0.0",
"surge": "0.23.1", "surge": "0.23.1",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"typescript": "5.1.6", "typescript": "5.2.2",
"webpack-bundle-analyzer": "4.7.0" "webpack-bundle-analyzer": "4.7.0"
}, },
"prettier": "@openstapps/prettier-config", "prettier": "@openstapps/prettier-config",

View File

@@ -15,9 +15,10 @@ export class FullScreenImageDirective {
await this.host.nativeElement.requestFullscreen(); await this.host.nativeElement.requestFullscreen();
if ( if (
Math.sign(screen.width - screen.height) === Math.sign(screen.width - screen.height) ===
Math.sign(this.host.nativeElement.width - this.host.nativeElement.height) Math.sign(this.host.nativeElement.width - this.host.nativeElement.height) &&
'lock' in screen.orientation
) { ) {
await screen.orientation.lock('landscape'); await (screen.orientation as {lock(orientation: string): Promise<void>}).lock('landscape');
} }
} }
} }

View File

@@ -41,8 +41,8 @@
"turbo": "1.10.3", "turbo": "1.10.3",
"turbo-ignore": "1.10.6", "turbo-ignore": "1.10.6",
"turbowatch": "2.29.4", "turbowatch": "2.29.4",
"typedoc": "0.24.8", "typedoc": "0.25.3",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"pnpm": { "pnpm": {
"patchedDependencies": { "patchedDependencies": {

View File

@@ -62,8 +62,8 @@
"nock": "13.3.1", "nock": "13.3.1",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "7.2.0", "tsup": "7.2.0",
"typedoc": "0.24.8", "typedoc": "0.25.3",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"peerDependencies": { "peerDependencies": {
"@openstapps/core": "workspace:*" "@openstapps/core": "workspace:*"

View File

@@ -56,8 +56,8 @@
"traverse": "0.6.7", "traverse": "0.6.7",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "7.2.0", "tsup": "7.2.0",
"typedoc": "0.24.8", "typedoc": "0.25.3",
"typescript": "5.1.6", "typescript": "5.2.2",
"undici": "5.22.1" "undici": "5.22.1"
}, },
"peerDependencies": { "peerDependencies": {

View File

@@ -30,8 +30,8 @@
"mocha": "10.2.0", "mocha": "10.2.0",
"mocha-junit-reporter": "2.2.0", "mocha-junit-reporter": "2.2.0",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"typedoc": "0.24.8", "typedoc": "0.25.3",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"prettier": "@openstapps/prettier-config", "prettier": "@openstapps/prettier-config",
"eslintConfig": { "eslintConfig": {

View File

@@ -52,5 +52,5 @@ export function groupByStable(collection, group) {
* @returns {Record<string, T[]>} * @returns {Record<string, T[]>}
*/ */
export function groupByProperty(collection, property) { export function groupByProperty(collection, property) {
return groupBy(collection, item => item[property]); return groupBy(collection, item => /** @type {string} */ (item[property]));
} }

View File

@@ -104,11 +104,11 @@ describe('groupByStable', () => {
describe('groupByProperty', function () { describe('groupByProperty', function () {
it('should group by property', () => { it('should group by property', () => {
const array = [ const array = [
{id: 1, name: 'one'}, {id: /** @type {1} */ 1, name: /** @type {'one'} */ 'one'},
{id: 2, name: 'two'}, {id: /** @type {2} */ 2, name: /** @type {'two'} */ 'two'},
{id: 3, name: 'three'}, {id: /** @type {3} */ 3, name: /** @type {'three'} */ 'three'},
{id: 4, name: 'four'}, {id: /** @type {4} */ 4, name: /** @type {'four'} */ 'four'},
{id: 5, name: 'five'}, {id: /** @type {5} */ 5, name: /** @type {'five'} */ 'five'},
]; ];
const result = groupByProperty(array, 'name'); const result = groupByProperty(array, 'name');

View File

@@ -52,8 +52,8 @@
"mocha-junit-reporter": "2.2.0", "mocha-junit-reporter": "2.2.0",
"nock": "13.3.1", "nock": "13.3.1",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"typedoc": "0.24.8", "typedoc": "0.25.3",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"prettier": "@openstapps/prettier-config", "prettier": "@openstapps/prettier-config",
"eslintConfig": { "eslintConfig": {

View File

@@ -71,8 +71,8 @@
"surge": "0.23.1", "surge": "0.23.1",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "7.2.0", "tsup": "7.2.0",
"typedoc": "0.24.8", "typedoc": "0.25.3",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"prettier": "@openstapps/prettier-config", "prettier": "@openstapps/prettier-config",
"eslintConfig": { "eslintConfig": {

View File

@@ -26,7 +26,7 @@
"@openstapps/collection-utils": "workspace:*", "@openstapps/collection-utils": "workspace:*",
"@openstapps/logger": "workspace:*", "@openstapps/logger": "workspace:*",
"glob": "10.2.7", "glob": "10.2.7",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"devDependencies": { "devDependencies": {
"@openstapps/eslint-config": "workspace:*", "@openstapps/eslint-config": "workspace:*",
@@ -41,7 +41,7 @@
"mocha-junit-reporter": "2.2.0", "mocha-junit-reporter": "2.2.0",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "7.2.0", "tsup": "7.2.0",
"typedoc": "0.24.8" "typedoc": "0.25.3"
}, },
"tsup": { "tsup": {
"entry": [ "entry": [

View File

@@ -45,8 +45,8 @@
"nock": "13.3.1", "nock": "13.3.1",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "7.2.0", "tsup": "7.2.0",
"typedoc": "0.24.8", "typedoc": "0.25.3",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"prettier": "@openstapps/prettier-config", "prettier": "@openstapps/prettier-config",
"eslintConfig": { "eslintConfig": {

View File

@@ -40,8 +40,8 @@
"@types/node": "18.15.3", "@types/node": "18.15.3",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "7.2.0", "tsup": "7.2.0",
"typedoc": "0.24.8", "typedoc": "0.25.3",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"tsup": { "tsup": {
"entry": [ "entry": [

View File

@@ -51,8 +51,8 @@
"mocha-junit-reporter": "2.2.0", "mocha-junit-reporter": "2.2.0",
"nock": "13.3.1", "nock": "13.3.1",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"typedoc": "0.24.8", "typedoc": "0.25.3",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"prettier": "@openstapps/prettier-config", "prettier": "@openstapps/prettier-config",
"eslintConfig": { "eslintConfig": {

View File

@@ -50,8 +50,8 @@
"mocha-junit-reporter": "2.2.0", "mocha-junit-reporter": "2.2.0",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "7.2.0", "tsup": "7.2.0",
"typedoc": "0.24.8", "typedoc": "0.25.3",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"tsup": { "tsup": {
"entry": [ "entry": [

View File

@@ -49,8 +49,8 @@
"mocha": "10.2.0", "mocha": "10.2.0",
"mocha-junit-reporter": "2.2.0", "mocha-junit-reporter": "2.2.0",
"nock": "13.3.1", "nock": "13.3.1",
"typedoc": "0.24.8", "typedoc": "0.25.3",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"prettier": "@openstapps/prettier-config", "prettier": "@openstapps/prettier-config",
"eslintConfig": { "eslintConfig": {

View File

@@ -49,8 +49,8 @@
"mocha": "10.2.0", "mocha": "10.2.0",
"mocha-junit-reporter": "2.2.0", "mocha-junit-reporter": "2.2.0",
"nock": "13.3.1", "nock": "13.3.1",
"typedoc": "0.24.8", "typedoc": "0.25.3",
"typescript": "5.1.6" "typescript": "5.2.2"
}, },
"prettier": "@openstapps/prettier-config", "prettier": "@openstapps/prettier-config",
"eslintConfig": { "eslintConfig": {

3916
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff