Skip to content

Commit 5859fc1

Browse files
committed
Merge remote-tracking branch 'origin/main' into multiline-search-filter-badge_main
2 parents a63a69d + 0a1764c commit 5859fc1

2,899 files changed

Lines changed: 80449 additions & 52924 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.

.eslintrc.json

Lines changed: 55 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
"eslint-plugin-deprecation",
99
"unused-imports",
1010
"eslint-plugin-lodash",
11-
"eslint-plugin-jsonc"
11+
"eslint-plugin-jsonc",
12+
"eslint-plugin-rxjs",
13+
"eslint-plugin-simple-import-sort",
14+
"eslint-plugin-import-newlines"
1215
],
1316
"overrides": [
1417
{
@@ -27,17 +30,29 @@
2730
"plugin:@typescript-eslint/recommended",
2831
"plugin:@typescript-eslint/recommended-requiring-type-checking",
2932
"plugin:@angular-eslint/recommended",
30-
"plugin:@angular-eslint/template/process-inline-templates"
33+
"plugin:@angular-eslint/template/process-inline-templates",
34+
"plugin:rxjs/recommended"
3135
],
3236
"rules": {
37+
"indent": [
38+
"error",
39+
2,
40+
{
41+
"SwitchCase": 1
42+
}
43+
],
3344
"max-classes-per-file": [
3445
"error",
3546
1
3647
],
3748
"comma-dangle": [
38-
"off",
49+
"error",
3950
"always-multiline"
4051
],
52+
"object-curly-spacing": [
53+
"error",
54+
"always"
55+
],
4156
"eol-last": [
4257
"error",
4358
"always"
@@ -104,15 +119,13 @@
104119
"allowTernary": true
105120
}
106121
],
107-
"prefer-const": "off", // todo: re-enable & fix errors (more strict than it used to be in TSLint)
122+
"prefer-const": "error",
123+
"no-case-declarations": "error",
124+
"no-extra-boolean-cast": "error",
108125
"prefer-spread": "off",
109126
"no-underscore-dangle": "off",
110-
111-
// todo: disabled rules from eslint:recommended, consider re-enabling & fixing
112127
"no-prototype-builtins": "off",
113128
"no-useless-escape": "off",
114-
"no-case-declarations": "off",
115-
"no-extra-boolean-cast": "off",
116129

117130
"@angular-eslint/directive-selector": [
118131
"error",
@@ -139,7 +152,6 @@
139152
}
140153
],
141154
"@angular-eslint/no-attribute-decorator": "error",
142-
"@angular-eslint/no-forward-ref": "error",
143155
"@angular-eslint/no-output-native": "warn",
144156
"@angular-eslint/no-output-on-prefix": "warn",
145157
"@angular-eslint/no-conflicting-lifecycle": "warn",
@@ -183,7 +195,7 @@
183195
],
184196
"@typescript-eslint/type-annotation-spacing": "error",
185197
"@typescript-eslint/unified-signatures": "error",
186-
"@typescript-eslint/ban-types": "warn", // todo: deal with {} type issues & re-enable
198+
"@typescript-eslint/ban-types": "error",
187199
"@typescript-eslint/no-floating-promises": "warn",
188200
"@typescript-eslint/no-misused-promises": "warn",
189201
"@typescript-eslint/restrict-plus-operands": "warn",
@@ -203,14 +215,45 @@
203215

204216
"deprecation/deprecation": "warn",
205217

