Skip to content

chore: upgrade prism to node 20 #2655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -2,10 +2,10 @@ version: 2.1
executors:
docker-node:
docker:
- image: cimg/node:18.20
- image: cimg/node:20.0
docker-harness:
docker:
- image: cimg/node:18.20
- image: cimg/node:20.0
- image: kennethreitz/httpbin
name: httpbin.org
macos:
@@ -49,7 +49,7 @@ jobs:
- when:
condition: <<parameters.install_manually>>
steps:
- run: nvm install 18.20.1 && nvm alias default 18.20.1
- run: nvm install 20.0.0 && nvm alias default 20.0.0
- run: pip3 install pipenv gunicorn
- run: sudo bash -c 'echo "0.0.0.0 httpbin.org" >> /etc/hosts'
- run: git clone https://github.com/stoplightio/httpbin httpbin
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18 AS compiler
FROM node:20 AS compiler

WORKDIR /usr/src/prism

@@ -8,7 +8,7 @@ COPY packages/ /usr/src/prism/packages/
RUN yarn && yarn build

###############################################################
FROM node:18 AS dependencies
FROM node:20 AS dependencies

WORKDIR /usr/src/prism/

@@ -34,7 +34,7 @@ RUN if [ $(uname -m) != "aarch64" ]; then curl -sfL https://gobinaries.com/tj/no
RUN if [ $(uname -m) != "aarch64" ]; then node-prune; fi

###############################################################
FROM node:18-alpine
FROM node:20-alpine

# https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#handling-kernel-signals
RUN apk add --no-cache tini
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -41,8 +41,8 @@ This information refers to Open Source Prism 3.x, which is the current version m

Prism requires

- NodeJS >= 18.20.1
- for NodeJS 18.x, [>= 18.16 is required](https://github.com/stoplightio/prism/issues/2305)
- NodeJS >= 20.0.0
- for NodeJS 20.x, >= 20.0 is required

```bash
npm install -g @stoplight/prism-cli
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
"yargs": "^16.2.0"
},
"engines": {
"node": ">=18.20.1"
"node": ">=20.0.0"
},
"files": [
"/dist"
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"/dist"
],
"engines": {
"node": ">=18.20.1"
"node": ">=20.0.0"
},
"dependencies": {
"fp-ts": "^2.11.5",
2 changes: 1 addition & 1 deletion packages/http-server/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
"url": "https://github.com/stoplightio/prism.git"
},
"engines": {
"node": ">=18.20.1"
"node": ">=20.0.0"
},
"files": [
"/dist"
2 changes: 1 addition & 1 deletion packages/http/package.json
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
"/dist"
],
"engines": {
"node": ">=18.20.1"
"node": ">=20.0.0"
},
"dependencies": {
"@faker-js/faker": "^6.0.0",