Skip to content

Commit ca2c8b2

Browse files
committed
Merge branch 'release/26.8.0'
2 parents 92af918 + 8c5b8af commit ca2c8b2

703 files changed

Lines changed: 24643 additions & 62794 deletions

File tree

Some content is hidden

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

.github/counter/counter.test.display.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/counter/counter.test.increment.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/scripts/check-coverage-thresholds.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
const fs = require('fs');
21
const coverage = require('../../coverage/coverage-summary.json');
3-
const jestConfig = require('../../jest.config.js');
2+
const vitestConfig = require('../../vitest.config.ts');
43

54
const summary = coverage.total;
6-
const thresholds = jestConfig.coverageThreshold.global;
5+
const thresholds = vitestConfig.default.test.coverage.thresholds;
76

87
let failed = false;
98
const errors = [];
@@ -29,7 +28,7 @@ for (const key of ['branches', 'functions', 'lines', 'statements']) {
2928
);
3029
errors.push(
3130
formatErrorsWithAlignedStars(
32-
`Please update the coverageThreshold.global.${key} in the jest.config.js to ---> ${current} <---`,
31+
`Please update test.coverage.thresholds.${key} in vitest.config.ts to ---> ${current} <---`,
3332
true
3433
)
3534
);
@@ -41,9 +40,9 @@ for (const key of ['branches', 'functions', 'lines', 'statements']) {
4140
if (failed) {
4241
const stars = '*'.repeat(warnMessage.length + 8);
4342
console.log('\n\nCongratulations! You have successfully run the coverage check and added tests.');
44-
console.log('\n\nThe jest.config.js file is not insync with your new test additions.');
45-
console.log('Please update the coverage thresholds in jest.config.js.');
46-
console.log('You will need to commit again once you have updated the jst.config.js file.');
43+
console.log('\n\nThe vitest.config.ts file is not in sync with your new test additions.');
44+
console.log('Please update test.coverage.thresholds in vitest.config.ts.');
45+
console.log('You will need to commit again once you have updated the vitest.config.ts file.');
4746
console.log('This is only necessary until we hit 100% coverage.');
4847
console.log(`\n\n${stars}`);
4948
errors.forEach((err) => {
@@ -55,5 +54,4 @@ if (failed) {
5554
console.log(`${leftBracket}${warnMessage}${rightBracket}`);
5655
console.log(`${leftBracket}${' '.repeat(warnMessage.length)}${rightBracket}`);
5756
console.log(`${stars}\n\n`);
58-
// process.exit(1);
5957
}

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run Jest Tests
1+
name: Run Vitest Tests
22

33
on:
44
pull_request:
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install dependencies
2727
run: npm ci
2828

29-
- name: Run Jest tests
29+
- name: Run Vitest tests
3030
run: npm run ci:test
3131
test-coverage:
3232
runs-on: ubuntu-latest
@@ -43,7 +43,7 @@ jobs:
4343
- name: Install dependencies
4444
run: npm ci
4545

46-
- name: Run Jest tests with coverage
46+
- name: Run Vitest tests with coverage
4747
run: npm run ci:test:coverage
4848

4949
- name: Check coverage thresholds

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ yarn-error.log
3434
/libpeerconnection.log
3535
testem.log
3636
/typings
37+
/public
3738

3839
# System files
3940
.DS_Store

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
We follow the CalVer (https://calver.org/) versioning scheme: YY.MINOR.MICRO.
44

5+
26.8.0 (2026-04-16)
6+
===================
7+
8+
* Angular upgrade
9+
510
26.7.0 (2026-04-08)
611
===================
712

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,23 @@ take up to 60 seconds once the docker build finishes.
3636

3737
## Testing the project
3838

39-
The project uses jest for unit testing.
40-
A "counter" script executes before and after each test run to track how many times the unit
41-
tests are run locally. The output is displayed.
39+
The project uses Vitest through Angular's unit test builder (`ng test`).
40+
A "counter" script displays local run stats after coverage runs.
4241

4342
```bash
44-
npm run test (single test run)
45-
npm run test:watch (single run after file save)
46-
npm run test:coverage (code coverage results)
43+
npm run test # single test run (no watch)
44+
npm run test:one "src/path/to/file.spec.ts" # run one spec file
45+
npm run test:watch # watch mode
46+
npm run test:coverage # coverage reports
4747
```
4848

49-
- all commits must pass the local pipeline for test coverage
49+
Coverage thresholds are configured in `vitest.config.ts` (`test.coverage.thresholds`).
50+
To validate threshold updates after improving coverage:
5051

5152
```bash
5253
npm run test:check-coverage-thresholds
5354
```
5455

55-
- Verifies newly added tests match the thresholds
56-
- This is only used until we hit 100% test coverage
57-
- all commits must pass the local pipeline for test coverage
58-
5956
## Volta
6057

6158
OSF uses volta to manage node and npm versions inside of the repository

angular.json

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@
1616
"prefix": "osf",
1717
"architect": {
1818
"build": {
19-
"builder": "@angular-devkit/build-angular:application",
19+
"builder": "@angular/build:application",
2020
"options": {
2121
"outputPath": "dist/osf",
2222
"index": "src/index.html",
2323
"browser": "src/main.ts",
24-
"polyfills": ["zone.js"],
2524
"tsConfig": "tsconfig.app.json",
2625
"inlineStyleLanguage": "scss",
2726
"allowedCommonJsDependencies": [
@@ -68,6 +67,9 @@
6867
"outputMode": "server",
6968
"ssr": {
7069
"entry": "src/server.ts"
70+
},
71+
"security": {
72+
"allowedHosts": ["localhost", "127.0.0.1"]
7173
}
7274
},
7375
"configurations": {
@@ -168,7 +170,7 @@
168170
"defaultConfiguration": "production"
169171
},
170172
"serve": {
171-
"builder": "@angular-devkit/build-angular:dev-server",
173+
"builder": "@angular/build:dev-server",
172174
"options": {
173175
"hmr": false
174176
},
@@ -197,13 +199,21 @@
197199
},
198200
"defaultConfiguration": "development"
199201
},
200-
"extract-i18n": {
201-
"builder": "@angular-devkit/build-angular:extract-i18n"
202-
},
203202
"test": {
204-
"builder": "@angular-devkit/build-angular:jest",
203+
"builder": "@angular/build:unit-test",
205204
"options": {
206-
"tsConfig": "tsconfig.spec.json"
205+
"runnerConfig": "vitest.config.ts",
206+
"coverageInclude": ["src/app/**/*.ts"],
207+
"coverageExclude": [
208+
"src/main.ts",
209+
"src/app/app.{config,routes}.ts",
210+
"**/theme/*.ts",
211+
"**/*.{routes,server}.ts",
212+
"**/index.ts",
213+
"**/mappers/**",
214+
"**/constants/**",
215+
"**/*.{enum,model,type,interface}.ts"
216+
]
207217
}
208218
},
209219
"lint": {

docs/docker.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ If the application does not open in your browser at [http://localhost:4200](http
161161
This should return something like `0.0.0.0:4200` or `127.0.0.1:4200`.
162162

163163
6. **Bypass browser caching issues**
164-
165164
- Open the site in an incognito/private window.
166165
- Or test with:
167166
```bash

docs/git-convention.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ The local pipeline is managed via husky
3737
To contribute to this repository, follow these steps:
3838

3939
1. **Fork the Repository**
40-
4140
- Go to the main repository page on GitHub [OSF Angular Project](https://github.com/CenterForOpenScience/angular-osf).
4241
- Click the **Fork** button (top-right corner).
4342
- This creates a copy of the repository under your GitHub account.
@@ -56,7 +55,6 @@ To contribute to this repository, follow these steps:
5655
```
5756

5857
4. **Make Your Changes**
59-
6058
- Follow the commit conventions outlined below.
6159
- Ensure all tests pass before committing.
6260

0 commit comments

Comments
 (0)