diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f48c6f1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +--- +name: CI + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [lts/-2, lts/-1] + + name: Node.js ${{ matrix.node-version }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Configure Node.js + uses: actions/setup-node@v3 + with: + cache: npm + node-version: ${{ matrix.node-version }} + + # Install npm greater-than-or-equal-to 7 for consistent dependency resolution. + # We can remove this when Node.js 16 is the oldest LTS (2023-04-30). + - name: Update npm + run: npm install --global 'npm@>7' + + - name: Cache node_modules + uses: actions/cache@v3 + id: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + + - name: Install dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm ci + + - name: Compile TypeScript + run: npm run build + + - name: Test + run: npm test diff --git a/package-lock.json b/package-lock.json index 0f635e2..5780392 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ }, "@babel/runtime": { "version": "7.17.9", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/@babel/runtime/-/runtime-7.17.9.tgz", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz", "integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==", "requires": { "regenerator-runtime": "^0.13.4" @@ -78,7 +78,7 @@ "dependencies": { "axios": { "version": "0.19.2", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/axios/-/axios-0.19.2.tgz", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", "dev": true, "requires": { @@ -175,7 +175,7 @@ }, "ethers": { "version": "4.0.49", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/ethers/-/ethers-4.0.49.tgz", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", "dev": true, "requires": { @@ -192,7 +192,7 @@ }, "hash.js": { "version": "1.1.3", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/hash.js/-/hash.js-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "dev": true, "requires": { @@ -214,19 +214,19 @@ }, "scrypt-js": { "version": "2.0.4", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/scrypt-js/-/scrypt-js-2.0.4.tgz", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", "dev": true }, "semver": { "version": "5.7.1", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/semver/-/semver-5.7.1.tgz", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, "tronweb": { "version": "2.10.2", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/tronweb/-/tronweb-2.10.2.tgz", + "resolved": "https://registry.npmjs.org/tronweb/-/tronweb-2.10.2.tgz", "integrity": "sha512-k3DT5W5GVX/9lSLp7yE8vlyz8AfZLHbDBRif1qEZ5RJLTFlddb0ERnc9OqKzDO/kL2dBjB8kCV/7nW2RXaps8A==", "dev": true, "requires": { @@ -245,7 +245,7 @@ "dependencies": { "bignumber.js": { "version": "7.2.1", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/bignumber.js/-/bignumber.js-7.2.1.tgz", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", "dev": true } @@ -259,7 +259,7 @@ }, "validator": { "version": "10.11.0", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/validator/-/validator-10.11.0.tgz", + "resolved": "https://registry.npmjs.org/validator/-/validator-10.11.0.tgz", "integrity": "sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw==", "dev": true } @@ -333,7 +333,7 @@ "integrity": "sha512-Zgr/N7wHTdMsc+C519JkZCqe6rfrNW8LSnscTISi5NfMTPbvDs/TvWrcuKi36JLVU5SYAPx55JGrSVOhQ1mmeg==", "dev": true, "requires": { - "@umpirsky/country-list": "git://github.com/umpirsky/country-list.git#05fda51", + "@umpirsky/country-list": "git+https://github.com/umpirsky/country-list.git#05fda51", "bigi": "^1.1.0", "bignumber.js": "^7.2.0", "bls12377js": "git+https://github.com/celo-org/bls12377js.git#400bcaeec9e7620b040bfad833268f5289699cac", @@ -1529,8 +1529,8 @@ } }, "@umpirsky/country-list": { - "version": "git://github.com/umpirsky/country-list.git#05fda51cd97b3294e8175ffed06104c44b3c71d7", - "from": "git://github.com/umpirsky/country-list.git#05fda51", + "version": "git+https://github.com/umpirsky/country-list.git#05fda51cd97b3294e8175ffed06104c44b3c71d7", + "from": "git+https://github.com/umpirsky/country-list.git#05fda51", "dev": true }, "@web3-js/scrypt-shim": { @@ -2062,7 +2062,7 @@ }, "axios": { "version": "0.24.0", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/axios/-/axios-0.24.0.tgz", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", "requires": { "follow-redirects": "^1.14.4" @@ -2070,7 +2070,7 @@ "dependencies": { "follow-redirects": { "version": "1.14.9", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/follow-redirects/-/follow-redirects-1.14.9.tgz", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==" } } @@ -5902,7 +5902,7 @@ }, "injectpromise": { "version": "1.0.0", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/injectpromise/-/injectpromise-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/injectpromise/-/injectpromise-1.0.0.tgz", "integrity": "sha512-qNq5wy4qX4uWHcVFOEU+RqZkoVG65FhvGkyDWbuBxILMjK6A1LFf5A1mgXZkD4nRx5FCorD81X/XvPKp/zVfPA==" }, "int64-buffer": { @@ -9705,7 +9705,7 @@ }, "tronweb": { "version": "4.1.0", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/tronweb/-/tronweb-4.1.0.tgz", + "resolved": "https://registry.npmjs.org/tronweb/-/tronweb-4.1.0.tgz", "integrity": "sha512-aCBLnww8db5UQaewZFs4XJcgLhXuQG6Qxnbuhnw1LlFMBGWr7kX3OMK+Ld3weGHvZfoxgH6q5+LMhp/xewHrIg==", "requires": { "@babel/runtime": "^7.0.0", @@ -9759,12 +9759,12 @@ }, "lodash": { "version": "4.17.21", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/lodash/-/lodash-4.17.21.tgz", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "semver": { "version": "5.7.1", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/semver/-/semver-5.7.1.tgz", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" } } @@ -10084,7 +10084,7 @@ }, "validator": { "version": "13.7.0", - "resolved": "https://artifactory.bitgo-ci.com/artifactory/api/npm/npm/validator/-/validator-13.7.0.tgz", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==" }, "varuint-bitcoin": {