Skip to content

Commit

Permalink
MAP-577 New options for Prisoner Relocation (#666)
Browse files Browse the repository at this point in the history
* MAP-577 Add Prison Relocation options, bump node/npm versions

* MAP-577 Bump npm in circle pipeline

* MAP-577 Fix postgres version in circle pipeline

* MAP-577 Update assertion messge on invalid json

* MAP-577 Update node in Dockerfile

* MAP-577 Node 20

* package-lock.json

* MAP-577 Fix pipeline node version
  • Loading branch information
danbenton-mojdt authored Jan 16, 2024
1 parent 07ecbcc commit 8cc1c09
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ parameters:

node-version:
type: string
default: 18.17.1-browsers
default: 20.11.0-browsers

executors:
integration-tests:
docker:
- image: cimg/node:<< pipeline.parameters.node-version >>
- image: circleci/postgres:10.13-ram
- image: cimg/postgres:14.7
environment:
POSTGRES_PASSWORD: use-of-force
POSTGRES_USER: use-of-force
Expand All @@ -39,7 +39,7 @@ jobs:
- checkout
- run:
name: Update npm
command: 'sudo npm install -g npm@9'
command: 'sudo npm install -g npm@10'
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.17.1 as builder
FROM node:20.11.0 as builder

ARG BUILD_NUMBER
ARG GIT_REF
Expand All @@ -24,7 +24,7 @@ RUN CYPRESS_INSTALL_BINARY=0 npm ci --no-audit && \

RUN npm prune --production

FROM node:18.17.1-slim
FROM node:20.11.0-slim
LABEL maintainer="HMPPS Digital Studio <[email protected]>"

# Cache breaking
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The easiest way to run the app is to use docker compose to start local postgres
`docker-compose pull`
`docker-compose up`

Install dependencies using `npm install`, ensuring you are using >= `Node v16`
Install dependencies using `npm install`, ensuring you are using >= `Node v20`

And then, to build the assets and start the app with nodemon:
`npm run start:dev`
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"security_audit": "npx audit-ci --config audit-ci.json"
},
"engines": {
"node": "^18",
"npm": "<10"
"node": "^20",
"npm": "^10"
},
"jest": {
"transform": {
Expand Down
3 changes: 3 additions & 0 deletions server/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export const RelocationLocation = toEnum({
SEGREGATION_UNIT: { value: 'SEGREGATION_UNIT', label: 'Segregation unit' },
SPECIAL_ACCOMMODATION: { value: 'SPECIAL_ACCOMMODATION', label: 'Special accommodation' },
CELLULAR_VEHICLE: { value: 'CELLULAR_VEHICLE', label: 'Cellular vehicle' },
RECEPTION: { value: 'RECEPTION', label: 'Reception' },
OTHER_WING: { value: 'OTHER_WING', label: 'Other wing' },
FACILITATE_RELEASE: { value: 'FACILITATE_RELEASE', label: 'To facilitate release' },
})

export const ReportStatus = toEnum({
Expand Down
2 changes: 1 addition & 1 deletion server/routes/maintainingReports/admin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('/:reportId/edit-report', () => {
expect(reportService.update).not.toHaveBeenCalled()
expect(flash).toHaveBeenCalledWith('errors', {
href: '#form',
text: 'Unexpected token h in JSON at position 1',
text: "Unexpected token 'h', \"this isn't json!\" is not valid JSON",
})
})
})
Expand Down

0 comments on commit 8cc1c09

Please sign in to comment.