Upgraded nodejs dependencies to 16.x (#364)

This commit is contained in:
Ravin Perera
2022-03-08 21:12:26 +05:30
committed by GitHub
parent 86895426a1
commit 050b6f5bd5
8 changed files with 206 additions and 17 deletions

View File

@@ -93,7 +93,7 @@ sudo apt-get install -y \
sudo apt-get install -y jq
# NodeJs
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
# ncc build utility for nodejs compiled builds.
sudo npm i -g @vercel/ncc

View File

@@ -1,6 +1,137 @@
{
"name": "js_client",
"lockfileVersion": 2,
"requires": true,
"lockfileVersion": 1,
"packages": {
"": {
"dependencies": {
"bson": "4.5.3",
"hotpocket-js-client": "0.5.3"
}
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/blake3": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/blake3/-/blake3-2.1.4.tgz",
"integrity": "sha512-70hmx0lPd6zmtNwxPT4/1P0pqaEUlTJ0noUBvCXPLfMpN0o8PPaK3q7ZlpRIyhrqcXxeMAJSowNm/L9oi/x1XA==",
"hasInstallScript": true
},
"node_modules/bson": {
"version": "4.5.3",
"resolved": "https://registry.npmjs.org/bson/-/bson-4.5.3.tgz",
"integrity": "sha512-qVX7LX79Mtj7B3NPLzCfBiCP6RAsjiV8N63DjlaVVpZW+PFoDTxQ4SeDbSpcqgE6mXksM5CAwZnXxxxn/XwC0g==",
"dependencies": {
"buffer": "^5.6.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"node_modules/hotpocket-js-client": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/hotpocket-js-client/-/hotpocket-js-client-0.5.3.tgz",
"integrity": "sha512-q+qglTOTtI8t8BRqeKnb2cFyaGsb0RrTx4tQnF9HPYZYsNYkQfQcBpt+p8QzhEP2UqIbIlx8nz7HQ+CsdYr1xw==",
"dependencies": {
"blake3": "2.1.4",
"bson": "4.5.3",
"libsodium-wrappers": "0.7.9",
"ws": "8.2.3"
}
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/libsodium": {
"version": "0.7.9",
"resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.9.tgz",
"integrity": "sha512-gfeADtR4D/CM0oRUviKBViMGXZDgnFdMKMzHsvBdqLBHd9ySi6EtYnmuhHVDDYgYpAO8eU8hEY+F8vIUAPh08A=="
},
"node_modules/libsodium-wrappers": {
"version": "0.7.9",
"resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.9.tgz",
"integrity": "sha512-9HaAeBGk1nKTRFRHkt7nzxqCvnkWTjn1pdjKgcUnZxj0FyOP4CnhgFhMdrFfgNsukijBGyBLpP2m2uKT1vuWhQ==",
"dependencies": {
"libsodium": "^0.7.0"
}
},
"node_modules/ws": {
"version": "8.2.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==",
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": "^5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
"optional": true
},
"utf-8-validate": {
"optional": true
}
}
}
},
"dependencies": {
"base64-js": {
"version": "1.5.1",
@@ -30,9 +161,9 @@
}
},
"hotpocket-js-client": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/hotpocket-js-client/-/hotpocket-js-client-0.5.2.tgz",
"integrity": "sha512-WjixO8nmpAvrPdPVPT5LbMVNw4MBSD8iLjVWW4YvKVPy9hxZqFzORFZz6qD+Asx+6KQMncMsCxkXJGJ2QxKCOA==",
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/hotpocket-js-client/-/hotpocket-js-client-0.5.3.tgz",
"integrity": "sha512-q+qglTOTtI8t8BRqeKnb2cFyaGsb0RrTx4tQnF9HPYZYsNYkQfQcBpt+p8QzhEP2UqIbIlx8nz7HQ+CsdYr1xw==",
"requires": {
"blake3": "2.1.4",
"bson": "4.5.3",
@@ -61,7 +192,8 @@
"ws": {
"version": "8.2.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA=="
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==",
"requires": {}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"dependencies": {
"hotpocket-js-client": "0.5.2",
"hotpocket-js-client": "0.5.3",
"bson": "4.5.3"
}
}

View File

@@ -1,6 +1,62 @@
{
"name": "nodejs_contract",
"lockfileVersion": 2,
"requires": true,
"lockfileVersion": 1,
"packages": {
"": {
"dependencies": {
"bson": "4.0.4",
"hotpocket-nodejs-contract": "0.5.3",
"seedrandom": "3.0.5"
}
},
"node_modules/base64-js": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
"integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
},
"node_modules/bson": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/bson/-/bson-4.0.4.tgz",
"integrity": "sha512-Ioi3TD0/1V3aI8+hPfC56TetYmzfq2H07jJa9A1lKTxWsFtHtYdLMGMXjtGEg9v0f72NSM07diRQEUNYhLupIA==",
"dependencies": {
"buffer": "^5.1.0",
"long": "^4.0.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/buffer": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz",
"integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==",
"dependencies": {
"base64-js": "^1.0.2",
"ieee754": "^1.1.4"
}
},
"node_modules/hotpocket-nodejs-contract": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/hotpocket-nodejs-contract/-/hotpocket-nodejs-contract-0.5.3.tgz",
"integrity": "sha512-IMyH6noQB1w6dcPTLxdrArMpfeT9d9VJPEQ5bxubDi9Gqeu+s+0E2tKP7wDY85ie7cG/IzC9v0TCbTggp2u12w=="
},
"node_modules/ieee754": {
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
},
"node_modules/long": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
},
"node_modules/seedrandom": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
"integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
}
},
"dependencies": {
"base64-js": {
"version": "1.3.1",
@@ -26,9 +82,9 @@
}
},
"hotpocket-nodejs-contract": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/hotpocket-nodejs-contract/-/hotpocket-nodejs-contract-0.5.2.tgz",
"integrity": "sha512-kBDpdWqA5x3i72wkhUVnhpp5Z5Qojw9MQD6NUbpjpzo4YYf14KNT5MZjX+ugRggE26UlueCaYdhKcBu+vaYNaQ=="
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/hotpocket-nodejs-contract/-/hotpocket-nodejs-contract-0.5.3.tgz",
"integrity": "sha512-IMyH6noQB1w6dcPTLxdrArMpfeT9d9VJPEQ5bxubDi9Gqeu+s+0E2tKP7wDY85ie7cG/IzC9v0TCbTggp2u12w=="
},
"ieee754": {
"version": "1.1.13",

View File

@@ -5,7 +5,7 @@
"build-diag": "ncc build diagnostic_contract.js -o dist/diagnostic-contract"
},
"dependencies": {
"hotpocket-nodejs-contract": "0.5.2",
"hotpocket-nodejs-contract": "0.5.3",
"bson": "4.0.4",
"seedrandom": "3.0.5"
}

