Ver código fonte

ethereum: update packages and use package-lock.json

Ran `npm update`. This resolves a ganache crash.

We can't really use `npm ci` because it's intentionally incompatible
with our incremental development workflow. We'll want to use it for
production builds, though.

ghstack-source-id: c66c5d464796e61c6781b339d6d74ebba9704144
Pull Request resolved: https://github.com/certusone/wormhole/pull/89
Leo 5 anos atrás
pai
commit
114524a096
4 arquivos alterados com 655 adições e 198 exclusões
  1. 2 2
      ethereum/Dockerfile
  2. 6 0
      ethereum/copy-from-container.sh
  3. 638 186
      ethereum/package-lock.json
  4. 9 10
      ethereum/package.json

+ 2 - 2
ethereum/Dockerfile

@@ -2,7 +2,7 @@
 FROM node:lts-alpine
 
 # npm wants to clone random Git repositories - lovely.
-RUN apk add git python
+RUN apk add git python make
 
 # Run as user, otherwise, npx explodes.
 USER 1000
@@ -11,8 +11,8 @@ RUN mkdir -p /home/node/.npm
 WORKDIR /home/node/app
 
 # Only invalidate the npm install step if package.json changed
-# TODO: build with "npm ci" for determinism
 ADD --chown=node:node package.json .
+ADD --chown=node:node package-lock.json .
 
 # 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 \

+ 6 - 0
ethereum/copy-from-container.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+# This script copies package{-lock}.json from a running container.
+set -e
+
+kubectl cp -c ganache eth-devnet-0:package.json package.json
+kubectl cp -c ganache eth-devnet-0:package-lock.json package-lock.json

Diferenças do arquivo suprimidas por serem muito extensas
+ 638 - 186
ethereum/package-lock.json


+ 9 - 10
ethereum/package.json

@@ -4,16 +4,16 @@
   "description": "",
   "main": "networks.js",
   "devDependencies": {
-    "@openzeppelin/cli": "^2.8.2",
-    "@openzeppelin/contracts": "^3.1.0",
-    "@openzeppelin/test-environment": "^0.1.4",
-    "@openzeppelin/test-helpers": "^0.5.6",
     "@chainsafe/truffle-plugin-abigen": "0.0.1",
+    "@openzeppelin/cli": "^2.8.2",
+    "@openzeppelin/contracts": "^3.2.0",
+    "@openzeppelin/test-environment": "^0.1.6",
+    "@openzeppelin/test-helpers": "^0.5.9",
+    "@truffle/hdwallet-provider": "^1.2.0",
     "chai": "^4.2.0",
-    "mocha": "^8.1.1",
-    "truffle-assertions": "^0.9.2",
-    "truffle": "^5.1.37",
-    "@truffle/hdwallet-provider": "^1.0.42"
+    "mocha": "^8.2.1",
+    "truffle": "^5.1.53",
+    "truffle-assertions": "^0.9.2"
   },
   "scripts": {
     "build": "truffle compile",
@@ -23,7 +23,6 @@
   "author": "",
   "license": "ISC",
   "dependencies": {
-    "ganache-cli": "^6.10.1",
-    "truffle": "^5.1.37"
+    "ganache-cli": "^6.12.1"
   }
 }

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff