Skip to content

Commit 7f2e1c8

Browse files
committed
feat!: upgrade to rsd v4 as in PR #1479
1 parent 357ed0d commit 7f2e1c8

910 files changed

Lines changed: 28190 additions & 17785 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.

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ services:
110110
# dockerfile to use for build
111111
dockerfile: Dockerfile
112112
# update version number to correspond to frontend/package.json
113-
image: kin-rpd/frontend:0.1.0
113+
image: kin-rpd/frontend:1.0.0
114114
environment:
115115
# it uses values from .env file
116116
- POSTGREST_URL

frontend/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# SPDX-FileCopyrightText: 2021 Dusan Mijatovic (dv4all)
22
# SPDX-FileCopyrightText: 2021 dv4all
3+
# SPDX-FileCopyrightText: 2024 Dusan Mijatovic (Netherlands eScience Center)
4+
# SPDX-FileCopyrightText: 2024 Netherlands eScience Center
35
#
46
# SPDX-License-Identifier: Apache-2.0
57

@@ -15,6 +17,7 @@
1517

1618
# next.js
1719
/.next/
20+
/.swc/
1821
/out/
1922

2023
# production

frontend/.eslintrc.json

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

frontend/.eslintrc.json.license

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

frontend/.knip.jsonc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"ignore":[
3+
// ignore mocks as some are not imported/used yet but can be in the future
4+
"**/__mocks__/**",
5+
// ignore jest setup file
6+
"jest.setup.js",
7+
// these are "required" in next.config.js but knip does not see that :-(
8+
"next.headers.js",
9+
"next.rewrites.js"
10+
],
11+
// see https://knip.dev/reference/configuration#ignoreexportsusedinfile
12+
"ignoreExportsUsedInFile": {
13+
"interface": true,
14+
"type": true
15+
},
16+
// see https://knip.dev/reference/configuration#includeentryexports
17+
"includeEntryExports": true,
18+
// see https://knip.dev/guides/handling-issues#unreachable-code
19+
"ignoreDependencies": [
20+
// ignore tailwind plugin
21+
"@tailwindcss/typography",
22+
// ignore sharp used in next standalone mode
23+
"sharp"
24+
]
25+
}

frontend/.unimportedrc.json

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

frontend/.unimportedrc.json.license

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

frontend/Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# SPDX-FileCopyrightText: 2021 - 2022 Dusan Mijatovic (dv4all)
22
# SPDX-FileCopyrightText: 2021 - 2022 dv4all
3-
# SPDX-FileCopyrightText: 2023 Dusan Mijatovic (Netherlands eScience Center)
4-
# SPDX-FileCopyrightText: 2023 Netherlands eScience Center
3+
# SPDX-FileCopyrightText: 2023 - 2025 Dusan Mijatovic (Netherlands eScience Center)
4+
# SPDX-FileCopyrightText: 2023 - 2025 Netherlands eScience Center
5+
# SPDX-FileCopyrightText: 2024 Ewan Cahen (Netherlands eScience Center) <e.cahen@esciencecenter.nl>
56
#
67
# SPDX-License-Identifier: Apache-2.0
78

@@ -12,14 +13,14 @@
1213
# ----------------------------------------
1314
# 1. Install dependencies only when needed
1415
# ----------------------------------------
15-
FROM node:20.15-slim AS deps
16+
FROM node:22.13.1-bookworm-slim AS deps
1617

1718
WORKDIR /app
1819

1920
# copy
2021
COPY package.json package-lock.json ./
2122
# install
22-
RUN npm install --frozen-lockfile --silent
23+
RUN npm ci --silent
2324

2425
# ----------------------------------------
2526
# 2. Build image
@@ -39,15 +40,15 @@ COPY . .
3940
ENV NEXT_TELEMETRY_DISABLED 1
4041

4142
# unit tests are already runned on PR and push to main
42-
# RUN npm test
43+
# RUN npm run test
4344

4445
# build the solution
4546
RUN npm run build
4647

4748
# ----------------------------------------
4849
# 3. Production image (standalone mode)
4950
# ----------------------------------------
50-
FROM node:20.15-slim AS runner
51+
FROM node:22.13.1-bookworm-slim AS runner
5152

5253
# optional install updates
5354
# RUN apt-get upgrade -y
@@ -75,4 +76,4 @@ ENV PORT 3000
7576
# set next hostname
7677
ENV HOSTNAME "0.0.0.0"
7778

78-
CMD ["node", "server.js"]
79+
CMD ["node", "server.js"]

frontend/Dockerfile.dev

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SPDX-License-Identifier: Apache-2.0
55

6-
FROM node:20.15-slim
6+
FROM node:22.13.1-bookworm-slim
77

88
# Change the user and group id of the node user to the specified ids
99
ARG DUID=1000
@@ -27,4 +27,4 @@ VOLUME [ "/app" ]
2727

2828
EXPOSE 3000
2929

30-
CMD [ "sh", "-c", "yarn install ; yarn dev:docker" ]
30+
CMD [ "sh", "-c", "npm install ; npm run dev:docker" ]

frontend/__tests__/CookiesPage.test.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: 2022 - 2023 Dusan Mijatovic (dv4all)
22
// SPDX-FileCopyrightText: 2022 - 2023 dv4all
3-
// SPDX-FileCopyrightText: 2023 Dusan Mijatovic (Netherlands eScience Center)
4-
// SPDX-FileCopyrightText: 2023 Netherlands eScience Center
3+
// SPDX-FileCopyrightText: 2023 - 2025 Dusan Mijatovic (Netherlands eScience Center)
4+
// SPDX-FileCopyrightText: 2023 - 2025 Netherlands eScience Center
55
//
66
// SPDX-License-Identifier: Apache-2.0
77

@@ -13,6 +13,9 @@ import CookiesPage from '../pages/cookies'
1313
// use DEFAULT MOCK for login providers list
1414
// required when AppHeader component is used
1515
jest.mock('~/auth/api/useLoginProviders')
16+
// MOCK global search
17+
jest.mock('~/components/GlobalSearchAutocomplete/apiGlobalSearch')
18+
jest.mock('~/components/GlobalSearchAutocomplete/useHasRemotes')
1619

1720

1821
it('renders cookies page with title Cookies', async() => {
@@ -22,8 +25,8 @@ it('renders cookies page with title Cookies', async() => {
2225
}
2326
render(WrappedComponentWithProps(
2427
CookiesPage, {
25-
props
26-
}))
28+
props
29+
}))
2730
const heading = await screen.findByRole('heading',{
2831
name: 'Cookies'
2932
})
@@ -39,8 +42,8 @@ it('renders cookies page with anonymous statistics checkbox ON', async() => {
3942
}
4043
render(WrappedComponentWithProps(
4144
CookiesPage, {
42-
props
43-
}))
45+
props
46+
}))
4447

4548
const heading = await screen.findByRole('heading',{
4649
name: 'Tracking cookies'
@@ -61,8 +64,8 @@ it('renders cookies page with anonymous statistics checkbox OFF', async() => {
6164
}
6265
render(WrappedComponentWithProps(
6366
CookiesPage, {
64-
props
65-
}))
67+
props
68+
}))
6669

6770
const checkbox = await screen.findByRole('checkbox', {
6871
checked:false

0 commit comments

Comments
 (0)