Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuring custom web3 instance #38

Merged
merged 25 commits into from May 10, 2019
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3974e5e
add web3-utils as a dependency
frangio May 9, 2019
c441f9c
rename main file to index.js
frangio May 9, 2019
644f82f
add explicit web3 injection with global fallback
frangio May 9, 2019
e9c6bb0
change installation procedure for integration tests
frangio May 9, 2019
3268fb0
add integration test for using in migrations
frangio May 9, 2019
0c4185b
emit better error message on migration integration test
frangio May 9, 2019
63d5777
add version check to web3 injection
frangio May 9, 2019
acb707b
allow multiple injection of the same instance
frangio May 9, 2019
33ca0f0
tweak migration integration test
frangio May 9, 2019
7c48143
fix linter errors
frangio May 9, 2019
5e7848e
pin web3-utils to beta 37
frangio May 9, 2019
61c628d
remove leftover comment
frangio May 9, 2019
ba1267e
rename integration test
frangio May 9, 2019
e80d12e
add truffle-migration test to travis
frangio May 9, 2019
1fa013c
keep test directory
frangio May 9, 2019
e0d103d
make inject-web3 a configuration step instead of alternative entry point
frangio May 10, 2019
a918899
remove unnecessary npm install
frangio May 10, 2019
88897cc
move default configuration logic to configure.js
frangio May 10, 2019
ebb9d6e
rename global-web3 to configure-web3
frangio May 10, 2019
0171182
add changelog entry
frangio May 10, 2019
8468b8d
add note about configuration in README
frangio May 10, 2019
5130283
fix linter errors
frangio May 10, 2019
2764287
Revert "remove unnecessary npm install"
frangio May 10, 2019
9fa877d
configure eslint globals correctly
frangio May 10, 2019
d2bfefa
fix some parentheses
frangio May 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
File renamed without changes.
8 changes: 8 additions & 0 deletions inject-web3.js
@@ -0,0 +1,8 @@
const { setWeb3 } = require('./src/global-web3');

module.exports = function (web3) {
// [TODO] check version
frangio marked this conversation as resolved.
Show resolved Hide resolved
setWeb3(web3);

return require('./index.js');
};