Skip to content

Commit 2ffd732

Browse files
committed
Merge remote-tracking branch 'origin/main' into w2p-96252_Reduce-main-bundle-size_Reorganize-shared-module_REBASE-ON-7.4
2 parents 95d5a2f + 2327901 commit 2ffd732

240 files changed

Lines changed: 8191 additions & 2093 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: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"eslint-plugin-import",
77
"eslint-plugin-jsdoc",
88
"eslint-plugin-deprecation",
9-
"eslint-plugin-unused-imports"
9+
"unused-imports",
10+
"eslint-plugin-lodash"
1011
],
1112
"overrides": [
1213
{
@@ -202,7 +203,13 @@
202203
"deprecation/deprecation": "warn",
203204

204205
"import/order": "off",
205-
"import/no-deprecated": "warn"
206+
"import/no-deprecated": "warn",
207+
"import/no-namespace": "error",
208+
"unused-imports/no-unused-imports": "error",
209+
"lodash/import-scope": [
210+
"error",
211+
"method"
212+
]
206213
}
207214
},
208215
{

.github/pull_request_template.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## References
22
_Add references/links to any related issues or PRs. These may include:_
3-
* Fixes #[issue-number]
4-
* Requires DSpace/DSpace#[pr-number] (if a REST API PR is required to test this)
3+
* Fixes #`issue-number` (if this fixes an issue ticket)
4+
* Requires DSpace/DSpace#`pr-number` (if a REST API PR is required to test this)
55

66
## Description
77
Short summary of changes (1-2 sentences).
@@ -19,8 +19,10 @@ List of changes in this PR:
1919
_This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!_
2020

2121
- [ ] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
22-
- [ ] My PR passes [TSLint](https://palantir.github.io/tslint/) validation using `yarn run lint`
23-
- [ ] My PR doesn't introduce circular dependencies
22+
- [ ] My PR passes [ESLint](https://eslint.org/) validation using `yarn lint`
23+
- [ ] My PR doesn't introduce circular dependencies (verified via `yarn check-circ-deps`)
2424
- [ ] My PR includes [TypeDoc](https://typedoc.org/) comments for _all new (or modified) public methods and classes_. It also includes TypeDoc for large or complex private methods.
2525
- [ ] My PR passes all specs/tests and includes new/updated specs or tests based on the [Code Testing Guide](https://wiki.lyrasis.org/display/DSPACE/Code+Testing+Guide).
26-
- [ ] If my PR includes new, third-party dependencies (in `package.json`), I've made sure their licenses align with the [DSpace BSD License](https://github.com/DSpace/DSpace/blob/main/LICENSE) based on the [Licensing of Contributions](https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines#CodeContributionGuidelines-LicensingofContributions) documentation.
26+
- [ ] If my PR includes new libraries/dependencies (in `package.json`), I've made sure their licenses align with the [DSpace BSD License](https://github.com/DSpace/DSpace/blob/main/LICENSE) based on the [Licensing of Contributions](https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines#CodeContributionGuidelines-LicensingofContributions) documentation.
27+
- [ ] If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
28+
- [ ] If my PR fixes an issue ticket, I've [linked them together](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).

.github/workflows/build.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ name: Build
66
# Run this Build for all pushes / PRs to current branch
77
on: [push, pull_request]
88

9+
permissions:
10+
contents: read # to fetch code (actions/checkout)
11+
912
jobs:
1013
tests:
1114
runs-on: ubuntu-latest
@@ -29,11 +32,11 @@ jobs:
2932
steps:
3033
# https://github.com/actions/checkout
3134
- name: Checkout codebase
32-
uses: actions/checkout@v2
35+
uses: actions/checkout@v3
3336

3437
# https://github.com/actions/setup-node
3538
- name: Install Node.js ${{ matrix.node-version }}
36-
uses: actions/setup-node@v2
39+
uses: actions/setup-node@v3
3740
with:
3841
node-version: ${{ matrix.node-version }}
3942

@@ -58,7 +61,7 @@ jobs:
5861
id: yarn-cache-dir-path
5962
run: echo "::set-output name=dir::$(yarn cache dir)"
6063
- name: Cache Yarn dependencies
61-
uses: actions/cache@v2
64+
uses: actions/cache@v3
6265
with:
6366
# Cache entire Yarn cache directory (see previous step)
6467
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -85,7 +88,7 @@ jobs:
8588
# Upload coverage reports to Codecov (for one version of Node only)
8689
# https://github.com/codecov/codecov-action
8790
- name: Upload coverage to Codecov.io
88-
uses: codecov/codecov-action@v2
91+
uses: codecov/codecov-action@v3
8992
if: matrix.node-version == '16.x'
9093

9194
# Using docker-compose start backend using CI configuration
@@ -100,7 +103,7 @@ jobs:
100103
# https://github.com/cypress-io/github-action
101104
# (NOTE: to run these e2e tests locally, just use 'ng e2e')
102105
- name: Run e2e tests (integration tests)
103-
uses: cypress-io/github-action@v2
106+
uses: cypress-io/github-action@v4
104107
with:
105108
# Run tests in Chrome, headless mode
106109
browser: chrome
@@ -116,7 +119,7 @@ jobs:
116119
# Cypress always creates a video of all e2e tests (whether they succeeded or failed)
117120
# Save those in an Artifact
118121
- name: Upload e2e test videos to Artifacts
119-
uses: actions/upload-artifact@v2
122+
uses: actions/upload-artifact@v3
120123
if: always()
121124
with:
122125
name: e2e-test-videos
@@ -125,7 +128,7 @@ jobs:
125128
# If e2e tests fail, Cypress creates a screenshot of what happened
126129
# Save those in an Artifact
127130
- name: Upload e2e test failure screenshots to Artifacts
128-
uses: actions/upload-artifact@v2
131+
uses: actions/upload-artifact@v3
129132
if: failure()
130133
with:
131134
name: e2e-test-screenshots

.github/workflows/codescan.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# DSpace CodeQL code scanning configuration for GitHub
2+
# https://docs.github.com/en/code-security/code-scanning
3+
#
4+
# NOTE: Code scanning must be run separate from our default build.yml
5+
# because CodeQL requires a fresh build with all tests *disabled*.
6+
name: "Code Scanning"
7+
8+
# Run this code scan for all pushes / PRs to main branch. Also run once a week.
9+
on:
10+
push:
11+
branches: [ main ]
12+
pull_request:
13+
branches: [ main ]
14+
# Don't run if PR is only updating static documentation
15+
paths-ignore:
16+
- '**/*.md'
17+
- '**/*.txt'
18+
schedule:
19+
- cron: "37 0 * * 1"
20+
21+
jobs:
22+
analyze:
23+
name: Analyze Code
24+
runs-on: ubuntu-latest
25+
# Limit permissions of this GitHub action. Can only write to security-events
26+
permissions:
27+
actions: read
28+
contents: read
29+
security-events: write
30+
31+
steps:
32+
# https://github.com/actions/checkout
33+
- name: Checkout repository
34+
uses: actions/checkout@v3
35+
36+
# Initializes the CodeQL tools for scanning.
37+
# https://github.com/github/codeql-action
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@v2
40+
with:
41+
languages: javascript
42+
43+
# Autobuild attempts to build any compiled languages
44+
- name: Autobuild
45+
uses: github/codeql-action/autobuild@v2
46+
47+
# Perform GitHub Code Scanning.
48+
- name: Perform CodeQL Analysis
49+
uses: github/codeql-action/analyze@v2

.github/workflows/docker.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
- 'dspace-**'
1313
pull_request:
1414

15+
permissions:
16+
contents: read # to fetch code (actions/checkout)
17+
1518
jobs:
1619
docker:
1720
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
@@ -39,11 +42,11 @@ jobs:
3942
steps:
4043
# https://github.com/actions/checkout
4144
- name: Checkout codebase
42-
uses: actions/checkout@v2
45+
uses: actions/checkout@v3
4346

4447
# https://github.com/docker/setup-buildx-action
4548
- name: Setup Docker Buildx
46-
uses: docker/setup-buildx-action@v1
49+
uses: docker/setup-buildx-action@v2
4750

4851
# https://github.com/docker/setup-qemu-action
4952
- name: Set up QEMU emulation to build for multiple architectures
@@ -53,7 +56,7 @@ jobs:
5356
- name: Login to DockerHub
5457
# Only login if not a PR, as PRs only trigger a Docker build and not a push
5558
if: github.event_name != 'pull_request'
56-
uses: docker/login-action@v1
59+
uses: docker/login-action@v2
5760
with:
5861
username: ${{ secrets.DOCKER_USERNAME }}
5962
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
@@ -65,7 +68,7 @@ jobs:
6568
# Get Metadata for docker_build step below
6669
- name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-angular' image
6770
id: meta_build
68-
uses: docker/metadata-action@v3
71+
uses: docker/metadata-action@v4
6972
with:
7073
images: dspace/dspace-angular
7174
tags: ${{ env.IMAGE_TAGS }}
@@ -74,7 +77,7 @@ jobs:
7477
# https://github.com/docker/build-push-action
7578
- name: Build and push 'dspace-angular' image
7679
id: docker_build
77-
uses: docker/build-push-action@v2
80+
uses: docker/build-push-action@v3
7881
with:
7982
context: .
8083
file: ./Dockerfile

.github/workflows/issue_opened.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,22 @@ on:
55
issues:
66
types: [opened]
77

8+
permissions: {}
89
jobs:
910
automation:
1011
runs-on: ubuntu-latest
1112
steps:
1213
# Add the new issue to a project board, if it needs triage
13-
# See https://github.com/marketplace/actions/create-project-card-action
14-
- name: Add issue to project board
14+
# See https://github.com/actions/add-to-project
15+
- name: Add issue to triage board
1516
# Only add to project board if issue is flagged as "needs triage" or has no labels
1617
# NOTE: By default we flag new issues as "needs triage" in our issue template
1718
if: (contains(github.event.issue.labels.*.name, 'needs triage') || join(github.event.issue.labels.*.name) == '')
18-
uses: technote-space/create-project-card-action@v1
19+
uses: actions/add-to-project@v0.3.0
1920
# Note, the authentication token below is an ORG level Secret.
20-
# It must be created/recreated manually via a personal access token with "public_repo" and "admin:org" permissions
21+
# It must be created/recreated manually via a personal access token with admin:org, project, public_repo permissions
2122
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token
2223
# This is necessary because the "DSpace Backlog" project is an org level project (i.e. not repo specific)
2324
with:
24-
GITHUB_TOKEN: ${{ secrets.ORG_PROJECT_TOKEN }}
25-
PROJECT: DSpace Backlog
26-
COLUMN: Triage
27-
CHECK_ORG_PROJECT: true
28-
# Ignore errors
29-
continue-on-error: true
25+
github-token: ${{ secrets.TRIAGE_PROJECT_TOKEN }}
26+
project-url: https://github.com/orgs/DSpace/projects/24

.github/workflows/label_merge_conflicts.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,32 @@ name: Check for merge conflicts
55
# NOTE: This means merge conflicts are only checked for when a PR is merged to main.
66
on:
77
push:
8-
branches:
9-
- main
8+
branches: [ main ]
9+
# So that the `conflict_label_name` is removed if conflicts are resolved,
10+
# we allow this to run for `pull_request_target` so that github secrets are available.
11+
pull_request_target:
12+
types: [ synchronize ]
13+
14+
permissions: {}
1015

1116
jobs:
1217
triage:
18+
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
19+
if: github.repository == 'dspace/dspace-angular'
1320
runs-on: ubuntu-latest
21+
permissions:
22+
pull-requests: write
1423
steps:
15-
# See: https://github.com/mschilde/auto-label-merge-conflicts/
24+
# See: https://github.com/prince-chrismc/label-merge-conflicts-action
1625
- name: Auto-label PRs with merge conflicts
17-
uses: mschilde/auto-label-merge-conflicts@v2.0
26+
uses: prince-chrismc/label-merge-conflicts-action@v2
1827
# Add "merge conflict" label if a merge conflict is detected. Remove it when resolved.
1928
# Note, the authentication token is created automatically
2029
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
2130
with:
22-
CONFLICT_LABEL_NAME: 'merge conflict'
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24-
# Ignore errors
25-
continue-on-error: true
31+
conflict_label_name: 'merge conflict'
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
conflict_comment: |
34+
Hi @${author},
35+
Conflicts have been detected against the base branch.
36+
Please [resolve these conflicts](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts) as soon as you can. Thanks!

CONTRIBUTING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# How to Contribute
2+
3+
DSpace is a community built and supported project. We do not have a centralized development or support team, but have a dedicated group of volunteers who help us improve the software, documentation, resources, etc.
4+
5+
* [Contribute new code via a Pull Request](#contribute-new-code-via-a-pull-request)
6+
* [Contribute documentation](#contribute-documentation)
7+
* [Help others on mailing lists or Slack](#help-others-on-mailing-lists-or-slack)
8+
* [Join a working or interest group](#join-a-working-or-interest-group)
9+
10+
## Contribute new code via a Pull Request
11+
12+
We accept [GitHub Pull Requests (PRs)](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) at any time from anyone.
13+
Contributors to each release are recognized in our [Release Notes](https://wiki.lyrasis.org/display/DSDOC7x/Release+Notes).
14+
15+
Code Contribution Checklist
16+
- [ ] PRs _should_ be smaller in size (ideally less than 1,000 lines of code, not including comments & tests)
17+
- [ ] PRs **must** pass [ESLint](https://eslint.org/) validation using `yarn lint`
18+
- [ ] PRs **must** not introduce circular dependencies (verified via `yarn check-circ-deps`)
19+
- [ ] PRs **must** include [TypeDoc](https://typedoc.org/) comments for _all new (or modified) public methods and classes_. Large or complex private methods should also have TypeDoc.
20+
- [ ] PRs **must** pass all automated pecs/tests and includes new/updated specs or tests based on the [Code Testing Guide](https://wiki.lyrasis.org/display/DSPACE/Code+Testing+Guide).
21+
- [ ] If a PR includes new libraries/dependencies (in `package.json`), then their software licenses **must** align with the [DSpace BSD License](https://github.com/DSpace/dspace-angular/blob/main/LICENSE) based on the [Licensing of Contributions](https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines#CodeContributionGuidelines-LicensingofContributions) documentation.
22+
- [ ] Basic technical documentation _should_ be provided for any new features or configuration, either in the PR itself or in the DSpace Wiki documentation.
23+
- [ ] If a PR fixes an issue ticket, please [link them together](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
24+
25+
Additional details on the code contribution process can be found in our [Code Contribution Guidelines](https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines)
26+
27+
## Contribute documentation
28+
29+
DSpace Documentation is a collaborative effort in a shared Wiki. The latest documentation is at https://wiki.lyrasis.org/display/DSDOC7x
30+
31+
If you find areas of the DSpace Documentation which you wish to improve, please request a Wiki account by emailing wikihelp@lyrasis.org.
32+
Once you have an account setup, contact @tdonohue (via [Slack](https://wiki.lyrasis.org/display/DSPACE/Slack) or email) for access to edit our Documentation.
33+
34+
## Help others on mailing lists or Slack
35+
36+
DSpace has our own [Slack](https://wiki.lyrasis.org/display/DSPACE/Slack) community and [Mailing Lists](https://wiki.lyrasis.org/display/DSPACE/Mailing+Lists) where discussions take place and questions are answered.
37+
Anyone is welcome to join and help others. We just ask you to follow our [Code of Conduct](https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx) (adopted via LYRASIS).
38+
39+
## Join a working or interest group
40+
41+
Most of the work in building/improving DSpace comes via [Working Groups](https://wiki.lyrasis.org/display/DSPACE/DSpace+Working+Groups) or [Interest Groups](https://wiki.lyrasis.org/display/DSPACE/DSpace+Interest+Groups).
42+
43+
All working/interest groups are open to anyone to join and participate. A few key groups to be aware of include:
44+
45+
* [DSpace 7 Working Group](https://wiki.lyrasis.org/display/DSPACE/DSpace+7+Working+Group) - This is the main (mostly volunteer) development team. We meet weekly to review our current development [project board](https://github.com/orgs/DSpace/projects), assigning tickets and/or PRs.
46+
* [DSpace Community Advisory Team (DCAT)](https://wiki.lyrasis.org/display/cmtygp/DSpace+Community+Advisory+Team) - This is an interest group for repository managers/administrators. We meet monthly to discuss DSpace, share tips & provide feedback back to developers.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ Documentation
351351
352352
Official DSpace documentation is available in the DSpace wiki at https://wiki.lyrasis.org/display/DSDOC7x/
353353
354-
Some UI specific configuration documentation is also found in the [`./docs`](docs) folder of htis codebase.
354+
Some UI specific configuration documentation is also found in the [`./docs`](docs) folder of this codebase.
355355
356356
### Building code documentation
357357
@@ -379,10 +379,10 @@ To get the most out of TypeScript, you'll need a TypeScript-aware editor. We've
379379
- [Sublime Text](http://www.sublimetext.com/3)
380380
- [Typescript-Sublime-Plugin](https://github.com/Microsoft/Typescript-Sublime-plugin#installation)
381381
382-
Collaborating
382+
Contributing
383383
-------------
384384
385-
See [the guide on the wiki](https://wiki.lyrasis.org/display/DSPACE/DSpace+7+-+Angular+UI+Development#DSpace7-AngularUIDevelopment-Howtocontribute)
385+
See [Contributing documentation](CONTRIBUTING.md)
386386
387387
File Structure
388388
--------------

config/config.example.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ languages:
170170
- code: el
171171
label: Ελληνικά
172172
active: true
173+
- code: uk
174+
label: Yкраї́нська
175+
active: true
173176

174177
# Browse-By Pages
175178
browseBy:
@@ -207,6 +210,11 @@ item:
207210
undoTimeout: 10000 # 10 seconds
208211
# Show the item access status label in items lists
209212
showAccessStatuses: false
213+
bitstream:
214+
# Number of entries in the bitstream list in the item view page.
215+
# Rounded to the nearest size in the list of selectable sizes on the
216+
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
217+
pageSize: 5
210218

211219
# Collection Page Config
212220
collection:
@@ -295,4 +303,4 @@ info:
295303
# display in supported metadata fields. By default, only dc.description.abstract is supported.
296304
markdown:
297305
enabled: false
298-
mathjax: false
306+
mathjax: false

0 commit comments

Comments
 (0)