Selaa lähdekoodia

update nodejs (#4409) (#4410)

* noot

* oh they havent finished publishing the images yet lol

* oops

* adjust the parse tests

* noot

* noot
a 3 kuukautta sitten
vanhempi
sitoutus
39081fa293

+ 8 - 8
.github/workflows/build.yml

@@ -71,7 +71,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-node@v2
         with:
-          node-version: "16"
+          node-version: "22"
       - name: Install Foundry
         uses: foundry-rs/foundry-toolchain@v1
       - run: cd ethereum && make test-push0 && make test
@@ -82,7 +82,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-node@v2
         with:
-          node-version: "16"
+          node-version: "22"
       - name: Install Foundry
         uses: foundry-rs/foundry-toolchain@v1
       - run: cd relayer/ethereum && make test-push0 && make test
@@ -93,7 +93,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-node@v2
         with:
-          node-version: "16"
+          node-version: "22"
       - name: Install Foundry
         uses: foundry-rs/foundry-toolchain@v1
       - run: cd clients/js && make install
@@ -222,7 +222,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-node@v2
         with:
-          node-version: "16"
+          node-version: "22"
       - run: cd terra && make test
   terra-2:
     runs-on: ubuntu-24.04
@@ -230,7 +230,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-node@v2
         with:
-          node-version: "16"
+          node-version: "22"
       - run: cd cosmwasm/deployment/terra2 && make test
   cosmwasm:
     runs-on: ubuntu-24.04
@@ -238,7 +238,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-node@v2
         with:
-          node-version: "16"
+          node-version: "22"
       - run: cd cosmwasm && make test
 
   cli:
@@ -247,7 +247,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-node@v2
         with:
-          node-version: "20"
+          node-version: "22"
       - run: |
           cd clients/js && make test
           make docs
@@ -414,5 +414,5 @@ jobs:
       - uses: actions/checkout@v3
       - uses: actions/setup-node@v3
         with:
-          node-version: 16
+          node-version: "22"
       - run: npx prettier@2.3.2 --check ./clients/js/src ./sdk/js/src

+ 1 - 1
.nvmrc

@@ -1 +1 @@
-v16.6.2
+v22.16.0

+ 1 - 1
Dockerfile.cli

@@ -1,5 +1,5 @@
 # syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
-FROM node:18-alpine@sha256:44aaf1ccc80eaed6572a0f2ef7d6b5a2982d54481e4255480041ac92221e2f11 as cli-build
+FROM node:22.16-alpine3.22@sha256:41e4389f3d988d2ed55392df4db1420ad048ae53324a8e2b7c6d19508288107e as cli-build
 
 # Copy package.json & package-lock.json by themselves to create a cache layer
 COPY clients/js/package.json clients/js/package-lock.json /clients/js/

+ 1 - 1
Dockerfile.const

@@ -1,6 +1,6 @@
 # syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
 FROM cli-gen as cli-export
-FROM node:18-alpine@sha256:44aaf1ccc80eaed6572a0f2ef7d6b5a2982d54481e4255480041ac92221e2f11 as const-build
+FROM node:22.16-alpine3.22@sha256:41e4389f3d988d2ed55392df4db1420ad048ae53324a8e2b7c6d19508288107e as const-build
 
 # fetch scripts/guardian-set-init.sh deps
 RUN apk update && apk add bash g++ make python3 curl jq findutils

+ 1 - 1
Dockerfile.proto

@@ -22,7 +22,7 @@ RUN --mount=type=cache,target=/root/.cache \
 	tools/bin/buf lint && \
 	tools/bin/buf generate
 
-FROM node:16-alpine@sha256:004dbac84fed48e20f9888a23e32fa7cf83c2995e174a78d41d9a9dd1e051a20 AS node-build
+FROM node:22.16-alpine3.22@sha256:41e4389f3d988d2ed55392df4db1420ad048ae53324a8e2b7c6d19508288107e as node-build
 
 COPY --from=go-tools /app /app
 

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 355 - 219
clients/js/package-lock.json


+ 3 - 3
clients/js/package.json

@@ -15,7 +15,7 @@
   "repository": "https://github.com/certusone/wormhole/tree/main/clients/js",
   "scripts": {
     "start": "npm run build && node ./build/main.js",
-    "build": "esbuild src/main.ts --bundle --outfile=build/main.js --minify --platform=node --target=node16",
+    "build": "esbuild src/main.ts --bundle --outfile=build/main.js --minify --platform=node --target=node22",
     "check": "tsc --noEmit",
     "docs": "npx tsx src/doc.ts",
     "prepublishOnly": "npm run check",
@@ -55,7 +55,7 @@
     "buffer-layout": "^1.2.2",
     "config": "^3.3.7",
     "dotenv": "^10.0.0",
-    "esbuild": "0.17.18",
+    "esbuild": "0.25.5",
     "ethers": "^5.6.8",
     "js-base64": "^3.6.1",
     "near-api-js": "^1.0.0",
@@ -79,4 +79,4 @@
   "overrides": {
     "elliptic": "^6.6.1"
   }
-}
+}

