Skip to content

Commit

Permalink
feat(node): move to node 20 (#4594)
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi authored Dec 11, 2024
1 parent ab41183 commit 1f04d6c
Show file tree
Hide file tree
Showing 24 changed files with 182 additions and 144 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:

defaults: &defaults
docker:
- image: cimg/node:18.18
- image: cimg/node:20.18.1
environment:
TERM: xterm
QUICK_BUILD: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ body:
attributes:
label: 'Node version'
description: 'Your Node.js version.'
placeholder: 'e.g., 18.16.1'
placeholder: 'e.g., 20.18.1'
validations:
required: true
- type: input
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Set up Git safe directory
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Set up Git safe directory
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.16.1
20.9.0
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# Stage 1: Build the application
# docker build -t ohif/viewer:latest .
FROM node:18.16.1-slim as json-copier
FROM node:20.18.1-slim as json-copier

RUN mkdir /usr/src/app
WORKDIR /usr/src/app
Expand All @@ -37,7 +37,7 @@ COPY platform /usr/src/app/platform
#RUN find platform \! -name "package.json" -mindepth 2 -maxdepth 2 -print | xargs rm -rf

# Copy Files
FROM node:18.16.1-slim as builder
FROM node:20.18.1-slim as builder
RUN apt-get update && apt-get install -y build-essential python3
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
Expand Down
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions extensions/cornerstone-dicom-pmap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^2.7.3",
"@cornerstonejs/core": "^2.7.3",
"@cornerstonejs/adapters": "^2.11.2",
"@cornerstonejs/core": "^2.11.2",
"@kitware/vtk.js": "32.1.1",
"react-color": "^2.19.3"
}
Expand Down
4 changes: 2 additions & 2 deletions extensions/cornerstone-dicom-seg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^2.7.3",
"@cornerstonejs/core": "^2.7.3",
"@cornerstonejs/adapters": "^2.11.2",
"@cornerstonejs/core": "^2.11.2",
"@kitware/vtk.js": "32.1.1",
"react-color": "^2.19.3"
}
Expand Down
6 changes: 3 additions & 3 deletions extensions/cornerstone-dicom-sr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^2.7.3",
"@cornerstonejs/core": "^2.7.3",
"@cornerstonejs/tools": "^2.7.3",
"@cornerstonejs/adapters": "^2.11.2",
"@cornerstonejs/core": "^2.11.2",
"@cornerstonejs/tools": "^2.11.2",
"classnames": "^2.3.2"
}
}
4 changes: 2 additions & 2 deletions extensions/cornerstone-dynamic-volume/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/core": "^2.7.3",
"@cornerstonejs/tools": "^2.7.3",
"@cornerstonejs/core": "^2.11.2",
"@cornerstonejs/tools": "^2.11.2",
"classnames": "^2.3.2"
}
}
8 changes: 4 additions & 4 deletions extensions/cornerstone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.4",
"@cornerstonejs/codec-openjph": "^2.4.5",
"@cornerstonejs/dicom-image-loader": "^2.7.3",
"@cornerstonejs/dicom-image-loader": "^2.11.2",
"@icr/polyseg-wasm": "^0.4.0",
"@ohif/core": "3.10.0-beta.20",
"@ohif/ui": "3.10.0-beta.20",
Expand All @@ -55,9 +55,9 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^2.7.3",
"@cornerstonejs/core": "^2.7.3",
"@cornerstonejs/tools": "^2.7.3",
"@cornerstonejs/adapters": "^2.11.2",
"@cornerstonejs/core": "^2.11.2",
"@cornerstonejs/tools": "^2.11.2",
"@icr/polyseg-wasm": "^0.4.0",
"@kitware/vtk.js": "32.1.1",
"html2canvas": "^1.4.1",
Expand Down
98 changes: 54 additions & 44 deletions extensions/cornerstone/src/panels/PanelSegmentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,51 +171,61 @@ export default function PanelSegmentation({
onSegmentationDownload,
onSegmentationDownloadRTSS,
t,
}) => (
<DropdownMenuContent align="start">
<DropdownMenuItem onClick={() => onSegmentationAdd(activeSegmentation.id)}>
<Icons.Add className="text-foreground" />
<span className="pl-2">{t('Create New Segmentation')}</span>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuLabel>{t('Manage Current Segmentation')}</DropdownMenuLabel>
<DropdownMenuItem onClick={() => onSegmentationRemoveFromViewport(activeSegmentation.id)}>
<Icons.Series className="text-foreground" />
<span className="pl-2">{t('Remove from Viewport')}</span>
</DropdownMenuItem>
<DropdownMenuItem onClick={() => onSegmentationEdit(activeSegmentation.id)}>
<Icons.Rename className="text-foreground" />
<span className="pl-2">{t('Rename')}</span>
</DropdownMenuItem>
<DropdownMenuSub>
<DropdownMenuSubTrigger
disabled={!allowExport}
className="pl-1"
}) => {
return (
<DropdownMenuContent align="start">
<DropdownMenuItem onClick={() => onSegmentationAdd(activeSegmentation.segmentationId)}>
<Icons.Add className="text-foreground" />
<span className="pl-2">{t('Create New Segmentation')}</span>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuLabel>{t('Manage Current Segmentation')}</DropdownMenuLabel>
<DropdownMenuItem
onClick={() => onSegmentationRemoveFromViewport(activeSegmentation.segmentationId)}
>
<Icons.Export className="text-foreground" />
<span className="pl-2">{t('Export & Download')}</span>
</DropdownMenuSubTrigger>
<DropdownMenuPortal>
<DropdownMenuSubContent>
<DropdownMenuItem onClick={() => storeSegmentation(activeSegmentation.id)}>
{t('Export DICOM SEG')}
</DropdownMenuItem>
<DropdownMenuItem onClick={() => onSegmentationDownload(activeSegmentation.id)}>
{t('Download DICOM SEG')}
</DropdownMenuItem>
<DropdownMenuItem onClick={() => onSegmentationDownloadRTSS(activeSegmentation.id)}>
{t('Download DICOM RTSTRUCT')}
</DropdownMenuItem>
</DropdownMenuSubContent>
</DropdownMenuPortal>
</DropdownMenuSub>
<DropdownMenuSeparator />
<DropdownMenuItem onClick={() => onSegmentationDelete(activeSegmentation.id)}>
<Icons.Delete className="text-red-600" />
<span className="pl-2 text-red-600">{t('Delete')}</span>
</DropdownMenuItem>
</DropdownMenuContent>
)
<Icons.Series className="text-foreground" />
<span className="pl-2">{t('Remove from Viewport')}</span>
</DropdownMenuItem>
<DropdownMenuItem onClick={() => onSegmentationEdit(activeSegmentation.segmentationId)}>
<Icons.Rename className="text-foreground" />
<span className="pl-2">{t('Rename')}</span>
</DropdownMenuItem>
<DropdownMenuSub>
<DropdownMenuSubTrigger
disabled={!allowExport}
className="pl-1"
>
<Icons.Export className="text-foreground" />
<span className="pl-2">{t('Export & Download')}</span>
</DropdownMenuSubTrigger>
<DropdownMenuPortal>
<DropdownMenuSubContent>
<DropdownMenuItem
onClick={() => storeSegmentation(activeSegmentation.segmentationId)}
>
{t('Export DICOM SEG')}
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => onSegmentationDownload(activeSegmentation.segmentationId)}
>
{t('Download DICOM SEG')}
</DropdownMenuItem>
{/* <DropdownMenuItem
onClick={() => onSegmentationDownloadRTSS(activeSegmentation.segmentationId)}
>
{t('Download DICOM RTSTRUCT')}
</DropdownMenuItem> */}
</DropdownMenuSubContent>
</DropdownMenuPortal>
</DropdownMenuSub>
<DropdownMenuSeparator />
<DropdownMenuItem onClick={() => onSegmentationDelete(activeSegmentation.segmentationId)}>
<Icons.Delete className="text-red-600" />
<span className="pl-2 text-red-600">{t('Delete')}</span>
</DropdownMenuItem>
</DropdownMenuContent>
);
}
);

