chore(web3): use github actions (#19816)

* chore: use github actions

* chore: npm audit

* chore: fix prettier warn

* chore: fix doc errors

* chore: add puppeteer
This commit is contained in:
Justin Starry
2021-09-13 16:37:18 -05:00
committed by GitHub
parent e1a038e791
commit 1942d294e9
9 changed files with 554 additions and 504 deletions

View File

@ -1,6 +1,5 @@
arrowParens: "avoid"
bracketSpacing: false
jsxBracketSameLine: false
semi: true
singleQuote: true
tabWidth: 2

View File

@ -38,6 +38,7 @@ deploy:
on:
branch: master
node_js: "lts/*"
- provider: script
skip_cleanup: true
script:
@ -45,6 +46,7 @@ deploy:
on:
branch: master
node_js: "lts/*"
- provider: releases
skip-cleanup: true
file:

32
web3.js/commitlint.sh Executable file
View File

@ -0,0 +1,32 @@
#!/usr/bin/env bash
#
# Runs commitlint in the provided subdirectory
#
set -e
basedir=$1
if [[ -z "$basedir" ]]; then
basedir=.
fi
if [[ ! -d "$basedir" ]]; then
echo "Error: not a directory: $basedir"
exit 1
fi
if [[ ! -f "$basedir"/commitlint.config.js ]]; then
echo "Error: No commitlint configuration found"
exit 1
fi
if [[ -z $COMMIT_RANGE ]]; then
echo "Error: COMMIT_RANGE not defined"
exit 1
fi
cd "$basedir"
echo "Checking commits in COMMIT_RANGE: $COMMIT_RANGE"
while IFS= read -r line; do
echo "$line" | npx commitlint
done < <(git log "$COMMIT_RANGE" --format=%s -- .)

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,7 @@
"clean": "rimraf ./coverage ./lib",
"codecov": "set -ex; npm run test:cover; cat ./coverage/lcov.info | codecov",
"dev": "cross-env NODE_ENV=development rollup -c",
"doc": "set -ex; typedoc",
"doc": "set -ex; typedoc --treatWarningsAsErrors",
"flow:check": "flow check-contents < module.flow.js",
"flow:gen": "flowgen lib/index.d.ts -o module.flow.js",
"type:gen": "./scripts/typegen.sh",
@ -126,6 +126,7 @@
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"prettier": "^2.3.0",
"puppeteer": "^10.2.0",
"rimraf": "3.0.2",
"rollup": "2.56.3",
"rollup-plugin-dts": "^4.0.0",

View File

@ -12,7 +12,10 @@ import {toBuffer} from './util/to-buffer';
*/
export const MAX_SEED_LENGTH = 32;
type PublicKeyInitData =
/**
* Value to be converted into public key
*/
export type PublicKeyInitData =
| number
| string
| Buffer
@ -20,7 +23,10 @@ type PublicKeyInitData =
| Array<number>
| PublicKeyData;
type PublicKeyData = {
/**
* JSON object representation of PublicKey class
*/
export type PublicKeyData = {
/** @internal */
_bn: BN;
};

View File

@ -106,7 +106,7 @@ export type SignaturePubkeyPair = {
* List of Transaction object fields that may be initialized at construction
*
*/
type TransactionCtorFields = {
export type TransactionCtorFields = {
/** A recent blockhash */
recentBlockhash?: Blockhash | null;
/** Optional nonce information used for offline nonce'd transactions */
@ -120,7 +120,7 @@ type TransactionCtorFields = {
/**
* Nonce information to be used to build an offline Transaction.
*/
type NonceInformation = {
export type NonceInformation = {
/** The current blockhash stored in the nonce */
nonce: Blockhash;
/** AdvanceNonceAccount Instruction */