Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6ee2f47
fix(upgrade): upgraded angular to 21
nsemets Mar 17, 2026
9fe43b1
fix(imports): updated imports according to new version
nsemets Mar 17, 2026
ec3be7d
fix(primeng): updated theme configs
nsemets Mar 17, 2026
a0d52a7
fix(dialog-service): updated dialog services
nsemets Mar 17, 2026
8d8b7d1
fix(severity): updated severity for different components
nsemets Mar 17, 2026
3be54f4
fix(prettier): updated ignore
nsemets Mar 17, 2026
7f4ab5f
fix(primeng): updated tables and tabs
nsemets Mar 17, 2026
e3ac6a2
fix(drawer): updated drawer
nsemets Mar 17, 2026
f8ac5f3
fix(format): updated format
nsemets Mar 17, 2026
42c596e
fix(issues): fixed files and wiki issues
nsemets Mar 17, 2026
098a2eb
fix(ssr): fixed issue with ssr
nsemets Mar 17, 2026
c7123d0
fix(angular-tag-manager): updated version
nsemets Mar 23, 2026
12f2dcb
fix(packages): updated package lock
nsemets Mar 23, 2026
cd80a78
fix(lint): fixed lint issues
nsemets Mar 23, 2026
01e710a
fix(accessibility): fixed accessibility issues
nsemets Mar 23, 2026
2f052b8
fix(format): fixed formatting
nsemets Mar 23, 2026
6414aed
fix(cedar-editor): updated cedar editor version
nsemets Mar 23, 2026
86e7a0f
fix(packages): removed unused json file
nsemets Mar 23, 2026
23840fe
Merge pull request #910 from nsemets/feature/initial-angular-upgrade
nsemets Mar 23, 2026
165f147
Unit tests updates (#915)
nsemets Mar 24, 2026
417de87
fix(ui): fixed ui issues
nsemets Mar 24, 2026
6a153df
test(developer-apps): updated unit tests
nsemets Mar 24, 2026
db9445f
Merge pull request #916 from nsemets/fix/ui-fixes
nsemets Mar 24, 2026
dc0161c
[ENG-10680] Migrate to Vitest (#927)
nsemets Apr 1, 2026
ee2d245
fix(ssr): added allowed hosts
nsemets Apr 6, 2026
ef8012a
Updated markdown-at-rules package to new version (#941)
nsemets Apr 9, 2026
aee66d0
Merge remote-tracking branch 'upstream/feature/angular-upgrade' into …
nsemets Apr 9, 2026
24ae3fe
Merge pull request #936 from nsemets/fix/angular-ssr-security
nsemets Apr 9, 2026
1f3d2a1
[ENG-10773] Contributors successfully updated message disappears when…
nsemets Apr 13, 2026
8d54e89
[ENG-10789] Pagination is not working on the Preprints moderation pag…
nsemets Apr 15, 2026
cc4678b
[ENG-10790] Dropdown section is initially too small and expands on cl…
nsemets Apr 15, 2026
9f26474
[ENG-10791] "?" icon is not properly centered in the search field (#949)
nsemets Apr 15, 2026
4e699e1
fix(storage-item-selector): fixed issue with radio button
nsemets Apr 15, 2026
682f19c
Merge pull request #951 from nsemets/fix/ENG-10803
nsemets Apr 15, 2026
fcab7d9
Merge remote-tracking branch 'upstream/develop' into fix/merge-conflicts
nsemets Apr 16, 2026
da326cc
Merge pull request #953 from nsemets/fix/angular-upgrade-merge-conflicts
brianjgeiger Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 0 additions & 17 deletions .github/counter/counter.test.display.js

This file was deleted.

22 changes: 0 additions & 22 deletions .github/counter/counter.test.increment.js

This file was deleted.

14 changes: 6 additions & 8 deletions .github/scripts/check-coverage-thresholds.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
const fs = require('fs');
const coverage = require('../../coverage/coverage-summary.json');
const jestConfig = require('../../jest.config.js');
const vitestConfig = require('../../vitest.config.ts');

const summary = coverage.total;
const thresholds = jestConfig.coverageThreshold.global;
const thresholds = vitestConfig.default.test.coverage.thresholds;

let failed = false;
const errors = [];
Expand All @@ -29,7 +28,7 @@ for (const key of ['branches', 'functions', 'lines', 'statements']) {
);
errors.push(
formatErrorsWithAlignedStars(
`Please update the coverageThreshold.global.${key} in the jest.config.js to ---> ${current} <---`,
`Please update test.coverage.thresholds.${key} in vitest.config.ts to ---> ${current} <---`,
true
)
);
Expand All @@ -41,9 +40,9 @@ for (const key of ['branches', 'functions', 'lines', 'statements']) {
if (failed) {
const stars = '*'.repeat(warnMessage.length + 8);
console.log('\n\nCongratulations! You have successfully run the coverage check and added tests.');
console.log('\n\nThe jest.config.js file is not insync with your new test additions.');
console.log('Please update the coverage thresholds in jest.config.js.');
console.log('You will need to commit again once you have updated the jst.config.js file.');
console.log('\n\nThe vitest.config.ts file is not in sync with your new test additions.');
console.log('Please update test.coverage.thresholds in vitest.config.ts.');
console.log('You will need to commit again once you have updated the vitest.config.ts file.');
console.log('This is only necessary until we hit 100% coverage.');
console.log(`\n\n${stars}`);
errors.forEach((err) => {
Expand All @@ -55,5 +54,4 @@ if (failed) {
console.log(`${leftBracket}${warnMessage}${rightBracket}`);
console.log(`${leftBracket}${' '.repeat(warnMessage.length)}${rightBracket}`);
console.log(`${stars}\n\n`);
// process.exit(1);
}
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Jest Tests
name: Run Vitest Tests

on:
pull_request:
Expand Down Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Run Jest tests
- name: Run Vitest tests
run: npm run ci:test
test-coverage:
runs-on: ubuntu-latest
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Run Jest tests with coverage
- name: Run Vitest tests with coverage
run: npm run ci:test:coverage

- name: Check coverage thresholds
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ yarn-error.log
/libpeerconnection.log
testem.log
/typings
/public

# System files
.DS_Store
Expand Down
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,23 @@ take up to 60 seconds once the docker build finishes.

## Testing the project

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

```bash
npm run test (single test run)
npm run test:watch (single run after file save)
npm run test:coverage (code coverage results)
npm run test # single test run (no watch)
npm run test:one "src/path/to/file.spec.ts" # run one spec file
npm run test:watch # watch mode
npm run test:coverage # coverage reports
```

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

```bash
npm run test:check-coverage-thresholds
```

- Verifies newly added tests match the thresholds
- This is only used until we hit 100% test coverage
- all commits must pass the local pipeline for test coverage

## Volta

OSF uses volta to manage node and npm versions inside of the repository
Expand Down
26 changes: 18 additions & 8 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
"prefix": "osf",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"builder": "@angular/build:application",
"options": {
"outputPath": "dist/osf",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"allowedCommonJsDependencies": [
Expand Down Expand Up @@ -68,6 +67,9 @@
"outputMode": "server",
"ssr": {
"entry": "src/server.ts"
},
"security": {
"allowedHosts": ["localhost", "127.0.0.1"]
}
},
"configurations": {
Expand Down Expand Up @@ -168,7 +170,7 @@
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@angular/build:dev-server",
"options": {
"hmr": false
},
Expand Down Expand Up @@ -197,13 +199,21 @@
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n"
},
"test": {
"builder": "@angular-devkit/build-angular:jest",
"builder": "@angular/build:unit-test",
"options": {
"tsConfig": "tsconfig.spec.json"
"runnerConfig": "vitest.config.ts",
"coverageInclude": ["src/app/**/*.ts"],
"coverageExclude": [
"src/main.ts",
"src/app/app.{config,routes}.ts",
"**/theme/*.ts",
"**/*.{routes,server}.ts",
"**/index.ts",
"**/mappers/**",
"**/constants/**",
"**/*.{enum,model,type,interface}.ts"
]
}
},
"lint": {
Expand Down
1 change: 0 additions & 1 deletion docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ If the application does not open in your browser at [http://localhost:4200](http
This should return something like `0.0.0.0:4200` or `127.0.0.1:4200`.

6. **Bypass browser caching issues**

- Open the site in an incognito/private window.
- Or test with:
```bash
Expand Down
2 changes: 0 additions & 2 deletions docs/git-convention.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ The local pipeline is managed via husky
To contribute to this repository, follow these steps:

1. **Fork the Repository**

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

4. **Make Your Changes**

- Follow the commit conventions outlined below.
- Ensure all tests pass before committing.

Expand Down
Loading
Loading