const exportOptions = segmentationsWithRepresentations.map(({ segmentation }) => {
Expand Down
4 changes: 2 additions & 2 deletions extensions/measurement-tracking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@cornerstonejs/core": "^2.7.3",
"@cornerstonejs/tools": "^2.7.3",
"@cornerstonejs/core": "^2.11.2",
"@cornerstonejs/tools": "^2.11.2",
"@ohif/core": "3.10.0-beta.20",
"@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.20",
"@ohif/extension-default": "3.10.0-beta.20",
Expand Down
2 changes: 1 addition & 1 deletion platform/app/.recipes/Nginx-Dcm4chee-Keycloak/dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build the application
FROM node:18.16.1-slim as builder
FROM node:20.18.1-slim as builder

# Setup the working directory
RUN mkdir /usr/src/app
Expand Down
2 changes: 1 addition & 1 deletion platform/app/.recipes/Nginx-Dcm4chee/dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build the application
FROM node:18.16.1-slim as builder
FROM node:20.18.1-slim as builder

# Setup the working directory
RUN mkdir /usr/src/app
Expand Down
2 changes: 1 addition & 1 deletion platform/app/.recipes/Nginx-Orthanc-Keycloak/dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build the application
FROM node:18.16.1-slim as builder
FROM node:20.18.1-slim as builder

# Setup the working directory
RUN mkdir /usr/src/app
Expand Down
2 changes: 1 addition & 1 deletion platform/app/.recipes/Nginx-Orthanc/dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build the application
FROM node:18.16.1-slim as builder
FROM node:20.18.1-slim as builder

# Setup the working directory
RUN mkdir /usr/src/app
Expand Down
2 changes: 1 addition & 1 deletion platform/app/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
[build.environment]
# If 'production', `yarn install` does not install devDependencies
NODE_ENV = "development"
NODE_VERSION = "18.16.1"
NODE_VERSION = "20.18.1"
YARN_VERSION = "1.22.5"
RUBY_VERSION = "2.6.2"
YARN_FLAGS = "--no-ignore-optional --pure-lockfile"
Expand Down
2 changes: 1 addition & 1 deletion platform/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.4",
"@cornerstonejs/codec-openjph": "^2.4.5",
"@cornerstonejs/dicom-image-loader": "^2.7.3",
"@cornerstonejs/dicom-image-loader": "^2.11.2",
"@emotion/serialize": "^1.1.3",
"@ohif/core": "3.10.0-beta.20",
"@ohif/extension-cornerstone": "3.10.0-beta.20",
Expand Down
31 changes: 3 additions & 28 deletions platform/app/public/config/local_static.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,16 @@ window.config = {
showLoadingIndicator: true,
strictZSpacingForVolumeViewport: true,
// filterQueryParam: false,
defaultDataSourceName: 'dicomweb',
defaultDataSourceName: 'local',
dataSources: [
{
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
sourceName: 'e2e',
configuration: {
friendlyName: 'StaticWado test data',
// The most important field to set for static WADO
staticWado: true,
name: 'StaticWADO',
wadoUriRoot: '/viewer-testdata',
qidoRoot: '/viewer-testdata',
wadoRoot: '/viewer-testdata',
qidoSupportsIncludeField: false,
imageRendering: 'wadors',
thumbnailRendering: 'wadors',
enableStudyLazyLoad: true,
supportsFuzzyMatching: false,
supportsWildcard: true,
singlepart: 'video,thumbnail,pdf',
omitQuotationForMultipartRequest: true,
bulkDataURI: {
enabled: true,
relativeResolution: 'studies',
},
},
},
{
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
sourceName: 'local',
configuration: {
friendlyName: 'Static WADO Local Data',
name: 'DCM4CHEE',
qidoRoot: 'http://localhost:5000/dicomweb',
wadoRoot: 'http://localhost:5000/dicomweb',
qidoRoot: 'http://localhost:3001/dicomweb',
wadoRoot: 'http://localhost:3001/dicomweb',
qidoSupportsIncludeField: false,
supportsReject: true,
supportsStow: true,
Expand Down
2 changes: 1 addition & 1 deletion platform/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.4",
"@cornerstonejs/codec-openjph": "^2.4.5",
"@cornerstonejs/dicom-image-loader": "^2.7.3",
"@cornerstonejs/dicom-image-loader": "^2.11.2",
"@ohif/ui": "3.10.0-beta.20",
"cornerstone-math": "0.1.9",
"dicom-parser": "^1.8.21"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1f04d6c

Please sign in to comment.