+ 1 - 2
clients/js/run_parse_tests

@@ -44,13 +44,12 @@ for test in ${test_files[@]}; do
     expected="$test_name.expected"
 
     result=$(mktemp)
-    node build/main.js parse $(cat "$test") > "$result" 2>&1
+    node build/main.js parse $(cat "$test") > "$result"
     if [ $accept = true ]; then
         echo "Updating $test_name"
         cat "$result" > "$expected"
         continue
     fi
-
     if [ ! -f "$expected" ]; then
         echo "Missing '$expected' (re-run with -a flag to create)"
         failed_tests=$(($failed_tests + 1))

+ 1 - 1
cosmwasm/Dockerfile.deploy

@@ -7,7 +7,7 @@ FROM const-gen AS const-export
 FROM cosmwasm_artifacts AS artifacts
 
 # Contract deployment stage
-FROM node:16-buster-slim@sha256:93c9fc3550f5f7d159f282027228e90e3a7f8bf38544758024f005e82607f546
+FROM node:22.16-bullseye-slim@sha256:550b434f7edc3a1875860657a3e306752358029c957280809ae6395ab296faeb
 
 RUN apt update && apt install netcat curl jq -y
 

+ 1 - 1
devnet/tx-verifier/Dockerfile.cast

@@ -3,7 +3,7 @@
 # updated alongside the other Dockerfile.
 FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry:v1.0.0@sha256:d12a373ec950de170d5461014ef9320ba0fb6e0db6f87835999d0fcf3820370e as foundry
 # node is required to install Foundry
-FROM node:19.6.1-slim@sha256:a1ba21bf0c92931d02a8416f0a54daad66cb36a85d2b73af9d73b044f5f57cfc
+FROM node:22.16-bullseye-slim@sha256:550b434f7edc3a1875860657a3e306752358029c957280809ae6395ab296faeb
 
 COPY --from=foundry /usr/local/bin/cast /bin/cast
 

+ 1 - 1
devnet/tx-verifier/Dockerfile.tx-verifier-evm

@@ -7,7 +7,7 @@ FROM guardiand-image AS base
 FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry:v1.0.0@sha256:d12a373ec950de170d5461014ef9320ba0fb6e0db6f87835999d0fcf3820370e as foundry
 
 # node is required to install Foundry
-FROM node:19.6.1-slim@sha256:a1ba21bf0c92931d02a8416f0a54daad66cb36a85d2b73af9d73b044f5f57cfc
+FROM node:22.16-bullseye-slim@sha256:550b434f7edc3a1875860657a3e306752358029c957280809ae6395ab296faeb
 
 # prepare cast
 COPY --from=foundry /usr/local/bin/cast /bin/cast

+ 5 - 5
ethereum/Dockerfile

@@ -1,7 +1,7 @@
 # syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
 FROM const-gen AS const-export
 FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry:v1.0.0@sha256:d12a373ec950de170d5461014ef9320ba0fb6e0db6f87835999d0fcf3820370e as foundry
-FROM node:19.6.1-slim@sha256:a1ba21bf0c92931d02a8416f0a54daad66cb36a85d2b73af9d73b044f5f57cfc
+FROM node:22.16-bullseye-slim@sha256:550b434f7edc3a1875860657a3e306752358029c957280809ae6395ab296faeb
 
 # npm wants to clone random Git repositories - lovely.
 # RUN apk add git python make build-base
@@ -38,9 +38,9 @@ COPY --from=const-export --chown=node:node .env.0x .env
 # We want to cache node_modules *and* incorporate it into the final image.
 RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
   --mount=type=cache,uid=1000,gid=1000,target=node_modules \
-  npm ci && \                                                 
+  npm ci && \
   cp -R node_modules node_modules_cache
-  
+
 
 # Amusingly, Debian's coreutils version has a bug where mv believes that
 # the target is on a different fs and does a full recursive copy for what
@@ -64,9 +64,9 @@ COPY --from=const-export --chown=node:node .env.0x .env
 
 RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
   --mount=type=cache,uid=1000,gid=1000,target=node_modules \
-  npm ci && \                                                 
+  npm ci && \
   cp -R node_modules node_modules_cache
