Skip to content

Commit 548cc2d

Browse files
Merge remote-tracking branch 'upstream/main' into created-metadata-service-for-metadata-operations_contribute-main
2 parents 7b19047 + 41eccbb commit 548cc2d

3,219 files changed

Lines changed: 123737 additions & 48032 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/disabled-workflows/pull_request_opened.yml

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

.github/workflows/build.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ 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
37+
COMPOSE_PROJECT_NAME: 'ci'
3638
strategy:
3739
# Create a matrix of Node versions to test against (in parallel)
3840
matrix:
@@ -43,11 +45,11 @@ jobs:
4345
steps:
4446
# https://github.com/actions/checkout
4547
- name: Checkout codebase
46-
uses: actions/checkout@v3
48+
uses: actions/checkout@v4
4749

4850
# https://github.com/actions/setup-node
4951
- name: Install Node.js ${{ matrix.node-version }}
50-
uses: actions/setup-node@v3
52+
uses: actions/setup-node@v4
5153
with:
5254
node-version: ${{ matrix.node-version }}
5355

@@ -118,7 +120,7 @@ jobs:
118120
# https://github.com/cypress-io/github-action
119121
# (NOTE: to run these e2e tests locally, just use 'ng e2e')
120122
- name: Run e2e tests (integration tests)
121-
uses: cypress-io/github-action@v5
123+
uses: cypress-io/github-action@v6
122124
with:
123125
# Run tests in Chrome, headless mode (default)
124126
browser: chrome
@@ -191,7 +193,7 @@ jobs:
191193
runs-on: ubuntu-latest
192194
steps:
193195
- name: Checkout
194-
uses: actions/checkout@v3
196+
uses: actions/checkout@v4
195197

196198
# Download artifacts from previous 'tests' job
197199
- name: Download coverage artifacts
@@ -203,10 +205,14 @@ jobs:
203205
# Retry action: https://github.com/marketplace/actions/retry-action
204206
# Codecov action: https://github.com/codecov/codecov-action
205207
- name: Upload coverage to Codecov.io
206-
uses: Wandalen/wretry.action@v1.0.36
208+
uses: Wandalen/wretry.action@v1.3.0
207209
with:
208210
action: codecov/codecov-action@v3
209-
# Try upload 5 times max
211+
# Ensure codecov-action throws an error when it fails to upload
212+
# This allows us to auto-restart the action if an error is thrown
213+
with: |
214+
fail_ci_if_error: true
215+
# Try re-running action 5 times max
210216
attempt_limit: 5
211217
# Run again in 30 seconds
212218
attempt_delay: 30000

.github/workflows/codescan.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
# because CodeQL requires a fresh build with all tests *disabled*.
66
name: "Code Scanning"
77

8-
# Run this code scan for all pushes / PRs to main branch. Also run once a week.
8+
# Run this code scan for all pushes / PRs to main or maintenance branches. Also run once a week.
99
on:
1010
push:
11-
branches: [ main ]
11+
branches:
12+
- main
13+
- 'dspace-**'
1214
pull_request:
13-
branches: [ main ]
15+
branches:
16+
- main
17+
- 'dspace-**'
1418
# Don't run if PR is only updating static documentation
1519
paths-ignore:
1620
- '**/*.md'
@@ -31,7 +35,7 @@ jobs:
3135
steps:
3236
# https://github.com/actions/checkout
3337
- name: Checkout repository
34-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3539

3640
# Initializes the CodeQL tools for scanning.
3741
# https://github.com/github/codeql-action

0 commit comments

Comments
 (0)