Skip to content

Commit b77b08c

Browse files
committed
task: move to yarn v4 and node20
1 parent 5113d4c commit b77b08c

File tree

7 files changed

+7920
-5148
lines changed

7 files changed

+7920
-5148
lines changed

.gitignore

+10-1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ dist
9595
.serverless/
9696

9797
# FuseBox cache
98+
9899
.fusebox/
99100

100101
# DynamoDB Local files
@@ -104,4 +105,12 @@ dist
104105
.tern-port
105106

106107
# IntelliJ
107-
.idea
108+
.idea
109+
110+
# Yarn v4
111+
.yarn/*
112+
!.yarn/patches
113+
!.yarn/plugins
114+
!.yarn/releases
115+
!.yarn/sdks
116+
!.yarn/versions

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v14.19
1+
20

.yarn/releases/yarn-4.3.1.cjs

+894
Large diffs are not rendered by default.

.yarnrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-4.3.1.cjs

Dockerfile

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
FROM node:18-alpine as builder
1+
FROM node:20-alpine as builder
22

33
WORKDIR /unleash-proxy
44

55
COPY . .
66

7-
RUN yarn install --frozen-lockfile --ignore-scripts
7+
RUN corepack enable
8+
9+
ENV YARN_ENABLE_SCRIPTS=false
10+
11+
RUN yarn install --immutable
812

913
RUN yarn build
1014

11-
RUN yarn install --production --frozen-lockfile --ignore-scripts --prefer-offline
15+
RUN yarn workspaces focus -A --production
1216

13-
FROM node:18-alpine
17+
FROM node:20-alpine
1418

1519
# Upgrade (addresses OpenSSL CVE-2023-6237 && CVE-2024-2511)
1620
RUN apk update && \
@@ -30,7 +34,7 @@ RUN chown -R node:node /unleash-proxy
3034

3135
ENTRYPOINT ["/sbin/tini", "--"]
3236

33-
EXPOSE 4242
37+
EXPOSE 3000
3438

3539
USER node
3640

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"types": "dist/index.d.ts",
77
"scripts": {
88
"build": "tsc --pretty",
9-
"example": "npm run build && node example",
9+
"example": "yarn run build && node example",
1010
"lint": "eslint ./src",
1111
"test": "jest",
1212
"updateSnapshots": "jest -u",
@@ -20,7 +20,7 @@
2020
"url": "git+https://github.com/Unleash/unleash-proxy.git"
2121
},
2222
"engines": {
23-
"node": ">=16"
23+
"node": ">=20"
2424
},
2525
"keywords": [
2626
"Unleash",
@@ -95,5 +95,6 @@
9595
"qs": "^6.9.7",
9696
"json5": "^2.2.2",
9797
"cookiejar": "^2.1.4"
98-
}
98+
},
99+
"packageManager": "yarn@4.3.1"
99100
}

0 commit comments

Comments
 (0)