-  
+
 RUN rm -rf node_modules && mv node_modules_cache node_modules
 
 ARG dev

+ 1 - 1
near/Dockerfile.deploy

@@ -7,7 +7,7 @@ COPY . .
 
 RUN ./build-contracts.sh
 
-FROM node:16-alpine@sha256:004dbac84fed48e20f9888a23e32fa7cf83c2995e174a78d41d9a9dd1e051a20 AS deploy
+FROM node:22.16-alpine3.22@sha256:41e4389f3d988d2ed55392df4db1420ad048ae53324a8e2b7c6d19508288107e
 
 WORKDIR /app
 COPY package.json .

+ 1 - 0
node/.tool-versions

@@ -0,0 +1 @@
+nodejs 22

+ 2 - 2
relayer/generic_relayer/relayer-engine-v2/Dockerfile

@@ -1,5 +1,5 @@
 # syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
-FROM node:19.6.1-slim@sha256:a1ba21bf0c92931d02a8416f0a54daad66cb36a85d2b73af9d73b044f5f57cfc
+FROM node:22.16-bullseye-slim@sha256:550b434f7edc3a1875860657a3e306752358029c957280809ae6395ab296faeb
 
 # npm wants to clone random Git repositories - lovely.
 # RUN apk add git python make build-base
@@ -31,7 +31,7 @@ COPY --chown=node:node /relayer/generic_relayer/relayer-engine-v2/package-lock.j
 # We want to cache node_modules *and* incorporate it into the final image.
 RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
   --mount=type=cache,uid=1000,gid=1000,target=/relayer/generic_relayer/relayer-engine-v2/node_modules \
-  npm ci  && \                                                 
+  npm ci  && \
   cp -R node_modules node_modules_cache
 
 # Amusingly, Debian's coreutils version has a bug where mv believes that

+ 1 - 1
terra/Dockerfile

@@ -13,7 +13,7 @@ FROM scratch as artifacts
 COPY --from=builder /code/artifacts /
 
 # Contract deployment stage
-FROM node:16-buster-slim@sha256:93c9fc3550f5f7d159f282027228e90e3a7f8bf38544758024f005e82607f546
+FROM node:22.16-bullseye-slim@sha256:550b434f7edc3a1875860657a3e306752358029c957280809ae6395ab296faeb
 
 RUN apt update && apt install netcat curl jq -y
 

+ 1 - 1
testing/Dockerfile.querysdk.test

@@ -1,4 +1,4 @@
-FROM node:19.6.1-slim@sha256:a1ba21bf0c92931d02a8416f0a54daad66cb36a85d2b73af9d73b044f5f57cfc
+FROM node:22.16-bullseye-slim@sha256:550b434f7edc3a1875860657a3e306752358029c957280809ae6395ab296faeb
 
 RUN apt-get update && apt-get -y install \
   git python3 make curl netcat

+ 1 - 1
testing/Dockerfile.sdk.test

@@ -1,5 +1,5 @@
 FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry:v1.0.0@sha256:d12a373ec950de170d5461014ef9320ba0fb6e0db6f87835999d0fcf3820370e as foundry
-FROM node:19.6.1-slim@sha256:a1ba21bf0c92931d02a8416f0a54daad66cb36a85d2b73af9d73b044f5f57cfc
+FROM node:22.16-bullseye-slim@sha256:550b434f7edc3a1875860657a3e306752358029c957280809ae6395ab296faeb
 
 RUN apt-get update && apt-get -y install \
   git python3 make curl netcat vim

+ 1 - 1
testing/Dockerfile.spydk.test

@@ -1,4 +1,4 @@
-FROM node:19.6.1-slim@sha256:a1ba21bf0c92931d02a8416f0a54daad66cb36a85d2b73af9d73b044f5f57cfc
+FROM node:22.16-bullseye-slim@sha256:550b434f7edc3a1875860657a3e306752358029c957280809ae6395ab296faeb
 
 RUN apt-get update && apt-get -y install \
   git python3 make curl netcat

+ 1 - 1
wormchain/Dockerfile.deploy

@@ -7,7 +7,7 @@ FROM const-gen AS const-export
 FROM cosmwasm_artifacts AS artifacts
 
 # Contract deployment stage
-FROM node:20.13.1-buster-slim@sha256:8916ca78cc94933fdaef715531141c8a658bea61b89d7d88a1b2dcc0a1ae92f6
+FROM node:22.16-bullseye-slim@sha256:550b434f7edc3a1875860657a3e306752358029c957280809ae6395ab296faeb
 
 RUN apt update && apt install netcat curl jq -y
 

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä