fix: avoid packaging bpf-sdk binaries that the user downloads

This commit is contained in:
Michael Vines 2018-12-02 10:03:46 -08:00
parent 5271f4e157
commit cd4da00a68
3 changed files with 30 additions and 24 deletions

1
web3.js/.gitignore vendored
View File

@ -27,3 +27,4 @@ doc
# bpf-sdk
/bpf-sdk
/bpf-sdk.tar.bz2

View File

@ -35,33 +35,36 @@
"/src"
],
"scripts": {
"clean": "rimraf ./coverage ./lib",
"dev": "cross-env NODE_ENV=development rollup -c",
"bpf-sdk:install": "set -ex; npm run bpf-sdk:fetch; npm run bpf-sdk:extract",
"bpf-sdk:extract": "test -d bpf-sdk || tar jxvf bpf-sdk.tar.bz2",
"bpf-sdk:fetch": "test -f bpf-sdk.tar.bz2 || curl http://solana-sdk.s3.amazonaws.com/$npm_package_solana_channel/bpf-sdk.tar.bz2 -o bpf-sdk.tar.bz2",
"bpf-sdk:remove-symlinks": "find bpf-sdk -type l -print -exec cp {} {}.tmp \\; -exec mv {}.tmp {} \\;",
"build": "cross-env NODE_ENV=production rollup -c",
"doc": "esdoc; node -p '\"\\nDocumentation coverage: \" + require(\"./doc/coverage.json\").coverage'",
"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; esdoc; node -p '\"\\nDocumentation coverage: \" + require(\"./doc/coverage.json\").coverage'",
"doc:watch": "watch 'npm run doc' . --wait=1 --ignoreDirectoryPattern=/doc/",
"test": "cross-env NODE_ENV=test jest --useStderr",
"test:live": "cross-env NODE_ENV=test TEST_LIVE=1 jest --useStderr",
"test:watch": "cross-env NODE_ENV=test jest --watch --useStderr",
"test:cover": "cross-env NODE_ENV=test jest --coverage --useStderr",
"codecov": "npm run test:cover && cat ./coverage/lcov.info | codecov",
"fetch-bpf-sdk": "test -d bpf-sdk || curl http://solana-sdk.s3.amazonaws.com/$npm_package_solana_channel/bpf-sdk.tar.bz2 | tar jxv",
"remove-bpf-sdk-symlinks": "find bpf-sdk -type l -print -exec cp {} {}.tmp \\; -exec mv {}.tmp {} \\;",
"flow": "flow stop; flow-typed install jest@22 && flow",
"flow:watch": "flow stop; watch 'flow' . --wait=1 --ignoreDirectoryPattern=/doc/",
"examples": "set -ex; for example in examples/*.js; do node $example; done",
"flow": "set -ex; flow stop; flow-typed install jest@22; flow",
"flow:stop": "flow stop",
"lint": "npm run pretty && eslint .",
"flow:watch": "flow stop; watch 'flow' . --wait=1 --ignoreDirectoryPattern=/doc/",
"install": "npm run bpf-sdk:install",
"lint": "set -ex; npm run pretty; eslint .",
"lint:fix": "npm run lint -- --fix",
"lint:watch": "watch 'npm run lint:fix' . --wait=1 --ignoreDirectoryPattern=/doc/",
"localnet:up": "bin/localnet.sh up $npm_package_solana_channel",
"localnet:down": "bin/localnet.sh down",
"localnet:update": "bin/localnet.sh update $npm_package_solana_channel",
"localnet:logs": "bin/localnet.sh logs -f",
"ok": "npm run lint && npm run flow && npm run test && npm run doc",
"localnet:up": "bin/localnet.sh up $npm_package_solana_channel",
"localnet:update": "bin/localnet.sh update $npm_package_solana_channel",
"ok": "set -ex; npm run lint; npm run flow; npm run test; npm run doc",
"prepare": "set -ex; npm run clean; npm run bpf-sdk:install; npm run build; rm -rf bpf-sdk; npm rum bpf-sdk:extract; npm run bpf-sdk:remove-symlinks",
"pretty": "prettier --write '{,{examples,src,test}/**/}*.js'",
"prepare": "npm run clean && npm run ok && npm run fetch-bpf-sdk && npm run remove-bpf-sdk-symlinks && npm run build",
"examples": "set -ex; for example in examples/*.js; do node $example; done",
"re": "semantic-release --repository-url git@github.com:solana-labs/solana-web3.js.git"
"re": "semantic-release --repository-url git@github.com:solana-labs/solana-web3.js.git",
"test": "cross-env NODE_ENV=test jest --useStderr",
"test:cover": "cross-env NODE_ENV=test jest --coverage --useStderr",
"test:live": "cross-env NODE_ENV=test TEST_LIVE=1 jest --useStderr",
"test:watch": "cross-env NODE_ENV=test jest --watch --useStderr"
},
"dependencies": {
"babel-runtime": "^6.26.0",

View File

@ -168,11 +168,13 @@ export class Transaction {
programIds.push(programId);
}
instruction.keys.map(key => key.toString()).forEach(key => {
if (!keys.includes(key)) {
keys.push(key);
}
});
instruction.keys
.map(key => key.toString())
.forEach(key => {
if (!keys.includes(key)) {
keys.push(key);
}
});
});
const instructions = this.instructions.map(instruction => {