218+
"simple-import-sort/imports": "error",
219+
"simple-import-sort/exports": "error",
206220
"import/order": "off",
221+
"import/first": "error",
222+
"import/newline-after-import": "error",
223+
"import/no-duplicates": "error",
207224
"import/no-deprecated": "warn",
208225
"import/no-namespace": "error",
226+
"import-newlines/enforce": [
227+
"error",
228+
{
229+
"items": 1,
230+
"semi": true,
231+
"forceSingleLine": true
232+
}
233+
],
234+
209235
"unused-imports/no-unused-imports": "error",
210236
"lodash/import-scope": [
211237
"error",
212238
"method"
213-
]
239+
],
240+
241+
"rxjs/no-nested-subscribe": "off" // todo: go over _all_ cases
242+
}
243+
},
244+
{
245+
"files": [
246+
"*.spec.ts"
247+
],
248+
"parserOptions": {
249+
"project": [
250+
"./tsconfig.json",
251+
"./cypress/tsconfig.json"
252+
],
253+
"createDefaultProgram": true
254+
},
255+
"rules": {
256+
"prefer-const": "off"
214257
}
215258
},
216259
{
@@ -219,12 +262,7 @@
219262
],
220263
"extends": [
221264
"plugin:@angular-eslint/template/recommended"
222-
],
223-
"rules": {
224-
// todo: re-enable & fix errors
225-
"@angular-eslint/template/no-negated-async": "off",
226-
"@angular-eslint/template/eqeqeq": "off"
227-
}
265+
]
228266
},
229267
{
230268
"files": [

.github/workflows/build.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333
#CHROME_VERSION: "90.0.4430.212-1"
3434
# Bump Node heap size (OOM in CI after upgrading to Angular 15)
3535
NODE_OPTIONS: '--max-old-space-size=4096'
36-
# Project name to use when running docker-compose prior to e2e tests
36+
# Project name to use when running "docker compose" prior to e2e tests
3737
COMPOSE_PROJECT_NAME: 'ci'
3838
strategy:
3939
# Create a matrix of Node versions to test against (in parallel)
4040
matrix:
41-
node-version: [16.x, 18.x]
41+
node-version: [18.x, 20.x]
4242
# Do NOT exit immediately if one matrix job fails
4343
fail-fast: false
4444
# These are the actual CI steps to perform per job
@@ -74,7 +74,7 @@ jobs:
7474
id: yarn-cache-dir-path
7575
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
7676
- name: Cache Yarn dependencies
77-
uses: actions/cache@v3
77+
uses: actions/cache@v4
7878
with:
7979
# Cache entire Yarn cache directory (see previous step)
8080
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -101,19 +101,19 @@ jobs:
101101
# so that it can be shared with the 'codecov' job (see below)
102102
# NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
103103
- name: Upload code coverage report to Artifact
104-
uses: actions/upload-artifact@v3
104+
uses: actions/upload-artifact@v4
105105
if: matrix.node-version == '18.x'
106106
with:
107-
name: dspace-angular coverage report
107+
name: coverage-report-${{ matrix.node-version }}
108108
path: 'coverage/dspace-angular/lcov.info'
109109
retention-days: 14
110110

111-
# Using docker-compose start backend using CI configuration
111+
# Using "docker compose" start backend using CI configuration
112112
# and load assetstore from a cached copy
113113
- name: Start DSpace REST Backend via Docker (for e2e tests)
114114
run: |
115-
docker-compose -f ./docker/docker-compose-ci.yml up -d
116-
docker-compose -f ./docker/cli.yml -f ./docker/cli.assetstore.yml run --rm dspace-cli
115+
docker compose -f ./docker/docker-compose-ci.yml up -d
116+
docker compose -f ./docker/cli.yml -f ./docker/cli.assetstore.yml run --rm dspace-cli
117117
docker container ls
118118
119119
# Run integration tests via Cypress.io
@@ -135,19 +135,19 @@ jobs:
135135
# Cypress always creates a video of all e2e tests (whether they succeeded or failed)
136136
# Save those in an Artifact
137137
- name: Upload e2e test videos to Artifacts
138-
uses: actions/upload-artifact@v3
138+
uses: actions/upload-artifact@v4
139139
if: always()
140140
with:
141-
name: e2e-test-videos
141+
name: e2e-test-videos-${{ matrix.node-version }}
142142
path: cypress/videos
143143

144144
# If e2e tests fail, Cypress creates a screenshot of what happened
145145
# Save those in an Artifact
146146
- name: Upload e2e test failure screenshots to Artifacts
147-
uses: actions/upload-artifact@v3
147+
uses: actions/upload-artifact@v4
148148
if: failure()
149149
with:
150-
name: e2e-test-screenshots
150+
name: e2e-test-screenshots-${{ matrix.node-version }}
151151
path: cypress/screenshots
152152

153153
- name: Stop app (in case it stays up after e2e tests)
@@ -182,7 +182,7 @@ jobs:
182182
run: kill -9 $(lsof -t -i:4000)
183183

184184
- name: Shutdown Docker containers
185-
run: docker-compose -f ./docker/docker-compose-ci.yml down
185+
run: docker compose -f ./docker/docker-compose-ci.yml down
186186

187187
# Codecov upload is a separate job in order to allow us to restart this separate from the entire build/test
188188
# job above. This is necessary because Codecov uploads seem to randomly fail at times.
@@ -197,7 +197,7 @@ jobs:
197197

198198
# Download artifacts from previous 'tests' job
199199
- name: Download coverage artifacts
200-
uses: actions/download-artifact@v3
200+
uses: actions/download-artifact@v4
201201

202202
# Now attempt upload to Codecov using its action.
203203
# NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
@@ -207,11 +207,12 @@ jobs:
207207
- name: Upload coverage to Codecov.io
208208
uses: Wandalen/wretry.action@v1.3.0
209209
with:
210-
action: codecov/codecov-action@v3
210+
action: codecov/codecov-action@v4
211211
# Ensure codecov-action throws an error when it fails to upload
212212
# This allows us to auto-restart the action if an error is thrown
213213
with: |
214214
fail_ci_if_error: true
215+
token: ${{ secrets.CODECOV_TOKEN }}
215216
# Try re-running action 5 times max
216217
attempt_limit: 5
217218
# Run again in 30 seconds

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
# Use the reusable-docker-build.yml script from DSpace/DSpace repo to build our Docker image
2929
uses: DSpace/DSpace/.github/workflows/reusable-docker-build.yml@main
3030
with:
31-
build_id: dspace-angular
31+
build_id: dspace-angular-dev
3232
image_name: dspace/dspace-angular
3333
dockerfile_path: ./Dockerfile
3434
secrets:

.github/workflows/issue_opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# Only add to project board if issue is flagged as "needs triage" or has no labels
1717
# NOTE: By default we flag new issues as "needs triage" in our issue template
1818
if: (contains(github.event.issue.labels.*.name, 'needs triage') || join(github.event.issue.labels.*.name) == '')
19-
uses: actions/add-to-project@v0.5.0
19+
uses: actions/add-to-project@v1.0.0
2020
# Note, the authentication token below is an ORG level Secret.
2121
# It must be created/recreated manually via a personal access token with admin:org, project, public_repo permissions
2222
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token

.github/workflows/pull_request_opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
# Assign the PR to whomever created it. This is useful for visualizing assignments on project boards
2222
# See https://github.com/toshimaru/auto-author-assign
2323
- name: Assign PR to creator
24-
uses: toshimaru/auto-author-assign@v2.0.1
24+
uses: toshimaru/auto-author-assign@v2.1.0

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/.angular/cache
2+
/.nx
23
/__build__
34
/__server_build__
45
/node_modules

angular.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,22 +109,22 @@
109109
"serve": {
110110
"builder": "@angular-builders/custom-webpack:dev-server",
111111
"options": {
112-
"browserTarget": "dspace-angular:build",
112+
"buildTarget": "dspace-angular:build",
113113
"port": 4000
114114
},
115115
"configurations": {
116116
"development": {
117-
"browserTarget": "dspace-angular:build:development"
117+
"buildTarget": "dspace-angular:build:development"
118118
},
119119
"production": {
120-
"browserTarget": "dspace-angular:build:production"
120+
"buildTarget": "dspace-angular:build:production"
121121
}
122122
}
123123
},
124124
"extract-i18n": {
125125
"builder": "@angular-devkit/build-angular:extract-i18n",
126126
"options": {
127-
"browserTarget": "dspace-angular:build"
127+
"buildTarget": "dspace-angular:build"
128128
}
129129
},
130130
"test": {
@@ -217,23 +217,23 @@
217217
}
218218
},
219219
"serve-ssr": {
220-
"builder": "@nguniversal/builders:ssr-dev-server",
220+
"builder": "@angular-devkit/build-angular:ssr-dev-server",
221221
"options": {
222-
"browserTarget": "dspace-angular:build",
222+
"buildTarget": "dspace-angular:build",
223223
"serverTarget": "dspace-angular:server",
224224
"port": 4000
225225
},
226226
"configurations": {
227227
"production": {
228-
"browserTarget": "dspace-angular:build:production",
228+
"buildTarget": "dspace-angular:build:production",
229229
"serverTarget": "dspace-angular:server:production"
230230
}
231231
}
232232
},
233233
"prerender": {
234-
"builder": "@nguniversal/builders:prerender",
234+
"builder": "@angular-devkit/build-angular:prerender",
235235
"options": {
236-
"browserTarget": "dspace-angular:build:production",
236+
"buildTarget": "dspace-angular:build:production",
237237
"serverTarget": "dspace-angular:server:production",
238238
"routes": [
239239
"/"

0 commit comments

Comments
 (0)