Skip to content

Commit

Permalink
[ANCHOR-553] Bump node to 20 (#136)
Browse files Browse the repository at this point in the history
* bump node to 20

* fix error:0308010C:digital envelope routines::unsupported during ui build
  • Loading branch information
JiahuiWho authored Feb 28, 2024
1 parent bfb4fea commit b2cc742
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm_and_docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Install Depencencies
Expand Down
4 changes: 2 additions & 2 deletions @stellar/anchor-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stellar/anchor-tests",
"version": "0.6.10",
"version": "0.6.11",
"description": "stellar-anchor-tests is a library and command line interface for testing Stellar anchors.",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down Expand Up @@ -36,7 +36,7 @@
},
"dependencies": {
"@types/jsonwebtoken": "^8.5.1",
"@types/node": "^14.14.41",
"@types/node": "^20.11.0",
"@types/node-fetch": "^2.5.10",
"ansi-colors": "^4.1.1",
"form-data": "^4.0.0",
Expand Down
6 changes: 6 additions & 0 deletions @stellar/anchor-tests/src/tests/sep6/deposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ const depositRequiresAccount: Test = {
context: depositRequiresAssetCode.context,
failureModes: depositRequiresAssetCode.failureModes,
async run(config: Config): Promise<Result> {
if (!config.assetCode)
// checked in assetCodeEnabledForDeposit
throw "improperly configured";
const result: Result = { networkCalls: [] };
if (!this.context.provides.authRequired) {
result.skipped = true;
Expand Down Expand Up @@ -198,6 +201,9 @@ const depositRejectsInvalidAccount: Test = {
context: depositRequiresAssetCode.context,
failureModes: depositRequiresAssetCode.failureModes,
async run(config: Config): Promise<Result> {
if (!config.assetCode)
// checked in assetCodeEnabledForWithdraw
throw "improperly configured";
const result: Result = { networkCalls: [] };
if (!this.context.provides.authRequired) {
result.skipped = true;
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.14.1
FROM node:20 as build

# Check the versions
RUN node --version && \
Expand Down
8 changes: 4 additions & 4 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ RUN apt-get update && apt-get install -y gnupg1 libtool build-essential

WORKDIR /app

RUN apt-get update && apt-get install -y gnupg curl git make apt-transport-https && \
curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo "deb https://deb.nodesource.com/node_14.x focal main" | tee /etc/apt/sources.list.d/nodesource.list && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
RUN apt-get update && apt-get install --no-install-recommends -y gpg curl git make ca-certificates apt-transport-https && \
curl -sSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key|gpg --dearmor >/etc/apt/trusted.gpg.d/nodesource-key.gpg && \
echo "deb https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg |gpg --dearmor >/etc/apt/trusted.gpg.d/yarnpkg.gpg && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install -y nodejs yarn && apt-get clean

Expand Down
4 changes: 2 additions & 2 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"typescript": "^4.2.4"
},
"dependencies": {
"@types/node": "^14.14.41",
"@types/node": "^20.11.0",
"express": "^4.17.1",
"socket.io": "^4.1.2",
"tslib": "^2.2.0",
"winston": "^3.3.3"
},
"peerDependencies": {
"@stellar/anchor-tests": "0.6.10"
"@stellar/anchor-tests": "0.6.11"
}
}
9 changes: 4 additions & 5 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ RUN apt-get update && apt-get install -y gnupg1 libtool build-essential

WORKDIR /app


RUN apt-get update && apt-get install -y gnupg curl git make apt-transport-https && \
curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo "deb https://deb.nodesource.com/node_14.x focal main" | tee /etc/apt/sources.list.d/nodesource.list && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
RUN apt-get update && apt-get install --no-install-recommends -y gpg curl git make ca-certificates apt-transport-https && \
curl -sSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key|gpg --dearmor >/etc/apt/trusted.gpg.d/nodesource-key.gpg && \
echo "deb https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg |gpg --dearmor >/etc/apt/trusted.gpg.d/yarnpkg.gpg && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install -y nodejs yarn && apt-get clean

Expand Down
6 changes: 3 additions & 3 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@types/node": "^15.12.2",
"@types/node": "^20.11.0",
"lodash": "^4.17.21",
"lodash.throttle": "^4.1.1",
"node-fetch": "^2.6.1",
Expand Down Expand Up @@ -39,8 +39,8 @@
},
"prettier": "@stellar/prettier-config",
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts --openssl-legacy-provider build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down
20 changes: 11 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2029,15 +2029,12 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.6.1.tgz#32d43390d5c62c5b6ec486a9bc9c59544de39a08"
integrity sha512-7EIraBEyRHEe7CH+Fm1XvgqU6uwZN8Q7jppJGcqjROMT29qhAuuOxYB1uEY5UMYQKEmA5D+5tBnhdaPXSsLONA==

"@types/node@^14.14.41":
version "14.17.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.1.tgz#5e07e0cb2ff793aa7a1b41deae76221e6166049f"
integrity sha512-/tpUyFD7meeooTRwl3sYlihx2BrJE7q9XF71EguPFIySj9B7qgnRtHsHTho+0AUm4m1SvWGm6uSncrR94q6Vtw==

"@types/node@^15.12.2":
version "15.12.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.2.tgz#1f2b42c4be7156ff4a6f914b2fb03d05fa84e38d"
integrity sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==
"@types/node@^20.11.0":
version "20.11.19"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.19.tgz#b466de054e9cb5b3831bee38938de64ac7f81195"
integrity sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==
dependencies:
undici-types "~5.26.4"

"@types/normalize-package-data@^2.4.0":
version "2.4.0"
Expand Down Expand Up @@ -11933,6 +11930,11 @@ unbox-primitive@^1.0.1:
has-symbols "^1.0.2"
which-boxed-primitive "^1.0.2"

undici-types@~5.26.4:
version "5.26.5"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

unicode-canonical-property-names-ecmascript@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"
Expand Down

0 comments on commit b2cc742

Please sign in to comment.