View File

@@ -22,11 +22,11 @@ rm -r $tmp/*
# NodeJs image
# Download and place the nodejs binary in the build context.
curl -fsSL -o $tmp/nodejs.tar.xz https://nodejs.org/dist/v14.17.3/node-v14.17.3-linux-x64.tar.xz
tar -xvJf $tmp/nodejs.tar.xz --strip-components=2 -C $tmp/ node-v14.17.3-linux-x64/bin/node
curl -fsSL -o $tmp/nodejs.tar.xz https://nodejs.org/dist/v16.14.0/node-v16.14.0-linux-x64.tar.xz
tar -xvJf $tmp/nodejs.tar.xz --strip-components=2 -C $tmp/ node-v16.14.0-linux-x64/bin/node
rm $tmp/nodejs.tar.xz
cp ./$njsfile $tmp/
sed -i "s/%ver%/$imgversion/g" $tmp/$njsfile
docker build -t $img:$imgversion-ubt.20.04-njs.14 -f $tmp/$njsfile $tmp
docker build -t $img:$imgversion-ubt.20.04-njs.16 -f $tmp/$njsfile $tmp
rm -r $tmp

View File

@@ -1,6 +1,7 @@
# We are going with Hot Pocket NodeJs docker image because sample contracts need NodeJs to run.
FROM evernodedev/hotpocket:0.5-ubt.20.04-njs.14
FROM evernodedev/hotpocket:latest-ubt.20.04-njs.16
# Copy (overwrite) the local build outputs into the docker image.
COPY hpcore hpfs hpws /usr/local/bin/hotpocket/
ENTRYPOINT ["/usr/local/bin/hotpocket/hpcore"]

View File

@@ -21,7 +21,7 @@ else
echo "Installing NodeJs..."
sudo apt-get update
sudo apt-get -y install curl
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
fi