Skip to content

Commit a89899b

Browse files
134770: Manual fixes
- Fixed dependencies who moved between packages - Special mention for the PlacementArray from @ng-bootstrap/ng-bootstrap which is not exposed by default so had to replace it with Placement[] - Fixed failing tests - Updated CI's node version to 20 & 22 (cherry picked from commit 02ea7b2)
1 parent c74ff20 commit a89899b

File tree

29 files changed

+142
-188
lines changed

29 files changed

+142
-188
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@
175175
"ignoreParameters": true
176176
}
177177
],
178+
"@angular-eslint/prefer-inject": "off",
178179
"@typescript-eslint/quotes": [
179180
"error",
180181
"single",

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
DSPACE_REST_PORT: 8080
2222
DSPACE_REST_NAMESPACE: '/server'
2323
DSPACE_REST_SSL: false
24-
# Spin up UI on 127.0.0.1 to avoid host resolution issues in e2e tests with Node 18+
24+
# Spin up UI on 127.0.0.1 to avoid host resolution issues in e2e tests with Node 20+
2525
DSPACE_UI_HOST: 127.0.0.1
2626
DSPACE_UI_PORT: 4000
2727
# Ensure all SSR caching is disabled in test environment
@@ -44,7 +44,7 @@ jobs:
4444
strategy:
4545
# Create a matrix of Node versions to test against (in parallel)
4646
matrix:
47-
node-version: [18.x, 20.x]
47+
node-version: [20.x, 22.x]
4848
# Do NOT exit immediately if one matrix job fails
4949
fail-fast: false
5050
# These are the actual CI steps to perform per job
@@ -114,7 +114,7 @@ jobs:
114114
# NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
115115
- name: Upload code coverage report to Artifact
116116
uses: actions/upload-artifact@v4
117-
if: matrix.node-version == '18.x'
117+
if: matrix.node-version == '20.x'
118118
with:
119119
name: coverage-report-${{ matrix.node-version }}
120120
path: 'coverage/dspace-angular/lcov.info'

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This image will be published as dspace/dspace-angular
22
# See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details
33

4-
FROM docker.io/node:18-alpine
4+
FROM docker.io/node:20-alpine
55

66
# Ensure Python and other build tools are available
77
# These are needed to install some node modules, especially on linux/arm64

Dockerfile.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Test build:
55
# docker build -f Dockerfile.dist -t dspace/dspace-angular:latest-dist .
66

7-
FROM docker.io/node:18-alpine AS build
7+
FROM docker.io/node:20-alpine AS build
88

99
# Ensure Python and other build tools are available
1010
# These are needed to install some node modules, especially on linux/arm64
@@ -17,7 +17,7 @@ RUN npm install
1717
ADD . /app/
1818
RUN npm run build:prod
1919

20-
FROM node:18-alpine
20+
FROM node:20-alpine
2121
RUN npm install --global pm2
2222

2323
COPY --chown=node:node --from=build /app/dist /app/dist

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ https://wiki.lyrasis.org/display/DSDOC9x/Installing+DSpace
3535
Quick start
3636
-----------
3737

38-
**Ensure you're running [Node](https://nodejs.org) `v18.x` or `v20.x`, [npm](https://www.npmjs.com/) >= `v10.x`**
38+
**Ensure you're running [Node](https://nodejs.org) `v20.x` or `v22.x`, [npm](https://www.npmjs.com/) >= `v10.x`**
3939

4040
```bash
4141
# clone the repo
@@ -90,7 +90,7 @@ Requirements
9090
------------
9191

9292
- [Node.js](https://nodejs.org)
93-
- Ensure you're running node `v18.x` or `v20.x`
93+
- Ensure you're running node `v20.x` or `v22.x`
9494

9595
If you have [`nvm`](https://github.com/creationix/nvm#install-script) or [`nvm-windows`](https://github.com/coreybutler/nvm-windows) installed, which is highly recommended, you can run `nvm install --lts && nvm use` to install and start using the latest Node LTS.
9696

src/app/admin/admin-notify-dashboard/admin-notify-search-result/admin-notify-search-result.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<tr>
1616
<td class="text-nowrap">
1717
@if (message.queueLastStartTime) {
18-
<div>{{ message.queueLastStartTime | date:"YYYY/MM/d hh:mm:ss" }}</div>
18+
<div>{{ message.queueLastStartTime | date:"yyyy/MM/d hh:mm:ss" }}</div>
1919
}
2020
@if (!message.queueLastStartTime) {
2121
<div>n/a</div>

src/app/admin/admin-notify-dashboard/admin-notify-search-result/admin-notify-search-result.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class AdminNotifySearchResultComponent extends TabulatableResultListEleme
9999
* The format for the date values
100100
* @private
101101
*/
102-
private dateFormat = 'YYYY/MM/d hh:mm:ss';
102+
private dateFormat = 'yyyy/MM/d hh:mm:ss';
103103

104104
constructor(private modalService: NgbModal,
105105
private adminNotifyMessagesService: AdminNotifyMessagesService,

src/app/collection-page/collection-form/collection-form.models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {
22
DynamicFormControlModel,
33
DynamicInputModel,
4+
DynamicSelectModelConfig,
45
DynamicTextAreaModel,
56
} from '@ng-dynamic-forms/core';
6-
import { DynamicSelectModelConfig } from '@ng-dynamic-forms/core/lib/model/select/dynamic-select.model';
77

88
import { environment } from '../../../environments/environment';
99

src/app/core/lazy-data-service.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
import {
2-
Injector,
3-
Type,
4-
} from '@angular/core';
1+
import { Injector } from '@angular/core';
52
import {
63
defer,
74
Observable,
85
} from 'rxjs';
96

107
import { LazyDataServicesMap } from '../../config/app-config.interface';
118
import { HALDataService } from './data/base/hal-data-service.interface';
9+
import { GenericConstructor } from './shared/generic-constructor';
1210

1311
/**
1412
* Loads a service lazily. The service is loaded when the observable is subscribed to.
@@ -32,7 +30,7 @@ export function lazyDataService<T>(
3230
): Observable<T> {
3331
return defer(() => {
3432
if (dataServicesMap.has(key) && typeof dataServicesMap.get(key) === 'function') {
35-
const loader: () => Promise<Type<HALDataService<any>> | { default: HALDataService<any> }> = dataServicesMap.get(key);
33+
const loader: () => Promise<GenericConstructor<HALDataService<any>> | { default: GenericConstructor<HALDataService<any>> }> = dataServicesMap.get(key);
3634
return loader()
3735
.then((serviceOrDefault) => {
3836
if ('default' in serviceOrDefault) {
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<select class="form-select" [(ngModel)]="mdValue?.newValue.value" (ngModelChange)="confirm.emit(false)"
2-
[attr.aria-label]="(dsoType + '.edit.metadata.edit.value') | translate">
3-
@for (entity of (entities$ | async); track entity.label) {
4-
<option [value]="entity.label === 'none' ? undefined : entity.label">
5-
{{ entity.label }}
6-
</option>
7-
}
8-
</select>
1+
@if (mdValue) {
2+
<select class="form-select" [(ngModel)]="mdValue.newValue.value" (ngModelChange)="confirm.emit(false)"
3+
[attr.aria-label]="(dsoType + '.edit.metadata.edit.value') | translate">
4+
@for (entity of (entities$ | async); track entity.label) {
5+
<option [value]="entity.label === 'none' ? undefined : entity.label">
6+
{{ entity.label }}
7+
</option>
8+
}
9+
</select>
10+
}

0 commit comments

Comments
 (0)