Skip to content

Commit 4f1910e

Browse files
authored
Merge pull request #318 from TheJacksonLaboratory/feature/angular-upgrade
Feature/angular upgrade
2 parents cefa340 + 4c6b95c commit 4f1910e

File tree

190 files changed

+16280
-10938
lines changed

Some content is hidden

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

190 files changed

+16280
-10938
lines changed

.eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
"type": "attribute"
3737
}
3838
]
39+
,
40+
"object-curly-spacing": ["error", "always"]
3941
}
4042
},
4143
{

.github/workflows/hpo-web-development.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
- name: Configure Node
1515
uses: actions/setup-node@v3
1616
with:
17-
node-version: 16.10.0
17+
node-version: 24.5.0
1818
cache: 'npm'
1919

2020
- name: Lint, Test, Build
2121
run: |
2222
npm install
2323
npm run lint
24-
npm run testci
24+
npm run test:ci

.github/workflows/hpo-web.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ jobs:
2424
- name: Configure Node
2525
uses: actions/setup-node@v3
2626
with:
27-
node-version: 16.10.0
27+
node-version: 24.5.0
2828
cache: 'npm'
2929

3030
- name: Lint, Test, Build
3131
run: |
3232
npm install
3333
npm run lint
34-
npm run testci
35-
npm run buildProd --if-present
34+
npm run test:ci
35+
npm run build:prod --if-present
3636
3737
- name: Set Project Version
3838
run: echo "PROJECT_VERSION=$(cat package.json | jq -r '.version')" >> "$GITHUB_ENV"
@@ -42,7 +42,7 @@ jobs:
4242

4343
- name: Deploy to GCS
4444
run: |
45-
gsutil -m cp -r dist/* "$GCLOUD_BUCKET/hpo-web-$PROJECT_VERSION-$GIT_HASH/"
45+
gsutil -m cp -r dist/hpo-web/* "$GCLOUD_BUCKET/hpo-web-$PROJECT_VERSION-$GIT_HASH/"
4646
gsutil -m rm -f "$GCLOUD_BUCKET/*" || true
4747
gsutil -m rm -rf "$GCLOUD_BUCKET/assets/" || true
4848
gsutil -m cp -r "$GCLOUD_BUCKET/hpo-web-$PROJECT_VERSION-$GIT_HASH/*" "$GCLOUD_BUCKET/"

angular.json

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,25 @@
99
"projectType": "application",
1010
"architect": {
1111
"build": {
12-
"builder": "@angular-devkit/build-angular:browser",
12+
"builder": "@angular-devkit/build-angular:application",
1313
"options": {
1414
"aot": true,
15-
"outputPath": "dist",
15+
"outputPath": "dist/hpo-web",
1616
"index": "src/index.html",
17-
"main": "src/main.ts",
1817
"tsConfig": "src/tsconfig.app.json",
19-
"polyfills": "src/polyfills.ts",
18+
"polyfills": [
19+
"src/polyfills.ts"
20+
],
2021
"assets": [
2122
"src/assets",
2223
"src/favicon.ico"
2324
],
2425
"styles": [
25-
"src/styles.scss"
26+
"src/styles.scss",
27+
"node_modules/@angular/material/prebuilt-themes/indigo-pink.css"
2628
],
27-
"scripts": []
29+
"scripts": [],
30+
"browser": "src/main.ts"
2831
},
2932
"configurations": {
3033
"development": {
@@ -62,8 +65,6 @@
6265
"namedChunks": false,
6366
"aot": true,
6467
"extractLicenses": true,
65-
"vendorChunk": false,
66-
"buildOptimizer": true,
6768
"fileReplacements": [
6869
{
6970
"replace": "src/environments/environment.ts",
@@ -76,38 +77,28 @@
7677
"serve": {
7778
"builder": "@angular-devkit/build-angular:dev-server",
7879
"options": {
79-
"browserTarget": "hpo:build"
80+
"buildTarget": "hpo:build"
8081
},
8182
"configurations": {
8283
"development": {
83-
"browserTarget": "hpo:build:development"
84+
"buildTarget": "hpo:build:development"
8485
},
8586
"production": {
86-
"browserTarget": "hpo:build:production"
87+
"buildTarget": "hpo:build:production"
8788
}
8889
}
8990
},
9091
"extract-i18n": {
9192
"builder": "@angular-devkit/build-angular:extract-i18n",
9293
"options": {
93-
"browserTarget": "hpo:build"
94+
"buildTarget": "hpo:build"
9495
}
9596
},
9697
"test": {
97-
"builder": "@angular-devkit/build-angular:karma",
98+
"builder": "@angular-devkit/build-angular:jest",
9899
"options": {
99-
"main": "src/test.ts",
100-
"karmaConfig": "./karma.conf.js",
101-
"polyfills": "src/polyfills.ts",
102-
"tsConfig": "src/tsconfig.spec.json",
103-
"scripts": [],
104-
"styles": [
105-
"src/styles.scss"
106-
],
107-
"assets": [
108-
"src/assets",
109-
"src/favicon.ico"
110-
]
100+
"polyfills": ["src/polyfills.ts"],
101+
"tsConfig": "src/tsconfig.spec.json"
111102
}
112103
},
113104
"lint": {

jest.config.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module.exports = {
2+
preset: 'jest-preset-angular',
3+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
4+
testEnvironment: 'jsdom',
5+
transform: {
6+
'^.+\\.(ts|mjs|js|html)$': [
7+
'jest-preset-angular',
8+
{
9+
tsconfig: '<rootDir>/src/tsconfig.spec.json',
10+
stringifyContentPathRegex: '\\.(html|svg)$',
11+
},
12+
],
13+
},
14+
transformIgnorePatterns: [
15+
'node_modules/(?!.*\\.mjs$)',
16+
],
17+
collectCoverageFrom: [
18+
'src/**/*.ts',
19+
'!src/main.ts',
20+
'!src/polyfills.ts',
21+
'!src/**/*.d.ts',
22+
'!src/**/index.ts',
23+
'!src/environments/**',
24+
'!src/test.ts',
25+
],
26+
coverageReporters: ['html', 'text-summary', 'lcov'],
27+
coverageDirectory: 'coverage',
28+
testMatch: [
29+
'<rootDir>/src/**/__tests__/**/*.(js|ts)',
30+
'<rootDir>/src/**/(*.)+(spec|test).(js|ts)',
31+
],
32+
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
33+
testPathIgnorePatterns: [
34+
'<rootDir>/node_modules/',
35+
'<rootDir>/dist/',
36+
],
37+
cacheDirectory: '<rootDir>/.jest-cache',
38+
};

karma.conf.js

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

0 commit comments

Comments
 (0)