Skip to content

Commit 7bad78c

Browse files
authored
SF-3635 Angular 20 upgrade (#3568)
1 parent a61171f commit 7bad78c

File tree

126 files changed

+25863
-38693
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+25863
-38693
lines changed

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
set -euo pipefail
109109
cd src/SIL.XForge.Scripture/ClientApp
110110
npm run test:gha | tee test_output.log
111-
if grep --perl-regex 'NG\d+|ERROR:|WARN:|LOG:|INFO:' test_output.log; then
111+
if grep --perl-regex '\bNG\d+\b|ERROR:|WARN:|LOG:|INFO:' test_output.log; then
112112
echo "Error: Disallowed token found in test run output, as shown above.";
113113
exit 1;
114114
fi

src/RealtimeServer/package-lock.json

Lines changed: 2542 additions & 8828 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/RealtimeServer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@
6666
"sharedb-mingo-memory": "^4.0.1",
6767
"ts-jest": "^29.1.2",
6868
"ts-mockito": "^2.6.1",
69-
"typescript": "~5.7.3"
69+
"typescript": "~5.9.3"
7070
}
7171
}

src/SIL.XForge.Scripture/ClientApp/angular.json

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"architect": {
2121
"build": {
22-
"builder": "@angular-devkit/build-angular:application",
22+
"builder": "@angular/build:application",
2323
"options": {
2424
"outputPath": "dist",
2525
"index": "src/index.html",
@@ -119,7 +119,7 @@
119119
"defaultConfiguration": "production"
120120
},
121121
"serve": {
122-
"builder": "@angular-devkit/build-angular:dev-server",
122+
"builder": "@angular/build:dev-server",
123123
"options": {},
124124
"configurations": {
125125
"production": {
@@ -132,24 +132,33 @@
132132
"defaultConfiguration": "development"
133133
},
134134
"extract-i18n": {
135-
"builder": "@angular-devkit/build-angular:extract-i18n",
135+
"builder": "@angular/build:extract-i18n",
136136
"options": {
137137
"buildTarget": "SIL.XForge.Scripture:build"
138138
}
139139
},
140140
"test": {
141-
"builder": "@angular-devkit/build-angular:karma",
141+
"builder": "@angular/build:karma",
142142
"options": {
143143
"main": "src/test.ts",
144144
"karmaConfig": "./src/karma.conf.js",
145-
"polyfills": "src/polyfills.ts",
145+
"polyfills": ["src/polyfills.ts"],
146146
"tsConfig": "src/tsconfig.spec.json",
147147
"scripts": [],
148148
"styles": ["src/styles.scss", "src/material-styles.scss"],
149149
"stylePreprocessorOptions": {
150-
"includePaths": ["node_modules"]
150+
"includePaths": ["node_modules", "."]
151151
},
152-
"assets": ["src/favicon.ico", "src/assets", "src/manifest.json"],
152+
"assets": [
153+
"src/favicon.ico",
154+
"src/assets",
155+
"src/manifest.json",
156+
{
157+
"glob": "**/*",
158+
"input": "src/app/checking/checking/test-audio",
159+
"output": "/assets/audio"
160+
}
161+
],
153162
"sourceMap": false,
154163
"webWorkerTsConfig": "tsconfig.worker.json"
155164
}
@@ -186,6 +195,30 @@
186195
},
187196
"@angular-eslint/schematics:library": {
188197
"setParserOptionsProject": true
198+
},
199+
"@schematics/angular:component": {
200+
"type": "component"
201+
},
202+
"@schematics/angular:directive": {
203+
"type": "directive"
204+
},
205+
"@schematics/angular:service": {
206+
"type": "service"
207+
},
208+
"@schematics/angular:guard": {
209+
"typeSeparator": "."
210+
},
211+
"@schematics/angular:interceptor": {
212+
"typeSeparator": "."
213+
},
214+
"@schematics/angular:module": {
215+
"typeSeparator": "."
216+
},
217+
"@schematics/angular:pipe": {
218+
"typeSeparator": "."
219+
},
220+
"@schematics/angular:resolver": {
221+
"typeSeparator": "."
189222
}
190223
}
191224
}

src/SIL.XForge.Scripture/ClientApp/e2e/workflows/community-checking.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@ export async function communityChecking(
102102
const count = Number.parseInt((await importButtonLocator.textContent())!.match(/\d+/)![0]);
103103
console.log(`Importing ${count} questions`);
104104
await user.click(importButtonLocator);
105-
await expect(page.getByRole('heading', { name: /Imported \d+ of \d+ questions/ })).toBeVisible();
105+
106+
const importHeaderLocator = page.getByRole('heading', { name: /Imported \d+ of \d+ questions/ });
107+
await expect(importHeaderLocator).toBeVisible();
108+
109+
// Wait for the questions to be imported
110+
await expect(importHeaderLocator).toBeHidden({ timeout: 60_000 });
111+
106112
// FIXME(application-bug) We should be able to look for the exact number of questions that should be imported, but the
107113
// page frequently fails to update after the import is complete. A single digest cycle appears to always fix it.
108114
await user.click(page.getByRole('button', { name: /John \d+ questions/ }).first());

0 commit comments

Comments
 (0)