Skip to content

Commit 5f27668

Browse files
ybndabhinav
authored andcommitted
Merge remote-tracking branch 'origin/dspace-7_x' into cache-bust-dynamic-configuration-7.6
2 parents 1a1669c + 2429699 commit 5f27668

File tree

293 files changed

+109585
-26102
lines changed

Some content is hidden

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

293 files changed

+109585
-26102
lines changed

.eslintrc.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,13 @@
231231
"*.json5"
232232
],
233233
"extends": [
234-
"plugin:jsonc/recommended-with-jsonc"
234+
"plugin:jsonc/recommended-with-json5"
235235
],
236236
"rules": {
237-
"no-irregular-whitespace": "error",
237+
// The ESLint core no-irregular-whitespace rule doesn't work well in JSON
238+
// See: https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html
239+
"no-irregular-whitespace": "off",
240+
"jsonc/no-irregular-whitespace": "error",
238241
"no-trailing-spaces": "error",
239242
"jsonc/comma-dangle": [
240243
"error",

.github/workflows/build.yml

Lines changed: 106 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
DSPACE_CACHE_SERVERSIDE_ANONYMOUSCACHE_MAX: 0
3030
# Tell Cypress to run e2e tests using the same UI URL
3131
CYPRESS_BASE_URL: http://127.0.0.1:4000
32+
# Disable the cookie consent banner in e2e tests to avoid errors because of elements hidden by it
33+
DSPACE_INFO_ENABLECOOKIECONSENTPOPUP: false
3234
# When Chrome version is specified, we pin to a specific version of Chrome
3335
# Comment this out to use the latest release
3436
#CHROME_VERSION: "90.0.4430.212-1"
@@ -184,12 +186,115 @@ jobs:
184186
# Get homepage and verify that the <meta name="title"> tag includes "DSpace".
185187
# If it does, then SSR is working, as this tag is created by our MetadataService.
186188
# This step also prints entire HTML of homepage for easier debugging if grep fails.
187-
- name: Verify SSR (server-side rendering)
189+
- name: Verify SSR (server-side rendering) on Homepage
188190
run: |
189191
result=$(wget -O- -q http://127.0.0.1:4000/home)
190192
echo "$result"
191193
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep DSpace
192194
195+
# Get a specific community in our test data and verify that the "<h1>" tag includes "Publications" (the community name).
196+
# If it does, then SSR is working.
197+
- name: Verify SSR on a Community page
198+
run: |
199+
result=$(wget -O- -q http://127.0.0.1:4000/communities/0958c910-2037-42a9-81c7-dca80e3892b4)
200+
echo "$result"
201+
echo "$result" | grep -oE "<h1 [^>]*>[^><]*</h1>" | grep Publications
202+
203+
# Get a specific collection in our test data and verify that the "<h1>" tag includes "Articles" (the collection name).
204+
# If it does, then SSR is working.
205+
- name: Verify SSR on a Collection page
206+
run: |
207+
result=$(wget -O- -q http://127.0.0.1:4000/collections/282164f5-d325-4740-8dd1-fa4d6d3e7200)
208+
echo "$result"
209+
echo "$result" | grep -oE "<h1 [^>]*>[^><]*</h1>" | grep Articles
210+
211+
# Get a specific publication in our test data and verify that the <meta name="title"> tag includes
212+
# the title of this publication. If it does, then SSR is working.
213+
- name: Verify SSR on a Publication page
214+
run: |
215+
result=$(wget -O- -q http://127.0.0.1:4000/entities/publication/6160810f-1e53-40db-81ef-f6621a727398)
216+
echo "$result"
217+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "An Economic Model of Mortality Salience"
218+
219+
# Get a specific person in our test data and verify that the <meta name="title"> tag includes
220+
# the name of the person. If it does, then SSR is working.
221+
- name: Verify SSR on a Person page
222+
run: |
223+
result=$(wget -O- -q http://127.0.0.1:4000/entities/person/b1b2c768-bda1-448a-a073-fc541e8b24d9)
224+
echo "$result"
225+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Simmons, Cameron"
226+
227+
# Get a specific project in our test data and verify that the <meta name="title"> tag includes
228+
# the name of the project. If it does, then SSR is working.
229+
- name: Verify SSR on a Project page
230+
run: |
231+
result=$(wget -O- -q http://127.0.0.1:4000/entities/project/46ccb608-a74c-4bf6-bc7a-e29cc7defea9)
232+
echo "$result"
233+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "University Research Fellowship"
234+
235+
# Get a specific orgunit in our test data and verify that the <meta name="title"> tag includes
236+
# the name of the orgunit. If it does, then SSR is working.
237+
- name: Verify SSR on an OrgUnit page
238+
run: |
239+
result=$(wget -O- -q http://127.0.0.1:4000/entities/orgunit/9851674d-bd9a-467b-8d84-068deb568ccf)
240+
echo "$result"
241+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Law and Development"
242+
243+
# Get a specific journal in our test data and verify that the <meta name="title"> tag includes
244+
# the name of the journal. If it does, then SSR is working.
245+
- name: Verify SSR on a Journal page
246+
run: |
247+
result=$(wget -O- -q http://127.0.0.1:4000/entities/journal/d4af6c3e-53d0-4757-81eb-566f3b45d63a)
248+
echo "$result"
249+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Environmental &amp; Architectural Phenomenology"
250+
251+
# Get a specific journal volume in our test data and verify that the <meta name="title"> tag includes
252+
# the name of the volume. If it does, then SSR is working.
253+
- name: Verify SSR on a Journal Volume page
254+
run: |
255+
result=$(wget -O- -q http://127.0.0.1:4000/entities/journalvolume/07c6249f-4bf7-494d-9ce3-6ffdb2aed538)
256+
echo "$result"
257+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Environmental &amp; Architectural Phenomenology Volume 28 (2017)"
258+
259+
# Get a specific journal issue in our test data and verify that the <meta name="title"> tag includes
260+
# the name of the issue. If it does, then SSR is working.
261+
- name: Verify SSR on a Journal Issue page
262+
run: |
263+
result=$(wget -O- -q http://127.0.0.1:4000/entities/journalissue/44c29473-5de2-48fa-b005-e5029aa1a50b)
264+
echo "$result"
265+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Environmental &amp; Architectural Phenomenology Vol. 28, No. 1"
266+
267+
# Verify 301 Handle redirect behavior
268+
# Note: /handle/123456789/260 is the same test Publication used by our e2e tests
269+
- name: Verify 301 redirect from '/handle' URLs
270+
run: |
271+
result=$(wget --server-response --quiet http://127.0.0.1:4000/handle/123456789/260 2>&1 | head -1 | awk '{print $2}')
272+
echo "$result"
273+
[[ "$result" -eq "301" ]]
274+
275+
# Verify 403 error code behavior
276+
- name: Verify 403 error code from '/403'
277+
run: |
278+
result=$(wget --server-response --quiet http://127.0.0.1:4000/403 2>&1 | head -1 | awk '{print $2}')
279+
echo "$result"
280+
[[ "$result" -eq "403" ]]
281+
282+
# Verify 404 error code behavior
283+
- name: Verify 404 error code from '/404' and on invalid pages
284+
run: |
285+
result=$(wget --server-response --quiet http://127.0.0.1:4000/404 2>&1 | head -1 | awk '{print $2}')
286+
echo "$result"
287+
result2=$(wget --server-response --quiet http://127.0.0.1:4000/invalidurl 2>&1 | head -1 | awk '{print $2}')
288+
echo "$result2"
289+
[[ "$result" -eq "404" && "$result2" -eq "404" ]]
290+
291+
# Verify 500 error code behavior
292+
- name: Verify 500 error code from '/500'
293+
run: |
294+
result=$(wget --server-response --quiet http://127.0.0.1:4000/500 2>&1 | head -1 | awk '{print $2}')
295+
echo "$result"
296+
[[ "$result" -eq "500" ]]
297+
193298
- name: Stop running app
194299
run: kill -9 $(lsof -t -i:4000)
195300

.github/workflows/codescan.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ jobs:
4040
# Initializes the CodeQL tools for scanning.
4141
# https://github.com/github/codeql-action
4242
- name: Initialize CodeQL
43-
uses: github/codeql-action/init@v2
43+
uses: github/codeql-action/init@v3
4444
with:
4545
languages: javascript
4646

4747
# Autobuild attempts to build any compiled languages
4848
- name: Autobuild
49-
uses: github/codeql-action/autobuild@v2
49+
uses: github/codeql-action/autobuild@v3
5050

5151
# Perform GitHub Code Scanning.
5252
- name: Perform CodeQL Analysis
53-
uses: github/codeql-action/analyze@v2
53+
uses: github/codeql-action/analyze@v3

config/config.example.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,24 @@ universal:
2323
# Determining which styles are critical is a relatively expensive operation; this option is
2424
# disabled (false) by default to boost server performance at the expense of loading smoothness.
2525
inlineCriticalCss: false
26-
# Path prefixes to enable SSR for. By default these are limited to paths of primary DSpace objects.
27-
# NOTE: The "/handle/" path ensures Handle redirects work via SSR. The "/reload/" path ensures
28-
# hard refreshes (e.g. after login) trigger SSR while fully reloading the page.
29-
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/', '/reload/' ]
26+
# Patterns to be run as regexes against the path of the page to check if SSR is allowed.
27+
# If the path match any of the regexes it will be served directly in CSR.
28+
# By default, excludes community and collection browse, global browse, global search, community list, statistics and various administrative tools.
29+
excludePathPatterns:
30+
- pattern: "^/communities/[a-f0-9-]{36}/browse(/.*)?$"
31+
flag: "i"
32+
- pattern: "^/collections/[a-f0-9-]{36}/browse(/.*)?$"
33+
flag: "i"
34+
- pattern: "^/browse/"
35+
- pattern: "^/search$"
36+
- pattern: "^/community-list$"
37+
- pattern: "^/admin/"
38+
- pattern: "^/processes/?"
39+
- pattern: "^/notifications/"
40+
- pattern: "^/statistics/?"
41+
- pattern: "^/access-control/"
42+
- pattern: "^/health$"
43+
3044
# Whether to enable rendering of Search component on SSR.
3145
# If set to true the component will be included in the HTML returned from the server side rendering.
3246
# If set to false the component will not be included in the HTML returned from the server side rendering.
@@ -448,3 +462,8 @@ search:
448462
# Since we don't know how many filters will be loaded before we receive a response from the server we use this parameter for the skeletons count.
449463
# e.g. If we set 5 then 5 loading skeletons will be visualized before the actual filters are retrieved.
450464
defaultFiltersCount: 5
465+
466+
# Configuration for storing accessibility settings, used by the AccessibilitySettingsService
467+
accessibility:
468+
# The duration in days after which the accessibility settings cookie expires
469+
cookieExpirationDuration: 7

cypress/e2e/header.cy.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@ describe('Header', () => {
1515
cy.visit('/');
1616

1717
// Click the language switcher (globe) in header
18-
cy.get('a[data-test="lang-switch"]').click();
18+
cy.get('button[data-test="lang-switch"]').click();
1919
// Click on the "Deusch" language in dropdown
20-
cy.get('#language-menu-list li').contains('Deutsch').click();
20+
cy.get('#language-menu-list div[role="option"]').contains('Deutsch').click();
2121

2222
// HTML "lang" attribute should switch to "de"
2323
cy.get('html').invoke('attr', 'lang').should('eq', 'de');
2424

2525
// Login menu should now be in German
26-
cy.get('a[data-test="login-menu"]').contains('Anmelden');
26+
cy.get('[data-test="login-menu"]').contains('Anmelden');
2727

2828
// Change back to English from language switcher
29-
cy.get('a[data-test="lang-switch"]').click();
30-
cy.get('#language-menu-list li').contains('English').click();
29+
cy.get('button[data-test="lang-switch"]').click();
30+
cy.get('#language-menu-list div[role="option"]').contains('English').click();
3131

3232
// HTML "lang" attribute should switch to "en"
3333
cy.get('html').invoke('attr', 'lang').should('eq', 'en');
3434

3535
// Login menu should now be in English
36-
cy.get('a[data-test="login-menu"]').contains('Log In');
36+
cy.get('[data-test="login-menu"]').contains('Log In');
3737
});
3838
});

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dspace-angular",
3-
"version": "7.6.4-next",
3+
"version": "7.6.6-next",
44
"scripts": {
55
"ng": "ng",
66
"config:watch": "nodemon",
@@ -60,7 +60,7 @@
6060
"@angular/platform-browser-dynamic": "^15.2.10",
6161
"@angular/platform-server": "^15.2.10",
6262
"@angular/router": "^15.2.10",
63-
"@babel/runtime": "7.26.7",
63+
"@babel/runtime": "7.28.4",
6464
"@kolkov/ngx-gallery": "^2.0.1",
6565
"@ng-bootstrap/ng-bootstrap": "^11.0.0",
6666
"@ng-dynamic-forms/core": "^15.0.0",
@@ -73,14 +73,14 @@
7373
"@nicky-lenaers/ngx-scroll-to": "^14.0.0",
7474
"angular-idle-preload": "3.0.0",
7575
"angulartics2": "^12.2.1",
76-
"axios": "^1.7.9",
76+
"axios": "^1.13.1",
7777
"bootstrap": "^4.6.1",
7878
"cerialize": "0.1.18",
7979
"cli-progress": "^3.12.0",
8080
"colors": "^1.4.0",
81-
"compression": "^1.7.5",
81+
"compression": "^1.8.1",
8282
"cookie-parser": "1.4.7",
83-
"core-js": "^3.40.0",
83+
"core-js": "^3.45.1",
8484
"date-fns": "^2.30.0",
8585
"date-fns-tz": "^1.3.7",
8686
"deepmerge": "^4.3.1",
@@ -89,9 +89,9 @@
8989
"express-rate-limit": "^5.1.3",
9090
"fast-json-patch": "^3.1.1",
9191
"filesize": "^6.1.0",
92-
"http-proxy-middleware": "^2.0.7",
92+
"http-proxy-middleware": "^2.0.9",
9393
"http-terminator": "^3.2.0",
94-
"isbot": "^5.1.22",
94+
"isbot": "^5.1.31",
9595
"js-cookie": "2.2.1",
9696
"js-yaml": "^4.1.0",
9797
"json5": "^2.2.3",
@@ -105,7 +105,7 @@
105105
"mirador": "^3.4.3",
106106
"mirador-dl-plugin": "^0.13.0",
107107
"mirador-share-plugin": "^0.16.0",
108-
"morgan": "^1.10.0",
108+
"morgan": "^1.10.1",
109109
"ng2-file-upload": "1.4.0",
110110
"ng2-nouislider": "^2.0.0",
111111
"ngx-infinite-scroll": "^15.0.0",
@@ -117,8 +117,8 @@
117117
"nouislider": "^15.8.1",
118118
"pem": "1.14.8",
119119
"reflect-metadata": "^0.2.2",
120-
"rxjs": "^7.8.0",
121-
"sanitize-html": "^2.14.0",
120+
"rxjs": "^7.8.2",
121+
"sanitize-html": "^2.17.0",
122122
"sortablejs": "1.15.6",
123123
"uuid": "^8.3.2",
124124
"zone.js": "~0.13.3"
@@ -147,24 +147,24 @@
147147
"@types/grecaptcha": "^3.0.9",
148148
"@types/jasmine": "~3.6.0",
149149
"@types/js-cookie": "2.2.6",
150-
"@types/lodash": "^4.17.15",
150+
"@types/lodash": "^4.17.20",
151151
"@types/node": "^14.18.63",
152-
"@types/sanitize-html": "^2.13.0",
152+
"@types/sanitize-html": "^2.16.0",
153153
"@typescript-eslint/eslint-plugin": "^5.62.0",
154154
"@typescript-eslint/parser": "^5.62.0",
155-
"axe-core": "^4.10.2",
155+
"axe-core": "^4.10.3",
156156
"compression-webpack-plugin": "^9.2.0",
157157
"copy-webpack-plugin": "^6.4.1",
158158
"cross-env": "^7.0.3",
159159
"csstype": "^3.1.3",
160160
"cypress": "^13.17.0",
161-
"cypress-axe": "^1.6.0",
161+
"cypress-axe": "^1.7.0",
162162
"deep-freeze": "0.0.1",
163163
"eslint": "^8.39.0",
164164
"eslint-plugin-deprecation": "^1.5.0",
165-
"eslint-plugin-import": "^2.31.0",
165+
"eslint-plugin-import": "^2.32.0",
166166
"eslint-plugin-jsdoc": "^45.0.0",
167-
"eslint-plugin-jsonc": "^2.19.1",
167+
"eslint-plugin-jsonc": "^2.20.1",
168168
"eslint-plugin-lodash": "^7.4.0",
169169
"eslint-plugin-unused-imports": "^2.0.0",
170170
"express-static-gzip": "^2.2.0",
@@ -176,7 +176,7 @@
176176
"karma-jasmine": "~4.0.0",
177177
"karma-jasmine-html-reporter": "^1.5.0",
178178
"karma-mocha-reporter": "2.2.5",
179-
"ng-mocks": "^14.13.2",
179+
"ng-mocks": "^14.13.5",
180180
"ngx-mask": "^13.1.7",
181181
"nodemon": "^2.0.22",
182182
"postcss": "^8.5",
@@ -188,13 +188,13 @@
188188
"react-copy-to-clipboard": "^5.1.0",
189189
"react-dom": "^16.14.0",
190190
"rimraf": "^3.0.2",
191-
"sass": "~1.84.0",
191+
"sass": "~1.93.3",
192192
"sass-loader": "^12.6.0",
193193
"sass-resources-loader": "^2.2.5",
194194
"ts-node": "^8.10.2",
195195
"typescript": "~4.8.4",
196196
"webpack": "5.76.1",
197197
"webpack-cli": "^4.2.0",
198-
"webpack-dev-server": "^4.15.2"
198+
"webpack-dev-server": "^5.2.2"
199199
}
200200
}

0 commit comments

Comments
 (0)