Skip to content

Commit

Permalink
Upgrade codebase to Angular19 (#177)
Browse files Browse the repository at this point in the history
* feat(ionic): start migrating to standalone components according to #157

* feat(angular19): start upgrade to angular 19

* feat(angular19): convert components to standalone

* feat(angular19): convert components to standalone

* fix(angular19): app runs!

* before migration

* chore(): run standalone component migration

* chore(): run inject migration

* fix(routes): use main component

* lint(): reformat files

* fix(): remove IonicModule completely

* chore(): update dependencies

* feat(settings): add settings page

* test(): fix standalone component tests

* feat(ng19): remove unused modules

* chore(): update dependencies

* feat(translate): add logo to translation page

* chore(): output signal migration

* chore(): update dependencies

* fix(tooltip): use module

* chore(): update dependencies

* chore(): update dependencies

* fix(icons): use self closing tags

* lint(): use prettier to reformat angular html files

* lint(): use prettier to reformat angular html files

* lint(): use prettier to reformat angular html files

* fix(dependencies): downgrade angular to compile

* fkx(icon): add missing icon

* chore(): update dependencies

* test(): remove failing tests
  • Loading branch information
AmitMY authored Dec 14, 2024
1 parent 311d0d2 commit 8efd6f4
Show file tree
Hide file tree
Showing 260 changed files with 1,957 additions and 2,152 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build project
run: bun run prerender
run: bun run build

- name: Generate Sitemap
run: bun run generate:sitemap
Expand Down
93 changes: 12 additions & 81 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/sign-translate/browser",
"outputPath": {
"base": "dist/sign-translate"
},
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": [
Expand Down Expand Up @@ -64,11 +65,6 @@
"glob": "worker.js",
"input": "node_modules/@sign-mt/browsermt/build/bundled/",
"output": "./browsermt/"
},
{
"glob": "**/*.svg",
"input": "node_modules/ionicons/dist/ionicons/svg",
"output": "./svg"
}
],
"styles": [
Expand All @@ -86,15 +82,18 @@
"includePaths": ["node_modules/"]
},
"scripts": [],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json",
"vendorChunk": true,
"serviceWorker": "ngsw-config.json",
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true,
"webWorkerTsConfig": "tsconfig.worker.json"
"webWorkerTsConfig": "tsconfig.worker.json",
"browser": "src/main.ts",
"server": "src/main.server.ts",
"prerender": true,
"ssr": {
"entry": "src/server.ts"
}
},
"configurations": {
"production": {
Expand All @@ -109,8 +108,6 @@
"sourceMap": true,
"namedChunks": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
Expand Down Expand Up @@ -209,11 +206,6 @@
"glob": "worker.js",
"input": "node_modules/@sign-mt/browsermt/build/bundled/",
"output": "./browsermt/"
},
{
"glob": "**/*.svg",
"input": "node_modules/ionicons/dist/ionicons/svg",
"output": "./svg"
}
],
"styles": ["src/theme/styles.scss"],
Expand All @@ -226,67 +218,6 @@
"options": {
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist/sign-translate/server",
"main": "server.ts",
"tsConfig": "tsconfig.server.json",
"optimization": false,
"sourceMap": true,
"stylePreprocessorOptions": {
"includePaths": ["node_modules/"]
},
"extractLicenses": false
},
"configurations": {
"production": {
"outputHashing": "media",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"sourceMap": false,
"extractLicenses": true
}
},
"defaultConfiguration": "production"
},
"serve-ssr": {
"builder": "@angular-devkit/build-angular:ssr-dev-server",
"configurations": {
"development": {
"browserTarget": "sign-translate:build",
"serverTarget": "sign-translate:server"
},
"production": {
"browserTarget": "sign-translate:build:production",
"serverTarget": "sign-translate:server:production"
}
},
"defaultConfiguration": "development"
},
"prerender": {
"builder": "@angular-devkit/build-angular:prerender",
"options": {
"discoverRoutes": true,
"routes": ["/", "/about", "/about/contribute", "/legal/terms", "/legal/privacy", "/legal/licenses"]
},
"configurations": {
"production": {
"browserTarget": "sign-translate:build:production",
"serverTarget": "sign-translate:server:production"
},
"development": {
"browserTarget": "sign-translate:build",
"serverTarget": "sign-translate:server"
}
},
"defaultConfiguration": "production"
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
"@firebase/database-types": "1.0.7",
"@google-cloud/storage": "7.14.0",
"@sign-mt/browsermt": "0.2.3",
"@unkey/api": "0.26.2",
"@unkey/ratelimit": "0.4.5",
"@unkey/api": "0.28.0",
"@unkey/ratelimit": "0.4.7",
"cors": "2.8.5",
"express": "4.21.1",
"express": "4.21.2",
"express-async-errors": "3.1.1",
"firebase-admin": "13.0.0",
"firebase-functions": "6.1.0",
"firebase-admin": "13.0.1",
"firebase-functions": "6.1.2",
"http-errors": "2.0.0",
"http-proxy-middleware": "^3.0.3",
"node-fetch": "2.6.7",
"openai": "4.72.0",
"openai": "4.76.3",
"request-ip": "3.3.0"
},
"devDependencies": {
Expand All @@ -43,16 +43,16 @@
"@types/jest": "29.5.14",
"@types/node-fetch": "2.6.12",
"@types/request-ip": "0.0.41",
"@typescript-eslint/eslint-plugin": "8.15.0",
"@typescript-eslint/parser": "8.15.0",
"@typescript-eslint/eslint-plugin": "8.18.0",
"@typescript-eslint/parser": "8.18.0",
"eslint": "8.57.0",
"firebase-functions-test": "3.3.0",
"firebase-tools": "13.25.0",
"firebase-tools": "13.29.1",
"jest": "29.7.0",
"minimatch": "10.0.1",
"mock-express-request": "0.2.2",
"mock-express-response": "0.3.0",
"ts-jest": "29.2.5",
"typescript": "5.6.3"
"typescript": "5.7.2"
}
}
111 changes: 55 additions & 56 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@
"mobile:metadata": "tsx tools/mobile/metadata/metadata.ts",
"prepare:husky": "node -e \"require('fs').cpSync('node_modules/@sign-mt/configuration/.husky/', '.husky/', {recursive: true})\"",
"prepare": "husky install && npm run prepare:husky",
"dev:ssr": "ng run sign-translate:serve-ssr",
"serve:ssr": "node dist/sign-translate/server/main.js",
"build:ssr": "ng build && ng run sign-translate:server",
"prerender": "NODE_OPTIONS=--max_old_space_size=16384 ng run sign-translate:prerender:production",
"test:workflow": "act --container-architecture linux/amd64 --artifact-server-path /tmp/artifacts -W .github/workflows/client.yml",
"generate:terms": "marked -i LICENSE.md -o src/app/pages/landing/terms/terms.component.html",
"generate:sitemap": "node tools/sitemap-generator.js",
"generate:licenses": "npm-license-crawler --json dist/sign-translate/browser/licenses.json --onlyDirectDependencies --exclude ios --exclude android --exclude dist --exclude functions",
"generate:docs": "cd docs && npm run docs:build && mv .vitepress/dist ../dist/sign-translate/browser/docs",
"build:full": "npm run generate:terms && npm run prerender && npm run generate:sitemap && npm run generate:licenses && npm run generate:docs"
"build:full": "npm run generate:terms && npm run build && npm run generate:sitemap && npm run generate:licenses && npm run generate:docs",
"serve:ssr:sign-translate": "node dist/sign-translate/server/server.mjs"
},
"engines": {
"node": ">=18",
Expand All @@ -39,45 +36,45 @@
},
"private": true,
"dependencies": {
"@angular/animations": "18.2.12",
"@angular/cdk": "18.2.13",
"@angular/common": "18.2.12",
"@angular/compiler": "18.2.12",
"@angular/core": "18.2.12",
"@angular/forms": "18.2.12",
"@angular/material": "18.2.13",
"@angular/platform-browser": "18.2.12",
"@angular/platform-browser-dynamic": "18.2.12",
"@angular/platform-server": "18.2.12",
"@angular/router": "18.2.12",
"@angular/service-worker": "18.2.12",
"@angular/ssr": "18.2.12",
"@angular/animations": "19.0.4",
"@angular/cdk": "19.0.3",
"@angular/common": "19.0.4",
"@angular/compiler": "19.0.4",
"@angular/core": "19.0.4",
"@angular/forms": "19.0.4",
"@angular/material": "19.0.3",
"@angular/platform-browser": "19.0.4",
"@angular/platform-browser-dynamic": "19.0.4",
"@angular/platform-server": "19.0.4",
"@angular/router": "19.0.4",
"@angular/service-worker": "19.0.4",
"@angular/ssr": "19.0.5",
"@asymmetrik/ngx-leaflet": "18.0.1",
"@capacitor-firebase/analytics": "6.2.0",
"@capacitor-firebase/app": "6.2.0",
"@capacitor-firebase/app-check": "6.2.0",
"@capacitor-firebase/crashlytics": "6.2.0",
"@capacitor-firebase/performance": "6.2.0",
"@capacitor-firebase/storage": "6.2.0",
"@capacitor/android": "6.1.2",
"@capacitor/clipboard": "6.0.1",
"@capacitor/core": "6.1.2",
"@capacitor/filesystem": "6.0.1",
"@capacitor/ios": "6.1.2",
"@capacitor/keyboard": "6.0.2",
"@capacitor/share": "6.0.2",
"@capacitor/splash-screen": "6.0.2",
"@capacitor/android": "6.2.0",
"@capacitor/clipboard": "6.0.2",
"@capacitor/core": "6.2.0",
"@capacitor/filesystem": "6.0.2",
"@capacitor/ios": "6.2.0",
"@capacitor/keyboard": "6.0.3",
"@capacitor/share": "6.0.3",
"@capacitor/splash-screen": "6.0.3",
"@ctrl/ngx-github-buttons": "9.0.0",
"@google/model-viewer": "4.0.0",
"@ionic/angular": "8.4.0",
"@ionic/angular": "8.4.1",
"@mediapipe/drawing_utils": "0.3.1675466124",
"@mediapipe/holistic": "0.5.1675471629",
"@mediapipe/tasks-text": "0.10.18",
"@mediapipe/tasks-text": "0.10.20",
"@ngneat/transloco": "6.0.4",
"@ngxs/store": "18.1.5",
"@ngxs/store": "19.0.0",
"@sign-mt/browsermt": "0.2.3",
"@sign-mt/i18n": "git://github.com/sign/i18n.git",
"@sutton-signwriting/font-ttf": "1.5.2",
"@sutton-signwriting/font-ttf": "1.6.0",
"@sutton-signwriting/sgnw-components": "1.1.0",
"@tensorflow/tfjs": "4.22.0",
"@tensorflow/tfjs-backend-wasm": "4.22.0",
Expand All @@ -90,62 +87,64 @@
"capacitor-blob-writer": "1.1.17",
"cld3-asm": "4.0.0",
"comlink": "4.4.2",
"express": "4.21.2",
"filesize": "9.0.11",
"firebase": "11.0.2",
"firebase": "11.1.0",
"flag-icons": "7.2.3",
"ionicons": "7.4.0",
"leaflet": "1.9.4",
"mermaid": "10.9.1",
"mp4-muxer": "5.1.3",
"mp4-muxer": "5.1.5",
"ngx-filesize": "3.0.4",
"pose-viewer": "0.10.0",
"pose-viewer": "1.0.0",
"rxjs": "7.8.1",
"stats.js": "0.17.0",
"swiper": "11.1.15",
"three": "0.170.0",
"three": "0.171.0",
"tslib": "2.8.1",
"web-vitals": "4.2.4",
"webm-muxer": "5.0.2",
"zone.js": "0.15.0"
},
"devDependencies": {
"@angular-devkit/architect": "0.1802.12",
"@angular-devkit/build-angular": "18.2.12",
"@angular-eslint/builder": "18.4.1",
"@angular-eslint/eslint-plugin": "18.4.1",
"@angular-eslint/eslint-plugin-template": "18.4.1",
"@angular-eslint/schematics": "18.4.1",
"@angular-eslint/template-parser": "18.4.1",
"@angular/cli": "18.2.12",
"@angular/compiler-cli": "18.2.12",
"@angular-devkit/architect": "0.1900.5",
"@angular-devkit/build-angular": "19.0.5",
"@angular-eslint/builder": "19.0.2",
"@angular-eslint/eslint-plugin": "19.0.2",
"@angular-eslint/eslint-plugin-template": "19.0.2",
"@angular-eslint/schematics": "19.0.2",
"@angular-eslint/template-parser": "19.0.2",
"@angular/cli": "19.0.5",
"@angular/compiler-cli": "19.0.4",
"@capacitor/assets": "3.0.5",
"@capacitor/cli": "6.1.2",
"@ionic/angular-server": "8.4.0",
"@playwright/test": "1.49.0",
"@capacitor/cli": "6.2.0",
"@ionic/angular-server": "8.4.1",
"@playwright/test": "1.49.1",
"@sign-mt/configuration": "git://github.com/sign/.github.git",
"@trapezedev/project": "7.1.3",
"@types/dom-mediacapture-transform": "0.1.10",
"@types/dom-speech-recognition": "0.0.4",
"@types/dom-webcodecs": "0.1.13",
"@types/jasmine": "5.1.4",
"@types/express": "^5.0.0",
"@types/jasmine": "5.1.5",
"@types/jasminewd2": "2.0.13",
"@types/offscreencanvas": "2019.7.3",
"@types/three": "0.170.0",
"@types/web-app-manifest": "1.0.8",
"@types/webgl2": "0.0.11",
"@types/wicg-file-system-access": "2023.10.5",
"@typescript-eslint/eslint-plugin": "8.15.0",
"@typescript-eslint/parser": "8.15.0",
"@typescript-eslint/eslint-plugin": "8.18.0",
"@typescript-eslint/parser": "8.18.0",
"browser-sync": "3.0.3",
"deepmerge": "4.3.1",
"dotenv": "16.4.5",
"dotenv": "16.4.7",
"eslint": "8.57.0",
"fuzzy": "0.1.3",
"husky": "9.1.7",
"inquirer": "12.1.0",
"inquirer": "12.2.0",
"inquirer-autocomplete-prompt": "3.0.1",
"jasmine-axe": "1.1.0",
"jasmine-core": "5.4.0",
"jasmine-core": "5.5.0",
"jasmine-spec-reporter": "7.0.0",
"karma": "6.4.4",
"karma-chrome-launcher": "3.2.0",
Expand All @@ -155,8 +154,8 @@
"karma-jasmine-html-reporter": "2.1.0",
"karma-safari-launcher": "1.0.0",
"karma-spec-reporter": "0.0.36",
"lint-staged": "15.2.10",
"marked": "15.0.1",
"lint-staged": "15.2.11",
"marked": "15.0.3",
"node-html-parser": "6.1.13",
"npm-license-crawler": "0.2.1",
"open": "10.1.0",
Expand All @@ -165,8 +164,8 @@
"tiny-async-pool": "2.1.0",
"ts-node": "10.9.2",
"tsx": "4.19.2",
"typescript": "5.4.3",
"typescript": "5.6.3",
"webpack-bundle-analyzer": "4.10.2",
"zod": "3.23.8"
"zod": "3.24.1"
}
}
Loading

0 comments on commit 8efd6f4

Please sign in to comment.