aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.circleci/config.yml10
-rw-r--r--.gitignore4
-rw-r--r--README.md79
-rw-r--r--package.json34
-rw-r--r--packages/0x.js/README.md18
-rw-r--r--packages/0x.js/package.json14
-rw-r--r--packages/0x.js/src/0x.ts2
-rw-r--r--packages/0x.js/test/global_hooks.ts2
-rw-r--r--packages/0x.js/test/utils/chai_setup.ts2
-rw-r--r--packages/abi-gen/CHANGELOG.json9
-rw-r--r--packages/abi-gen/README.md18
-rwxr-xr-xpackages/abi-gen/bin/abi-gen.js2
-rw-r--r--packages/abi-gen/package.json7
-rw-r--r--packages/abi-gen/src/index.ts3
-rw-r--r--packages/assert/README.md18
-rw-r--r--packages/assert/package.json5
-rw-r--r--packages/assert/src/index.ts2
-rw-r--r--packages/base-contract/README.md8
-rw-r--r--packages/base-contract/package.json5
-rw-r--r--packages/connect/README.md18
-rw-r--r--packages/connect/package.json10
-rw-r--r--packages/connect/src/ws_orderbook_channel.ts4
-rw-r--r--packages/contract-wrappers/README.md10
-rw-r--r--packages/contract-wrappers/package.json5
-rw-r--r--packages/contract-wrappers/src/utils/assert.ts2
-rw-r--r--packages/contract-wrappers/src/utils/decorators.ts4
-rw-r--r--packages/contract-wrappers/src/utils/order_validation_utils.ts4
-rw-r--r--packages/contract-wrappers/test/global_hooks.ts2
-rw-r--r--packages/contract-wrappers/test/utils/chai_setup.ts2
-rw-r--r--packages/contracts/README.md18
-rw-r--r--packages/contracts/package.json15
-rw-r--r--packages/contracts/src/utils/chai_setup.ts2
-rw-r--r--packages/contracts/src/utils/crypto.ts2
-rw-r--r--packages/contracts/src/utils/multi_sig_wrapper.ts4
-rw-r--r--packages/contracts/src/utils/token_registry_wrapper.ts8
-rw-r--r--packages/dev-utils/README.md18
-rw-r--r--packages/dev-utils/package.json5
-rw-r--r--packages/dev-utils/src/callback_error_reporter.ts15
-rw-r--r--packages/fill-scenarios/README.md18
-rw-r--r--packages/fill-scenarios/package.json5
-rw-r--r--packages/fill-scenarios/src/index.ts4
-rw-r--r--packages/json-schemas/README.md18
-rw-r--r--packages/json-schemas/package.json7
-rw-r--r--packages/json-schemas/src/schema_validator.ts2
-rw-r--r--packages/metacoin/package.json9
-rw-r--r--packages/metacoin/test/utils/chai_setup.ts2
-rw-r--r--packages/migrations/README.md18
-rw-r--r--packages/migrations/package.json11
-rw-r--r--packages/monorepo-scripts/README.md20
-rw-r--r--packages/monorepo-scripts/package.json7
-rw-r--r--packages/monorepo-scripts/src/postpublish_utils.ts15
-rw-r--r--packages/monorepo-scripts/src/publish.ts10
-rw-r--r--packages/monorepo-scripts/src/utils.ts4
-rw-r--r--packages/monorepo-scripts/tslint.json2
-rw-r--r--packages/order-utils/README.md18
-rw-r--r--packages/order-utils/package.json7
-rw-r--r--packages/order-utils/src/order_hash.ts2
-rw-r--r--packages/order-utils/test/signature_utils_test.ts4
-rw-r--r--packages/order-utils/test/utils/chai_setup.ts2
-rw-r--r--packages/order-watcher/README.md18
-rw-r--r--packages/order-watcher/package.json5
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts2
-rw-r--r--packages/order-watcher/src/utils/assert.ts2
-rw-r--r--packages/order-watcher/test/global_hooks.ts2
-rw-r--r--packages/order-watcher/test/utils/chai_setup.ts2
-rw-r--r--packages/react-docs-example/README.md14
-rw-r--r--packages/react-docs-example/package.json5
-rw-r--r--packages/react-docs-example/ts/docs.tsx6
-rw-r--r--packages/react-docs/README.md18
-rw-r--r--packages/react-docs/package.json5
-rw-r--r--packages/react-docs/src/components/badge.tsx4
-rw-r--r--packages/react-docs/src/components/custom_enum.tsx4
-rw-r--r--packages/react-docs/src/components/documentation.tsx18
-rw-r--r--packages/react-docs/src/components/enum.tsx4
-rw-r--r--packages/react-docs/src/components/event_definition.tsx6
-rw-r--r--packages/react-docs/src/components/interface.tsx4
-rw-r--r--packages/react-docs/src/components/signature.tsx4
-rw-r--r--packages/react-docs/src/components/signature_block.tsx8
-rw-r--r--packages/react-docs/src/components/source_link.tsx4
-rw-r--r--packages/react-docs/src/components/type_definition.tsx8
-rw-r--r--packages/react-docs/src/docs_info.ts5
-rw-r--r--packages/react-docs/src/utils/doxity_utils.ts4
-rw-r--r--packages/react-docs/src/utils/typedoc_utils.ts2
-rw-r--r--packages/react-docs/src/utils/utils.ts2
-rw-r--r--packages/react-shared/README.md18
-rw-r--r--packages/react-shared/package.json5
-rw-r--r--packages/react-shared/src/components/anchor_title.tsx4
-rw-r--r--packages/react-shared/src/components/markdown_code_block.tsx4
-rw-r--r--packages/react-shared/src/components/markdown_link_block.tsx6
-rw-r--r--packages/react-shared/src/components/markdown_section.tsx4
-rw-r--r--packages/react-shared/src/components/nested_sidebar_menu.tsx2
-rw-r--r--packages/react-shared/src/components/section_header.tsx4
-rw-r--r--packages/react-shared/src/components/version_drop_down.tsx6
-rw-r--r--packages/react-shared/src/utils/utils.ts6
-rw-r--r--packages/sol-compiler/CHANGELOG.json9
-rw-r--r--packages/sol-compiler/README.md18
-rwxr-xr-xpackages/sol-compiler/bin/sol-compiler.js2
-rw-r--r--packages/sol-compiler/package.json9
-rw-r--r--packages/sol-compiler/test/compiler_test.ts2
-rw-r--r--packages/sol-cov/README.md18
-rw-r--r--packages/sol-cov/package.json9
-rw-r--r--packages/sol-cov/src/coverage_subprovider.ts2
-rw-r--r--packages/sol-resolver/README.md67
-rw-r--r--packages/sol-resolver/package.json5
-rw-r--r--packages/sra-report/CHANGELOG.json9
-rw-r--r--packages/sra-report/README.md18
-rwxr-xr-xpackages/sra-report/bin/sra-report.js2
-rw-r--r--packages/sra-report/package.json7
-rw-r--r--packages/sra-report/src/postman_environment_factory.ts31
-rw-r--r--packages/sra-report/test/test_runner.ts13
-rw-r--r--packages/subproviders/README.md18
-rw-r--r--packages/subproviders/package.json7
-rw-r--r--packages/subproviders/src/subproviders/base_wallet_subprovider.ts6
-rw-r--r--packages/subproviders/src/subproviders/empty_wallet_subprovider.ts2
-rw-r--r--packages/subproviders/src/subproviders/fake_gas_estimate_subprovider.ts2
-rw-r--r--packages/subproviders/src/subproviders/ganache.ts2
-rw-r--r--packages/subproviders/src/subproviders/injected_web3.ts2
-rw-r--r--packages/subproviders/src/subproviders/ledger.ts4
-rw-r--r--packages/subproviders/src/subproviders/mnemonic_wallet.ts2
-rw-r--r--packages/subproviders/src/subproviders/subprovider.ts2
-rw-r--r--packages/subproviders/test/chai_setup.ts2
-rw-r--r--packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts2
-rw-r--r--packages/testnet-faucets/Dockerfile2
-rw-r--r--packages/testnet-faucets/README.md20
-rw-r--r--packages/testnet-faucets/gulpfile.js6
-rw-r--r--packages/testnet-faucets/package.json10
-rw-r--r--packages/testnet-faucets/src/ts/dispatch_queue.ts4
-rw-r--r--packages/testnet-faucets/src/ts/dispense_asset_tasks.ts6
-rw-r--r--packages/testnet-faucets/src/ts/error_reporter.ts4
-rw-r--r--packages/testnet-faucets/src/ts/handler.ts29
-rw-r--r--packages/testnet-faucets/src/ts/parameter_transformer.ts2
-rw-r--r--packages/testnet-faucets/src/ts/server.ts4
-rw-r--r--packages/tslint-config/README.md18
-rw-r--r--packages/tslint-config/package.json5
-rw-r--r--packages/tslint-config/rules/underscorePrivateAndProtectedRule.ts4
-rw-r--r--packages/tslint-config/tslint.json1
-rw-r--r--packages/types/README.md18
-rw-r--r--packages/types/package.json5
-rw-r--r--packages/typescript-typings/README.md18
-rw-r--r--packages/typescript-typings/package.json4
-rw-r--r--packages/utils/README.md18
-rw-r--r--packages/utils/package.json5
-rw-r--r--packages/utils/src/abi_decoder.ts2
-rw-r--r--packages/utils/src/interval_utils.ts8
-rw-r--r--packages/web3-wrapper/README.md18
-rw-r--r--packages/web3-wrapper/package.json7
-rw-r--r--packages/web3-wrapper/src/web3_wrapper.ts4
-rw-r--r--packages/web3-wrapper/test/utils/chai_setup.ts2
-rw-r--r--packages/website/README.md8
-rw-r--r--packages/website/package.json6
-rw-r--r--packages/website/public/images/team/fragosti.pngbin0 -> 26209 bytes
-rw-r--r--packages/website/ts/blockchain.ts57
-rw-r--r--packages/website/ts/blockchain_watcher.ts14
-rw-r--r--packages/website/ts/components/dialogs/blockchain_err_dialog.tsx16
-rw-r--r--packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx20
-rw-r--r--packages/website/ts/components/dialogs/ledger_config_dialog.tsx20
-rw-r--r--packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx4
-rw-r--r--packages/website/ts/components/dialogs/send_dialog.tsx14
-rw-r--r--packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx4
-rw-r--r--packages/website/ts/components/dialogs/u2f_not_supported_dialog.tsx4
-rw-r--r--packages/website/ts/components/dialogs/wrapped_eth_section_notice_dialog.tsx4
-rw-r--r--packages/website/ts/components/dropdowns/network_drop_down.tsx4
-rw-r--r--packages/website/ts/components/eth_weth_conversion_button.tsx6
-rw-r--r--packages/website/ts/components/eth_wrappers.tsx24
-rw-r--r--packages/website/ts/components/fill_order.tsx32
-rw-r--r--packages/website/ts/components/fill_order_json.tsx2
-rw-r--r--packages/website/ts/components/fill_warning_dialog.tsx4
-rw-r--r--packages/website/ts/components/flash_messages/token_send_completed.tsx2
-rw-r--r--packages/website/ts/components/flash_messages/transaction_submitted.tsx2
-rw-r--r--packages/website/ts/components/footer.tsx10
-rw-r--r--packages/website/ts/components/generate_order/asset_picker.tsx20
-rw-r--r--packages/website/ts/components/generate_order/generate_order_form.tsx8
-rw-r--r--packages/website/ts/components/generate_order/new_token_form.tsx18
-rw-r--r--packages/website/ts/components/inputs/address_input.tsx6
-rw-r--r--packages/website/ts/components/inputs/allowance_toggle.tsx6
-rw-r--r--packages/website/ts/components/inputs/balance_bounded_input.tsx8
-rw-r--r--packages/website/ts/components/inputs/eth_amount_input.tsx4
-rw-r--r--packages/website/ts/components/inputs/expiration_input.tsx8
-rw-r--r--packages/website/ts/components/inputs/hash_input.tsx4
-rw-r--r--packages/website/ts/components/inputs/identicon_address_input.tsx2
-rw-r--r--packages/website/ts/components/inputs/token_amount_input.tsx12
-rw-r--r--packages/website/ts/components/inputs/token_input.tsx8
-rw-r--r--packages/website/ts/components/legacy_portal/legacy_portal.tsx30
-rw-r--r--packages/website/ts/components/legacy_portal/legacy_portal_menu.tsx4
-rw-r--r--packages/website/ts/components/order_json.tsx12
-rw-r--r--packages/website/ts/components/portal/portal.tsx22
-rw-r--r--packages/website/ts/components/redirecter.tsx2
-rw-r--r--packages/website/ts/components/relayer_index/relayer_grid_tile.tsx10
-rw-r--r--packages/website/ts/components/relayer_index/relayer_index.tsx6
-rw-r--r--packages/website/ts/components/relayer_index/relayer_top_tokens.tsx55
-rw-r--r--packages/website/ts/components/send_button.tsx6
-rw-r--r--packages/website/ts/components/sidebar_header.tsx2
-rw-r--r--packages/website/ts/components/token_balances.tsx40
-rw-r--r--packages/website/ts/components/top_bar/provider_display.tsx4
-rw-r--r--packages/website/ts/components/top_bar/provider_picker.tsx8
-rw-r--r--packages/website/ts/components/top_bar/top_bar.tsx32
-rw-r--r--packages/website/ts/components/top_bar/top_bar_menu_item.tsx2
-rw-r--r--packages/website/ts/components/track_token_confirmation.tsx2
-rw-r--r--packages/website/ts/components/trade_history/trade_history.tsx20
-rw-r--r--packages/website/ts/components/trade_history/trade_history_item.tsx8
-rw-r--r--packages/website/ts/components/ui/alert.tsx4
-rw-r--r--packages/website/ts/components/ui/copy_icon.tsx12
-rw-r--r--packages/website/ts/components/ui/drop_down.tsx18
-rw-r--r--packages/website/ts/components/ui/etherscan_icon.tsx2
-rw-r--r--packages/website/ts/components/ui/fake_text_field.tsx4
-rw-r--r--packages/website/ts/components/ui/flash_message.tsx4
-rw-r--r--packages/website/ts/components/ui/identicon.tsx2
-rw-r--r--packages/website/ts/components/ui/lifecycle_raised_button.tsx6
-rw-r--r--packages/website/ts/components/ui/menu_item.tsx4
-rw-r--r--packages/website/ts/components/ui/party.tsx2
-rw-r--r--packages/website/ts/components/ui/swap_icon.tsx4
-rw-r--r--packages/website/ts/components/ui/token_icon.tsx2
-rw-r--r--packages/website/ts/components/visual_order.tsx4
-rw-r--r--packages/website/ts/components/wallet/wallet.tsx54
-rw-r--r--packages/website/ts/components/wallet/wrap_ether_item.tsx12
-rw-r--r--packages/website/ts/index.tsx2
-rw-r--r--packages/website/ts/lazy_component.tsx8
-rw-r--r--packages/website/ts/local_storage/local_storage.ts6
-rw-r--r--packages/website/ts/local_storage/trade_history_storage.tsx12
-rw-r--r--packages/website/ts/pages/about/about.tsx20
-rw-r--r--packages/website/ts/pages/about/profile.tsx8
-rw-r--r--packages/website/ts/pages/documentation/doc_page.tsx10
-rw-r--r--packages/website/ts/pages/faq/faq.tsx8
-rw-r--r--packages/website/ts/pages/faq/question.tsx4
-rw-r--r--packages/website/ts/pages/landing/landing.tsx39
-rw-r--r--packages/website/ts/pages/not_found.tsx2
-rw-r--r--packages/website/ts/pages/wiki/wiki.tsx18
-rw-r--r--packages/website/ts/redux/dispatcher.ts60
-rw-r--r--packages/website/ts/redux/reducer.ts2
-rw-r--r--packages/website/ts/types.ts2
-rw-r--r--packages/website/ts/utils/analytics.ts6
-rw-r--r--packages/website/ts/utils/backend_client.ts10
-rw-r--r--packages/website/ts/utils/configs.ts5
-rw-r--r--packages/website/ts/utils/translate.ts8
-rw-r--r--packages/website/ts/utils/utils.ts34
-rw-r--r--yarn.lock1065
236 files changed, 2191 insertions, 1184 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index dbd8b2926..58740062a 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -22,7 +22,7 @@ jobs:
- run: wget https://s3.amazonaws.com/testrpc-shapshots/${CONTRACTS_COMMIT_HASH}.zip
- run: unzip ${CONTRACTS_COMMIT_HASH}.zip -d testrpc_snapshot
- run: node ./node_modules/lerna/bin/lerna.js bootstrap
- - run: yarn lerna:run build
+ - run: yarn build
- save_cache:
key: repo-{{ .Environment.CIRCLE_SHA1 }}
paths:
@@ -48,7 +48,7 @@ jobs:
name: testrpc
command: npm run testrpc -- --db testrpc_snapshot
background: true
- - run: yarn lerna:run --scope 0x.js test:circleci
+ - run: yarn wsrun test:circleci 0x.js
- save_cache:
key: coverage-0xjs-{{ .Environment.CIRCLE_SHA1 }}
paths:
@@ -65,7 +65,7 @@ jobs:
name: testrpc
command: npm run testrpc -- --db testrpc_snapshot
background: true
- - run: yarn lerna:run --scope contracts test:circleci
+ - run: yarn wsrun test:circleci contracts
- save_cache:
key: coverage-contracts-{{ .Environment.CIRCLE_SHA1 }}
paths:
@@ -82,7 +82,7 @@ jobs:
name: testrpc
command: npm run testrpc -- --db testrpc_snapshot
background: true
- - run: yarn lerna:run --scope @0xproject/sol-compiler test:circleci
+ - run: yarn wsrun test:circleci @0xproject/sol-compiler
- save_cache:
key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }}
paths:
@@ -99,7 +99,7 @@ jobs:
name: testrpc
command: npm run testrpc -- --db testrpc_snapshot
background: true
- - run: yarn lerna:run --ignore contracts --ignore 0x.js --ignore @0xproject/sol-compiler test:circleci
+ - run: yarn wsrun test:circleci --exclude contracts --exclude 0x.js --exclude @0xproject/sol-compiler --stages --exclude-missing
- save_cache:
key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }}
paths:
diff --git a/.gitignore b/.gitignore
index 2c819cacf..5d0b845ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -70,8 +70,8 @@ TODO.md
packages/website/public/bundle*
packages/react-docs/example/public/bundle*
-# generated binaries
-bin/
+# server cli
+packages/testnet-faucets/server/
# generated contract artifacts/
packages/sol-cov/test/fixtures/artifacts/
diff --git a/README.md b/README.md
index de77e980e..6615ae4dc 100644
--- a/README.md
+++ b/README.md
@@ -62,6 +62,8 @@ Dedicated documentation pages:
* [Sol-cov](https://0xproject.com/docs/sol-cov)
* [Standard Relayer API](https://github.com/0xProject/standard-relayer-api/blob/master/README.md)
+Node version >= 6.12 is required.
+
Most of the packages require additional typings for external dependencies.
You can include those by prepending @0xproject/typescript-typings package to your [`typeRoots`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) config.
@@ -91,32 +93,87 @@ yarn install
### Build
-Build all packages. You need to do this before working on any given package. Although these packages
-as independent, when run from within the monorepo, they are internally symlinked, to make development
-easier. You can change several packages and run the changes without publishing them first to NPM. When
-running `rebuild`, Lerna will figure out the dependency order of all the packages, and build them in
-this order.
+To build all packages:
+
+```bash
+yarn build
+```
+
+To build a specific package:
+
+```bash
+PKG=@0xproject/web3-wrapper yarn build
+```
+
+### Watch
+
+To re-build all packages on change:
+
+```bash
+yarn watch
+```
+
+To watch a specific package and all it's dependent packages:
+
+```bash
+PKG=[NPM_PACKAGE_NAME] yarn watch
+
+e.g
+PKG=@0xproject/web3-wrapper yarn watch
+```
+
+### Clean
+
+Clean all packages:
+
+```bash
+yarn clean
+```
+
+Clean a specific package
+
+```bash
+PKG=0x.js yarn clean
+```
+
+### Rebuild
+
+To re-build (clean & build) all packages:
```bash
-yarn lerna:rebuild
+yarn rebuild
```
-Or continuously rebuild on change:
+To re-build (clean & build) a specific package & it's deps:
```bash
-yarn dev
+PKG=0x.js yarn rebuild
```
### Lint
-Lint all packages
+Lint all packages:
```bash
-yarn lerna:run lint
+yarn lint
+```
+
+Lint a specific package:
+
+```bash
+PKG=0x.js yarn lint
```
### Run Tests
+Run all tests:
+
+```bash
+yarn test
+```
+
+Run a specific package's test:
+
```bash
-yarn lerna:test
+PKG=@0xproject/web3-wrapper yarn test
```
diff --git a/package.json b/package.json
index 3f2486656..2d44e468e 100644
--- a/package.json
+++ b/package.json
@@ -1,27 +1,32 @@
{
"private": true,
"name": "0x-monorepo",
+ "engines": {
+ "node" : ">=6.12"
+ },
"workspaces": [
"packages/*"
],
"scripts": {
- "dev": "lerna run --parallel build:watch",
- "testrpc": "testrpc -p 8545 --networkId 50 -m \"${npm_package_config_mnemonic}\"",
+ "ganache": "ganache-cli -p 8545 --networkId 50 -m \"${npm_package_config_mnemonic}\"",
"prettier": "prettier --write '**/*.{ts,tsx,json,md}' --config .prettierrc",
"prettier:ci": "prettier --list-different '**/*.{ts,tsx,json,md}' --config .prettierrc",
"report_coverage": "lcov-result-merger 'packages/*/coverage/lcov.info' | coveralls",
"test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js",
- "lerna:install": "yarn install",
- "lerna:run": "lerna run",
- "lerna:test": "lerna run test",
- "lerna:clean": "lerna run clean",
- "lerna:build": "lerna run build",
- "lerna:rebuild": "run-s lerna:clean lerna:build",
- "lerna:publish": "run-s lerna:install lerna:rebuild script:publish",
- "lerna:publish:dry": "run-s lerna:install lerna:rebuild script:publish:dry",
- "lerna:stage_docs": "lerna run docs:stage",
+ "publish": "run-s install:all rebuild script:publish",
+ "publish:dry": "run-s install:all rebuild script:publish:dry",
"script:publish": "node ./packages/monorepo-scripts/lib/publish.js",
- "script:publish:dry": "IS_DRY_RUN=true yarn script:publish"
+ "script:publish:dry": "IS_DRY_RUN=true yarn script:publish",
+ "install:all": "yarn install",
+ "wsrun": "wsrun",
+ "lerna:run": "lerna run",
+ "watch": "wsrun watch $PKG -r --stages --done-criteria='complete|successfully'",
+ "build": "wsrun build $PKG -r --stages",
+ "clean": "wsrun clean $PKG -r --parallel",
+ "rebuild": "run-s clean build",
+ "test": "wsrun test $PKG --serial --exclude-missing",
+ "stage_docs": "wsrun docs:stage $PKG --parallel --exclude-missing",
+ "lint": "wsrun lint $PKG --parallel --exclude-missing"
},
"config": {
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic"
@@ -29,10 +34,11 @@
"devDependencies": {
"async-child-process": "^1.1.1",
"coveralls": "^3.0.0",
- "ethereumjs-testrpc": "^6.0.3",
+ "ganache-cli": "^6.1.0",
"lcov-result-merger": "^2.0.0",
"lerna": "^2.5.1",
"npm-run-all": "^4.1.2",
- "prettier": "^1.11.1"
+ "prettier": "^1.11.1",
+ "wsrun": "^2.2.0"
}
}
diff --git a/packages/0x.js/README.md b/packages/0x.js/README.md
index 8d84f6c82..fd6217151 100644
--- a/packages/0x.js/README.md
+++ b/packages/0x.js/README.md
@@ -64,28 +64,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=0x.js yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=0x.js yarn watch
```
### Clean
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json
index 70e95aecd..dab284dc7 100644
--- a/packages/0x.js/package.json
+++ b/packages/0x.js/package.json
@@ -1,6 +1,9 @@
{
"name": "0x.js",
"version": "0.37.2",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "A javascript library for interacting with the 0x protocol",
"keywords": [
"0x.js",
@@ -12,10 +15,10 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"prebuild": "run-s clean generate_contract_wrappers",
"build": "run-p build:umd:prod build:commonjs; exit 0;",
- "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers && prettier --write 'src/contract_wrappers/generated/**.ts'",
+ "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers && prettier --write 'src/contract_wrappers/generated/**.ts'",
"lint": "tslint --project .",
"test:circleci": "run-s test:coverage",
"test": "run-s clean test:commonjs",
@@ -29,7 +32,7 @@
"note": "The `run_mocha` test has been commented out by @hysz (greg@0xproject.com) until the migration package and 0x.js have been updated for V2."},
"run_mocha": "",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
- "docs:stage": "yarn build && node ./scripts/stage_docs.js",
+ "docs:stage": "node scripts/stage_docs.js",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
},
@@ -64,10 +67,8 @@
"url": "https://github.com/0xProject/0x-monorepo"
},
"license": "Apache-2.0",
- "engines": {
- "node": ">=6.0.0"
- },
"devDependencies": {
+ "@0xproject/abi-gen": "^0.2.13",
"@0xproject/sol-compiler": "^0.4.3",
"@0xproject/dev-utils": "^0.4.1",
"@0xproject/migrations": "^0.0.5",
@@ -105,6 +106,7 @@
"@0xproject/order-utils": "^0.0.4",
"@0xproject/types": "^0.6.3",
"@0xproject/typescript-typings": "^0.3.1",
+ "@0xproject/sol-compiler": "^0.4.3",
"@0xproject/utils": "^0.6.1",
"@0xproject/web3-wrapper": "^0.6.3",
"ethers": "^3.0.15",
diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts
index e0192d5ef..206954a0b 100644
--- a/packages/0x.js/src/0x.ts
+++ b/packages/0x.js/src/0x.ts
@@ -200,7 +200,7 @@ export class ZeroEx {
*/
public async awaitTransactionMinedAsync(
txHash: string,
- pollingIntervalMs = 1000,
+ pollingIntervalMs: number = 1000,
timeoutMs?: number,
): Promise<TransactionReceiptWithDecodedLogs> {
// Hack: Get Web3Wrapper from ContractWrappers
diff --git a/packages/0x.js/test/global_hooks.ts b/packages/0x.js/test/global_hooks.ts
index 88f202761..53b3ef545 100644
--- a/packages/0x.js/test/global_hooks.ts
+++ b/packages/0x.js/test/global_hooks.ts
@@ -5,7 +5,7 @@ import * as path from 'path';
import { constants } from './utils/constants';
import { provider } from './utils/web3_wrapper';
-before('migrate contracts', async function() {
+before('migrate contracts', async function(): Promise<void> {
// HACK: Since the migrations take longer then our global mocha timeout limit
// we manually increase it for this before hook.
this.timeout(20000);
diff --git a/packages/0x.js/test/utils/chai_setup.ts b/packages/0x.js/test/utils/chai_setup.ts
index 078edd309..1a8733093 100644
--- a/packages/0x.js/test/utils/chai_setup.ts
+++ b/packages/0x.js/test/utils/chai_setup.ts
@@ -4,7 +4,7 @@ import ChaiBigNumber = require('chai-bignumber');
import * as dirtyChai from 'dirty-chai';
export const chaiSetup = {
- configure() {
+ configure(): void {
chai.config.includeStack = true;
chai.use(ChaiBigNumber());
chai.use(dirtyChai);
diff --git a/packages/abi-gen/CHANGELOG.json b/packages/abi-gen/CHANGELOG.json
index 4dada9cc1..4b23b8118 100644
--- a/packages/abi-gen/CHANGELOG.json
+++ b/packages/abi-gen/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "0.3.0",
+ "changes": [
+ {
+ "note": "Properly export the executable binary",
+ "pr": 588
+ }
+ ]
+ },
+ {
"timestamp": 1525477860,
"version": "0.2.13",
"changes": [
diff --git a/packages/abi-gen/README.md b/packages/abi-gen/README.md
index 301bd709f..4240ba7ba 100644
--- a/packages/abi-gen/README.md
+++ b/packages/abi-gen/README.md
@@ -80,28 +80,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/abi-gen yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/abi-gen yarn watch
```
### Clean
diff --git a/packages/abi-gen/bin/abi-gen.js b/packages/abi-gen/bin/abi-gen.js
new file mode 100755
index 000000000..c46eb9b66
--- /dev/null
+++ b/packages/abi-gen/bin/abi-gen.js
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+require('../lib/index.js')
diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json
index 82184a596..d0cd946f0 100644
--- a/packages/abi-gen/package.json
+++ b/packages/abi-gen/package.json
@@ -1,18 +1,21 @@
{
"name": "@0xproject/abi-gen",
"version": "0.2.13",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "Generate contract wrappers from ABI and handlebars templates",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"lint": "tslint --project .",
"clean": "shx rm -rf lib scripts",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
},
"bin": {
- "abi-gen": "lib/index.js"
+ "abi-gen": "bin/abi-gen.js"
},
"repository": {
"type": "git",
diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts
index a280f2e63..ef5710f53 100644
--- a/packages/abi-gen/src/index.ts
+++ b/packages/abi-gen/src/index.ts
@@ -61,14 +61,13 @@ const args = yargs
'Full usage example',
).argv;
-function registerPartials(partialsGlob: string) {
+function registerPartials(partialsGlob: string): void {
const partialTemplateFileNames = globSync(partialsGlob);
logUtils.log(`Found ${chalk.green(`${partialTemplateFileNames.length}`)} ${chalk.bold('partial')} templates`);
for (const partialTemplateFileName of partialTemplateFileNames) {
const namedContent = utils.getNamedContent(partialTemplateFileName);
Handlebars.registerPartial(namedContent.name, namedContent.content);
}
- return partialsGlob;
}
function writeOutputFile(name: string, renderedTsCode: string): void {
diff --git a/packages/assert/README.md b/packages/assert/README.md
index 598fee613..1f2139d47 100644
--- a/packages/assert/README.md
+++ b/packages/assert/README.md
@@ -46,28 +46,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/assert yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/assert yarn watch
```
### Clean
diff --git a/packages/assert/package.json b/packages/assert/package.json
index f86bbb33f..c6d77c1bd 100644
--- a/packages/assert/package.json
+++ b/packages/assert/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/assert",
"version": "0.2.9",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "Provides a standard way of performing type and schema validation across 0x projects",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib test_temp scripts",
"lint": "tslint --project .",
diff --git a/packages/assert/src/index.ts b/packages/assert/src/index.ts
index 938daab92..f3b3651d5 100644
--- a/packages/assert/src/index.ts
+++ b/packages/assert/src/index.ts
@@ -10,7 +10,7 @@ export const assert = {
const isBigNumber = _.isObject(value) && (value as any).isBigNumber;
this.assert(isBigNumber, this.typeAssertionMessage(variableName, 'BigNumber', value));
},
- isValidBaseUnitAmount(variableName: string, value: BigNumber) {
+ isValidBaseUnitAmount(variableName: string, value: BigNumber): void {
assert.isBigNumber(variableName, value);
const isNegative = value.lessThan(0);
this.assert(!isNegative, `${variableName} cannot be a negative number, found value: ${value.toNumber()}`);
diff --git a/packages/base-contract/README.md b/packages/base-contract/README.md
index a689d0130..4f2426c2e 100644
--- a/packages/base-contract/README.md
+++ b/packages/base-contract/README.md
@@ -44,14 +44,16 @@ yarn install
### Build
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
+
```bash
-yarn build
+PKG=@0xproject/base-contract yarn build
```
-or
+Or continuously rebuild on change:
```bash
-yarn build:watch
+PKG=@0xproject/base-contract yarn watch
```
### Lint
diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json
index 90253616b..8a048112c 100644
--- a/packages/base-contract/package.json
+++ b/packages/base-contract/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/base-contract",
"version": "0.3.1",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "0x Base TS contract",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib scripts",
"test": "run-s clean build run_mocha",
diff --git a/packages/connect/README.md b/packages/connect/README.md
index a57fefa59..9d8cb9215 100644
--- a/packages/connect/README.md
+++ b/packages/connect/README.md
@@ -43,28 +43,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/connect yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/connect yarn watch
```
### Clean
diff --git a/packages/connect/package.json b/packages/connect/package.json
index 2930de98e..d52fb450e 100644
--- a/packages/connect/package.json
+++ b/packages/connect/package.json
@@ -1,6 +1,9 @@
{
"name": "@0xproject/connect",
"version": "0.6.12",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "A javascript library for interacting with the standard relayer api",
"keywords": [
"connect",
@@ -12,7 +15,7 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib test_temp scripts",
"copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures",
@@ -23,7 +26,7 @@
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"test:circleci": "yarn test:coverage",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
- "docs:stage": "yarn build && node ./scripts/stage_docs.js",
+ "docs:stage": "node scripts/stage_docs.js",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
},
@@ -42,9 +45,6 @@
},
"author": "Brandon Millman",
"license": "Apache-2.0",
- "engines": {
- "node": ">=6.0.0"
- },
"bugs": {
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
diff --git a/packages/connect/src/ws_orderbook_channel.ts b/packages/connect/src/ws_orderbook_channel.ts
index 5aa730d8f..4a9d4058f 100644
--- a/packages/connect/src/ws_orderbook_channel.ts
+++ b/packages/connect/src/ws_orderbook_channel.ts
@@ -91,7 +91,7 @@ export class WebSocketOrderbookChannel implements OrderbookChannel {
/**
* Close the websocket and stop receiving updates
*/
- public close() {
+ public close(): void {
if (!_.isUndefined(this._connectionIfExists)) {
this._connectionIfExists.close();
}
@@ -99,7 +99,7 @@ export class WebSocketOrderbookChannel implements OrderbookChannel {
clearInterval(this._heartbeatTimerIfExists);
}
}
- private _getConnection(callback: (error?: Error, connection?: WebSocket.connection) => void) {
+ private _getConnection(callback: (error?: Error, connection?: WebSocket.connection) => void): void {
if (!_.isUndefined(this._connectionIfExists) && this._connectionIfExists.connected) {
callback(undefined, this._connectionIfExists);
} else {
diff --git a/packages/contract-wrappers/README.md b/packages/contract-wrappers/README.md
index 0fca4c762..6153f798e 100644
--- a/packages/contract-wrappers/README.md
+++ b/packages/contract-wrappers/README.md
@@ -48,20 +48,18 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/contract-wrappers yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
+PKG=@0xproject/contract-wrappers yarn watch
```
-You can also build this specific package by running the following from within its directory:
-
```bash
yarn build
```
@@ -69,7 +67,7 @@ yarn build
or continuously rebuild on change:
```bash
-yarn build:watch
+yarn watch
```
### Clean
diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json
index 2b53f5c8d..5042a14e7 100644
--- a/packages/contract-wrappers/package.json
+++ b/packages/contract-wrappers/package.json
@@ -11,9 +11,9 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"prebuild": "run-s clean generate_contract_wrappers",
- "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers && prettier --write 'src/contract_wrappers/generated/**.ts'",
+ "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers && prettier --write 'src/contract_wrappers/generated/**.ts'",
"lint": "tslint --project .",
"test:circleci": "run-s test:coverage",
"test": "run-s clean build run_mocha",
@@ -44,6 +44,7 @@
"node": ">=6.0.0"
},
"devDependencies": {
+ "@0xproject/abi-gen": "^0.2.13",
"@0xproject/sol-compiler": "^0.4.3",
"@0xproject/dev-utils": "^0.4.1",
"@0xproject/migrations": "^0.0.5",
diff --git a/packages/contract-wrappers/src/utils/assert.ts b/packages/contract-wrappers/src/utils/assert.ts
index 2588a4d09..c74ed341f 100644
--- a/packages/contract-wrappers/src/utils/assert.ts
+++ b/packages/contract-wrappers/src/utils/assert.ts
@@ -12,7 +12,7 @@ import { isValidSignature } from '@0xproject/order-utils';
export const assert = {
...sharedAssert,
- isValidSignature(orderHash: string, ecSignature: ECSignature, signerAddress: string) {
+ isValidSignature(orderHash: string, ecSignature: ECSignature, signerAddress: string): void {
const isValid = isValidSignature(orderHash, ecSignature, signerAddress);
this.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`);
},
diff --git a/packages/contract-wrappers/src/utils/decorators.ts b/packages/contract-wrappers/src/utils/decorators.ts
index 64123143c..494575e7b 100644
--- a/packages/contract-wrappers/src/utils/decorators.ts
+++ b/packages/contract-wrappers/src/utils/decorators.ts
@@ -39,7 +39,7 @@ const asyncErrorHandlerFactory = (errorTransformer: ErrorTransformer) => {
// Do not use arrow syntax here. Use a function expression in
// order to use the correct value of `this` in this method
// tslint:disable-next-line:only-arrow-functions
- descriptor.value = async function(...args: any[]) {
+ descriptor.value = async function(...args: any[]): Promise<any> {
try {
const result = await originalMethod.apply(this, args);
return result;
@@ -66,7 +66,7 @@ const syncErrorHandlerFactory = (errorTransformer: ErrorTransformer) => {
// Do not use arrow syntax here. Use a function expression in
// order to use the correct value of `this` in this method
// tslint:disable-next-line:only-arrow-functions
- descriptor.value = function(...args: any[]) {
+ descriptor.value = function(...args: any[]): any {
try {
const result = originalMethod.apply(this, args);
return result;
diff --git a/packages/contract-wrappers/src/utils/order_validation_utils.ts b/packages/contract-wrappers/src/utils/order_validation_utils.ts
index 36dfbd800..362c605de 100644
--- a/packages/contract-wrappers/src/utils/order_validation_utils.ts
+++ b/packages/contract-wrappers/src/utils/order_validation_utils.ts
@@ -86,12 +86,12 @@ export class OrderValidationUtils {
private static _validateRemainingFillAmountNotZeroOrThrow(
takerTokenAmount: BigNumber,
unavailableTakerTokenAmount: BigNumber,
- ) {
+ ): void {
if (takerTokenAmount.eq(unavailableTakerTokenAmount)) {
throw new Error(ExchangeContractErrs.OrderRemainingFillAmountZero);
}
}
- private static _validateOrderNotExpiredOrThrow(expirationUnixTimestampSec: BigNumber) {
+ private static _validateOrderNotExpiredOrThrow(expirationUnixTimestampSec: BigNumber): void {
const currentUnixTimestampSec = utils.getCurrentUnixTimestampSec();
if (expirationUnixTimestampSec.lessThan(currentUnixTimestampSec)) {
throw new Error(ExchangeContractErrs.OrderFillExpired);
diff --git a/packages/contract-wrappers/test/global_hooks.ts b/packages/contract-wrappers/test/global_hooks.ts
index 88f202761..53b3ef545 100644
--- a/packages/contract-wrappers/test/global_hooks.ts
+++ b/packages/contract-wrappers/test/global_hooks.ts
@@ -5,7 +5,7 @@ import * as path from 'path';
import { constants } from './utils/constants';
import { provider } from './utils/web3_wrapper';
-before('migrate contracts', async function() {
+before('migrate contracts', async function(): Promise<void> {
// HACK: Since the migrations take longer then our global mocha timeout limit
// we manually increase it for this before hook.
this.timeout(20000);
diff --git a/packages/contract-wrappers/test/utils/chai_setup.ts b/packages/contract-wrappers/test/utils/chai_setup.ts
index 078edd309..1a8733093 100644
--- a/packages/contract-wrappers/test/utils/chai_setup.ts
+++ b/packages/contract-wrappers/test/utils/chai_setup.ts
@@ -4,7 +4,7 @@ import ChaiBigNumber = require('chai-bignumber');
import * as dirtyChai from 'dirty-chai';
export const chaiSetup = {
- configure() {
+ configure(): void {
chai.config.includeStack = true;
chai.use(ChaiBigNumber());
chai.use(dirtyChai);
diff --git a/packages/contracts/README.md b/packages/contracts/README.md
index 16e253549..23551b69d 100644
--- a/packages/contracts/README.md
+++ b/packages/contracts/README.md
@@ -34,28 +34,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=contracts yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=contracts yarn watch
```
### Clean
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 11db3880a..b10ed3c44 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -2,25 +2,25 @@
"private": true,
"name": "contracts",
"version": "2.1.28",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "Smart contract components of 0x protocol",
"main": "index.js",
"directories": {
"test": "test"
},
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"prebuild": "run-s clean copy_artifacts generate_contract_wrappers",
"copy_artifacts": "copyfiles -u 4 '../migrations/artifacts/2.0.0/**/*' ./lib/src/artifacts;",
"build": "tsc",
"test": "run-s build run_mocha",
"test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
"run_mocha": "mocha 'lib/test/**/*.js' --timeout 100000 --bail --exit",
- "compile:comment":
- "Yarn workspaces do not link binaries correctly so we need to reference them directly https://github.com/yarnpkg/yarn/issues/3846",
- "compile": "node ../sol-compiler/lib/src/cli.js",
- "clean": "shx rm -rf lib ./contract_wrappers/generated",
- "generate_contract_wrappers":
- "node ../abi-gen/lib/index.js --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output ./src/contract_wrappers/generated --backend ethers && prettier --write './src/contract_wrappers/generated/**.ts'",
+ "compile": "sol-compiler",
+ "clean": "shx rm -rf lib src/contract_wrappers/generated",
+ "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers && prettier --write 'src/contract_wrappers/generated/**.ts'",
"lint": "tslint --project .",
"coverage:report:text": "istanbul report text",
"coverage:report:html": "istanbul report html && open coverage/index.html",
@@ -42,6 +42,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md",
"devDependencies": {
+ "@0xproject/abi-gen": "^0.2.13",
"@0xproject/dev-utils": "^0.4.1",
"@0xproject/tslint-config": "^0.4.17",
"@types/lodash": "4.14.104",
diff --git a/packages/contracts/src/utils/chai_setup.ts b/packages/contracts/src/utils/chai_setup.ts
index 078edd309..1a8733093 100644
--- a/packages/contracts/src/utils/chai_setup.ts
+++ b/packages/contracts/src/utils/chai_setup.ts
@@ -4,7 +4,7 @@ import ChaiBigNumber = require('chai-bignumber');
import * as dirtyChai from 'dirty-chai';
export const chaiSetup = {
- configure() {
+ configure(): void {
chai.config.includeStack = true;
chai.use(ChaiBigNumber());
chai.use(dirtyChai);
diff --git a/packages/contracts/src/utils/crypto.ts b/packages/contracts/src/utils/crypto.ts
index 222cb7cca..80c5f30a5 100644
--- a/packages/contracts/src/utils/crypto.ts
+++ b/packages/contracts/src/utils/crypto.ts
@@ -18,7 +18,7 @@ export const crypto = {
solSHA256(args: any[]): Buffer {
return crypto._solHash(args, ABI.soliditySHA256);
},
- _solHash(args: any[], hashFunction: (types: string[], values: any[]) => Buffer) {
+ _solHash(args: any[], hashFunction: (types: string[], values: any[]) => Buffer): Buffer {
const argTypes: string[] = [];
_.each(args, (arg, i) => {
const isNumber = _.isFinite(arg);
diff --git a/packages/contracts/src/utils/multi_sig_wrapper.ts b/packages/contracts/src/utils/multi_sig_wrapper.ts
index 84fed7944..41a1dd8d9 100644
--- a/packages/contracts/src/utils/multi_sig_wrapper.ts
+++ b/packages/contracts/src/utils/multi_sig_wrapper.ts
@@ -11,7 +11,7 @@ import { TransactionDataParams } from './types';
export class MultiSigWrapper {
private _multiSig: MultiSigWalletContract;
- public static encodeFnArgs(name: string, abi: AbiDefinition[], args: any[]) {
+ public static encodeFnArgs(name: string, abi: AbiDefinition[], args: any[]): string {
const abiEntity = _.find(abi, { name }) as MethodAbi;
if (_.isUndefined(abiEntity)) {
throw new Error(`Did not find abi entry for name: ${name}`);
@@ -33,7 +33,7 @@ export class MultiSigWrapper {
from: string,
dataParams: TransactionDataParams,
value: BigNumber = new BigNumber(0),
- ) {
+ ): Promise<string> {
const { name, abi, args = [] } = dataParams;
const encoded = MultiSigWrapper.encodeFnArgs(name, abi, args);
return this._multiSig.submitTransaction.sendTransactionAsync(destination, value, encoded, {
diff --git a/packages/contracts/src/utils/token_registry_wrapper.ts b/packages/contracts/src/utils/token_registry_wrapper.ts
index 91bd5503d..86daeca62 100644
--- a/packages/contracts/src/utils/token_registry_wrapper.ts
+++ b/packages/contracts/src/utils/token_registry_wrapper.ts
@@ -9,7 +9,7 @@ export class TokenRegWrapper {
constructor(tokenRegContract: TokenRegistryContract) {
this._tokenReg = tokenRegContract;
}
- public async addTokenAsync(token: Token, from: string) {
+ public async addTokenAsync(token: Token, from: string): Promise<string> {
const tx = this._tokenReg.addToken.sendTransactionAsync(
token.address as string,
token.name,
@@ -21,7 +21,7 @@ export class TokenRegWrapper {
);
return tx;
}
- public async getTokenMetaDataAsync(tokenAddress: string) {
+ public async getTokenMetaDataAsync(tokenAddress: string): Promise<Token> {
const data = await this._tokenReg.getTokenMetaData.callAsync(tokenAddress);
const token: Token = {
address: data[0],
@@ -33,7 +33,7 @@ export class TokenRegWrapper {
};
return token;
}
- public async getTokenByNameAsync(tokenName: string) {
+ public async getTokenByNameAsync(tokenName: string): Promise<Token> {
const data = await this._tokenReg.getTokenByName.callAsync(tokenName);
const token: Token = {
address: data[0],
@@ -45,7 +45,7 @@ export class TokenRegWrapper {
};
return token;
}
- public async getTokenBySymbolAsync(tokenSymbol: string) {
+ public async getTokenBySymbolAsync(tokenSymbol: string): Promise<Token> {
const data = await this._tokenReg.getTokenBySymbol.callAsync(tokenSymbol);
const token: Token = {
address: data[0],
diff --git a/packages/dev-utils/README.md b/packages/dev-utils/README.md
index 2b183f1c7..1c3bd3a3f 100644
--- a/packages/dev-utils/README.md
+++ b/packages/dev-utils/README.md
@@ -49,28 +49,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/dev-utils yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/dev-utils yarn watch
```
### Clean
diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json
index 67b448024..93edd80ca 100644
--- a/packages/dev-utils/package.json
+++ b/packages/dev-utils/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/dev-utils",
"version": "0.4.1",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "0x dev TS utils",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"test": "run-s clean build run_mocha",
"test:circleci": "yarn test:coverage",
diff --git a/packages/dev-utils/src/callback_error_reporter.ts b/packages/dev-utils/src/callback_error_reporter.ts
index c8e693673..8432bb5d4 100644
--- a/packages/dev-utils/src/callback_error_reporter.ts
+++ b/packages/dev-utils/src/callback_error_reporter.ts
@@ -6,7 +6,10 @@ import { DoneCallback } from '@0xproject/types';
const expect = chai.expect;
export const callbackErrorReporter = {
- reportNoErrorCallbackErrors(done: DoneCallback, expectToBeCalledOnce = true) {
+ reportNoErrorCallbackErrors(
+ done: DoneCallback,
+ expectToBeCalledOnce: boolean = true,
+ ): <T>(f?: ((value: T) => void) | undefined) => (value: T) => void {
const callback = <T>(f?: (value: T) => void) => {
const wrapped = (value: T) => {
if (_.isUndefined(f)) {
@@ -26,7 +29,10 @@ export const callbackErrorReporter = {
};
return callback;
},
- reportNodeCallbackErrors(done: DoneCallback, expectToBeCalledOnce = true) {
+ reportNodeCallbackErrors(
+ done: DoneCallback,
+ expectToBeCalledOnce: boolean = true,
+ ): <T>(f?: ((value: T) => void) | undefined) => (error: Error | null, value: T | undefined) => void {
const callback = <T>(f?: (value: T) => void) => {
const wrapped = (error: Error | null, value: T | undefined) => {
if (!_.isNull(error)) {
@@ -50,7 +56,10 @@ export const callbackErrorReporter = {
};
return callback;
},
- assertNodeCallbackError(done: DoneCallback, errMsg: string) {
+ assertNodeCallbackError(
+ done: DoneCallback,
+ errMsg: string,
+ ): <T>(error: Error | null, value: T | undefined) => void {
const wrapped = <T>(error: Error | null, value: T | undefined) => {
if (_.isNull(error)) {
done(new Error('Expected callback to receive an error'));
diff --git a/packages/fill-scenarios/README.md b/packages/fill-scenarios/README.md
index e4cec0695..67df0941f 100644
--- a/packages/fill-scenarios/README.md
+++ b/packages/fill-scenarios/README.md
@@ -38,28 +38,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/fill-scenarios yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/fill-scenarios yarn watch
```
### Clean
diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json
index 6a728b742..2f1a46c97 100644
--- a/packages/fill-scenarios/package.json
+++ b/packages/fill-scenarios/package.json
@@ -5,9 +5,9 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"prebuild": "run-s clean generate_contract_wrappers",
- "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'",
+ "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'",
"build": "tsc && copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/compact_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib scripts src/generated_contract_wrappers",
"lint": "tslint --project .",
@@ -23,6 +23,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/fill-scenarios/README.md",
"devDependencies": {
+ "@0xproject/abi-gen": "^0.2.13",
"@0xproject/monorepo-scripts": "^0.1.19",
"@0xproject/sol-compiler": "^0.4.3",
"@0xproject/tslint-config": "^0.4.17",
diff --git a/packages/fill-scenarios/src/index.ts b/packages/fill-scenarios/src/index.ts
index 9f1b68ef2..7e5c6cc08 100644
--- a/packages/fill-scenarios/src/index.ts
+++ b/packages/fill-scenarios/src/index.ts
@@ -33,7 +33,7 @@ export class FillScenarios {
this._zrxTokenAddress = zrxTokenAddress;
this._exchangeContractAddress = exchangeContractAddress;
}
- public async initTokenBalancesAsync() {
+ public async initTokenBalancesAsync(): Promise<void> {
for (const token of this._tokens) {
if (token.symbol !== 'ZRX' && token.symbol !== 'WETH') {
const dummyToken = new DummyTokenContract(
@@ -126,7 +126,7 @@ export class FillScenarios {
takerAddress: string,
fillableAmount: BigNumber,
partialFillAmount: BigNumber,
- ) {
+ ): Promise<SignedOrder> {
const [makerAddress] = this._userAddresses;
const signedOrder = await this.createAsymmetricFillableSignedOrderAsync(
makerTokenAddress,
diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md
index ffa8e947a..ab57833be 100644
--- a/packages/json-schemas/README.md
+++ b/packages/json-schemas/README.md
@@ -52,28 +52,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/json-schemas yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/json-schemas yarn watch
```
### Clean
diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json
index 9da9da2b7..6db04b35b 100644
--- a/packages/json-schemas/package.json
+++ b/packages/json-schemas/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/json-schemas",
"version": "0.7.23",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "0x-related json schemas",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"lint": "tslint --project .",
"test": "run-s clean build run_mocha",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
@@ -15,7 +18,7 @@
"clean": "shx rm -rf lib test_temp scripts",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
- "docs:stage": "yarn build && node ./scripts/stage_docs.js",
+ "docs:stage": "node scripts/stage_docs.js",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
},
diff --git a/packages/json-schemas/src/schema_validator.ts b/packages/json-schemas/src/schema_validator.ts
index 38ae766e6..f0392d1d1 100644
--- a/packages/json-schemas/src/schema_validator.ts
+++ b/packages/json-schemas/src/schema_validator.ts
@@ -23,7 +23,7 @@ export class SchemaValidator {
* instances of that schema.
* @param schema The schema to add
*/
- public addSchema(schema: Schema) {
+ public addSchema(schema: Schema): void {
this._validator.addSchema(schema, schema.id);
}
// In order to validate a complex JS object using jsonschema, we must replace any complex
diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json
index be1a33d65..e8ed6f100 100644
--- a/packages/metacoin/package.json
+++ b/packages/metacoin/package.json
@@ -1,10 +1,13 @@
{
"name": "@0xproject/metacoin",
"version": "0.0.6",
+ "engines": {
+ "node" : ">=6.12"
+ },
"private": true,
"description": "Example solidity project using 0x dev tools",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"lint": "tslint --project .",
"clean": "shx rm -rf lib artifacts src/contract_wrappers",
"prebuild": "run-s clean compile generate_contract_wrappers copy_artifacts",
@@ -13,12 +16,12 @@
"test": "run-s build run_mocha",
"test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
"run_mocha": "mocha lib/test/**/*_test.js lib/test/global_hooks.js --bail --exit",
- "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'artifacts/Metacoin.json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers && prettier --write 'src/contract_wrappers/**.ts'",
+ "generate_contract_wrappers": "abi-gen --abis 'artifacts/Metacoin.json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers && prettier --write 'src/contract_wrappers/**.ts'",
"coverage:report:text": "istanbul report text",
"coverage:report:html": "istanbul report html && open coverage/index.html",
"coverage:report:lcov": "istanbul report lcov",
"test:circleci": "yarn test:coverage",
- "compile": "node ../sol-compiler/lib/src/cli.js compile"
+ "compile": "sol-compiler compile"
},
"author": "",
"license": "Apache-2.0",
diff --git a/packages/metacoin/test/utils/chai_setup.ts b/packages/metacoin/test/utils/chai_setup.ts
index 078edd309..1a8733093 100644
--- a/packages/metacoin/test/utils/chai_setup.ts
+++ b/packages/metacoin/test/utils/chai_setup.ts
@@ -4,7 +4,7 @@ import ChaiBigNumber = require('chai-bignumber');
import * as dirtyChai from 'dirty-chai';
export const chaiSetup = {
- configure() {
+ configure(): void {
chai.config.includeStack = true;
chai.use(ChaiBigNumber());
chai.use(dirtyChai);
diff --git a/packages/migrations/README.md b/packages/migrations/README.md
index 15129ae85..83a49fefb 100644
--- a/packages/migrations/README.md
+++ b/packages/migrations/README.md
@@ -24,28 +24,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/migrations yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/migrations yarn watch
```
### Clean
diff --git a/packages/migrations/package.json b/packages/migrations/package.json
index 2606577ee..fa488a9e9 100644
--- a/packages/migrations/package.json
+++ b/packages/migrations/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/migrations",
"version": "0.0.5",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "0x smart contract migrations",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"prebuild": "run-s clean compile copy_artifacts generate_contract_wrappers",
"copy_artifacts": "copyfiles -u 4 'artifacts/1.0.0/**/*' ./lib/src/artifacts",
"build": "tsc",
@@ -14,9 +17,8 @@
"migrate": "run-s build compile script:migrate",
"script:migrate": "node ./lib/migrate.js",
"copy_artifacts": "copyfiles 'artifacts/1.0.0/**/*' ./lib",
- "generate_contract_wrappers":
- "node ../abi-gen/lib/index.js --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers && prettier --write 'src/contract_wrappers/**.ts'",
- "compile": "node ../sol-compiler/lib/src/cli.js compile"
+ "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers && prettier --write 'src/contract_wrappers/**.ts'",
+ "compile": "sol-compiler"
},
"config": {
"abis":
@@ -24,6 +26,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
+ "@0xproject/abi-gen": "^0.2.13",
"@0xproject/dev-utils": "^0.4.1",
"@0xproject/types": "^0.6.3",
"@0xproject/tslint-config": "^0.4.17",
diff --git a/packages/monorepo-scripts/README.md b/packages/monorepo-scripts/README.md
index cec77a10d..22b449870 100644
--- a/packages/monorepo-scripts/README.md
+++ b/packages/monorepo-scripts/README.md
@@ -4,7 +4,7 @@ This repository contains a few helpful scripts for working with this mono repo.
#### Scripts
-**`yarn deps_versions`**: Since we use Lerna + Yarn workspaces, shared dependencies between packages in the monorepo get hoisted to a top-level `node_modules` directory. If two packages use different versions of the same dependency however, both get installed. To avoid having many versions of a dependency installed, we try to keep dependency versions the same across packages in the monorepo. This script will list any dependencies for which we have multiple versions installed. We can then go through them and try to consolidate to a single version where possible.
+**`yarn deps_versions`**: Since we are a Yarn workspaces monorepo, shared dependencies between packages in the monorepo get hoisted to a top-level `node_modules` directory. If two packages use different versions of the same dependency however, both get installed. To avoid having many versions of a dependency installed, we try to keep dependency versions the same across packages in the monorepo. This script will list any dependencies for which we have multiple versions installed. We can then go through them and try to consolidate to a single version where possible.
**`yarn find_unused_deps`**: Sometimes we accidentally leave dependencies listed in `package.json` that are no longer being used. This script finds potential dependencies that might no longer be in use. Please verify that it is no longer in use before removing, the `depcheck` package we use under-the-hood doesn't handle some TS quirks perfectly.
@@ -46,28 +46,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/monorepo-scripts yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/monorepo-scripts yarn watch
```
### Clean
diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json
index 859c23149..1291e7586 100644
--- a/packages/monorepo-scripts/package.json
+++ b/packages/monorepo-scripts/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/monorepo-scripts",
"version": "0.1.19",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "Helper scripts for the monorepo",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"lint": "tslint --project .",
"clean": "shx rm -rf lib",
"build": "tsc",
@@ -26,9 +29,7 @@
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/monorepo-scripts/README.md",
- "comment": "// We purposefully use an older version of tslint-config here to avoid creating an import cycle",
"devDependencies": {
- "@0xproject/tslint-config": "0.4.13",
"@types/glob": "^5.0.33",
"@types/node": "^8.0.53",
"@types/opn": "^5.1.0",
diff --git a/packages/monorepo-scripts/src/postpublish_utils.ts b/packages/monorepo-scripts/src/postpublish_utils.ts
index df2bcb128..22614f01b 100644
--- a/packages/monorepo-scripts/src/postpublish_utils.ts
+++ b/packages/monorepo-scripts/src/postpublish_utils.ts
@@ -74,7 +74,7 @@ export const postpublishUtils = {
utils.log(`POSTPUBLISH: No S3Bucket config found for ${packageJSON.name}. Skipping doc JSON generation.`);
}
},
- async publishDocsToStagingAsync(packageJSON: any, tsConfigJSON: any, cwd: string) {
+ async publishDocsToStagingAsync(packageJSON: any, tsConfigJSON: any, cwd: string): Promise<void> {
const configs = this.generateConfig(packageJSON, tsConfigJSON, cwd);
if (_.isUndefined(configs.docPublishConfigs.s3StagingBucketPath)) {
utils.log('config.postpublish.docPublishConfigs.s3StagingBucketPath entry in package.json not found!');
@@ -109,7 +109,7 @@ export const postpublishUtils = {
assets,
});
},
- getReleaseNotes(packageName: string, version: string) {
+ getReleaseNotes(packageName: string, version: string): string {
const packageNameWithNamespace = packageName.replace('@0xproject/', '');
const changelogJSONPath = path.join(
constants.monorepoRootPath,
@@ -135,14 +135,14 @@ export const postpublishUtils = {
});
return notes;
},
- getTag(packageName: string, version: string) {
+ getTag(packageName: string, version: string): string {
return `${packageName}@${version}`;
},
getReleaseName(subPackageName: string, version: string): string {
const releaseName = `${subPackageName} v${version}`;
return releaseName;
},
- adjustAssetPaths(cwd: string, assets: string[]) {
+ adjustAssetPaths(cwd: string, assets: string[]): string[] {
const finalAssets: string[] = [];
_.each(assets, (asset: string) => {
finalAssets.push(`${cwd}/${asset}`);
@@ -164,7 +164,12 @@ export const postpublishUtils = {
});
return fileIncludesAdjusted;
},
- async generateAndUploadDocsAsync(cwd: string, fileIncludes: string[], version: string, S3BucketPath: string) {
+ async generateAndUploadDocsAsync(
+ cwd: string,
+ fileIncludes: string[],
+ version: string,
+ S3BucketPath: string,
+ ): Promise<void> {
const fileIncludesAdjusted = this.adjustFileIncludePaths(fileIncludes, cwd);
const projectFiles = fileIncludesAdjusted.join(' ');
const jsonFilePath = `${cwd}/${generatedDocsDirectoryName}/index.json`;
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index a5be40014..5c26475c9 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -72,10 +72,10 @@ const packageNameToWebsitePath: { [name: string]: string } = {
process.exit(1);
});
-async function confirmDocPagesRenderAsync(packages: LernaPackage[]) {
+async function confirmDocPagesRenderAsync(packages: LernaPackage[]): Promise<void> {
// push docs to staging
utils.log("Upload all docJson's to S3 staging...");
- await execAsync(`yarn lerna:stage_docs`, { cwd: constants.monorepoRootPath });
+ await execAsync(`yarn stage_docs`, { cwd: constants.monorepoRootPath });
// deploy website to staging
utils.log('Deploy website to staging...');
@@ -162,7 +162,7 @@ async function checkPublishRequiredSetupAsync(): Promise<boolean> {
return true;
}
-async function pushChangelogsToGithubAsync() {
+async function pushChangelogsToGithubAsync(): Promise<void> {
await execAsync(`git add . --all`, { cwd: constants.monorepoRootPath });
await execAsync(`git commit -m "Updated CHANGELOGS"`, { cwd: constants.monorepoRootPath });
await execAsync(`git push`, { cwd: constants.monorepoRootPath });
@@ -228,7 +228,7 @@ async function updateChangeLogsAsync(updatedPublicLernaPackages: LernaPackage[])
return packageToVersionChange;
}
-async function lernaPublishAsync(packageToVersionChange: { [name: string]: string }) {
+async function lernaPublishAsync(packageToVersionChange: { [name: string]: string }): Promise<void> {
// HACK: Lerna publish does not provide a way to specify multiple package versions via
// flags so instead we need to interact with their interactive prompt interface.
const child = spawn('lerna', ['publish', '--registry=https://registry.npmjs.org/'], {
@@ -269,7 +269,7 @@ async function lernaPublishAsync(packageToVersionChange: { [name: string]: strin
});
}
-function updateVersionNumberIfNeeded(currentVersion: string, proposedNextVersion: string) {
+function updateVersionNumberIfNeeded(currentVersion: string, proposedNextVersion: string): string {
if (proposedNextVersion === currentVersion) {
return utils.getNextPatchVersion(currentVersion);
}
diff --git a/packages/monorepo-scripts/src/utils.ts b/packages/monorepo-scripts/src/utils.ts
index 4412f753a..c2d92c86a 100644
--- a/packages/monorepo-scripts/src/utils.ts
+++ b/packages/monorepo-scripts/src/utils.ts
@@ -17,7 +17,7 @@ export const utils = {
const newPatchVersion = `${versionSegments[0]}.${versionSegments[1]}.${newPatch}`;
return newPatchVersion;
},
- async prettifyAsync(filePath: string, cwd: string) {
+ async prettifyAsync(filePath: string, cwd: string): Promise<void> {
await execAsync(`prettier --write ${filePath} --config .prettierrc`, {
cwd,
});
@@ -43,7 +43,7 @@ export const utils = {
}
return updatedPackages;
},
- getChangelogJSONIfExists(changelogPath: string) {
+ getChangelogJSONIfExists(changelogPath: string): string | undefined {
try {
const changelogJSON = fs.readFileSync(changelogPath, 'utf-8');
return changelogJSON;
diff --git a/packages/monorepo-scripts/tslint.json b/packages/monorepo-scripts/tslint.json
index ffaefe83a..d67c2e490 100644
--- a/packages/monorepo-scripts/tslint.json
+++ b/packages/monorepo-scripts/tslint.json
@@ -1,3 +1,3 @@
{
- "extends": ["@0xproject/tslint-config"]
+ "extends": ["../tslint-config"]
}
diff --git a/packages/order-utils/README.md b/packages/order-utils/README.md
index 4b571509a..33df1d4b0 100644
--- a/packages/order-utils/README.md
+++ b/packages/order-utils/README.md
@@ -40,28 +40,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/order-utils yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/order-utils yarn watch
```
### Clean
diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json
index cdb5b63b0..35a486a6b 100644
--- a/packages/order-utils/package.json
+++ b/packages/order-utils/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/order-utils",
"version": "0.0.4",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "0x order utils",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"test": "run-s clean build run_mocha",
"test:circleci": "yarn test:coverage",
@@ -15,7 +18,7 @@
"clean": "shx rm -rf lib scripts",
"lint": "tslint --project .",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
- "docs:stage": "yarn build && node ./scripts/stage_docs.js",
+ "docs:stage": "node scripts/stage_docs.js",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
},
diff --git a/packages/order-utils/src/order_hash.ts b/packages/order-utils/src/order_hash.ts
index 8da11c596..1cde72a73 100644
--- a/packages/order-utils/src/order_hash.ts
+++ b/packages/order-utils/src/order_hash.ts
@@ -16,7 +16,7 @@ const INVALID_TAKER_FORMAT = 'instance.taker is not of a type(s) string';
* expects values of Solidity type `uint` to be passed as type `BN`.
* We do not use BN anywhere else in the codebase.
*/
-function bigNumberToBN(value: BigNumber) {
+function bigNumberToBN(value: BigNumber): BN {
return new BN(value.toString(), 10);
}
diff --git a/packages/order-utils/test/signature_utils_test.ts b/packages/order-utils/test/signature_utils_test.ts
index ede681619..553ec2e53 100644
--- a/packages/order-utils/test/signature_utils_test.ts
+++ b/packages/order-utils/test/signature_utils_test.ts
@@ -106,7 +106,7 @@ describe('Signature utils', () => {
};
const fakeProvider = {
- async sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback) {
+ async sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback): Promise<void> {
if (payload.method === 'eth_sign') {
const [address, message] = payload.params;
const signature = await web3Wrapper.signMessageAsync(address, message);
@@ -137,7 +137,7 @@ describe('Signature utils', () => {
s: '0x7feabdfe76e05924b484789f79af4ee7fa29ec006cedce1bbf369320d034e10b',
};
const fakeProvider = {
- async sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback) {
+ async sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback): Promise<void> {
if (payload.method === 'eth_sign') {
const [address, message] = payload.params;
const signature = await web3Wrapper.signMessageAsync(address, message);
diff --git a/packages/order-utils/test/utils/chai_setup.ts b/packages/order-utils/test/utils/chai_setup.ts
index 078edd309..1a8733093 100644
--- a/packages/order-utils/test/utils/chai_setup.ts
+++ b/packages/order-utils/test/utils/chai_setup.ts
@@ -4,7 +4,7 @@ import ChaiBigNumber = require('chai-bignumber');
import * as dirtyChai from 'dirty-chai';
export const chaiSetup = {
- configure() {
+ configure(): void {
chai.config.includeStack = true;
chai.use(ChaiBigNumber());
chai.use(dirtyChai);
diff --git a/packages/order-watcher/README.md b/packages/order-watcher/README.md
index d461dca8d..de64a70e7 100644
--- a/packages/order-watcher/README.md
+++ b/packages/order-watcher/README.md
@@ -48,28 +48,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/order-watcher yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/order-watcher yarn watch
```
### Clean
diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json
index 39162fd1e..50aaffd7f 100644
--- a/packages/order-watcher/package.json
+++ b/packages/order-watcher/package.json
@@ -12,9 +12,9 @@
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"prebuild": "run-s clean generate_contract_wrappers",
- "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'",
+ "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers && prettier --write 'src/generated_contract_wrappers/**.ts'",
"lint": "tslint --project .",
"test:circleci": "run-s test:coverage",
"test": "run-s clean build run_mocha",
@@ -45,6 +45,7 @@
"node": ">=6.0.0"
},
"devDependencies": {
+ "@0xproject/abi-gen": "^0.2.13",
"@0xproject/sol-compiler": "^0.4.3",
"@0xproject/dev-utils": "^0.4.1",
"@0xproject/migrations": "^0.0.5",
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts
index 63f87b565..3c93d6293 100644
--- a/packages/order-watcher/src/order_watcher/order_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/order_watcher.ts
@@ -377,7 +377,7 @@ export class OrderWatcher {
}
this._dependentOrderHashes[signedOrder.maker][zrxTokenAddress].add(orderHash);
}
- private _removeFromDependentOrderHashes(makerAddress: string, tokenAddress: string, orderHash: string) {
+ private _removeFromDependentOrderHashes(makerAddress: string, tokenAddress: string, orderHash: string): void {
this._dependentOrderHashes[makerAddress][tokenAddress].delete(orderHash);
if (this._dependentOrderHashes[makerAddress][tokenAddress].size === 0) {
delete this._dependentOrderHashes[makerAddress][tokenAddress];
diff --git a/packages/order-watcher/src/utils/assert.ts b/packages/order-watcher/src/utils/assert.ts
index f96bcebc1..9e02f8bdc 100644
--- a/packages/order-watcher/src/utils/assert.ts
+++ b/packages/order-watcher/src/utils/assert.ts
@@ -12,7 +12,7 @@ import { isValidSignature } from '@0xproject/order-utils';
export const assert = {
...sharedAssert,
- isValidSignature(orderHash: string, ecSignature: ECSignature, signerAddress: string) {
+ isValidSignature(orderHash: string, ecSignature: ECSignature, signerAddress: string): void {
const isValid = isValidSignature(orderHash, ecSignature, signerAddress);
this.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`);
},
diff --git a/packages/order-watcher/test/global_hooks.ts b/packages/order-watcher/test/global_hooks.ts
index 88f202761..53b3ef545 100644
--- a/packages/order-watcher/test/global_hooks.ts
+++ b/packages/order-watcher/test/global_hooks.ts
@@ -5,7 +5,7 @@ import * as path from 'path';
import { constants } from './utils/constants';
import { provider } from './utils/web3_wrapper';
-before('migrate contracts', async function() {
+before('migrate contracts', async function(): Promise<void> {
// HACK: Since the migrations take longer then our global mocha timeout limit
// we manually increase it for this before hook.
this.timeout(20000);
diff --git a/packages/order-watcher/test/utils/chai_setup.ts b/packages/order-watcher/test/utils/chai_setup.ts
index 078edd309..1a8733093 100644
--- a/packages/order-watcher/test/utils/chai_setup.ts
+++ b/packages/order-watcher/test/utils/chai_setup.ts
@@ -4,7 +4,7 @@ import ChaiBigNumber = require('chai-bignumber');
import * as dirtyChai from 'dirty-chai';
export const chaiSetup = {
- configure() {
+ configure(): void {
chai.config.includeStack = true;
chai.use(ChaiBigNumber());
chai.use(dirtyChai);
diff --git a/packages/react-docs-example/README.md b/packages/react-docs-example/README.md
index ff821dba8..c7dfcd3aa 100644
--- a/packages/react-docs-example/README.md
+++ b/packages/react-docs-example/README.md
@@ -25,7 +25,7 @@ yarn install
The **first** time you work with this package, you must build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=0x.js yarn build
```
Note: If you move this package out of the monorepo, it will work without this step. Make sure you copy it out on the `master` branch since the `development` version might rely on not-yet published changes to other packages.
@@ -35,7 +35,7 @@ Note: If you move this package out of the monorepo, it will work without this st
The the `react-docs-example` root directory, run:
```bash
-yarn dev
+PKG=0x.js yarn watch
```
### Deploy Example to S3 bucket
@@ -50,8 +50,16 @@ yarn deploy_example
### Build
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
+
+```bash
+PKG=@0xproject/react-docs-example yarn build
+```
+
+Or continuously rebuild on change:
+
```bash
-yarn build
+PKG=@0xproject/react-docs-example yarn watch
```
### Clean
diff --git a/packages/react-docs-example/package.json b/packages/react-docs-example/package.json
index b6b6c6c7d..4c26dd3bd 100644
--- a/packages/react-docs-example/package.json
+++ b/packages/react-docs-example/package.json
@@ -2,12 +2,15 @@
"private": true,
"name": "@0xproject/react-docs-example",
"version": "0.0.11",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "An example app using react-docs",
"scripts": {
"lint": "tslint --project .",
"build": "tsc",
"build:example": "NODE_ENV=production webpack",
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"clean": "shx rm -rf lib; shx rm -f public/bundle*",
"dev": "webpack-dev-server --open",
"deploy_example": "npm run build:example; aws s3 sync ./public/. s3://react-docs-example --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers"
diff --git a/packages/react-docs-example/ts/docs.tsx b/packages/react-docs-example/ts/docs.tsx
index eef331813..b35e9a629 100644
--- a/packages/react-docs-example/ts/docs.tsx
+++ b/packages/react-docs-example/ts/docs.tsx
@@ -94,7 +94,7 @@ export class Docs extends React.Component<DocsProps, DocsState> {
docAgnosticFormat: docsInfo.convertToDocAgnosticFormat(v2TypeDocJson),
};
}
- public render() {
+ public render(): React.ReactNode {
const menuSubsectionsBySection = _.isUndefined(this.state.docAgnosticFormat)
? {}
: docsInfo.getMenuSubsectionsBySection(this.state.docAgnosticFormat);
@@ -109,14 +109,14 @@ export class Docs extends React.Component<DocsProps, DocsState> {
/>
);
}
- private _onVersionSelected(semver: string) {
+ private _onVersionSelected(semver: string): void {
const selectedDocJSON = versionToDocJSON[semver];
this.setState({
selectedVersion: semver,
docAgnosticFormat: docsInfo.convertToDocAgnosticFormat(selectedDocJSON as TypeDocNode),
});
}
- private _getSourceUrl() {
+ private _getSourceUrl(): string {
const sourceUrl = `${docsInfoConfig.packageUrl}/blob/@0xproject/web3-wrapper@${
this.state.selectedVersion
}/packages`;
diff --git a/packages/react-docs/README.md b/packages/react-docs/README.md
index 5a46b84f0..c0efc4a0b 100644
--- a/packages/react-docs/README.md
+++ b/packages/react-docs/README.md
@@ -71,28 +71,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/react-docs yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/react-docs yarn watch
```
### Clean
diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json
index ca9ae610e..cf3575fea 100644
--- a/packages/react-docs/package.json
+++ b/packages/react-docs/package.json
@@ -1,13 +1,16 @@
{
"name": "@0xproject/react-docs",
"version": "0.0.11",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "React documentation component for rendering TypeDoc & Doxity generated JSON",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"lint": "tslint --project .",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"clean": "shx rm -rf lib scripts",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
},
diff --git a/packages/react-docs/src/components/badge.tsx b/packages/react-docs/src/components/badge.tsx
index b342f2dca..0137b153b 100644
--- a/packages/react-docs/src/components/badge.tsx
+++ b/packages/react-docs/src/components/badge.tsx
@@ -31,7 +31,7 @@ export class Badge extends React.Component<BadgeProps, BadgeState> {
isHovering: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const badgeStyle = {
...styles.badge,
backgroundColor: this.props.backgroundColor,
@@ -48,7 +48,7 @@ export class Badge extends React.Component<BadgeProps, BadgeState> {
</div>
);
}
- private _setHoverState(isHovering: boolean) {
+ private _setHoverState(isHovering: boolean): void {
this.setState({
isHovering,
});
diff --git a/packages/react-docs/src/components/custom_enum.tsx b/packages/react-docs/src/components/custom_enum.tsx
index 1fe55eedc..797372f35 100644
--- a/packages/react-docs/src/components/custom_enum.tsx
+++ b/packages/react-docs/src/components/custom_enum.tsx
@@ -14,7 +14,7 @@ export interface CustomEnumProps {
// This component renders custom string enums that was a work-around for versions of
// TypeScript <2.4.0 that did not support them natively. We keep it around to support
// older versions of 0x.js <0.9.0
-export function CustomEnum(props: CustomEnumProps) {
+export const CustomEnum = (props: CustomEnumProps) => {
const type = props.type;
if (!_.startsWith(type.defaultValue, STRING_ENUM_CODE_PREFIX)) {
logUtils.log('We do not yet support `Variable` types that are not strEnums');
@@ -31,4 +31,4 @@ export function CustomEnum(props: CustomEnumProps) {
{`}`}
</span>
);
-}
+};
diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx
index 0a525f702..25687db67 100644
--- a/packages/react-docs/src/components/documentation.tsx
+++ b/packages/react-docs/src/components/documentation.tsx
@@ -71,19 +71,19 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
isHoveringSidebar: false,
};
}
- public componentDidMount() {
+ public componentDidMount(): void {
window.addEventListener('hashchange', this._onHashChanged.bind(this), false);
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
window.removeEventListener('hashchange', this._onHashChanged.bind(this), false);
}
- public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState) {
+ public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState): void {
if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) {
const hash = window.location.hash.slice(1);
sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
}
}
- public render() {
+ public render(): React.ReactNode {
const styles: Styles = {
mainContainers: {
position: 'absolute',
@@ -157,7 +157,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
</div>
);
}
- private _renderLoading(mainContainersStyles: React.CSSProperties) {
+ private _renderLoading(mainContainersStyles: React.CSSProperties): React.ReactNode {
return (
<div className="col col-12" style={mainContainersStyles}>
<div
@@ -289,7 +289,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
</div>
);
}
- private _renderNetworkBadgesIfExists(sectionName: string) {
+ private _renderNetworkBadgesIfExists(sectionName: string): React.ReactNode {
if (this.props.docsInfo.type !== SupportedDocJson.Doxity) {
return null;
}
@@ -368,17 +368,17 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
/>
);
}
- private _onSidebarHover(event: React.FormEvent<HTMLInputElement>) {
+ private _onSidebarHover(event: React.FormEvent<HTMLInputElement>): void {
this.setState({
isHoveringSidebar: true,
});
}
- private _onSidebarHoverOff() {
+ private _onSidebarHoverOff(): void {
this.setState({
isHoveringSidebar: false,
});
}
- private _onHashChanged(event: any) {
+ private _onHashChanged(event: any): void {
const hash = window.location.hash.slice(1);
sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
}
diff --git a/packages/react-docs/src/components/enum.tsx b/packages/react-docs/src/components/enum.tsx
index 37f82f26e..536385d90 100644
--- a/packages/react-docs/src/components/enum.tsx
+++ b/packages/react-docs/src/components/enum.tsx
@@ -7,7 +7,7 @@ export interface EnumProps {
values: EnumValue[];
}
-export function Enum(props: EnumProps) {
+export const Enum = (props: EnumProps) => {
const values = _.map(props.values, (value, i) => {
const defaultValueIfAny = !_.isUndefined(value.defaultValue) ? ` = ${value.defaultValue}` : '';
return `\n\t${value.name}${defaultValueIfAny},`;
@@ -20,4 +20,4 @@ export function Enum(props: EnumProps) {
{`}`}
</span>
);
-}
+};
diff --git a/packages/react-docs/src/components/event_definition.tsx b/packages/react-docs/src/components/event_definition.tsx
index 67729ac87..b4dc729a9 100644
--- a/packages/react-docs/src/components/event_definition.tsx
+++ b/packages/react-docs/src/components/event_definition.tsx
@@ -24,7 +24,7 @@ export class EventDefinition extends React.Component<EventDefinitionProps, Event
shouldShowAnchor: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const event = this.props.event;
const id = `${this.props.sectionName}-${event.name}`;
return (
@@ -49,7 +49,7 @@ export class EventDefinition extends React.Component<EventDefinitionProps, Event
</div>
);
}
- private _renderEventCode() {
+ private _renderEventCode(): React.ReactNode {
const indexed = <span style={{ color: colors.green }}> indexed</span>;
const eventArgs = _.map(this.props.event.eventArgs, (eventArg: EventArg) => {
const type = (
@@ -76,7 +76,7 @@ export class EventDefinition extends React.Component<EventDefinitionProps, Event
</span>
);
}
- private _setAnchorVisibility(shouldShowAnchor: boolean) {
+ private _setAnchorVisibility(shouldShowAnchor: boolean): void {
this.setState({
shouldShowAnchor,
});
diff --git a/packages/react-docs/src/components/interface.tsx b/packages/react-docs/src/components/interface.tsx
index bdfdf47c4..a881c7fec 100644
--- a/packages/react-docs/src/components/interface.tsx
+++ b/packages/react-docs/src/components/interface.tsx
@@ -13,7 +13,7 @@ export interface InterfaceProps {
docsInfo: DocsInfo;
}
-export function Interface(props: InterfaceProps) {
+export const Interface = (props: InterfaceProps) => {
const type = props.type;
const properties = _.map(type.children, property => {
return (
@@ -63,4 +63,4 @@ export function Interface(props: InterfaceProps) {
{`}`}
</span>
);
-}
+};
diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index 1d3c90261..c4a6394fa 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -88,7 +88,7 @@ function renderParameters(
docsInfo: DocsInfo,
sectionName: string,
typeDefinitionByName?: TypeDefinitionByName,
-) {
+): React.ReactNode[] {
const params = _.map(parameters, (p: Parameter) => {
const isOptional = p.isOptional;
const hasDefaultValue = !_.isUndefined(p.defaultValue);
@@ -116,7 +116,7 @@ function renderTypeParameter(
docsInfo: DocsInfo,
sectionName: string,
typeDefinitionByName?: TypeDefinitionByName,
-) {
+): React.ReactNode {
const typeParam = (
<span>
{`<${typeParameter.name} extends `}
diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx
index 6475d3995..9e5198e16 100644
--- a/packages/react-docs/src/components/signature_block.tsx
+++ b/packages/react-docs/src/components/signature_block.tsx
@@ -42,7 +42,7 @@ export class SignatureBlock extends React.Component<SignatureBlockProps, Signatu
shouldShowAnchor: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const method = this.props.method;
if (typeDocUtils.isPrivateOrProtectedProperty(method.name)) {
return null;
@@ -111,14 +111,14 @@ export class SignatureBlock extends React.Component<SignatureBlockProps, Signatu
</div>
);
}
- private _renderChip(text: string) {
+ private _renderChip(text: string): React.ReactNode {
return (
<div className="p1 mr1" style={styles.chip}>
{text}
</div>
);
}
- private _renderParameterDescriptions(parameters: Parameter[]) {
+ private _renderParameterDescriptions(parameters: Parameter[]): React.ReactNode {
const descriptions = _.map(parameters, parameter => {
const isOptional = parameter.isOptional;
return (
@@ -146,7 +146,7 @@ export class SignatureBlock extends React.Component<SignatureBlockProps, Signatu
});
return descriptions;
}
- private _setAnchorVisibility(shouldShowAnchor: boolean) {
+ private _setAnchorVisibility(shouldShowAnchor: boolean): void {
this.setState({
shouldShowAnchor,
});
diff --git a/packages/react-docs/src/components/source_link.tsx b/packages/react-docs/src/components/source_link.tsx
index 89956a507..58a9ba6a7 100644
--- a/packages/react-docs/src/components/source_link.tsx
+++ b/packages/react-docs/src/components/source_link.tsx
@@ -10,7 +10,7 @@ export interface SourceLinkProps {
version: string;
}
-export function SourceLink(props: SourceLinkProps) {
+export const SourceLink = (props: SourceLinkProps) => {
const src = props.source;
const sourceCodeUrl = `${props.sourceUrl}/${src.fileName}#L${src.line}`;
return (
@@ -20,4 +20,4 @@ export function SourceLink(props: SourceLinkProps) {
</a>
</div>
);
-}
+};
diff --git a/packages/react-docs/src/components/type_definition.tsx b/packages/react-docs/src/components/type_definition.tsx
index 605b58fbd..a8e601ac2 100644
--- a/packages/react-docs/src/components/type_definition.tsx
+++ b/packages/react-docs/src/components/type_definition.tsx
@@ -3,7 +3,7 @@ import * as _ from 'lodash';
import * as React from 'react';
import { DocsInfo } from '../docs_info';
-import { CustomType, CustomTypeChild, KindString, TypeDocTypes } from '../types';
+import { CustomType, CustomTypeChild, EnumValue, KindString, TypeDocTypes } from '../types';
import { constants } from '../utils/constants';
import { utils } from '../utils/utils';
@@ -35,7 +35,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef
shouldShowAnchor: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const customType = this.props.customType;
if (!this.props.docsInfo.isPublicType(customType.name)) {
return null; // no-op
@@ -129,7 +129,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef
</div>
);
}
- private _setAnchorVisibility(shouldShowAnchor: boolean) {
+ private _setAnchorVisibility(shouldShowAnchor: boolean): void {
this.setState({
shouldShowAnchor,
});
@@ -150,7 +150,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef
*
* Each property description should be on a new line.
*/
- private _formatComment(text: string) {
+ private _formatComment(text: string): string {
const NEW_LINE_REGEX = /(\r\n|\n|\r)/gm;
const sanitizedText = text.replace(NEW_LINE_REGEX, ' ');
const PROPERTY_DESCRIPTION_DIVIDER = ':';
diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts
index 0030568a1..e9c84b7c9 100644
--- a/packages/react-docs/src/docs_info.ts
+++ b/packages/react-docs/src/docs_info.ts
@@ -11,6 +11,7 @@ import {
DoxityDocObj,
SectionsMap,
SupportedDocJson,
+ TypeDefinitionByName,
TypeDocNode,
} from './types';
import { doxityUtils } from './utils/doxity_utils';
@@ -104,13 +105,13 @@ export class DocsInfo {
});
return menuSubsectionsBySection;
}
- public getTypeDefinitionsByName(docAgnosticFormat: DocAgnosticFormat) {
+ public getTypeDefinitionsByName(docAgnosticFormat: DocAgnosticFormat): { [name: string]: TypeDefinitionByName } {
if (_.isUndefined(this.sections.types)) {
return {};
}
const typeDocSection = docAgnosticFormat[this.sections.types];
- const typeDefinitionByName = _.keyBy(typeDocSection.types, 'name');
+ const typeDefinitionByName = _.keyBy(typeDocSection.types, 'name') as any;
return typeDefinitionByName;
}
public isVisibleConstructor(sectionName: string): boolean {
diff --git a/packages/react-docs/src/utils/doxity_utils.ts b/packages/react-docs/src/utils/doxity_utils.ts
index 1b91690e0..374ee07dd 100644
--- a/packages/react-docs/src/utils/doxity_utils.ts
+++ b/packages/react-docs/src/utils/doxity_utils.ts
@@ -142,7 +142,7 @@ export const doxityUtils = {
};
return type;
},
- _isMethod(abiDoc: DoxityAbiDoc) {
+ _isMethod(abiDoc: DoxityAbiDoc): boolean {
if (abiDoc.type !== AbiTypes.Function) {
return false;
}
@@ -152,7 +152,7 @@ export const doxityUtils = {
const isMethod = hasNamedOutputIfExists && !isNameAllCaps;
return isMethod;
},
- _isProperty(abiDoc: DoxityAbiDoc) {
+ _isProperty(abiDoc: DoxityAbiDoc): boolean {
if (abiDoc.type !== AbiTypes.Function) {
return false;
}
diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts
index 0c7803a04..5a672f10f 100644
--- a/packages/react-docs/src/utils/typedoc_utils.ts
+++ b/packages/react-docs/src/utils/typedoc_utils.ts
@@ -113,7 +113,7 @@ export const typeDocUtils = {
});
return docAgnosticFormat;
},
- _convertEntitiesToDocSection(entities: TypeDocNode[], docsInfo: DocsInfo, sectionName: string) {
+ _convertEntitiesToDocSection(entities: TypeDocNode[], docsInfo: DocsInfo, sectionName: string): DocSection {
const docSection: DocSection = {
comment: '',
constructors: [],
diff --git a/packages/react-docs/src/utils/utils.ts b/packages/react-docs/src/utils/utils.ts
index f8c1fefff..e3dd1fc62 100644
--- a/packages/react-docs/src/utils/utils.ts
+++ b/packages/react-docs/src/utils/utils.ts
@@ -1,5 +1,5 @@
export const utils = {
- spawnSwitchErr(name: string, value: any) {
+ spawnSwitchErr(name: string, value: any): Error {
return new Error(`Unexpected switch value: ${value} encountered for ${name}`);
},
};
diff --git a/packages/react-shared/README.md b/packages/react-shared/README.md
index 0b4188180..88e6f18ae 100644
--- a/packages/react-shared/README.md
+++ b/packages/react-shared/README.md
@@ -38,28 +38,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/react-shared yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/react-shared yarn watch
```
### Clean
diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json
index b9a46376c..32ef636a6 100644
--- a/packages/react-shared/package.json
+++ b/packages/react-shared/package.json
@@ -1,13 +1,16 @@
{
"name": "@0xproject/react-shared",
"version": "0.1.6",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "0x shared react components",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"lint": "tslint --project .",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"clean": "shx rm -rf lib scripts",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
},
diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx
index 6e648739d..473b994bf 100644
--- a/packages/react-shared/src/components/anchor_title.tsx
+++ b/packages/react-shared/src/components/anchor_title.tsx
@@ -46,7 +46,7 @@ export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleSt
isHovering: false,
};
}
- public render() {
+ public render(): React.ReactNode {
let opacity = 0;
if (this.props.shouldShowAnchor) {
opacity = this.state.isHovering ? 0.6 : 1;
@@ -84,7 +84,7 @@ export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleSt
</div>
);
}
- private _setHoverState(isHovering: boolean) {
+ private _setHoverState(isHovering: boolean): void {
this.setState({
isHovering,
});
diff --git a/packages/react-shared/src/components/markdown_code_block.tsx b/packages/react-shared/src/components/markdown_code_block.tsx
index 2070bb8e1..49b2ff526 100644
--- a/packages/react-shared/src/components/markdown_code_block.tsx
+++ b/packages/react-shared/src/components/markdown_code_block.tsx
@@ -12,10 +12,10 @@ export interface MarkdownCodeBlockState {}
export class MarkdownCodeBlock extends React.Component<MarkdownCodeBlockProps, MarkdownCodeBlockState> {
// Re-rendering a codeblock causes any use selection to become de-selected. This is annoying when trying
// to copy-paste code examples. We therefore noop re-renders on this component if it's props haven't changed.
- public shouldComponentUpdate(nextProps: MarkdownCodeBlockProps, nextState: MarkdownCodeBlockState) {
+ public shouldComponentUpdate(nextProps: MarkdownCodeBlockProps, nextState: MarkdownCodeBlockState): boolean {
return nextProps.value !== this.props.value || nextProps.language !== this.props.language;
}
- public render() {
+ public render(): React.ReactNode {
return (
<span style={{ fontSize: 14 }}>
<HighLight className={this.props.language || 'javascript'}>{this.props.value}</HighLight>
diff --git a/packages/react-shared/src/components/markdown_link_block.tsx b/packages/react-shared/src/components/markdown_link_block.tsx
index 8f5862249..0b489b749 100644
--- a/packages/react-shared/src/components/markdown_link_block.tsx
+++ b/packages/react-shared/src/components/markdown_link_block.tsx
@@ -13,10 +13,10 @@ export interface MarkdownLinkBlockState {}
export class MarkdownLinkBlock extends React.Component<MarkdownLinkBlockProps, MarkdownLinkBlockState> {
// Re-rendering a linkBlock causes it to remain unclickable.
// We therefore noop re-renders on this component if it's props haven't changed.
- public shouldComponentUpdate(nextProps: MarkdownLinkBlockProps, nextState: MarkdownLinkBlockState) {
+ public shouldComponentUpdate(nextProps: MarkdownLinkBlockProps, nextState: MarkdownLinkBlockState): boolean {
return nextProps.href !== this.props.href;
}
- public render() {
+ public render(): React.ReactNode {
const href = this.props.href;
const isLinkToSection = _.startsWith(href, '#');
// If protocol is http or https, we can open in a new tab, otherwise don't for security reasons
@@ -39,7 +39,7 @@ export class MarkdownLinkBlock extends React.Component<MarkdownLinkBlockProps, M
return <a href={href}>{this.props.children}</a>;
}
}
- private _onHashUrlClick(href: string) {
+ private _onHashUrlClick(href: string): void {
const hash = href.split('#')[1];
utils.scrollToHash(hash, constants.SCROLL_CONTAINER_ID);
utils.setUrlHash(hash);
diff --git a/packages/react-shared/src/components/markdown_section.tsx b/packages/react-shared/src/components/markdown_section.tsx
index 449e8a045..b0761cd21 100644
--- a/packages/react-shared/src/components/markdown_section.tsx
+++ b/packages/react-shared/src/components/markdown_section.tsx
@@ -39,7 +39,7 @@ export class MarkdownSection extends React.Component<MarkdownSectionProps, Markd
shouldShowAnchor: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const { sectionName, markdownContent, headerSize, githubLink } = this.props as PropsWithDefaults;
const id = utils.getIdFromName(sectionName);
@@ -87,7 +87,7 @@ export class MarkdownSection extends React.Component<MarkdownSectionProps, Markd
</div>
);
}
- private _setAnchorVisibility(shouldShowAnchor: boolean) {
+ private _setAnchorVisibility(shouldShowAnchor: boolean): void {
this.setState({
shouldShowAnchor,
});
diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx
index f49d6fcf7..804398d71 100644
--- a/packages/react-shared/src/components/nested_sidebar_menu.tsx
+++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx
@@ -43,7 +43,7 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N
shouldDisplaySectionHeaders: true,
onMenuItemClick: _.noop,
};
- public render() {
+ public render(): React.ReactNode {
const navigation = _.map(this.props.topLevelMenu, (menuItems: string[], sectionName: string) => {
const finalSectionName = utils.convertDashesToSpaces(sectionName);
if (this.props.shouldDisplaySectionHeaders) {
diff --git a/packages/react-shared/src/components/section_header.tsx b/packages/react-shared/src/components/section_header.tsx
index 0224c2127..9bbec7747 100644
--- a/packages/react-shared/src/components/section_header.tsx
+++ b/packages/react-shared/src/components/section_header.tsx
@@ -32,7 +32,7 @@ export class SectionHeader extends React.Component<SectionHeaderProps, SectionHe
shouldShowAnchor: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const { sectionName, headerSize } = this.props as PropsWithDefaults;
const finalSectionName = utils.convertDashesToSpaces(this.props.sectionName);
@@ -65,7 +65,7 @@ export class SectionHeader extends React.Component<SectionHeaderProps, SectionHe
</div>
);
}
- private _setAnchorVisibility(shouldShowAnchor: boolean) {
+ private _setAnchorVisibility(shouldShowAnchor: boolean): void {
this.setState({
shouldShowAnchor,
});
diff --git a/packages/react-shared/src/components/version_drop_down.tsx b/packages/react-shared/src/components/version_drop_down.tsx
index d9e49b205..926dd6a7a 100644
--- a/packages/react-shared/src/components/version_drop_down.tsx
+++ b/packages/react-shared/src/components/version_drop_down.tsx
@@ -14,7 +14,7 @@ export interface VersionDropDownProps {
export interface VersionDropDownState {}
export class VersionDropDown extends React.Component<VersionDropDownProps, VersionDropDownState> {
- public render() {
+ public render(): React.ReactNode {
return (
<div className="mx-auto" style={{ width: 120 }}>
<DropDownMenu
@@ -27,13 +27,13 @@ export class VersionDropDown extends React.Component<VersionDropDownProps, Versi
</div>
);
}
- private _renderDropDownItems() {
+ private _renderDropDownItems(): React.ReactNode[] {
const items = _.map(this.props.versions, version => {
return <MenuItem key={version} value={version} primaryText={`v${version}`} />;
});
return items;
}
- private _updateSelectedVersion(e: any, index: number, semver: string) {
+ private _updateSelectedVersion(e: any, index: number, semver: string): void {
this.props.onVersionSelected(semver);
}
}
diff --git a/packages/react-shared/src/utils/utils.ts b/packages/react-shared/src/utils/utils.ts
index 1538dd087..93c7e9f7b 100644
--- a/packages/react-shared/src/utils/utils.ts
+++ b/packages/react-shared/src/utils/utils.ts
@@ -7,7 +7,7 @@ import { EtherscanLinkSuffixes, Networks } from '../types';
import { constants } from './constants';
export const utils = {
- setUrlHash(anchorId: string) {
+ setUrlHash(anchorId: string): void {
window.location.hash = anchorId;
},
scrollToHash(hash: string, containerId: string): void {
@@ -26,11 +26,11 @@ export const utils = {
const isUserOnMobile = isMobile();
return isUserOnMobile;
},
- getIdFromName(name: string) {
+ getIdFromName(name: string): string {
const id = name.replace(/ /g, '-');
return id;
},
- convertDashesToSpaces(text: string) {
+ convertDashesToSpaces(text: string): string {
return text.replace(/-/g, ' ');
},
getEtherScanLinkIfExists(
diff --git a/packages/sol-compiler/CHANGELOG.json b/packages/sol-compiler/CHANGELOG.json
index 3f18ae121..a1b53fb9e 100644
--- a/packages/sol-compiler/CHANGELOG.json
+++ b/packages/sol-compiler/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "0.5.0",
+ "changes": [
+ {
+ "note": "Properly export the executable binary",
+ "pr": 588
+ }
+ ]
+ },
+ {
"timestamp": 1525477860,
"version": "0.4.3",
"changes": [
diff --git a/packages/sol-compiler/README.md b/packages/sol-compiler/README.md
index bb8175952..76d0e9b8b 100644
--- a/packages/sol-compiler/README.md
+++ b/packages/sol-compiler/README.md
@@ -60,28 +60,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/sol-compiler yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/sol-compiler yarn watch
```
### Clean
diff --git a/packages/sol-compiler/bin/sol-compiler.js b/packages/sol-compiler/bin/sol-compiler.js
new file mode 100755
index 000000000..0e5b69af0
--- /dev/null
+++ b/packages/sol-compiler/bin/sol-compiler.js
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+require('../lib/src/cli.js')
diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json
index 19d390c32..42f5dd0a9 100644
--- a/packages/sol-compiler/package.json
+++ b/packages/sol-compiler/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/sol-compiler",
"version": "0.4.3",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "Solidity compiler wrapper and artifactor",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "yarn clean && copyfiles 'test/fixtures/contracts/**/*' ./lib && tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"test": "run-s build run_mocha",
"run_mocha": "mocha lib/test/*_test.js --bail --exit",
@@ -15,7 +18,7 @@
"migrate": "npm run build; node lib/src/cli.js migrate",
"lint": "tslint --project .",
"test:circleci": "yarn test:coverage",
- "docs:stage": "yarn build && node ./scripts/stage_docs.js",
+ "docs:stage": "node scripts/stage_docs.js",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
@@ -33,7 +36,7 @@
}
},
"bin": {
- "sol-compiler": "lib/src/cli.js"
+ "sol-compiler": "bin/sol-compiler.js"
},
"repository": {
"type": "git",
diff --git a/packages/sol-compiler/test/compiler_test.ts b/packages/sol-compiler/test/compiler_test.ts
index 79bb3b873..d0f121897 100644
--- a/packages/sol-compiler/test/compiler_test.ts
+++ b/packages/sol-compiler/test/compiler_test.ts
@@ -11,7 +11,7 @@ import { constants } from './util/constants';
const expect = chai.expect;
-describe('#Compiler', function() {
+describe('#Compiler', function(): void {
this.timeout(constants.timeoutMs);
const artifactsDir = `${__dirname}/fixtures/artifacts`;
const contractsDir = `${__dirname}/fixtures/contracts`;
diff --git a/packages/sol-cov/README.md b/packages/sol-cov/README.md
index 3a0377521..0a63ac06e 100644
--- a/packages/sol-cov/README.md
+++ b/packages/sol-cov/README.md
@@ -44,28 +44,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/sol-cov yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/sol-cov yarn watch
```
### Clean
diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json
index 6268df4c7..dc6ea42cd 100644
--- a/packages/sol-cov/package.json
+++ b/packages/sol-cov/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/sol-cov",
"version": "0.0.10",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "Generate coverage reports for Solidity code",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"lint": "tslint --project .",
"test": "run-s clean build compile_test run_mocha",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
@@ -14,9 +17,9 @@
"run_mocha": "mocha lib/test/**/*_test.js --exit",
"clean": "shx rm -rf lib scripts test/fixtures/artifacts src/artifacts",
"build": "copyfiles 'test/fixtures/**/*' ./lib && tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
- "compile_test": "node ../sol-compiler/lib/src/cli.js compile",
+ "compile_test": "sol-compiler compile",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
- "docs:stage": "yarn build && node ./scripts/stage_docs.js",
+ "docs:stage": "node scripts/stage_docs.js",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
},
diff --git a/packages/sol-cov/src/coverage_subprovider.ts b/packages/sol-cov/src/coverage_subprovider.ts
index b08291afb..08efeaa24 100644
--- a/packages/sol-cov/src/coverage_subprovider.ts
+++ b/packages/sol-cov/src/coverage_subprovider.ts
@@ -51,7 +51,7 @@ export class CoverageSubprovider extends Subprovider {
* @param end Callback to call if subprovider handled the request and wants to pass back the request.
*/
// tslint:disable-next-line:prefer-function-over-method async-suffix
- public async handleRequest(payload: JSONRPCRequestPayload, next: NextCallback, end: ErrorCallback) {
+ public async handleRequest(payload: JSONRPCRequestPayload, next: NextCallback, end: ErrorCallback): Promise<void> {
switch (payload.method) {
case 'eth_sendTransaction':
const txData = payload.params[0];
diff --git a/packages/sol-resolver/README.md b/packages/sol-resolver/README.md
new file mode 100644
index 000000000..8487947f0
--- /dev/null
+++ b/packages/sol-resolver/README.md
@@ -0,0 +1,67 @@
+## @0xproject/sol-resolver
+
+A Solidity import resolver used by [sol-compiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-compiler).
+
+## Installation
+
+```bash
+yarn add @0xproject/sol-resolver
+```
+
+**Import**
+
+```javascript
+import { Resolver } from '@0xproject/sol-resolver';
+```
+
+or
+
+```javascript
+var Resolver = require('@0xproject/sol-resolver').Resolver;
+```
+
+## Contributing
+
+We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.
+
+Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
+
+### Install dependencies
+
+If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
+
+```bash
+yarn config set workspaces-experimental true
+```
+
+Then install dependencies
+
+```bash
+yarn install
+```
+
+### Build
+
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
+
+```bash
+PKG=@0xproject/sol-resolver yarn build
+```
+
+Or continuously rebuild on change:
+
+```bash
+PKG=@0xproject/sol-resolver yarn watch
+```
+
+### Clean
+
+```bash
+yarn clean
+```
+
+### Lint
+
+```bash
+yarn lint
+```
diff --git a/packages/sol-resolver/package.json b/packages/sol-resolver/package.json
index 6e4ba97e4..ad42dfa6c 100644
--- a/packages/sol-resolver/package.json
+++ b/packages/sol-resolver/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/sol-resolver",
"version": "0.0.4",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "Import resolver for smart contracts dependencies",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "yarn clean && tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib scripts",
"lint": "tslint --project .",
diff --git a/packages/sra-report/CHANGELOG.json b/packages/sra-report/CHANGELOG.json
index 22aa8ce16..90a807c85 100644
--- a/packages/sra-report/CHANGELOG.json
+++ b/packages/sra-report/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "0.1.0",
+ "changes": [
+ {
+ "note": "Properly export the executable binary",
+ "pr": 588
+ }
+ ]
+ },
+ {
"timestamp": 1525477860,
"version": "0.0.14",
"changes": [
diff --git a/packages/sra-report/README.md b/packages/sra-report/README.md
index 806ac3bf4..d8df36a29 100644
--- a/packages/sra-report/README.md
+++ b/packages/sra-report/README.md
@@ -107,28 +107,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/sra-report yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/sra-report yarn watch
```
### Clean
diff --git a/packages/sra-report/bin/sra-report.js b/packages/sra-report/bin/sra-report.js
new file mode 100755
index 000000000..8d6bdccf8
--- /dev/null
+++ b/packages/sra-report/bin/sra-report.js
@@ -0,0 +1,2 @@
+#!/usr/bin/env node
+require('../lib/src/index.js')
diff --git a/packages/sra-report/package.json b/packages/sra-report/package.json
index 1fc0d3ade..5d2245cc1 100644
--- a/packages/sra-report/package.json
+++ b/packages/sra-report/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/sra-report",
"version": "0.0.14",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "Generate reports for standard relayer API compliance",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"clean": "shx rm -rf lib scripts",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"lint": "tslint --project .",
@@ -16,7 +19,7 @@
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
},
"bin": {
- "sra-report": "lib/src/index.js"
+ "sra-report": "bin/sra-report.js"
},
"repository": {
"type": "git",
diff --git a/packages/sra-report/src/postman_environment_factory.ts b/packages/sra-report/src/postman_environment_factory.ts
index 530cacb07..42389aea2 100644
--- a/packages/sra-report/src/postman_environment_factory.ts
+++ b/packages/sra-report/src/postman_environment_factory.ts
@@ -12,8 +12,22 @@ import { addresses as ropstenAddresses } from './contract_addresses/ropsten_addr
const ENVIRONMENT_NAME = 'SRA Report';
-interface EnvironmentValue {
+export interface EnvironmentValue {
key: string;
+ value: string;
+ enabled: true;
+ type: 'text';
+}
+
+export interface Environment {
+ name: string;
+ values: EnvironmentValue[];
+}
+
+export interface Addresses {
+ WETH: string;
+ ZRX: string;
+ EXCHANGE: string;
}
export const postmanEnvironmentFactory = {
@@ -25,7 +39,7 @@ export const postmanEnvironmentFactory = {
* - Contract addresses based on the network id for making specific queries (ex. baseTokenAddress=ZRX_address)
* - Order properties for making specific queries (ex. maker=orderMaker)
*/
- async createPostmanEnvironmentAsync(url: string, networkId: number) {
+ async createPostmanEnvironmentAsync(url: string, networkId: number): Promise<Environment> {
const orderEnvironmentValues = await createOrderEnvironmentValuesAsync(url);
const allEnvironmentValues = _.concat(
createSchemaEnvironmentValues(),
@@ -40,7 +54,7 @@ export const postmanEnvironmentFactory = {
return environment;
},
};
-function createSchemaEnvironmentValues() {
+function createSchemaEnvironmentValues(): EnvironmentValue[] {
const schemas: Schema[] = _.values(schemasByName);
const schemaEnvironmentValues = _.compact(
_.map(schemas, (schema: Schema) => {
@@ -60,7 +74,7 @@ function createSchemaEnvironmentValues() {
const result = _.concat(schemaEnvironmentValues, createEnvironmentValue('schemaKeys', JSON.stringify(schemaKeys)));
return result;
}
-function createContractAddressEnvironmentValues(networkId: number) {
+function createContractAddressEnvironmentValues(networkId: number): EnvironmentValue[] {
const contractAddresses = getContractAddresses(networkId);
return [
createEnvironmentValue('tokenContractAddress1', contractAddresses.WETH),
@@ -68,7 +82,7 @@ function createContractAddressEnvironmentValues(networkId: number) {
createEnvironmentValue('exchangeContractAddress', contractAddresses.EXCHANGE),
];
}
-async function createOrderEnvironmentValuesAsync(url: string) {
+async function createOrderEnvironmentValuesAsync(url: string): Promise<EnvironmentValue[]> {
const httpClient = new HttpClient(url);
const orders = await httpClient.getOrdersAsync();
const orderIfExists = _.head(orders);
@@ -91,7 +105,7 @@ async function createOrderEnvironmentValuesAsync(url: string) {
];
}
}
-function getContractAddresses(networkId: number) {
+function getContractAddresses(networkId: number): Addresses {
switch (networkId) {
case 1:
return mainnetAddresses;
@@ -105,7 +119,7 @@ function getContractAddresses(networkId: number) {
throw new Error('Unsupported network id');
}
}
-function convertSchemaIdToKey(schemaId: string) {
+function convertSchemaIdToKey(schemaId: string): string {
let result = schemaId;
if (_.startsWith(result, '/')) {
result = result.substr(1);
@@ -113,7 +127,8 @@ function convertSchemaIdToKey(schemaId: string) {
result = `${result}Schema`;
return result;
}
-function createEnvironmentValue(key: string, value: string) {
+
+function createEnvironmentValue(key: string, value: string): EnvironmentValue {
return {
key,
value,
diff --git a/packages/sra-report/test/test_runner.ts b/packages/sra-report/test/test_runner.ts
index bf9b923e7..91ef6aa4e 100644
--- a/packages/sra-report/test/test_runner.ts
+++ b/packages/sra-report/test/test_runner.ts
@@ -3,7 +3,12 @@ import * as chaiAsPromised from 'chai-as-promised';
import * as dirtyChai from 'dirty-chai';
import * as _ from 'lodash';
import 'mocha';
-import { NewmanRunExecution, NewmanRunExecutionAssertion, NewmanRunSummary } from 'newman';
+import {
+ NewmanRunExecution,
+ NewmanRunExecutionAssertion,
+ NewmanRunExecutionAssertionError,
+ NewmanRunSummary,
+} from 'newman';
import * as nock from 'nock';
import * as sraReportCollectionJSON from '../../postman_collections/sra_report.postman_collection.json';
@@ -33,7 +38,7 @@ export const testRunner = {
nockInterceptor: nock.Interceptor,
postmanCollectionFolderName: string,
postmanCollectionRequestName: string,
- ) {
+ ): void {
const newmanRunOptions = {
...baseNewmanRunOptions,
folder: postmanCollectionFolderName,
@@ -87,7 +92,7 @@ export const testRunner = {
postmanCollectionRequestName: string,
malformedJson: object,
correctJson: object,
- ) {
+ ): void {
const newmanRunOptions = {
...baseNewmanRunOptions,
folder: postmanCollectionFolderName,
@@ -116,7 +121,7 @@ function findAssertionErrorIfExists(
summary: NewmanRunSummary,
postmanCollectionRequestName: string,
postmanCollectionAssertionName: string,
-) {
+): NewmanRunExecutionAssertionError | undefined {
const matchingExecutionIfExists = _.find(summary.run.executions, (execution: NewmanRunExecution) => {
return execution.item.name === postmanCollectionRequestName;
});
diff --git a/packages/subproviders/README.md b/packages/subproviders/README.md
index 8c8807895..90c9b7bbe 100644
--- a/packages/subproviders/README.md
+++ b/packages/subproviders/README.md
@@ -42,28 +42,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/subproviders yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/subproviders yarn watch
```
### Clean
diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json
index 92377f118..d9eda98f3 100644
--- a/packages/subproviders/package.json
+++ b/packages/subproviders/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/subproviders",
"version": "0.10.1",
+ "engines": {
+ "node" : ">=6.12"
+ },
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"license": "Apache-2.0",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"clean": "shx rm -rf lib scripts",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"lint": "tslint --project .",
@@ -19,7 +22,7 @@
"test:unit": "run-s clean build run_mocha_unit",
"test:integration": "run-s clean build run_mocha_integration",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
- "docs:stage": "yarn build && node ./scripts/stage_docs.js",
+ "docs:stage": "node scripts/stage_docs.js",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
},
diff --git a/packages/subproviders/src/subproviders/base_wallet_subprovider.ts b/packages/subproviders/src/subproviders/base_wallet_subprovider.ts
index f68d7eb29..a04be68e1 100644
--- a/packages/subproviders/src/subproviders/base_wallet_subprovider.ts
+++ b/packages/subproviders/src/subproviders/base_wallet_subprovider.ts
@@ -8,13 +8,13 @@ import { Callback, ErrorCallback, PartialTxParams, ResponseWithTxParams, WalletS
import { Subprovider } from './subprovider';
export abstract class BaseWalletSubprovider extends Subprovider {
- protected static _validateTxParams(txParams: PartialTxParams) {
+ protected static _validateTxParams(txParams: PartialTxParams): void {
if (!_.isUndefined(txParams.to)) {
assert.isETHAddressHex('to', txParams.to);
}
assert.isHexString('nonce', txParams.nonce);
}
- private static _validateSender(sender: string) {
+ private static _validateSender(sender: string): void {
if (_.isUndefined(sender) || !addressUtils.isAddress(sender)) {
throw new Error(WalletSubproviderErrors.SenderInvalidOrNotSupplied);
}
@@ -33,7 +33,7 @@ export abstract class BaseWalletSubprovider extends Subprovider {
* @param end Callback to call if subprovider handled the request and wants to pass back the request.
*/
// tslint:disable-next-line:async-suffix
- public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback) {
+ public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback): Promise<void> {
let accounts;
let txParams;
switch (payload.method) {
diff --git a/packages/subproviders/src/subproviders/empty_wallet_subprovider.ts b/packages/subproviders/src/subproviders/empty_wallet_subprovider.ts
index 8f152dc0a..bd7a4b6d9 100644
--- a/packages/subproviders/src/subproviders/empty_wallet_subprovider.ts
+++ b/packages/subproviders/src/subproviders/empty_wallet_subprovider.ts
@@ -18,7 +18,7 @@ export class EmptyWalletSubprovider extends Subprovider {
* @param end Callback to call if subprovider handled the request and wants to pass back the request.
*/
// tslint:disable-next-line:prefer-function-over-method async-suffix
- public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback) {
+ public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback): Promise<void> {
switch (payload.method) {
case 'eth_accounts':
end(null, []);
diff --git a/packages/subproviders/src/subproviders/fake_gas_estimate_subprovider.ts b/packages/subproviders/src/subproviders/fake_gas_estimate_subprovider.ts
index 54fd7bcb9..6c49f20cf 100644
--- a/packages/subproviders/src/subproviders/fake_gas_estimate_subprovider.ts
+++ b/packages/subproviders/src/subproviders/fake_gas_estimate_subprovider.ts
@@ -32,7 +32,7 @@ export class FakeGasEstimateSubprovider extends Subprovider {
* @param end Callback to call if subprovider handled the request and wants to pass back the request.
*/
// tslint:disable-next-line:prefer-function-over-method async-suffix
- public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback) {
+ public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback): Promise<void> {
switch (payload.method) {
case 'eth_estimateGas':
end(null, this._constantGasAmount);
diff --git a/packages/subproviders/src/subproviders/ganache.ts b/packages/subproviders/src/subproviders/ganache.ts
index debd7ecf0..9ab764048 100644
--- a/packages/subproviders/src/subproviders/ganache.ts
+++ b/packages/subproviders/src/subproviders/ganache.ts
@@ -28,7 +28,7 @@ export class GanacheSubprovider extends Subprovider {
* @param end Callback to call if subprovider handled the request and wants to pass back the request.
*/
// tslint:disable-next-line:prefer-function-over-method async-suffix
- public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback) {
+ public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback): Promise<void> {
this._ganacheProvider.sendAsync(payload, (err: Error | null, result: any) => {
end(err, result && result.result);
});
diff --git a/packages/subproviders/src/subproviders/injected_web3.ts b/packages/subproviders/src/subproviders/injected_web3.ts
index 3ca0c4bd0..73b870cd5 100644
--- a/packages/subproviders/src/subproviders/injected_web3.ts
+++ b/packages/subproviders/src/subproviders/injected_web3.ts
@@ -31,7 +31,7 @@ export class InjectedWeb3Subprovider extends Subprovider {
* @param end Callback to call if subprovider handled the request and wants to pass back the request.
*/
// tslint:disable-next-line:prefer-function-over-method async-suffix
- public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback) {
+ public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback): Promise<void> {
switch (payload.method) {
case 'web3_clientVersion':
this._injectedWeb3.version.getNode(end);
diff --git a/packages/subproviders/src/subproviders/ledger.ts b/packages/subproviders/src/subproviders/ledger.ts
index 563e5a56a..347eda55f 100644
--- a/packages/subproviders/src/subproviders/ledger.ts
+++ b/packages/subproviders/src/subproviders/ledger.ts
@@ -74,7 +74,7 @@ export class LedgerSubprovider extends BaseWalletSubprovider {
* Set a desired derivation path when computing the available user addresses
* @param basDerivationPath The desired derivation path (e.g `44'/60'/0'`)
*/
- public setPath(basDerivationPath: string) {
+ public setPath(basDerivationPath: string): void {
this._baseDerivationPath = basDerivationPath;
}
/**
@@ -192,7 +192,7 @@ export class LedgerSubprovider extends BaseWalletSubprovider {
this._connectionLock.release();
return ledgerEthereumClient;
}
- private async _destroyLedgerClientAsync() {
+ private async _destroyLedgerClientAsync(): Promise<void> {
await this._connectionLock.acquire();
if (_.isUndefined(this._ledgerClientIfExists)) {
this._connectionLock.release();
diff --git a/packages/subproviders/src/subproviders/mnemonic_wallet.ts b/packages/subproviders/src/subproviders/mnemonic_wallet.ts
index 080bfeb4c..f29864a74 100644
--- a/packages/subproviders/src/subproviders/mnemonic_wallet.ts
+++ b/packages/subproviders/src/subproviders/mnemonic_wallet.ts
@@ -56,7 +56,7 @@ export class MnemonicWalletSubprovider extends BaseWalletSubprovider {
* Set a desired derivation path when computing the available user addresses
* @param baseDerivationPath The desired derivation path (e.g `44'/60'/0'`)
*/
- public setPath(baseDerivationPath: string) {
+ public setPath(baseDerivationPath: string): void {
this._baseDerivationPath = baseDerivationPath;
this._derivedKeyInfo = this._initialDerivedKeyInfo(this._baseDerivationPath);
}
diff --git a/packages/subproviders/src/subproviders/subprovider.ts b/packages/subproviders/src/subproviders/subprovider.ts
index 2118f52c8..56d2381a0 100644
--- a/packages/subproviders/src/subproviders/subprovider.ts
+++ b/packages/subproviders/src/subproviders/subprovider.ts
@@ -11,7 +11,7 @@ export abstract class Subprovider {
// tslint:disable-next-line:underscore-private-and-protected
private engine: any;
// Ported from: https://github.com/MetaMask/provider-engine/blob/master/util/random-id.js
- private static _getRandomId() {
+ private static _getRandomId(): number {
const extraDigits = 3;
// 13 time digits
const datePart = new Date().getTime() * Math.pow(10, extraDigits);
diff --git a/packages/subproviders/test/chai_setup.ts b/packages/subproviders/test/chai_setup.ts
index a281bab6c..6c24dc222 100644
--- a/packages/subproviders/test/chai_setup.ts
+++ b/packages/subproviders/test/chai_setup.ts
@@ -3,7 +3,7 @@ import chaiAsPromised = require('chai-as-promised');
import * as dirtyChai from 'dirty-chai';
export const chaiSetup = {
- configure() {
+ configure(): void {
chai.config.includeStack = true;
chai.use(dirtyChai);
chai.use(chaiAsPromised);
diff --git a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
index 14176c145..1a3db7672 100644
--- a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
+++ b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
@@ -39,7 +39,7 @@ describe('NonceTrackerSubprovider', () => {
'0x5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab',
'0x5bd428537f05f9830e93792f90ea6a3e2d1ee84952dd96edbae9f658f831ab13',
];
- function createFixtureSubprovider() {
+ function createFixtureSubprovider(): FixtureSubprovider {
let isFirstGetTransactionCount = true;
const fixedBlockNumberAndTransactionCountProvider = new FixtureSubprovider({
eth_getBlockByNumber: '0x01',
diff --git a/packages/testnet-faucets/Dockerfile b/packages/testnet-faucets/Dockerfile
index bd1dcc4a4..198087ba6 100644
--- a/packages/testnet-faucets/Dockerfile
+++ b/packages/testnet-faucets/Dockerfile
@@ -15,4 +15,4 @@ COPY . .
EXPOSE 3000
-CMD ["forever", "./bin/server.js"]
+CMD ["forever", "./server/server.js"]
diff --git a/packages/testnet-faucets/README.md b/packages/testnet-faucets/README.md
index 93f97e1b7..a92b93fc0 100644
--- a/packages/testnet-faucets/README.md
+++ b/packages/testnet-faucets/README.md
@@ -28,28 +28,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/testnet-faucets yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/testnet-faucets yarn watch
```
### Clean
@@ -86,7 +74,7 @@ Infura API Key can be requested here: https://infura.io/signup
Note: The above public/private keys exist when running `testrpc` with the following option `--mnemonic concert load couple harbor equip island argue ramp clarify fence smart topic`.
```bash
-yarn dev
+PKG=0x.js yarn watch
```
### Endpoints
diff --git a/packages/testnet-faucets/gulpfile.js b/packages/testnet-faucets/gulpfile.js
index 773faf33a..7c4e25e0f 100644
--- a/packages/testnet-faucets/gulpfile.js
+++ b/packages/testnet-faucets/gulpfile.js
@@ -9,7 +9,7 @@ const config = {
target: 'node',
entry: [path.join(__dirname, '/src/ts/server.ts')],
output: {
- path: path.join(__dirname, '/bin'),
+ path: path.join(__dirname, '/server'),
filename: 'server.js',
},
devtool: 'source-map',
@@ -47,7 +47,7 @@ const config = {
modulesDir: path.join(__dirname, '../../node_modules')
}),
watchOptions: {
- ignored: /bin|node_modules|transpiled/
+ ignored: /server|node_modules|transpiled/
},
};
@@ -67,7 +67,7 @@ gulp.task('run', ['watch'], function() {
execMap: {
js: 'node',
},
- script: path.join(__dirname, 'bin/server'),
+ script: path.join(__dirname, 'server/server'),
ignore: ['*'],
watch: ['foo/'],
ext: 'noop',
diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json
index 198c0b2f7..693e980ed 100644
--- a/packages/testnet-faucets/package.json
+++ b/packages/testnet-faucets/package.json
@@ -2,21 +2,25 @@
"private": true,
"name": "@0xproject/testnet-faucets",
"version": "1.0.29",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "A faucet micro-service that dispenses test ERC20 tokens or Ether",
"main": "server.js",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "node ../../node_modules/gulp/bin/gulp.js build",
"dev": "node ../../node_modules/gulp/bin/gulp.js run",
- "start": "node ./bin/server.js",
+ "start": "node ./server/server.js",
"lint": "tslint --project .",
- "clean": "shx rm -rf bin"
+ "clean": "shx rm -rf server"
},
"author": "Fabio Berger",
"license": "Apache-2.0",
"dependencies": {
"0x.js": "^0.37.2",
"@0xproject/subproviders": "^0.10.1",
+ "@0xproject/types": "^0.6.3",
"@0xproject/typescript-typings": "^0.3.1",
"@0xproject/utils": "^0.6.1",
"body-parser": "^1.17.1",
diff --git a/packages/testnet-faucets/src/ts/dispatch_queue.ts b/packages/testnet-faucets/src/ts/dispatch_queue.ts
index 2dbeeba7a..b1996a0c2 100644
--- a/packages/testnet-faucets/src/ts/dispatch_queue.ts
+++ b/packages/testnet-faucets/src/ts/dispatch_queue.ts
@@ -28,12 +28,12 @@ export class DispatchQueue {
public isFull(): boolean {
return this.size() >= MAX_QUEUE_SIZE;
}
- public stop() {
+ public stop(): void {
if (!_.isUndefined(this._queueIntervalIdIfExists)) {
intervalUtils.clearAsyncExcludingInterval(this._queueIntervalIdIfExists);
}
}
- private _start() {
+ private _start(): void {
this._queueIntervalIdIfExists = intervalUtils.setAsyncExcludingInterval(
async () => {
const taskAsync = this._queue.shift();
diff --git a/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts b/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts
index 99f1bad36..39ba4bc14 100644
--- a/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts
+++ b/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts
@@ -11,8 +11,10 @@ const DISPENSE_AMOUNT_TOKEN = 0.1;
const DISPENSE_MAX_AMOUNT_TOKEN = 2;
const DISPENSE_MAX_AMOUNT_ETHER = 2;
+type AsyncTask = () => Promise<void>;
+
export const dispenseAssetTasks = {
- dispenseEtherTask(recipientAddress: string, web3: Web3) {
+ dispenseEtherTask(recipientAddress: string, web3: Web3): AsyncTask {
return async () => {
logUtils.log(`Processing ETH ${recipientAddress}`);
const userBalance = await promisify<BigNumber>(web3.eth.getBalance)(recipientAddress);
@@ -32,7 +34,7 @@ export const dispenseAssetTasks = {
logUtils.log(`Sent ${DISPENSE_AMOUNT_ETHER} ETH to ${recipientAddress} tx: ${txHash}`);
};
},
- dispenseTokenTask(recipientAddress: string, tokenSymbol: string, zeroEx: ZeroEx) {
+ dispenseTokenTask(recipientAddress: string, tokenSymbol: string, zeroEx: ZeroEx): AsyncTask {
return async () => {
logUtils.log(`Processing ${tokenSymbol} ${recipientAddress}`);
const amountToDispense = new BigNumber(DISPENSE_AMOUNT_TOKEN);
diff --git a/packages/testnet-faucets/src/ts/error_reporter.ts b/packages/testnet-faucets/src/ts/error_reporter.ts
index f0f3ca679..a0abcc07b 100644
--- a/packages/testnet-faucets/src/ts/error_reporter.ts
+++ b/packages/testnet-faucets/src/ts/error_reporter.ts
@@ -5,7 +5,7 @@ import rollbar = require('rollbar');
import { configs } from './configs';
export const errorReporter = {
- setup() {
+ setup(): void {
rollbar.init(configs.ROLLBAR_ACCESS_KEY, {
environment: configs.ENVIRONMENT,
});
@@ -31,7 +31,7 @@ export const errorReporter = {
});
});
},
- errorHandler() {
+ errorHandler(): any {
return rollbar.errorHandler(configs.ROLLBAR_ACCESS_KEY);
},
};
diff --git a/packages/testnet-faucets/src/ts/handler.ts b/packages/testnet-faucets/src/ts/handler.ts
index a6e786552..3858b5339 100644
--- a/packages/testnet-faucets/src/ts/handler.ts
+++ b/packages/testnet-faucets/src/ts/handler.ts
@@ -1,4 +1,5 @@
import { Order, SignedOrder, ZeroEx } from '0x.js';
+import { Provider } from '@0xproject/types';
import { BigNumber, logUtils } from '@0xproject/utils';
import * as express from 'express';
import * as _ from 'lodash';
@@ -38,7 +39,7 @@ const FIVE_DAYS_IN_MS = 4.32e8; // TODO: make this configurable
export class Handler {
private _networkConfigByNetworkId: ItemByNetworkId<NetworkConfig> = {};
- private static _createProviderEngine(rpcUrl: string) {
+ private static _createProviderEngine(rpcUrl: string): Provider {
if (_.isUndefined(configs.DISPENSER_PRIVATE_KEY)) {
throw new Error('Dispenser Private key not found');
}
@@ -69,7 +70,7 @@ export class Handler {
};
});
}
- public getQueueInfo(req: express.Request, res: express.Response) {
+ public getQueueInfo(req: express.Request, res: express.Response): void {
res.setHeader('Content-Type', 'application/json');
const queueInfo = _.mapValues(rpcUrls, (rpcUrl: string, networkId: string) => {
const dispatchQueue = this._networkConfigByNetworkId[networkId].dispatchQueue;
@@ -81,19 +82,23 @@ export class Handler {
const payload = JSON.stringify(queueInfo);
res.status(200).send(payload);
}
- public dispenseEther(req: express.Request, res: express.Response) {
+ public dispenseEther(req: express.Request, res: express.Response): void {
this._dispenseAsset(req, res, RequestedAssetType.ETH);
}
- public dispenseZRX(req: express.Request, res: express.Response) {
+ public dispenseZRX(req: express.Request, res: express.Response): void {
this._dispenseAsset(req, res, RequestedAssetType.ZRX);
}
- public async dispenseWETHOrder(req: express.Request, res: express.Response) {
- await this._dispenseOrder(req, res, RequestedAssetType.WETH);
+ public async dispenseWETHOrderAsync(req: express.Request, res: express.Response): Promise<void> {
+ await this._dispenseOrderAsync(req, res, RequestedAssetType.WETH);
}
- public async dispenseZRXOrder(req: express.Request, res: express.Response, next: express.NextFunction) {
- await this._dispenseOrder(req, res, RequestedAssetType.ZRX);
+ public async dispenseZRXOrderAsync(
+ req: express.Request,
+ res: express.Response,
+ next: express.NextFunction,
+ ): Promise<void> {
+ await this._dispenseOrderAsync(req, res, RequestedAssetType.ZRX);
}
- private _dispenseAsset(req: express.Request, res: express.Response, requestedAssetType: RequestedAssetType) {
+ private _dispenseAsset(req: express.Request, res: express.Response, requestedAssetType: RequestedAssetType): void {
const networkId = req.params.networkId;
const recipient = req.params.recipient;
const networkConfig = this._networkConfigByNetworkId[networkId];
@@ -121,7 +126,11 @@ export class Handler {
logUtils.log(`Added ${recipient} to queue: ${requestedAssetType} networkId: ${networkId}`);
res.status(200).end();
}
- private async _dispenseOrder(req: express.Request, res: express.Response, requestedAssetType: RequestedAssetType) {
+ private async _dispenseOrderAsync(
+ req: express.Request,
+ res: express.Response,
+ requestedAssetType: RequestedAssetType,
+ ): Promise<void> {
const networkConfig = _.get(this._networkConfigByNetworkId, req.params.networkId);
if (_.isUndefined(networkConfig)) {
res.status(400).send('UNSUPPORTED_NETWORK_ID');
diff --git a/packages/testnet-faucets/src/ts/parameter_transformer.ts b/packages/testnet-faucets/src/ts/parameter_transformer.ts
index 2630a5e0b..58bf154dc 100644
--- a/packages/testnet-faucets/src/ts/parameter_transformer.ts
+++ b/packages/testnet-faucets/src/ts/parameter_transformer.ts
@@ -8,7 +8,7 @@ import { rpcUrls } from './rpc_urls';
const DEFAULT_NETWORK_ID = 42; // kovan
export const parameterTransformer = {
- transform(req: Request, res: Response, next: NextFunction) {
+ transform(req: Request, res: Response, next: NextFunction): void {
const recipientAddress = req.params.recipient;
if (_.isUndefined(recipientAddress) || !addressUtils.isAddress(recipientAddress)) {
res.status(400).send('INVALID_RECIPIENT_ADDRESS');
diff --git a/packages/testnet-faucets/src/ts/server.ts b/packages/testnet-faucets/src/ts/server.ts
index be1077756..198a5fdc9 100644
--- a/packages/testnet-faucets/src/ts/server.ts
+++ b/packages/testnet-faucets/src/ts/server.ts
@@ -23,8 +23,8 @@ app.get('/ping', (req: express.Request, res: express.Response) => {
app.get('/info', handler.getQueueInfo.bind(handler));
app.get('/ether/:recipient', parameterTransformer.transform, handler.dispenseEther.bind(handler));
app.get('/zrx/:recipient', parameterTransformer.transform, handler.dispenseZRX.bind(handler));
-app.get('/order/weth/:recipient', parameterTransformer.transform, handler.dispenseWETHOrder.bind(handler));
-app.get('/order/zrx/:recipient', parameterTransformer.transform, handler.dispenseZRXOrder.bind(handler));
+app.get('/order/weth/:recipient', parameterTransformer.transform, handler.dispenseWETHOrderAsync.bind(handler));
+app.get('/order/zrx/:recipient', parameterTransformer.transform, handler.dispenseZRXOrderAsync.bind(handler));
// Log to rollbar any errors unhandled by handlers
app.use(errorReporter.errorHandler());
diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md
index d90b3cf73..d630ec84d 100644
--- a/packages/tslint-config/README.md
+++ b/packages/tslint-config/README.md
@@ -40,28 +40,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/tslint-config yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/tslint-config yarn watch
```
### Clean
diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json
index a5b34a35e..d7e62fc51 100644
--- a/packages/tslint-config/package.json
+++ b/packages/tslint-config/package.json
@@ -1,10 +1,13 @@
{
"name": "@0xproject/tslint-config",
"version": "0.4.17",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "Lint rules related to 0xProject for TSLint",
"main": "tslint.json",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib scripts",
"lint": "tslint --project .",
diff --git a/packages/tslint-config/rules/underscorePrivateAndProtectedRule.ts b/packages/tslint-config/rules/underscorePrivateAndProtectedRule.ts
index 2f05b0c18..8c039bea7 100644
--- a/packages/tslint-config/rules/underscorePrivateAndProtectedRule.ts
+++ b/packages/tslint-config/rules/underscorePrivateAndProtectedRule.ts
@@ -50,10 +50,10 @@ function isRelevantClassMember(node: ts.Node): node is RelevantClassMember {
return false;
}
}
-function nameStartsWithUnderscore(text: string) {
+function nameStartsWithUnderscore(text: string): boolean {
return text.charCodeAt(0) === UNDERSCORE.charCodeAt(0);
}
-function memberIsPrivate(node: ts.Declaration) {
+function memberIsPrivate(node: ts.Declaration): boolean {
return Lint.hasModifier(node.modifiers, ts.SyntaxKind.PrivateKeyword, ts.SyntaxKind.ProtectedKeyword);
}
function nameIsIdentifier(node: ts.Node): node is ts.Identifier {
diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json
index aacfb6d59..1d717430d 100644
--- a/packages/tslint-config/tslint.json
+++ b/packages/tslint-config/tslint.json
@@ -18,6 +18,7 @@
],
"curly": true,
"eofline": true,
+ "typedef": [true, "call-signature", "parameter", "property-declaration"],
"encoding": true,
"import-spacing": true,
"indent": [true, "spaces", 4],
diff --git a/packages/types/README.md b/packages/types/README.md
index 665701ea4..c091b8302 100644
--- a/packages/types/README.md
+++ b/packages/types/README.md
@@ -44,28 +44,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/types yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/types yarn watch
```
### Clean
diff --git a/packages/types/package.json b/packages/types/package.json
index 973d5b8d0..2d79af6fd 100644
--- a/packages/types/package.json
+++ b/packages/types/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/types",
"version": "0.6.3",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "0x types",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib scripts",
"lint": "tslint --project .",
diff --git a/packages/typescript-typings/README.md b/packages/typescript-typings/README.md
index 968b2e87c..439cb6484 100644
--- a/packages/typescript-typings/README.md
+++ b/packages/typescript-typings/README.md
@@ -40,28 +40,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/typescript-typings yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/typescript-typings yarn watch
```
### Clean
diff --git a/packages/typescript-typings/package.json b/packages/typescript-typings/package.json
index ad865854c..5a7268126 100644
--- a/packages/typescript-typings/package.json
+++ b/packages/typescript-typings/package.json
@@ -1,8 +1,12 @@
{
"name": "@0xproject/typescript-typings",
"version": "0.3.1",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "0x project typescript type definitions",
"scripts": {
+ "watch": "tsc -w",
"build": "tsc && copyfiles -u 1 './lib/**/*' ./scripts",
"clean": "shx rm -rf scripts",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
diff --git a/packages/utils/README.md b/packages/utils/README.md
index 914404937..c637c9af5 100644
--- a/packages/utils/README.md
+++ b/packages/utils/README.md
@@ -44,28 +44,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/utils yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/utils yarn watch
```
### Clean
diff --git a/packages/utils/package.json b/packages/utils/package.json
index 0924aefc3..d39077148 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/utils",
"version": "0.6.1",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "0x TS utils",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib scripts",
"lint": "tslint --project .",
diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts
index 150f74a15..d329f917a 100644
--- a/packages/utils/src/abi_decoder.ts
+++ b/packages/utils/src/abi_decoder.ts
@@ -17,7 +17,7 @@ import { BigNumber } from './configured_bignumber';
export class AbiDecoder {
private _savedABIs: AbiDefinition[] = [];
private _methodIds: { [signatureHash: string]: EventAbi } = {};
- private static _padZeros(address: string) {
+ private static _padZeros(address: string): string {
let formatted = address;
if (_.startsWith(formatted, '0x')) {
formatted = formatted.slice(2);
diff --git a/packages/utils/src/interval_utils.ts b/packages/utils/src/interval_utils.ts
index ebecc7015..6984bf42d 100644
--- a/packages/utils/src/interval_utils.ts
+++ b/packages/utils/src/interval_utils.ts
@@ -1,7 +1,11 @@
import * as _ from 'lodash';
export const intervalUtils = {
- setAsyncExcludingInterval(fn: () => Promise<void>, intervalMs: number, onError: (err: Error) => void) {
+ setAsyncExcludingInterval(
+ fn: () => Promise<void>,
+ intervalMs: number,
+ onError: (err: Error) => void,
+ ): NodeJS.Timer {
let locked = false;
const intervalId = setInterval(async () => {
if (locked) {
@@ -21,7 +25,7 @@ export const intervalUtils = {
clearAsyncExcludingInterval(intervalId: NodeJS.Timer): void {
clearInterval(intervalId);
},
- setInterval(fn: () => void, intervalMs: number, onError: (err: Error) => void) {
+ setInterval(fn: () => void, intervalMs: number, onError: (err: Error) => void): NodeJS.Timer {
const intervalId = setInterval(() => {
try {
fn();
diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md
index d752a9de0..bfa98deff 100644
--- a/packages/web3-wrapper/README.md
+++ b/packages/web3-wrapper/README.md
@@ -40,28 +40,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/web3-wrapper yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/web3-wrapper yarn watch
```
### Clean
diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json
index bc38df00d..c0fa45433 100644
--- a/packages/web3-wrapper/package.json
+++ b/packages/web3-wrapper/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/web3-wrapper",
"version": "0.6.3",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "Wraps around web3 and gives a nicer interface",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib scripts",
"lint": "tslint --project .",
@@ -15,7 +18,7 @@
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
- "docs:stage": "yarn build && node ./scripts/stage_docs.js",
+ "docs:stage": "node scripts/stage_docs.js",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
},
diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts
index 349e1ed7e..c60d5fe33 100644
--- a/packages/web3-wrapper/src/web3_wrapper.ts
+++ b/packages/web3-wrapper/src/web3_wrapper.ts
@@ -117,7 +117,7 @@ export class Web3Wrapper {
* Update the used Web3 provider
* @param provider The new Web3 provider to be set
*/
- public setProvider(provider: Provider) {
+ public setProvider(provider: Provider): void {
this._web3.setProvider(provider);
}
/**
@@ -333,7 +333,7 @@ export class Web3Wrapper {
*/
public async awaitTransactionMinedAsync(
txHash: string,
- pollingIntervalMs = 1000,
+ pollingIntervalMs: number = 1000,
timeoutMs?: number,
): Promise<TransactionReceiptWithDecodedLogs> {
let timeoutExceeded = false;
diff --git a/packages/web3-wrapper/test/utils/chai_setup.ts b/packages/web3-wrapper/test/utils/chai_setup.ts
index 078edd309..1a8733093 100644
--- a/packages/web3-wrapper/test/utils/chai_setup.ts
+++ b/packages/web3-wrapper/test/utils/chai_setup.ts
@@ -4,7 +4,7 @@ import ChaiBigNumber = require('chai-bignumber');
import * as dirtyChai from 'dirty-chai';
export const chaiSetup = {
- configure() {
+ configure(): void {
chai.config.includeStack = true;
chai.use(ChaiBigNumber());
chai.use(dirtyChai);
diff --git a/packages/website/README.md b/packages/website/README.md
index d93d18935..7115a3b5c 100644
--- a/packages/website/README.md
+++ b/packages/website/README.md
@@ -30,18 +30,16 @@ yarn install
### Initial setup
-The **first** time you work with this package, you must build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/website yarn build
```
### Run dev server
-The the `website` root directory, run:
-
```bash
-yarn dev
+PKG=@0xproject/website yarn watch
```
Visit [0xproject.localhost:3572](http://0xproject.localhost:3572) in your browser.
diff --git a/packages/website/package.json b/packages/website/package.json
index ad84a3eb9..f1b2a1750 100644
--- a/packages/website/package.json
+++ b/packages/website/package.json
@@ -1,13 +1,17 @@
{
"name": "@0xproject/website",
"version": "0.0.32",
+ "engines": {
+ "node" : ">=6.12"
+ },
"private": true,
"description": "Website and 0x portal dapp",
"scripts": {
"build": "NODE_ENV=production webpack; exit 0;",
"clean": "shx rm -f public/bundle*",
"lint": "tslint --project . 'ts/**/*.ts' 'ts/**/*.tsx'",
- "dev": "webpack-dev-server --content-base public --https",
+ "watch": "webpack-dev-server --content-base public --https",
+ "deploy_dogfood": "npm run build; aws s3 sync ./public/. s3://dogfood-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers",
"deploy_staging": "npm run build; aws s3 sync ./public/. s3://staging-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers",
"deploy_live": "npm run build; aws s3 sync ./public/. s3://0xproject.com --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers"
},
diff --git a/packages/website/public/images/team/fragosti.png b/packages/website/public/images/team/fragosti.png
new file mode 100644
index 000000000..60c168514
--- /dev/null
+++ b/packages/website/public/images/team/fragosti.png
Binary files differ
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index b7ba2241c..32acb9d43 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -39,6 +39,7 @@ import {
BlockchainCallErrs,
BlockchainErrs,
ContractInstance,
+ Fill,
Order as PortalOrder,
Providers,
ProviderType,
@@ -88,7 +89,7 @@ export class Blockchain {
}
return providerNameIfExists;
}
- private static async _getProviderAsync(injectedWeb3: Web3, networkIdIfExists: number) {
+ private static async _getProviderAsync(injectedWeb3: Web3, networkIdIfExists: number): Promise<Provider> {
const doesInjectedWeb3Exist = !_.isUndefined(injectedWeb3);
const publicNodeUrlsIfExistsForNetworkId = configs.PUBLIC_NODE_URLS_BY_NETWORK_ID[networkIdIfExists];
const isPublicNodeAvailableForNetworkId = !_.isUndefined(publicNodeUrlsIfExistsForNetworkId);
@@ -137,7 +138,7 @@ export class Blockchain {
// tslint:disable-next-line:no-floating-promises
this._onPageLoadInitFireAndForgetAsync();
}
- public async networkIdUpdatedFireAndForgetAsync(newNetworkId: number) {
+ public async networkIdUpdatedFireAndForgetAsync(newNetworkId: number): Promise<void> {
const isConnected = !_.isUndefined(newNetworkId);
if (!isConnected) {
this.networkId = newNetworkId;
@@ -147,17 +148,17 @@ export class Blockchain {
this.networkId = newNetworkId;
this._dispatcher.encounteredBlockchainError(BlockchainErrs.NoError);
await this.fetchTokenInformationAsync();
- await this._rehydrateStoreWithContractEvents();
+ await this._rehydrateStoreWithContractEventsAsync();
}
}
- public async userAddressUpdatedFireAndForgetAsync(newUserAddress: string) {
+ public async userAddressUpdatedFireAndForgetAsync(newUserAddress: string): Promise<void> {
if (this._userAddressIfExists !== newUserAddress) {
this._userAddressIfExists = newUserAddress;
await this.fetchTokenInformationAsync();
- await this._rehydrateStoreWithContractEvents();
+ await this._rehydrateStoreWithContractEventsAsync();
}
}
- public async nodeVersionUpdatedFireAndForgetAsync(nodeVersion: string) {
+ public async nodeVersionUpdatedFireAndForgetAsync(nodeVersion: string): Promise<void> {
if (this.nodeVersion !== nodeVersion) {
this.nodeVersion = nodeVersion;
}
@@ -174,13 +175,13 @@ export class Blockchain {
const path = this._ledgerSubprovider.getPath();
return path;
}
- public updateLedgerDerivationPathIfExists(path: string) {
+ public updateLedgerDerivationPathIfExists(path: string): void {
if (_.isUndefined(this._ledgerSubprovider)) {
return; // noop
}
this._ledgerSubprovider.setPath(path);
}
- public async updateProviderToLedgerAsync(networkId: number) {
+ public async updateProviderToLedgerAsync(networkId: number): Promise<void> {
utils.assert(!_.isUndefined(this._zeroEx), 'ZeroEx must be instantiated.');
const isU2FSupported = await utils.isU2FSupportedAsync();
@@ -228,7 +229,7 @@ export class Blockchain {
this._blockchainWatcher.startEmittingNetworkConnectionAndUserBalanceState();
this._dispatcher.updateProviderType(ProviderType.Ledger);
}
- public async updateProviderToInjectedAsync() {
+ public async updateProviderToInjectedAsync(): Promise<void> {
utils.assert(!_.isUndefined(this._zeroEx), 'ZeroEx must be instantiated.');
if (_.isUndefined(this._cachedProvider)) {
@@ -367,7 +368,7 @@ export class Blockchain {
const unavailableTakerAmount = await this._zeroEx.exchange.getUnavailableTakerAmountAsync(orderHash);
return unavailableTakerAmount;
}
- public getExchangeContractAddressIfExists() {
+ public getExchangeContractAddressIfExists(): string | undefined {
return this._zeroEx.exchange.getContractAddress();
}
public async validateFillOrderThrowIfInvalidAsync(
@@ -391,7 +392,7 @@ export class Blockchain {
const lowercaseAddress = address.toLowerCase();
return Web3Wrapper.isAddress(lowercaseAddress);
}
- public async pollTokenBalanceAsync(token: Token) {
+ public async pollTokenBalanceAsync(token: Token): Promise<BigNumber> {
utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
const [currBalance] = await this.getTokenBalanceAndAllowanceAsync(this._userAddressIfExists, token.address);
@@ -445,7 +446,7 @@ export class Blockchain {
this._dispatcher.updateECSignature(ecSignature);
return ecSignature;
}
- public async mintTestTokensAsync(token: Token) {
+ public async mintTestTokensAsync(token: Token): Promise<void> {
utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
const mintableContract = await this._instantiateContractIfExistsAsync(MintableArtifacts, token.address);
@@ -489,7 +490,7 @@ export class Blockchain {
);
await this._showEtherScanLinkAndAwaitTransactionMinedAsync(txHash);
}
- public async doesContractExistAtAddressAsync(address: string) {
+ public async doesContractExistAtAddressAsync(address: string): Promise<boolean> {
const doesContractExist = await this._web3Wrapper.doesContractExistAtAddressAsync(address);
return doesContractExist;
}
@@ -520,7 +521,7 @@ export class Blockchain {
}
return [balance, allowance];
}
- public async getUserAccountsAsync() {
+ public async getUserAccountsAsync(): Promise<string[]> {
utils.assert(!_.isUndefined(this._zeroEx), 'ZeroEx must be instantiated.');
const userAccountsIfExists = await this._zeroEx.getAvailableAddressesAsync();
return userAccountsIfExists;
@@ -528,14 +529,14 @@ export class Blockchain {
// HACK: When a user is using a Ledger, we simply dispatch the selected userAddress, which
// by-passes the web3Wrapper logic for updating the prevUserAddress. We therefore need to
// manually update it. This should only be called by the LedgerConfigDialog.
- public updateWeb3WrapperPrevUserAddress(newUserAddress: string) {
+ public updateWeb3WrapperPrevUserAddress(newUserAddress: string): void {
this._blockchainWatcher.updatePrevUserAddress(newUserAddress);
}
- public destroy() {
+ public destroy(): void {
this._blockchainWatcher.destroy();
this._stopWatchingExchangeLogFillEvents();
}
- public async fetchTokenInformationAsync() {
+ public async fetchTokenInformationAsync(): Promise<void> {
utils.assert(
!_.isUndefined(this.networkId),
'Cannot call fetchTokenInformationAsync if disconnected from Ethereum node',
@@ -624,7 +625,7 @@ export class Blockchain {
private _doesUserAddressExist(): boolean {
return !_.isUndefined(this._userAddressIfExists);
}
- private async _rehydrateStoreWithContractEvents() {
+ private async _rehydrateStoreWithContractEventsAsync(): Promise<void> {
// Ensure we are only ever listening to one set of events
this._stopWatchingExchangeLogFillEvents();
@@ -675,7 +676,7 @@ export class Blockchain {
},
);
}
- private async _fetchHistoricalExchangeLogFillEventsAsync(indexFilterValues: IndexedFilterValues) {
+ private async _fetchHistoricalExchangeLogFillEventsAsync(indexFilterValues: IndexedFilterValues): Promise<void> {
utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
const fromBlock = tradeHistoryStorage.getFillsLatestBlock(this._userAddressIfExists, this.networkId);
@@ -697,7 +698,9 @@ export class Blockchain {
tradeHistoryStorage.addFillToUser(this._userAddressIfExists, this.networkId, fill);
}
}
- private async _convertDecodedLogToFillAsync(decodedLog: LogWithDecodedArgs<LogFillContractEventArgs>) {
+ private async _convertDecodedLogToFillAsync(
+ decodedLog: LogWithDecodedArgs<LogFillContractEventArgs>,
+ ): Promise<Fill> {
const args = decodedLog.args;
const blockTimestamp = await this._web3Wrapper.getBlockTimestampAsync(decodedLog.blockHash);
const fill = {
@@ -716,12 +719,12 @@ export class Blockchain {
};
return fill;
}
- private _doesLogEventInvolveUser(decodedLog: LogWithDecodedArgs<LogFillContractEventArgs>) {
+ private _doesLogEventInvolveUser(decodedLog: LogWithDecodedArgs<LogFillContractEventArgs>): boolean {
const args = decodedLog.args;
const isUserMakerOrTaker = args.maker === this._userAddressIfExists || args.taker === this._userAddressIfExists;
return isUserMakerOrTaker;
}
- private _updateLatestFillsBlockIfNeeded(blockNumber: number) {
+ private _updateLatestFillsBlockIfNeeded(blockNumber: number): void {
utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
const isBlockPending = _.isNull(blockNumber);
@@ -762,7 +765,7 @@ export class Blockchain {
});
return tokenByAddress;
}
- private async _onPageLoadInitFireAndForgetAsync() {
+ private async _onPageLoadInitFireAndForgetAsync(): Promise<void> {
await utils.onPageLoadAsync(); // wait for page to load
// Hack: We need to know the networkId the injectedWeb3 is connected to (if it is defined) in
@@ -807,9 +810,9 @@ export class Blockchain {
this._dispatcher.updateUserAddress(this._userAddressIfExists);
await this.fetchTokenInformationAsync();
this._blockchainWatcher.startEmittingNetworkConnectionAndUserBalanceState();
- await this._rehydrateStoreWithContractEvents();
+ await this._rehydrateStoreWithContractEventsAsync();
}
- private _updateProviderName(injectedWeb3: Web3) {
+ private _updateProviderName(injectedWeb3: Web3): void {
const doesInjectedWeb3Exist = !_.isUndefined(injectedWeb3);
const providerName = doesInjectedWeb3Exist
? Blockchain._getNameGivenProvider(injectedWeb3.currentProvider)
@@ -851,12 +854,12 @@ export class Blockchain {
}
}
}
- private _showFlashMessageIfLedger() {
+ private _showFlashMessageIfLedger(): void {
if (!_.isUndefined(this._ledgerSubprovider)) {
this._dispatcher.showFlashMessage('Confirm the transaction on your Ledger Nano S');
}
}
- private async _updateDefaultGasPriceAsync() {
+ private async _updateDefaultGasPriceAsync(): Promise<void> {
try {
const gasInfo = await backendClient.getGasInfoAsync();
const gasPriceInGwei = new BigNumber(gasInfo.average / 10);
diff --git a/packages/website/ts/blockchain_watcher.ts b/packages/website/ts/blockchain_watcher.ts
index 2712b2c04..c420a98a4 100644
--- a/packages/website/ts/blockchain_watcher.ts
+++ b/packages/website/ts/blockchain_watcher.ts
@@ -23,8 +23,8 @@ export class BlockchainWatcher {
this._shouldPollUserAddress = shouldPollUserAddress;
this._web3Wrapper = web3Wrapper;
}
- public destroy() {
- this._stopEmittingNetworkConnectionAndUserBalanceStateAsync();
+ public destroy(): void {
+ this._stopEmittingNetworkConnectionAndUserBalanceState();
// HACK: stop() is only available on providerEngine instances
const provider = this._web3Wrapper.getProvider();
if (!_.isUndefined((provider as any).stop)) {
@@ -32,10 +32,10 @@ export class BlockchainWatcher {
}
}
// This should only be called from the LedgerConfigDialog
- public updatePrevUserAddress(userAddress: string) {
+ public updatePrevUserAddress(userAddress: string): void {
this._prevUserAddressIfExists = userAddress;
}
- public startEmittingNetworkConnectionAndUserBalanceState() {
+ public startEmittingNetworkConnectionAndUserBalanceState(): void {
if (!_.isUndefined(this._watchNetworkAndBalanceIntervalId)) {
return; // we are already emitting the state
}
@@ -88,18 +88,18 @@ export class BlockchainWatcher {
5000,
(err: Error) => {
logUtils.log(`Watching network and balances failed: ${err.stack}`);
- this._stopEmittingNetworkConnectionAndUserBalanceStateAsync();
+ this._stopEmittingNetworkConnectionAndUserBalanceState();
},
);
}
- private async _updateUserWeiBalanceAsync(userAddress: string) {
+ private async _updateUserWeiBalanceAsync(userAddress: string): Promise<void> {
const balanceInWei = await this._web3Wrapper.getBalanceInWeiAsync(userAddress);
if (!balanceInWei.eq(this._prevUserEtherBalanceInWei)) {
this._prevUserEtherBalanceInWei = balanceInWei;
this._dispatcher.updateUserWeiBalance(balanceInWei);
}
}
- private _stopEmittingNetworkConnectionAndUserBalanceStateAsync() {
+ private _stopEmittingNetworkConnectionAndUserBalanceState(): void {
if (!_.isUndefined(this._watchNetworkAndBalanceIntervalId)) {
intervalUtils.clearAsyncExcludingInterval(this._watchNetworkAndBalanceIntervalId);
}
diff --git a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx
index 1c3b7458d..7156e700b 100644
--- a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx
+++ b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx
@@ -18,7 +18,7 @@ interface BlockchainErrDialogProps {
}
export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProps, undefined> {
- public render() {
+ public render(): React.ReactNode {
const dialogActions = [
<FlatButton
key="blockchainErrOk"
@@ -45,7 +45,7 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
</Dialog>
);
}
- private _getTitle(hasWalletAddress: boolean) {
+ private _getTitle(hasWalletAddress: boolean): string {
if (this.props.blockchainErr === BlockchainErrs.AContractNotDeployedOnNetwork) {
return '0x smart contracts not found';
} else if (!hasWalletAddress) {
@@ -58,7 +58,7 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
return 'Unexpected error';
}
}
- private _renderExplanation(hasWalletAddress: boolean) {
+ private _renderExplanation(hasWalletAddress: boolean): React.ReactNode {
if (this.props.blockchainErr === BlockchainErrs.AContractNotDeployedOnNetwork) {
return this._renderContractsNotDeployedExplanation();
} else if (!hasWalletAddress) {
@@ -71,7 +71,7 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
return this._renderUnexpectedErrorExplanation();
}
}
- private _renderDisconnectedFromNode() {
+ private _renderDisconnectedFromNode(): React.ReactNode {
return (
<div>
You were disconnected from the backing Ethereum node. If using{' '}
@@ -86,7 +86,7 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
</div>
);
}
- private _renderDefaultTokenNotInTokenRegistry() {
+ private _renderDefaultTokenNotInTokenRegistry(): React.ReactNode {
return (
<div>
The TokenRegistry deployed on your network does not contain the needed default tokens for 0x Portal to
@@ -96,10 +96,10 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
</div>
);
}
- private _renderUnexpectedErrorExplanation() {
+ private _renderUnexpectedErrorExplanation(): React.ReactNode {
return <div>We encountered an unexpected error. Please try refreshing the page.</div>;
}
- private _renderNoWalletFoundExplanation() {
+ private _renderNoWalletFoundExplanation(): React.ReactNode {
return (
<div>
<div>
@@ -137,7 +137,7 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
</div>
);
}
- private _renderContractsNotDeployedExplanation() {
+ private _renderContractsNotDeployedExplanation(): React.ReactNode {
return (
<div>
<div>
diff --git a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx
index 42ca1713d..069a75560 100644
--- a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx
+++ b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx
@@ -47,14 +47,14 @@ export class EthWethConversionDialog extends React.Component<
ethTokenBalance: new BigNumber(0),
};
}
- public componentWillMount() {
+ public componentWillMount(): void {
// tslint:disable-next-line:no-floating-promises
this._fetchEthTokenBalanceAsync();
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
this._isUnmounted = true;
}
- public render() {
+ public render(): React.ReactNode {
const convertDialogActions = [
<FlatButton key="cancel" label="Cancel" onTouchTap={this._onCancel.bind(this)} />,
<FlatButton key="convert" label="Convert" primary={true} onTouchTap={this._onConvertClick.bind(this)} />,
@@ -72,7 +72,7 @@ export class EthWethConversionDialog extends React.Component<
</Dialog>
);
}
- private _renderConversionDialogBody() {
+ private _renderConversionDialogBody(): React.ReactNode {
const explanation =
this.props.direction === Side.Deposit
? 'Convert your Ether into a tokenized, tradable form.'
@@ -137,7 +137,7 @@ export class EthWethConversionDialog extends React.Component<
</div>
);
}
- private _renderCurrency(isWrappedVersion: boolean) {
+ private _renderCurrency(isWrappedVersion: boolean): React.ReactNode {
const name = isWrappedVersion ? 'Wrapped Ether' : 'Ether';
const iconUrl = isWrappedVersion ? '/images/token_icons/ether_erc20.png' : '/images/ether.png';
const symbol = isWrappedVersion ? 'WETH' : 'ETH';
@@ -155,18 +155,18 @@ export class EthWethConversionDialog extends React.Component<
</div>
);
}
- private _onMaxClick() {
+ private _onMaxClick(): void {
this.setState({
value: this.state.ethTokenBalance,
});
}
- private _onValueChange(isValid: boolean, amount?: BigNumber) {
+ private _onValueChange(isValid: boolean, amount?: BigNumber): void {
this.setState({
value: amount,
hasErrors: !isValid,
});
}
- private _onConvertClick() {
+ private _onConvertClick(): void {
if (this.state.hasErrors) {
this.setState({
shouldShowIncompleteErrs: true,
@@ -179,13 +179,13 @@ export class EthWethConversionDialog extends React.Component<
this.props.onComplete(this.props.direction, value);
}
}
- private _onCancel() {
+ private _onCancel(): void {
this.setState({
value: undefined,
});
this.props.onCancelled();
}
- private async _fetchEthTokenBalanceAsync() {
+ private async _fetchEthTokenBalanceAsync(): Promise<void> {
const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
const [balance] = await this.props.blockchain.getTokenBalanceAndAllowanceAsync(
userAddressIfExists,
diff --git a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx
index a72d33183..3c839d6f5 100644
--- a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx
+++ b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx
@@ -59,7 +59,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
preferredNetworkId: props.networkId,
};
}
- public render() {
+ public render(): React.ReactNode {
const dialogActions = [
<FlatButton key="ledgerConnectCancel" label="Cancel" onTouchTap={this._onClose.bind(this)} />,
];
@@ -82,7 +82,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
</Dialog>
);
}
- private _renderConnectStep() {
+ private _renderConnectStep(): React.ReactNode {
const networkIds = _.values(sharedConstants.NETWORK_ID_BY_NAME);
return (
<div>
@@ -122,7 +122,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
</div>
);
}
- private _renderSelectAddressStep() {
+ private _renderSelectAddressStep(): React.ReactNode {
return (
<div>
<div>
@@ -159,7 +159,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
</div>
);
}
- private _renderAddressTableRows() {
+ private _renderAddressTableRows(): React.ReactNode {
const rows = _.map(this.state.userAddresses, (userAddress: string, i: number) => {
const balanceInWei = this.state.addressBalances[i];
const addressTooltipId = `address-${userAddress}`;
@@ -189,7 +189,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
});
return rows;
}
- private _onClose() {
+ private _onClose(): void {
this.setState({
connectionErrMsg: '',
stepIndex: LedgerSteps.CONNECT,
@@ -197,7 +197,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
const isOpen = false;
this.props.toggleDialogFn(isOpen);
}
- private _onAddressSelected(selectedRowIndexes: number[]) {
+ private _onAddressSelected(selectedRowIndexes: number[]): void {
const selectedRowIndex = selectedRowIndexes[0];
const selectedAddress = this.state.userAddresses[selectedRowIndex];
const selectAddressBalance = this.state.addressBalances[selectedRowIndex];
@@ -228,7 +228,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
}
return didSucceed;
}
- private async _fetchAddressesAndBalancesAsync() {
+ private async _fetchAddressesAndBalancesAsync(): Promise<boolean> {
let userAddresses: string[];
const addressBalances: BigNumber[] = [];
try {
@@ -250,7 +250,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
});
return true;
}
- private _onDerivationPathChanged(e: any, derivationPath: string) {
+ private _onDerivationPathChanged(e: any, derivationPath: string): void {
let derivationErrMsg = '';
if (!_.startsWith(derivationPath, VALID_ETHEREUM_DERIVATION_PATH_PREFIX)) {
derivationErrMsg = 'Must be valid Ethereum path.';
@@ -261,7 +261,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
derivationErrMsg,
});
}
- private async _onConnectLedgerClickAsync() {
+ private async _onConnectLedgerClickAsync(): Promise<boolean> {
const isU2FSupported = await utils.isU2FSupportedAsync();
if (!isU2FSupported) {
logUtils.log(`U2F not supported in this browser`);
@@ -295,7 +295,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
}
return userAddresses;
}
- private _onSelectedNetworkUpdated(e: any, index: number, networkId: number) {
+ private _onSelectedNetworkUpdated(e: any, index: number, networkId: number): void {
this.setState({
preferredNetworkId: networkId,
});
diff --git a/packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx b/packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx
index b31667121..41a17fe96 100644
--- a/packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx
+++ b/packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx
@@ -8,7 +8,7 @@ interface PortalDisclaimerDialogProps {
onToggleDialog: () => void;
}
-export function PortalDisclaimerDialog(props: PortalDisclaimerDialogProps) {
+export const PortalDisclaimerDialog = (props: PortalDisclaimerDialogProps) => {
return (
<Dialog
title="0x Portal Disclaimer"
@@ -33,4 +33,4 @@ export function PortalDisclaimerDialog(props: PortalDisclaimerDialogProps) {
</div>
</Dialog>
);
-}
+};
diff --git a/packages/website/ts/components/dialogs/send_dialog.tsx b/packages/website/ts/components/dialogs/send_dialog.tsx
index 2af7fd7ac..421f18b4f 100644
--- a/packages/website/ts/components/dialogs/send_dialog.tsx
+++ b/packages/website/ts/components/dialogs/send_dialog.tsx
@@ -35,7 +35,7 @@ export class SendDialog extends React.Component<SendDialogProps, SendDialogState
isAmountValid: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const transferDialogActions = [
<FlatButton key="cancelTransfer" label="Cancel" onTouchTap={this._onCancel.bind(this)} />,
<FlatButton
@@ -57,7 +57,7 @@ export class SendDialog extends React.Component<SendDialogProps, SendDialogState
</Dialog>
);
}
- private _renderSendDialogBody() {
+ private _renderSendDialogBody(): React.ReactNode {
return (
<div className="mx-auto" style={{ maxWidth: 300 }}>
<div style={{ height: 80 }}>
@@ -86,19 +86,19 @@ export class SendDialog extends React.Component<SendDialogProps, SendDialogState
</div>
);
}
- private _onRecipientChange(recipient?: string) {
+ private _onRecipientChange(recipient?: string): void {
this.setState({
shouldShowIncompleteErrs: false,
recipient,
});
}
- private _onValueChange(isValid: boolean, amount?: BigNumber) {
+ private _onValueChange(isValid: boolean, amount?: BigNumber): void {
this.setState({
isAmountValid: isValid,
value: amount,
});
}
- private _onSendClick() {
+ private _onSendClick(): void {
if (this._hasErrors()) {
this.setState({
shouldShowIncompleteErrs: true,
@@ -112,13 +112,13 @@ export class SendDialog extends React.Component<SendDialogProps, SendDialogState
this.props.onComplete(this.state.recipient, value);
}
}
- private _onCancel() {
+ private _onCancel(): void {
this.setState({
value: undefined,
});
this.props.onCancelled();
}
- private _hasErrors() {
+ private _hasErrors(): boolean {
return _.isUndefined(this.state.recipient) || _.isUndefined(this.state.value) || !this.state.isAmountValid;
}
}
diff --git a/packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx b/packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx
index bb7e3ed1a..ac0b27cdc 100644
--- a/packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx
+++ b/packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx
@@ -33,7 +33,7 @@ export class TrackTokenConfirmationDialog extends React.Component<
isAddingTokenToTracked: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const tokens = this.props.tokens;
return (
<Dialog
@@ -66,7 +66,7 @@ export class TrackTokenConfirmationDialog extends React.Component<
</Dialog>
);
}
- private async _onTrackConfirmationRespondedAsync(didUserAcceptTracking: boolean) {
+ private async _onTrackConfirmationRespondedAsync(didUserAcceptTracking: boolean): Promise<void> {
if (!didUserAcceptTracking) {
this.props.onToggleDialog(didUserAcceptTracking);
return;
diff --git a/packages/website/ts/components/dialogs/u2f_not_supported_dialog.tsx b/packages/website/ts/components/dialogs/u2f_not_supported_dialog.tsx
index 6ac9cf917..ce86df856 100644
--- a/packages/website/ts/components/dialogs/u2f_not_supported_dialog.tsx
+++ b/packages/website/ts/components/dialogs/u2f_not_supported_dialog.tsx
@@ -9,7 +9,7 @@ interface U2fNotSupportedDialogProps {
onToggleDialog: () => void;
}
-export function U2fNotSupportedDialog(props: U2fNotSupportedDialogProps) {
+export const U2fNotSupportedDialog = (props: U2fNotSupportedDialogProps) => {
return (
<Dialog
title="U2F Not Supported"
@@ -43,4 +43,4 @@ export function U2fNotSupportedDialog(props: U2fNotSupportedDialogProps) {
</div>
</Dialog>
);
-}
+};
diff --git a/packages/website/ts/components/dialogs/wrapped_eth_section_notice_dialog.tsx b/packages/website/ts/components/dialogs/wrapped_eth_section_notice_dialog.tsx
index 9e91ff12d..78b270c1e 100644
--- a/packages/website/ts/components/dialogs/wrapped_eth_section_notice_dialog.tsx
+++ b/packages/website/ts/components/dialogs/wrapped_eth_section_notice_dialog.tsx
@@ -8,7 +8,7 @@ interface WrappedEthSectionNoticeDialogProps {
onToggleDialog: () => void;
}
-export function WrappedEthSectionNoticeDialog(props: WrappedEthSectionNoticeDialogProps) {
+export const WrappedEthSectionNoticeDialog = (props: WrappedEthSectionNoticeDialogProps) => {
return (
<Dialog
title="Dedicated Wrapped Ether Section"
@@ -30,4 +30,4 @@ export function WrappedEthSectionNoticeDialog(props: WrappedEthSectionNoticeDial
</div>
</Dialog>
);
-}
+};
diff --git a/packages/website/ts/components/dropdowns/network_drop_down.tsx b/packages/website/ts/components/dropdowns/network_drop_down.tsx
index b569807dd..2fd2785d1 100644
--- a/packages/website/ts/components/dropdowns/network_drop_down.tsx
+++ b/packages/website/ts/components/dropdowns/network_drop_down.tsx
@@ -13,7 +13,7 @@ interface NetworkDropDownProps {
interface NetworkDropDownState {}
export class NetworkDropDown extends React.Component<NetworkDropDownProps, NetworkDropDownState> {
- public render() {
+ public render(): React.ReactNode {
return (
<div className="mx-auto" style={{ width: 120 }}>
<DropDownMenu value={this.props.selectedNetworkId} onChange={this.props.updateSelectedNetwork}>
@@ -22,7 +22,7 @@ export class NetworkDropDown extends React.Component<NetworkDropDownProps, Netwo
</div>
);
}
- private _renderDropDownItems() {
+ private _renderDropDownItems(): React.ReactNode {
const items = _.map(this.props.avialableNetworkIds, networkId => {
const networkName = sharedConstants.NETWORK_NAME_BY_ID[networkId];
const primaryText = (
diff --git a/packages/website/ts/components/eth_weth_conversion_button.tsx b/packages/website/ts/components/eth_weth_conversion_button.tsx
index 586d260fb..e8db42a7a 100644
--- a/packages/website/ts/components/eth_weth_conversion_button.tsx
+++ b/packages/website/ts/components/eth_weth_conversion_button.tsx
@@ -46,7 +46,7 @@ export class EthWethConversionButton extends React.Component<
isEthConversionHappening: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const labelStyle = this.state.isEthConversionHappening ? { fontSize: 10 } : {};
let callToActionLabel;
let inProgressLabel;
@@ -81,12 +81,12 @@ export class EthWethConversionButton extends React.Component<
</div>
);
}
- private _toggleConversionDialog() {
+ private _toggleConversionDialog(): void {
this.setState({
isEthConversionDialogVisible: !this.state.isEthConversionDialogVisible,
});
}
- private async _onConversionAmountSelectedAsync(direction: Side, value: BigNumber) {
+ private async _onConversionAmountSelectedAsync(direction: Side, value: BigNumber): Promise<void> {
this.setState({
isEthConversionHappening: true,
});
diff --git a/packages/website/ts/components/eth_wrappers.tsx b/packages/website/ts/components/eth_wrappers.tsx
index 59afeb50b..f19b05861 100644
--- a/packages/website/ts/components/eth_wrappers.tsx
+++ b/packages/website/ts/components/eth_wrappers.tsx
@@ -65,7 +65,7 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
},
};
}
- public componentWillReceiveProps(nextProps: EthWrappersProps) {
+ public componentWillReceiveProps(nextProps: EthWrappersProps): void {
if (
nextProps.userAddress !== this.props.userAddress ||
nextProps.networkId !== this.props.networkId ||
@@ -75,15 +75,15 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
this._fetchWETHStateAsync();
}
}
- public componentDidMount() {
+ public componentDidMount(): void {
window.scrollTo(0, 0);
// tslint:disable-next-line:no-floating-promises
this._fetchWETHStateAsync();
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
this._isUnmounted = true;
}
- public render() {
+ public render(): React.ReactNode {
const etherToken = this._getEthToken();
const wethBalance = ZeroEx.toUnitAmount(this.state.ethTokenState.balance, constants.DECIMAL_PLACES_ETH);
const isBidirectional = true;
@@ -222,7 +222,7 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
</div>
);
}
- private _renderActionColumnTitle(isBidirectional: boolean) {
+ private _renderActionColumnTitle(isBidirectional: boolean): React.ReactNode {
let iconClass = 'zmdi-long-arrow-right';
let leftSymbol = 'WETH';
let rightSymbol = 'ETH';
@@ -241,7 +241,7 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
</div>
);
}
- private _renderOutdatedWeths(etherToken: Token, etherTokenState: TokenState) {
+ private _renderOutdatedWeths(etherToken: Token, etherTokenState: TokenState): React.ReactNode {
const rows = _.map(
configs.OUTDATED_WRAPPED_ETHERS,
(outdatedWETHByNetworkId: OutdatedWrappedEtherByNetworkId) => {
@@ -313,7 +313,7 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
);
return rows;
}
- private _renderTokenLink(tokenLabel: React.ReactNode, etherscanUrl: string) {
+ private _renderTokenLink(tokenLabel: React.ReactNode, etherscanUrl: string): React.ReactNode {
return (
<span>
{_.isUndefined(etherscanUrl) ? (
@@ -326,7 +326,7 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
</span>
);
}
- private _renderToken(name: string, address: string, imgPath: string) {
+ private _renderToken(name: string, address: string, imgPath: string): React.ReactNode {
const tooltipId = `tooltip-${address}`;
return (
<div className="flex">
@@ -340,7 +340,7 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
</div>
);
}
- private async _onOutdatedConversionSuccessfulAsync(outdatedWETHAddress: string) {
+ private async _onOutdatedConversionSuccessfulAsync(outdatedWETHAddress: string): Promise<void> {
const currentOutdatedWETHState = this.state.outdatedWETHStateByAddress[outdatedWETHAddress];
this.setState({
outdatedWETHStateByAddress: {
@@ -368,7 +368,7 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
},
});
}
- private async _fetchWETHStateAsync() {
+ private async _fetchWETHStateAsync(): Promise<void> {
const tokens = _.values(this.props.tokenByAddress);
const wethToken = _.find(tokens, token => token.symbol === 'WETH');
const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
@@ -414,12 +414,12 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
);
return outdatedWETHAddresses;
}
- private _getEthToken() {
+ private _getEthToken(): Token {
const tokens = _.values(this.props.tokenByAddress);
const etherToken = _.find(tokens, { symbol: 'WETH' });
return etherToken;
}
- private async _refetchEthTokenStateAsync() {
+ private async _refetchEthTokenStateAsync(): Promise<void> {
const etherToken = this._getEthToken();
const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
const [balance, allowance] = await this.props.blockchain.getTokenBalanceAndAllowanceAsync(
diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx
index ea94e0987..59c32cebc 100644
--- a/packages/website/ts/components/fill_order.tsx
+++ b/packages/website/ts/components/fill_order.tsx
@@ -82,19 +82,19 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
tokensToTrack: [],
};
}
- public componentWillMount() {
+ public componentWillMount(): void {
if (!_.isEmpty(this.state.orderJSON)) {
// tslint:disable-next-line:no-floating-promises
this._validateFillOrderFireAndForgetAsync(this.state.orderJSON);
}
}
- public componentDidMount() {
+ public componentDidMount(): void {
window.scrollTo(0, 0);
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
this._isUnmounted = true;
}
- public render() {
+ public render(): React.ReactNode {
return (
<div className="clearfix lg-px4 md-px4 sm-px2" style={{ minHeight: 600 }}>
<h3>Fill an order</h3>
@@ -159,7 +159,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
</div>
);
}
- private _renderOrderJsonNotices() {
+ private _renderOrderJsonNotices(): React.ReactNode {
return (
<div>
{!_.isUndefined(this.props.initialOrder) &&
@@ -177,7 +177,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
</div>
);
}
- private _renderVisualOrder() {
+ private _renderVisualOrder(): React.ReactNode {
const takerTokenAddress = this.state.parsedOrder.signedOrder.takerTokenAddress;
const takerToken = this.props.tokenByAddress[takerTokenAddress];
const orderTakerAmount = new BigNumber(this.state.parsedOrder.signedOrder.takerTokenAmount);
@@ -306,7 +306,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
</div>
);
}
- private _renderFillSuccessMsg() {
+ private _renderFillSuccessMsg(): React.ReactNode {
return (
<div>
Order successfully filled. See the trade details in your{' '}
@@ -316,10 +316,10 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
</div>
);
}
- private _renderCancelSuccessMsg() {
+ private _renderCancelSuccessMsg(): React.ReactNode {
return <div>Order successfully cancelled.</div>;
}
- private _onFillOrderClick() {
+ private _onFillOrderClick(): void {
if (!this.state.isMakerTokenAddressInRegistry || !this.state.isTakerTokenAddressInRegistry) {
this.setState({
isFillWarningDialogOpen: true,
@@ -329,7 +329,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
this._onFillOrderClickFireAndForgetAsync();
}
}
- private _onFillWarningClosed(didUserCancel: boolean) {
+ private _onFillWarningClosed(didUserCancel: boolean): void {
this.setState({
isFillWarningDialogOpen: false,
});
@@ -338,10 +338,10 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
this._onFillOrderClickFireAndForgetAsync();
}
}
- private _onFillAmountChange(isValid: boolean, amount?: BigNumber) {
+ private _onFillAmountChange(isValid: boolean, amount?: BigNumber): void {
this.props.dispatcher.updateOrderFillAmount(amount);
}
- private _onFillOrderJSONChanged(event: any) {
+ private _onFillOrderJSONChanged(event: any): void {
const orderJSON = event.target.value;
this.setState({
didOrderValidationRun: _.isEmpty(orderJSON) && _.isEmpty(this.state.orderJSONErrMsg),
@@ -350,7 +350,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
// tslint:disable-next-line:no-floating-promises
this._validateFillOrderFireAndForgetAsync(orderJSON);
}
- private async _checkForUntrackedTokensAndAskToAdd() {
+ private async _checkForUntrackedTokensAndAskToAddAsync(): Promise<void> {
if (!_.isEmpty(this.state.orderJSONErrMsg)) {
return;
}
@@ -396,7 +396,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
});
}
}
- private async _validateFillOrderFireAndForgetAsync(orderJSON: string) {
+ private async _validateFillOrderFireAndForgetAsync(orderJSON: string): Promise<void> {
let orderJSONErrMsg = '';
let parsedOrder: Order;
let orderHash: string;
@@ -491,7 +491,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
unavailableTakerAmount,
});
- await this._checkForUntrackedTokensAndAskToAdd();
+ await this._checkForUntrackedTokensAndAskToAddAsync();
}
private async _onFillOrderClickFireAndForgetAsync(): Promise<void> {
if (this.props.blockchainErr !== BlockchainErrs.NoError || _.isEmpty(this.props.userAddress)) {
@@ -650,7 +650,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
const roundedUnitAmount = Math.round(unitAmount.toNumber() * 100000) / 100000;
return roundedUnitAmount;
}
- private _onToggleTrackConfirmDialog(didConfirmTokenTracking: boolean) {
+ private _onToggleTrackConfirmDialog(didConfirmTokenTracking: boolean): void {
if (!didConfirmTokenTracking) {
this.setState({
orderJSON: '',
diff --git a/packages/website/ts/components/fill_order_json.tsx b/packages/website/ts/components/fill_order_json.tsx
index 7d5351ec4..97297d5a1 100644
--- a/packages/website/ts/components/fill_order_json.tsx
+++ b/packages/website/ts/components/fill_order_json.tsx
@@ -19,7 +19,7 @@ interface FillOrderJSONProps {
interface FillOrderJSONState {}
export class FillOrderJSON extends React.Component<FillOrderJSONProps, FillOrderJSONState> {
- public render() {
+ public render(): React.ReactNode {
const tokenAddresses = _.keys(this.props.tokenByAddress);
const exchangeContract = this.props.blockchain.getExchangeContractAddressIfExists();
const hintSideToAssetToken = {
diff --git a/packages/website/ts/components/fill_warning_dialog.tsx b/packages/website/ts/components/fill_warning_dialog.tsx
index d3215a6c1..83095b1d3 100644
--- a/packages/website/ts/components/fill_warning_dialog.tsx
+++ b/packages/website/ts/components/fill_warning_dialog.tsx
@@ -8,7 +8,7 @@ interface FillWarningDialogProps {
onToggleDialog: (didUserCancel: boolean) => void;
}
-export function FillWarningDialog(props: FillWarningDialogProps) {
+export const FillWarningDialog = (props: FillWarningDialogProps) => {
const didCancel = true;
return (
<Dialog
@@ -42,4 +42,4 @@ export function FillWarningDialog(props: FillWarningDialogProps) {
</div>
</Dialog>
);
-}
+};
diff --git a/packages/website/ts/components/flash_messages/token_send_completed.tsx b/packages/website/ts/components/flash_messages/token_send_completed.tsx
index a3b056758..bb5adfa4e 100644
--- a/packages/website/ts/components/flash_messages/token_send_completed.tsx
+++ b/packages/website/ts/components/flash_messages/token_send_completed.tsx
@@ -16,7 +16,7 @@ interface TokenSendCompletedProps {
interface TokenSendCompletedState {}
export class TokenSendCompleted extends React.Component<TokenSendCompletedProps, TokenSendCompletedState> {
- public render() {
+ public render(): React.ReactNode {
const etherScanLink = !_.isUndefined(this.props.etherScanLinkIfExists) && (
<a style={{ color: colors.white }} href={`${this.props.etherScanLinkIfExists}`} target="_blank">
Verify on Etherscan
diff --git a/packages/website/ts/components/flash_messages/transaction_submitted.tsx b/packages/website/ts/components/flash_messages/transaction_submitted.tsx
index 188f1f9a6..2a6d2a64b 100644
--- a/packages/website/ts/components/flash_messages/transaction_submitted.tsx
+++ b/packages/website/ts/components/flash_messages/transaction_submitted.tsx
@@ -9,7 +9,7 @@ interface TransactionSubmittedProps {
interface TransactionSubmittedState {}
export class TransactionSubmitted extends React.Component<TransactionSubmittedProps, TransactionSubmittedState> {
- public render() {
+ public render(): React.ReactNode {
if (_.isUndefined(this.props.etherScanLinkIfExists)) {
return <div>Transaction submitted to the network</div>;
} else {
diff --git a/packages/website/ts/components/footer.tsx b/packages/website/ts/components/footer.tsx
index 487b039b2..c44e41084 100644
--- a/packages/website/ts/components/footer.tsx
+++ b/packages/website/ts/components/footer.tsx
@@ -50,7 +50,7 @@ export class Footer extends React.Component<FooterProps, FooterState> {
selectedLanguage: props.translate.getLanguage(),
};
}
- public render() {
+ public render(): React.ReactNode {
const menuItemsBySection: MenuItemsBySection = {
[Key.Documentation]: [
{
@@ -180,14 +180,14 @@ export class Footer extends React.Component<FooterProps, FooterState> {
</div>
);
}
- private _renderIcon(fileName: string) {
+ private _renderIcon(fileName: string): React.ReactNode {
return (
<div style={{ height: ICON_DIMENSION, width: ICON_DIMENSION }}>
<img src={`/images/social/${fileName}`} style={{ width: ICON_DIMENSION }} />
</div>
);
}
- private _renderMenuItem(item: FooterMenuItem) {
+ private _renderMenuItem(item: FooterMenuItem): React.ReactNode {
const titleToIcon: { [title: string]: string } = {
[this.props.translate.get(Key.RocketChat, Deco.Cap)]: 'rocketchat.png',
[this.props.translate.get(Key.Blog, Deco.Cap)]: 'medium.png',
@@ -222,7 +222,7 @@ export class Footer extends React.Component<FooterProps, FooterState> {
</div>
);
}
- private _renderHeader(key: Key) {
+ private _renderHeader(key: Key): React.ReactNode {
const headerStyle = {
color: colors.grey400,
letterSpacing: 2,
@@ -235,7 +235,7 @@ export class Footer extends React.Component<FooterProps, FooterState> {
</div>
);
}
- private _updateLanguage(e: any, index: number, value: Language) {
+ private _updateLanguage(e: any, index: number, value: Language): void {
this.setState({
selectedLanguage: value,
});
diff --git a/packages/website/ts/components/generate_order/asset_picker.tsx b/packages/website/ts/components/generate_order/asset_picker.tsx
index 69fb32a21..d7cc554c4 100644
--- a/packages/website/ts/components/generate_order/asset_picker.tsx
+++ b/packages/website/ts/components/generate_order/asset_picker.tsx
@@ -79,7 +79,7 @@ export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerSt
},
};
}
- public render() {
+ public render(): React.ReactNode {
const dialogConfigs: DialogConfigs = this._dialogConfigsByAssetView[this.state.assetView];
return (
<Dialog
@@ -102,7 +102,7 @@ export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerSt
</Dialog>
);
}
- private _renderConfirmTrackToken() {
+ private _renderConfirmTrackToken(): React.ReactNode {
const token = this.props.tokenByAddress[this.state.chosenTrackTokenAddress];
return (
<TrackTokenConfirmation
@@ -113,7 +113,7 @@ export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerSt
/>
);
}
- private _renderAssetPicker() {
+ private _renderAssetPicker(): React.ReactNode {
return (
<div
className="clearfix flex flex-wrap"
@@ -128,7 +128,7 @@ export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerSt
</div>
);
}
- private _renderGridTiles() {
+ private _renderGridTiles(): React.ReactNode {
let isHovered;
let tileStyles;
const gridTiles = _.map(this.props.tokenByAddress, (token: Token, address: string) => {
@@ -195,19 +195,19 @@ export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerSt
}
return gridTiles;
}
- private _onToggleHover(address: string, isHovered: boolean) {
+ private _onToggleHover(address: string, isHovered: boolean): void {
const hoveredAddress = isHovered ? address : undefined;
this.setState({
hoveredAddress,
});
}
- private _onCloseDialog() {
+ private _onCloseDialog(): void {
this.setState({
assetView: AssetViews.ASSET_PICKER,
});
this.props.onTokenChosen(this.props.currentTokenAddress);
}
- private _onChooseToken(tokenAddress: string) {
+ private _onChooseToken(tokenAddress: string): void {
const token = this.props.tokenByAddress[tokenAddress];
if (token.isTracked) {
this.props.onTokenChosen(tokenAddress);
@@ -218,12 +218,12 @@ export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerSt
});
}
}
- private _onCustomAssetChosen() {
+ private _onCustomAssetChosen(): void {
this.setState({
assetView: AssetViews.NEW_TOKEN_FORM,
});
}
- private _onNewTokenSubmitted(newToken: Token) {
+ private _onNewTokenSubmitted(newToken: Token): void {
trackedTokenStorage.addTrackedTokenToUser(this.props.userAddress, this.props.networkId, newToken);
this.props.dispatcher.addTokenToTokenByAddress(newToken);
this.setState({
@@ -231,7 +231,7 @@ export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerSt
});
this.props.onTokenChosen(newToken.address);
}
- private async _onTrackConfirmationRespondedAsync(didUserAcceptTracking: boolean) {
+ private async _onTrackConfirmationRespondedAsync(didUserAcceptTracking: boolean): Promise<void> {
if (!didUserAcceptTracking) {
this.setState({
isAddingTokenToTracked: false,
diff --git a/packages/website/ts/components/generate_order/generate_order_form.tsx b/packages/website/ts/components/generate_order/generate_order_form.tsx
index eb76cb529..d46c29058 100644
--- a/packages/website/ts/components/generate_order/generate_order_form.tsx
+++ b/packages/website/ts/components/generate_order/generate_order_form.tsx
@@ -63,10 +63,10 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G
signingState: SigningState.UNSIGNED,
};
}
- public componentDidMount() {
+ public componentDidMount(): void {
window.scrollTo(0, 0);
}
- public render() {
+ public render(): React.ReactNode {
const dispatcher = this.props.dispatcher;
const depositTokenAddress = this.props.sideToAssetToken[Side.Deposit].address;
const depositToken = this.props.tokenByAddress[depositTokenAddress];
@@ -214,13 +214,13 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G
</div>
);
}
- private _onTokenAmountChange(token: Token, side: Side, isValid: boolean, amount?: BigNumber) {
+ private _onTokenAmountChange(token: Token, side: Side, isValid: boolean, amount?: BigNumber): void {
this.props.dispatcher.updateChosenAssetToken(side, {
address: token.address,
amount,
});
}
- private _onCloseOrderJSONDialog() {
+ private _onCloseOrderJSONDialog(): void {
// Upon closing the order JSON dialog, we update the orderSalt stored in the Redux store
// with a new value so that if a user signs the identical order again, the newly signed
// orderHash will not collide with the previously generated orderHash.
diff --git a/packages/website/ts/components/generate_order/new_token_form.tsx b/packages/website/ts/components/generate_order/new_token_form.tsx
index e7f3b93c6..10f71b430 100644
--- a/packages/website/ts/components/generate_order/new_token_form.tsx
+++ b/packages/website/ts/components/generate_order/new_token_form.tsx
@@ -42,7 +42,7 @@ export class NewTokenForm extends React.Component<NewTokenFormProps, NewTokenFor
decimalsErrText: '',
};
}
- public render() {
+ public render(): React.ReactNode {
return (
<div className="mx-auto pb2" style={{ width: 256 }}>
<div>
@@ -96,7 +96,7 @@ export class NewTokenForm extends React.Component<NewTokenFormProps, NewTokenFor
</div>
);
}
- private async _onAddNewTokenClickAsync() {
+ private async _onAddNewTokenClickAsync(): Promise<void> {
// Trigger validation of name and symbol
this._onTokenNameChanged(undefined, this.state.name);
this._onTokenSymbolChanged(undefined, this.state.symbol);
@@ -152,7 +152,7 @@ export class NewTokenForm extends React.Component<NewTokenFormProps, NewTokenFor
};
this.props.onNewTokenSubmitted(newToken);
}
- private _onTokenNameChanged(e: any, name: string) {
+ private _onTokenNameChanged(e: any, name: string): void {
let nameErrText = '';
const maxLength = 30;
const tokens = _.values(this.props.tokenByAddress);
@@ -173,7 +173,7 @@ export class NewTokenForm extends React.Component<NewTokenFormProps, NewTokenFor
nameErrText,
});
}
- private _onTokenSymbolChanged(e: any, symbol: string) {
+ private _onTokenSymbolChanged(e: any, symbol: string): void {
let symbolErrText = '';
const maxLength = 5;
const tokens = _.values(this.props.tokenByAddress);
@@ -193,7 +193,7 @@ export class NewTokenForm extends React.Component<NewTokenFormProps, NewTokenFor
symbolErrText,
});
}
- private _onTokenDecimalsChanged(e: any, decimals: string) {
+ private _onTokenDecimalsChanged(e: any, decimals: string): void {
let decimalsErrText = '';
const maxLength = 2;
if (decimals === '') {
@@ -209,20 +209,20 @@ export class NewTokenForm extends React.Component<NewTokenFormProps, NewTokenFor
decimalsErrText,
});
}
- private _onTokenAddressChanged(address?: string) {
+ private _onTokenAddressChanged(address?: string): void {
if (!_.isUndefined(address)) {
this.setState({
address,
});
}
}
- private _isValidName(input: string) {
+ private _isValidName(input: string): boolean {
return /^[a-z0-9 ]+$/i.test(input);
}
- private _isInteger(input: string) {
+ private _isInteger(input: string): boolean {
return /^[0-9]+$/i.test(input);
}
- private _isAlphanumeric(input: string) {
+ private _isAlphanumeric(input: string): boolean {
return /^[a-zA-Z0-9]+$/i.test(input);
}
}
diff --git a/packages/website/ts/components/inputs/address_input.tsx b/packages/website/ts/components/inputs/address_input.tsx
index 7ca4af968..39ec72f8a 100644
--- a/packages/website/ts/components/inputs/address_input.tsx
+++ b/packages/website/ts/components/inputs/address_input.tsx
@@ -29,14 +29,14 @@ export class AddressInput extends React.Component<AddressInputProps, AddressInpu
errMsg: '',
};
}
- public componentWillReceiveProps(nextProps: AddressInputProps) {
+ public componentWillReceiveProps(nextProps: AddressInputProps): void {
if (nextProps.shouldShowIncompleteErrs && this.props.isRequired && this.state.address === '') {
this.setState({
errMsg: 'Address is required',
});
}
}
- public render() {
+ public render(): React.ReactNode {
const label = this.props.isRequired ? <RequiredLabel label={this.props.label} /> : this.props.label;
const labelDisplay = this.props.shouldHideLabel ? 'hidden' : 'block';
const hintText = this.props.hintText ? this.props.hintText : '';
@@ -57,7 +57,7 @@ export class AddressInput extends React.Component<AddressInputProps, AddressInpu
</div>
);
}
- private _onOrderTakerAddressUpdated(e: any) {
+ private _onOrderTakerAddressUpdated(e: any): void {
const address = e.target.value.toLowerCase();
const isValidAddress = addressUtils.isAddress(address) || address === '';
const errMsg = isValidAddress ? '' : 'Invalid ethereum address';
diff --git a/packages/website/ts/components/inputs/allowance_toggle.tsx b/packages/website/ts/components/inputs/allowance_toggle.tsx
index cfe75b751..48c7f9f57 100644
--- a/packages/website/ts/components/inputs/allowance_toggle.tsx
+++ b/packages/website/ts/components/inputs/allowance_toggle.tsx
@@ -63,7 +63,7 @@ export class AllowanceToggle extends React.Component<AllowanceToggleProps, Allow
prevAllowance: props.tokenState.allowance,
};
}
- public componentWillReceiveProps(nextProps: AllowanceToggleProps) {
+ public componentWillReceiveProps(nextProps: AllowanceToggleProps): void {
if (!nextProps.tokenState.allowance.eq(this.state.prevAllowance)) {
this.setState({
isSpinnerVisible: false,
@@ -71,7 +71,7 @@ export class AllowanceToggle extends React.Component<AllowanceToggleProps, Allow
});
}
}
- public render() {
+ public render(): React.ReactNode {
return (
<div className="flex">
<div>
@@ -128,7 +128,7 @@ export class AllowanceToggle extends React.Component<AllowanceToggleProps, Allow
await errorReporter.reportAsync(err);
}
}
- private _isAllowanceSet() {
+ private _isAllowanceSet(): boolean {
return !this.props.tokenState.allowance.eq(0);
}
}
diff --git a/packages/website/ts/components/inputs/balance_bounded_input.tsx b/packages/website/ts/components/inputs/balance_bounded_input.tsx
index e9b8dd369..68b77cfc3 100644
--- a/packages/website/ts/components/inputs/balance_bounded_input.tsx
+++ b/packages/website/ts/components/inputs/balance_bounded_input.tsx
@@ -46,7 +46,7 @@ export class BalanceBoundedInput extends React.Component<BalanceBoundedInputProp
amountString,
};
}
- public componentWillReceiveProps(nextProps: BalanceBoundedInputProps) {
+ public componentWillReceiveProps(nextProps: BalanceBoundedInputProps): void {
if (nextProps === this.props) {
return;
}
@@ -76,7 +76,7 @@ export class BalanceBoundedInput extends React.Component<BalanceBoundedInputProp
});
}
}
- public render() {
+ public render(): React.ReactNode {
let errorText;
if (this.props.shouldShowErrs) {
errorText =
@@ -104,7 +104,7 @@ export class BalanceBoundedInput extends React.Component<BalanceBoundedInputProp
/>
);
}
- private _onValueChange(e: any, amountString: string) {
+ private _onValueChange(e: any, amountString: string): void {
const errMsg = this._validate(amountString, this.props.balance);
this.setState(
{
@@ -135,7 +135,7 @@ export class BalanceBoundedInput extends React.Component<BalanceBoundedInputProp
const errMsg = _.isUndefined(this.props.validate) ? undefined : this.props.validate(amount);
return errMsg;
}
- private _renderIncreaseBalanceLink() {
+ private _renderIncreaseBalanceLink(): React.ReactNode {
if (this.props.shouldHideVisitBalancesLink) {
return null;
}
diff --git a/packages/website/ts/components/inputs/eth_amount_input.tsx b/packages/website/ts/components/inputs/eth_amount_input.tsx
index f3a879065..c3822a80b 100644
--- a/packages/website/ts/components/inputs/eth_amount_input.tsx
+++ b/packages/website/ts/components/inputs/eth_amount_input.tsx
@@ -29,7 +29,7 @@ export class EthAmountInput extends React.Component<EthAmountInputProps, EthAmou
shouldShowUnderline: true,
style: { height: 63 },
};
- public render() {
+ public render(): React.ReactNode {
const amount = this.props.amount
? ZeroEx.toUnitAmount(this.props.amount, constants.DECIMAL_PLACES_ETH)
: undefined;
@@ -52,7 +52,7 @@ export class EthAmountInput extends React.Component<EthAmountInputProps, EthAmou
</div>
);
}
- private _onChange(isValid: boolean, amount?: BigNumber) {
+ private _onChange(isValid: boolean, amount?: BigNumber): void {
const baseUnitAmountIfExists = _.isUndefined(amount)
? undefined
: ZeroEx.toBaseUnitAmount(amount, constants.DECIMAL_PLACES_ETH);
diff --git a/packages/website/ts/components/inputs/expiration_input.tsx b/packages/website/ts/components/inputs/expiration_input.tsx
index e473648d2..5c68080fe 100644
--- a/packages/website/ts/components/inputs/expiration_input.tsx
+++ b/packages/website/ts/components/inputs/expiration_input.tsx
@@ -30,7 +30,7 @@ export class ExpirationInput extends React.Component<ExpirationInputProps, Expir
timeMoment: didUserSetExpiry ? expirationMoment : undefined,
};
}
- public render() {
+ public render(): React.ReactNode {
const date = this.state.dateMoment ? this.state.dateMoment.toDate() : undefined;
const time = this.state.timeMoment ? this.state.timeMoment.toDate() : undefined;
return (
@@ -72,7 +72,7 @@ export class ExpirationInput extends React.Component<ExpirationInputProps, Expir
.startOf('day')
.isBefore(this._earliestPickableMoment);
}
- private _clearDates() {
+ private _clearDates(): void {
this.setState({
dateMoment: undefined,
timeMoment: undefined,
@@ -80,7 +80,7 @@ export class ExpirationInput extends React.Component<ExpirationInputProps, Expir
const defaultDateTime = utils.initialOrderExpiryUnixTimestampSec();
this.props.updateOrderExpiry(defaultDateTime);
}
- private _onDateChanged(e: any, date: Date) {
+ private _onDateChanged(e: any, date: Date): void {
const dateMoment = moment(date);
this.setState({
dateMoment,
@@ -88,7 +88,7 @@ export class ExpirationInput extends React.Component<ExpirationInputProps, Expir
const timestamp = utils.convertToUnixTimestampSeconds(dateMoment, this.state.timeMoment);
this.props.updateOrderExpiry(timestamp);
}
- private _onTimeChanged(e: any, time: Date) {
+ private _onTimeChanged(e: any, time: Date): void {
const timeMoment = moment(time);
this.setState({
timeMoment,
diff --git a/packages/website/ts/components/inputs/hash_input.tsx b/packages/website/ts/components/inputs/hash_input.tsx
index 28305637d..37d4af138 100644
--- a/packages/website/ts/components/inputs/hash_input.tsx
+++ b/packages/website/ts/components/inputs/hash_input.tsx
@@ -27,7 +27,7 @@ interface HashInputProps {
interface HashInputState {}
export class HashInput extends React.Component<HashInputProps, HashInputState> {
- public render() {
+ public render(): React.ReactNode {
const msgHashHex = this.props.blockchainIsLoaded ? this._generateMessageHashHex() : '';
return (
<div>
@@ -40,7 +40,7 @@ export class HashInput extends React.Component<HashInputProps, HashInputState> {
</div>
);
}
- private _generateMessageHashHex() {
+ private _generateMessageHashHex(): string {
const exchangeContractAddress = this.props.blockchain.getExchangeContractAddressIfExists();
const hashData = this.props.hashData;
const order: Order = {
diff --git a/packages/website/ts/components/inputs/identicon_address_input.tsx b/packages/website/ts/components/inputs/identicon_address_input.tsx
index 4cf9af64d..a4dc01ba8 100644
--- a/packages/website/ts/components/inputs/identicon_address_input.tsx
+++ b/packages/website/ts/components/inputs/identicon_address_input.tsx
@@ -23,7 +23,7 @@ export class IdenticonAddressInput extends React.Component<IdenticonAddressInput
address: props.initialAddress,
};
}
- public render() {
+ public render(): React.ReactNode {
const label = this.props.isRequired ? <RequiredLabel label={this.props.label} /> : this.props.label;
return (
<div className="relative" style={{ width: '100%' }}>
diff --git a/packages/website/ts/components/inputs/token_amount_input.tsx b/packages/website/ts/components/inputs/token_amount_input.tsx
index 9e638b67b..9a74bdd51 100644
--- a/packages/website/ts/components/inputs/token_amount_input.tsx
+++ b/packages/website/ts/components/inputs/token_amount_input.tsx
@@ -52,14 +52,14 @@ export class TokenAmountInput extends React.Component<TokenAmountInputProps, Tok
isBalanceAndAllowanceLoaded: false,
};
}
- public componentWillMount() {
+ public componentWillMount(): void {
// tslint:disable-next-line:no-floating-promises
this._fetchBalanceAndAllowanceAsync(this.props.token.address, this.props.userAddress);
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
this._isUnmounted = true;
}
- public componentWillReceiveProps(nextProps: TokenAmountInputProps) {
+ public componentWillReceiveProps(nextProps: TokenAmountInputProps): void {
if (
nextProps.userAddress !== this.props.userAddress ||
nextProps.networkId !== this.props.networkId ||
@@ -70,7 +70,7 @@ export class TokenAmountInput extends React.Component<TokenAmountInputProps, Tok
this._fetchBalanceAndAllowanceAsync(nextProps.token.address, nextProps.userAddress);
}
}
- public render() {
+ public render(): React.ReactNode {
const amount = this.props.amount
? ZeroEx.toUnitAmount(this.props.amount, this.props.token.decimals)
: undefined;
@@ -98,7 +98,7 @@ export class TokenAmountInput extends React.Component<TokenAmountInputProps, Tok
</div>
);
}
- private _onChange(isValid: boolean, amount?: BigNumber) {
+ private _onChange(isValid: boolean, amount?: BigNumber): void {
let baseUnitAmount;
if (!_.isUndefined(amount)) {
baseUnitAmount = ZeroEx.toBaseUnitAmount(amount, this.props.token.decimals);
@@ -122,7 +122,7 @@ export class TokenAmountInput extends React.Component<TokenAmountInputProps, Tok
return undefined;
}
}
- private async _fetchBalanceAndAllowanceAsync(tokenAddress: string, userAddress: string) {
+ private async _fetchBalanceAndAllowanceAsync(tokenAddress: string, userAddress: string): Promise<void> {
this.setState({
isBalanceAndAllowanceLoaded: false,
});
diff --git a/packages/website/ts/components/inputs/token_input.tsx b/packages/website/ts/components/inputs/token_input.tsx
index 545e9a095..c2c4dd63b 100644
--- a/packages/website/ts/components/inputs/token_input.tsx
+++ b/packages/website/ts/components/inputs/token_input.tsx
@@ -38,7 +38,7 @@ export class TokenInput extends React.Component<TokenInputProps, TokenInputState
isPickerOpen: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const token = this.props.tokenByAddress[this.props.assetToken.address];
const iconStyles = {
cursor: 'pointer',
@@ -76,7 +76,7 @@ export class TokenInput extends React.Component<TokenInputProps, TokenInputState
</div>
);
}
- private _onTokenChosen(tokenAddress: string) {
+ private _onTokenChosen(tokenAddress: string): void {
const assetToken: AssetToken = {
address: tokenAddress,
amount: this.props.assetToken.amount,
@@ -86,12 +86,12 @@ export class TokenInput extends React.Component<TokenInputProps, TokenInputState
isPickerOpen: false,
});
}
- private _onToggleHover(isHoveringIcon: boolean) {
+ private _onToggleHover(isHoveringIcon: boolean): void {
this.setState({
isHoveringIcon,
});
}
- private _onAssetClicked() {
+ private _onAssetClicked(): void {
if (this.props.blockchainErr !== BlockchainErrs.NoError) {
this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
return;
diff --git a/packages/website/ts/components/legacy_portal/legacy_portal.tsx b/packages/website/ts/components/legacy_portal/legacy_portal.tsx
index c45b20365..002b258fb 100644
--- a/packages/website/ts/components/legacy_portal/legacy_portal.tsx
+++ b/packages/website/ts/components/legacy_portal/legacy_portal.tsx
@@ -79,7 +79,7 @@ export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPorta
private _blockchain: Blockchain;
private _sharedOrderIfExists: Order;
private _throttledScreenWidthUpdate: () => void;
- public static hasAlreadyDismissedWethNotice() {
+ public static hasAlreadyDismissedWethNotice(): boolean {
const didDismissWethNotice = localStorage.getItemIfExists(constants.LOCAL_STORAGE_KEY_DISMISS_WETH_NOTICE);
const hasAlreadyDismissedWethNotice = !_.isUndefined(didDismissWethNotice) && !_.isEmpty(didDismissWethNotice);
return hasAlreadyDismissedWethNotice;
@@ -105,14 +105,14 @@ export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPorta
isLedgerDialogOpen: false,
};
}
- public componentDidMount() {
+ public componentDidMount(): void {
window.addEventListener('resize', this._throttledScreenWidthUpdate);
window.scrollTo(0, 0);
}
- public componentWillMount() {
+ public componentWillMount(): void {
this._blockchain = new Blockchain(this.props.dispatcher);
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
this._blockchain.destroy();
window.removeEventListener('resize', this._throttledScreenWidthUpdate);
// We re-set the entire redux state when the portal is unmounted so that when it is re-rendered
@@ -121,7 +121,7 @@ export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPorta
// become disconnected from their backing Ethereum node, changes user accounts, etc...)
this.props.dispatcher.resetState();
}
- public componentWillReceiveProps(nextProps: LegacyPortalProps) {
+ public componentWillReceiveProps(nextProps: LegacyPortalProps): void {
if (nextProps.networkId !== this.state.prevNetworkId) {
// tslint:disable-next-line:no-floating-promises
this._blockchain.networkIdUpdatedFireAndForgetAsync(nextProps.networkId);
@@ -150,7 +150,7 @@ export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPorta
});
}
}
- public render() {
+ public render(): React.ReactNode {
const updateShouldBlockchainErrDialogBeOpen = this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen.bind(
this.props.dispatcher,
);
@@ -276,12 +276,12 @@ export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPorta
</div>
);
}
- public onToggleLedgerDialog() {
+ public onToggleLedgerDialog(): void {
this.setState({
isLedgerDialogOpen: !this.state.isLedgerDialogOpen,
});
}
- private _renderEthWrapper() {
+ private _renderEthWrapper(): React.ReactNode {
return (
<EthWrappers
networkId={this.props.networkId}
@@ -294,7 +294,7 @@ export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPorta
/>
);
}
- private _renderTradeHistory() {
+ private _renderTradeHistory(): React.ReactNode {
return (
<TradeHistory
tokenByAddress={this.props.tokenByAddress}
@@ -303,7 +303,7 @@ export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPorta
/>
);
}
- private _renderTokenBalances() {
+ private _renderTokenBalances(): React.ReactNode {
const allTokens = _.values(this.props.tokenByAddress);
const trackedTokens = _.filter(allTokens, t => t.isTracked);
return (
@@ -322,7 +322,7 @@ export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPorta
/>
);
}
- private _renderFillOrder(match: any, location: Location, history: History) {
+ private _renderFillOrder(match: any, location: Location, history: History): React.ReactNode {
const initialFillOrder = !_.isUndefined(this.props.userSuppliedOrderCache)
? this.props.userSuppliedOrderCache
: this._sharedOrderIfExists;
@@ -341,7 +341,7 @@ export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPorta
/>
);
}
- private _renderGenerateOrderForm(match: any, location: Location, history: History) {
+ private _renderGenerateOrderForm(match: any, location: Location, history: History): React.ReactNode {
return (
<GenerateOrderForm
blockchain={this._blockchain}
@@ -350,13 +350,13 @@ export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPorta
/>
);
}
- private _onPortalDisclaimerAccepted() {
+ private _onPortalDisclaimerAccepted(): void {
localStorage.setItem(constants.LOCAL_STORAGE_KEY_ACCEPT_DISCLAIMER, 'set');
this.setState({
isDisclaimerDialogOpen: false,
});
}
- private _onWethNoticeAccepted() {
+ private _onWethNoticeAccepted(): void {
localStorage.setItem(constants.LOCAL_STORAGE_KEY_DISMISS_WETH_NOTICE, 'set');
this.setState({
isWethNoticeDialogOpen: false,
@@ -388,7 +388,7 @@ export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPorta
}
return order;
}
- private _updateScreenWidth() {
+ private _updateScreenWidth(): void {
const newScreenWidth = utils.getScreenWidth();
this.props.dispatcher.updateScreenWidth(newScreenWidth);
}
diff --git a/packages/website/ts/components/legacy_portal/legacy_portal_menu.tsx b/packages/website/ts/components/legacy_portal/legacy_portal_menu.tsx
index 94113f066..7469ca14e 100644
--- a/packages/website/ts/components/legacy_portal/legacy_portal_menu.tsx
+++ b/packages/website/ts/components/legacy_portal/legacy_portal_menu.tsx
@@ -15,7 +15,7 @@ export class LegacyPortalMenu extends React.Component<LegacyPortalMenuProps, Leg
public static defaultProps: Partial<LegacyPortalMenuProps> = {
onClick: _.noop,
};
- public render() {
+ public render(): React.ReactNode {
return (
<div>
<MenuItem
@@ -61,7 +61,7 @@ export class LegacyPortalMenu extends React.Component<LegacyPortalMenuProps, Leg
</div>
);
}
- private _renderMenuItemWithIcon(title: string, iconName: string) {
+ private _renderMenuItemWithIcon(title: string, iconName: string): React.ReactNode {
return (
<div className="flex" style={{ fontWeight: 100 }}>
<div className="pr1 pl2">
diff --git a/packages/website/ts/components/order_json.tsx b/packages/website/ts/components/order_json.tsx
index 02b88b888..6feefea50 100644
--- a/packages/website/ts/components/order_json.tsx
+++ b/packages/website/ts/components/order_json.tsx
@@ -38,7 +38,7 @@ export class OrderJSON extends React.Component<OrderJSONProps, OrderJSONState> {
// tslint:disable-next-line:no-floating-promises
this._setShareLinkAsync();
}
- public render() {
+ public render(): React.ReactNode {
const order = utils.generateOrder(
this.props.exchangeContractIfExists,
this.props.sideToAssetToken,
@@ -116,11 +116,11 @@ export class OrderJSON extends React.Component<OrderJSONProps, OrderJSONState> {
</div>
);
}
- private async _shareViaTwitterAsync() {
+ private _shareViaTwitterAsync(): void {
const tweetText = encodeURIComponent(`Fill my order using the 0x protocol: ${this.state.shareLink}`);
window.open(`https://twitter.com/intent/tweet?text=${tweetText}`, 'Share your order', 'width=500,height=400');
}
- private async _shareViaFacebook() {
+ private _shareViaFacebook(): void {
(window as any).FB.ui(
{
display: 'popup',
@@ -130,14 +130,14 @@ export class OrderJSON extends React.Component<OrderJSONProps, OrderJSONState> {
_.noop,
);
}
- private async _shareViaEmailAsync() {
+ private _shareViaEmailAsync(): void {
const encodedSubject = encodeURIComponent("Let's trade using the 0x protocol");
const encodedBody = encodeURIComponent(`I generated an order with the 0x protocol.
You can see and fill it here: ${this.state.shareLink}`);
const mailToLink = `mailto:mail@example.org?subject=${encodedSubject}&body=${encodedBody}`;
window.open(mailToLink, '_blank');
}
- private async _setShareLinkAsync() {
+ private async _setShareLinkAsync(): Promise<void> {
const shareLink = await this._generateShareLinkAsync();
this.setState({
shareLink,
@@ -159,7 +159,7 @@ You can see and fill it here: ${this.state.shareLink}`);
}
return bodyObj.data.url;
}
- private _getOrderUrl() {
+ private _getOrderUrl(): string {
const order = utils.generateOrder(
this.props.exchangeContractIfExists,
this.props.sideToAssetToken,
diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx
index 4cbc65ce4..e572b7911 100644
--- a/packages/website/ts/components/portal/portal.tsx
+++ b/packages/website/ts/components/portal/portal.tsx
@@ -102,14 +102,14 @@ export class Portal extends React.Component<PortalProps, PortalState> {
isLedgerDialogOpen: false,
};
}
- public componentDidMount() {
+ public componentDidMount(): void {
window.addEventListener('resize', this._throttledScreenWidthUpdate);
window.scrollTo(0, 0);
}
- public componentWillMount() {
+ public componentWillMount(): void {
this._blockchain = new Blockchain(this.props.dispatcher);
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
this._blockchain.destroy();
window.removeEventListener('resize', this._throttledScreenWidthUpdate);
// We re-set the entire redux state when the portal is unmounted so that when it is re-rendered
@@ -118,7 +118,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
// become disconnected from their backing Ethereum node, changed user accounts, etc...)
this.props.dispatcher.resetState();
}
- public componentWillReceiveProps(nextProps: PortalProps) {
+ public componentWillReceiveProps(nextProps: PortalProps): void {
if (nextProps.networkId !== this.state.prevNetworkId) {
// tslint:disable-next-line:no-floating-promises
this._blockchain.networkIdUpdatedFireAndForgetAsync(nextProps.networkId);
@@ -144,7 +144,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
});
}
}
- public render() {
+ public render(): React.ReactNode {
const updateShouldBlockchainErrDialogBeOpen = this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen.bind(
this.props.dispatcher,
);
@@ -241,7 +241,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
</div>
);
}
- private _onTokenChosen(tokenAddress: string) {
+ private _onTokenChosen(tokenAddress: string): void {
if (_.isEmpty(tokenAddress)) {
this.setState({
tokenManagementState: TokenManagementState.None,
@@ -269,28 +269,28 @@ export class Portal extends React.Component<PortalProps, PortalState> {
tokenManagementState: TokenManagementState.None,
});
}
- private _onToggleLedgerDialog() {
+ private _onToggleLedgerDialog(): void {
this.setState({
isLedgerDialogOpen: !this.state.isLedgerDialogOpen,
});
}
- private _onAddToken() {
+ private _onAddToken(): void {
this.setState({
tokenManagementState: TokenManagementState.Add,
});
}
- private _onRemoveToken() {
+ private _onRemoveToken(): void {
this.setState({
tokenManagementState: TokenManagementState.Remove,
});
}
- private _onPortalDisclaimerAccepted() {
+ private _onPortalDisclaimerAccepted(): void {
localStorage.setItem(constants.LOCAL_STORAGE_KEY_ACCEPT_DISCLAIMER, 'set');
this.setState({
isDisclaimerDialogOpen: false,
});
}
- private _updateScreenWidth() {
+ private _updateScreenWidth(): void {
const newScreenWidth = utils.getScreenWidth();
this.props.dispatcher.updateScreenWidth(newScreenWidth);
}
diff --git a/packages/website/ts/components/redirecter.tsx b/packages/website/ts/components/redirecter.tsx
index 2e705af58..629522bbb 100644
--- a/packages/website/ts/components/redirecter.tsx
+++ b/packages/website/ts/components/redirecter.tsx
@@ -5,6 +5,6 @@ interface RedirecterProps {
location: string;
}
-export function Redirecter(props: RedirecterProps) {
+export function Redirecter(props: RedirecterProps): void {
window.location.href = constants.URL_ANGELLIST;
}
diff --git a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx
index d88a59d15..5964dcd56 100644
--- a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx
+++ b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx
@@ -47,7 +47,7 @@ const styles: Styles = {
width: '100%',
boxSizing: 'border-box',
},
- dailyTradeVolumeLabel: {
+ weeklyTradeVolumeLabel: {
fontSize: 14,
color: colors.mediumBlue,
},
@@ -80,9 +80,9 @@ export const RelayerGridTile: React.StatelessComponent<RelayerGridTileProps> = (
<div className="py1" style={styles.relayerNameLabel}>
{props.relayerInfo.name}
</div>
- <div style={styles.dailyTradeVolumeLabel}>{props.relayerInfo.dailyTxnVolume}</div>
+ <div style={styles.weeklyTradeVolumeLabel}>{props.relayerInfo.weeklyTxnVolume}</div>
<div className="py1" style={styles.subLabel}>
- Daily Trade Volume
+ Weekly Trade Volume
</div>
<TopTokens tokens={props.relayerInfo.topTokens} networkId={props.networkId} />
<div className="py1" style={styles.subLabel}>
@@ -109,14 +109,14 @@ class ImgWithFallback extends React.Component<ImgWithFallbackProps, ImgWithFallb
imageLoadFailed: false,
};
}
- public render() {
+ public render(): React.ReactNode {
if (this.state.imageLoadFailed || _.isUndefined(this.props.src)) {
return <img src={this.props.fallbackSrc} style={this.props.style} />;
} else {
return <img src={this.props.src} onError={this._onError.bind(this)} style={this.props.style} />;
}
}
- private _onError() {
+ private _onError(): void {
this.setState({
imageLoadFailed: true,
});
diff --git a/packages/website/ts/components/relayer_index/relayer_index.tsx b/packages/website/ts/components/relayer_index/relayer_index.tsx
index dffd0f83f..d4fd6aeaf 100644
--- a/packages/website/ts/components/relayer_index/relayer_index.tsx
+++ b/packages/website/ts/components/relayer_index/relayer_index.tsx
@@ -48,14 +48,14 @@ export class RelayerIndex extends React.Component<RelayerIndexProps, RelayerInde
error: undefined,
};
}
- public componentWillMount() {
+ public componentWillMount(): void {
// tslint:disable-next-line:no-floating-promises
this._fetchRelayerInfosAsync();
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
this._isUnmounted = true;
}
- public render() {
+ public render(): React.ReactNode {
const readyToRender = _.isUndefined(this.state.error) && !_.isUndefined(this.state.relayerInfos);
if (!readyToRender) {
return (
diff --git a/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx b/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx
index db4d3a211..03c70c9dd 100644
--- a/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx
+++ b/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx
@@ -26,21 +26,54 @@ export const TopTokens: React.StatelessComponent<TopTokensProps> = (props: TopTo
{_.map(props.tokens, (tokenInfo: WebsiteBackendTokenInfo, index: number) => {
const firstItemStyle = { ...styles.tokenLabel, ...styles.followingTokenLabel };
const style = index !== 0 ? firstItemStyle : styles.tokenLabel;
- return (
- <a
- key={tokenInfo.address}
- href={tokenLinkFromToken(tokenInfo, props.networkId)}
- target="_blank"
- style={style}
- >
- {tokenInfo.symbol}
- </a>
- );
+ return <TokenLink tokenInfo={tokenInfo} style={style} networkId={props.networkId} />;
})}
</div>
);
};
-function tokenLinkFromToken(tokenInfo: WebsiteBackendTokenInfo, networkId: number) {
+interface TokenLinkProps {
+ tokenInfo: WebsiteBackendTokenInfo;
+ style: React.CSSProperties;
+ networkId: number;
+}
+interface TokenLinkState {
+ isHovering: boolean;
+}
+
+class TokenLink extends React.Component<TokenLinkProps, TokenLinkState> {
+ constructor(props: TokenLinkProps) {
+ super(props);
+ this.state = {
+ isHovering: false,
+ };
+ }
+ public render(): React.ReactNode {
+ const style = {
+ ...this.props.style,
+ cursor: 'pointer',
+ opacity: this.state.isHovering ? 0.5 : 1,
+ };
+ return (
+ <a
+ key={this.props.tokenInfo.address}
+ href={tokenLinkFromToken(this.props.tokenInfo, this.props.networkId)}
+ target="_blank"
+ style={style}
+ onMouseEnter={this._onToggleHover.bind(this, true)}
+ onMouseLeave={this._onToggleHover.bind(this, false)}
+ >
+ {this.props.tokenInfo.symbol}
+ </a>
+ );
+ }
+ private _onToggleHover(isHovering: boolean): void {
+ this.setState({
+ isHovering,
+ });
+ }
+}
+
+function tokenLinkFromToken(tokenInfo: WebsiteBackendTokenInfo, networkId: number): string {
return sharedUtils.getEtherScanLinkIfExists(tokenInfo.address, networkId, EtherscanLinkSuffixes.Address);
}
diff --git a/packages/website/ts/components/send_button.tsx b/packages/website/ts/components/send_button.tsx
index 79c103e05..8486dbd8b 100644
--- a/packages/website/ts/components/send_button.tsx
+++ b/packages/website/ts/components/send_button.tsx
@@ -33,7 +33,7 @@ export class SendButton extends React.Component<SendButtonProps, SendButtonState
isSending: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const labelStyle = this.state.isSending ? { fontSize: 10 } : {};
return (
<div>
@@ -57,12 +57,12 @@ export class SendButton extends React.Component<SendButtonProps, SendButtonState
</div>
);
}
- private _toggleSendDialog() {
+ private _toggleSendDialog(): void {
this.setState({
isSendDialogVisible: !this.state.isSendDialogVisible,
});
}
- private async _onSendAmountSelectedAsync(recipient: string, value: BigNumber) {
+ private async _onSendAmountSelectedAsync(recipient: string, value: BigNumber): Promise<void> {
this.setState({
isSending: true,
});
diff --git a/packages/website/ts/components/sidebar_header.tsx b/packages/website/ts/components/sidebar_header.tsx
index a0ea869fb..bf46caad9 100644
--- a/packages/website/ts/components/sidebar_header.tsx
+++ b/packages/website/ts/components/sidebar_header.tsx
@@ -12,7 +12,7 @@ interface SidebarHeaderProps {
interface SidebarHeaderState {}
export class SidebarHeader extends React.Component<SidebarHeaderProps, SidebarHeaderState> {
- public render() {
+ public render(): React.ReactNode {
return (
<div className="pt2 md-px1 sm-px2" style={{ color: colors.black, paddingBottom: 18 }}>
<div className="flex" style={{ fontSize: 25 }}>
diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx
index 618b5fe8f..83948e5c2 100644
--- a/packages/website/ts/components/token_balances.tsx
+++ b/packages/website/ts/components/token_balances.tsx
@@ -99,15 +99,15 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
trackedTokenStateByAddress: initialTrackedTokenStateByAddress,
};
}
- public componentWillMount() {
+ public componentWillMount(): void {
const trackedTokenAddresses = _.keys(this.state.trackedTokenStateByAddress);
// tslint:disable-next-line:no-floating-promises
this._fetchBalancesAndAllowancesAsync(trackedTokenAddresses);
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
this._isUnmounted = true;
}
- public componentWillReceiveProps(nextProps: TokenBalancesProps) {
+ public componentWillReceiveProps(nextProps: TokenBalancesProps): void {
if (nextProps.userEtherBalanceInWei !== this.props.userEtherBalanceInWei) {
if (this.state.isBalanceSpinnerVisible) {
const receivedAmountInWei = nextProps.userEtherBalanceInWei.minus(this.props.userEtherBalanceInWei);
@@ -153,10 +153,10 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
this._fetchBalancesAndAllowancesAsync(newTokenAddresses);
}
}
- public componentDidMount() {
+ public componentDidMount(): void {
window.scrollTo(0, 0);
}
- public render() {
+ public render(): React.ReactNode {
const errorDialogActions = [
<FlatButton
key="errorOkBtn"
@@ -294,7 +294,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
</div>
);
}
- private _renderTokenTableRows() {
+ private _renderTokenTableRows(): React.ReactNode {
if (!this.props.blockchainIsLoaded || this.props.blockchainErr !== BlockchainErrs.NoError) {
return '';
}
@@ -313,7 +313,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
);
return tableRows;
}
- private _renderTokenRow(tokenColSpan: number, actionPaddingX: number, token: Token) {
+ private _renderTokenRow(tokenColSpan: number, actionPaddingX: number, token: Token): React.ReactNode {
const tokenState = this.state.trackedTokenStateByAddress[token.address];
const tokenLink = sharedUtils.getEtherScanLinkIfExists(
token.address,
@@ -411,7 +411,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
</TableRow>
);
}
- private _onAssetTokenPicked(tokenAddress: string) {
+ private _onAssetTokenPicked(tokenAddress: string): void {
if (_.isEmpty(tokenAddress)) {
this.setState({
isTokenPickerOpen: false,
@@ -439,16 +439,16 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
isTokenPickerOpen: false,
});
}
- private _onSendFailed() {
+ private _onSendFailed(): void {
this.setState({
errorType: BalanceErrs.sendFailed,
});
}
- private _renderAmount(amount: BigNumber, decimals: number) {
+ private _renderAmount(amount: BigNumber, decimals: number): React.ReactNode {
const unitAmount = ZeroEx.toUnitAmount(amount, decimals);
return unitAmount.toNumber().toFixed(configs.AMOUNT_DISPLAY_PRECSION);
}
- private _renderTokenName(token: Token) {
+ private _renderTokenName(token: Token): React.ReactNode {
const tooltipId = `tooltip-${token.address}`;
return (
<div className="flex">
@@ -460,7 +460,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
</div>
);
}
- private _renderErrorDialogBody() {
+ private _renderErrorDialogBody(): React.ReactNode {
switch (this.state.errorType) {
case BalanceErrs.incorrectNetworkForFaucet:
return (
@@ -499,7 +499,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
throw utils.spawnSwitchErr('errorType', this.state.errorType);
}
}
- private _onErrorOccurred(errorType: BalanceErrs) {
+ private _onErrorOccurred(errorType: BalanceErrs): void {
this.setState({
errorType,
});
@@ -577,24 +577,24 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
}
return true;
}
- private _onErrorDialogToggle(isOpen: boolean) {
+ private _onErrorDialogToggle(isOpen: boolean): void {
this.setState({
errorType: undefined,
});
}
- private _onAddTokenClicked() {
+ private _onAddTokenClicked(): void {
this.setState({
isTokenPickerOpen: true,
isAddingToken: true,
});
}
- private _onRemoveTokenClicked() {
+ private _onRemoveTokenClicked(): void {
this.setState({
isTokenPickerOpen: true,
isAddingToken: false,
});
}
- private async _startPollingZrxBalanceAsync() {
+ private async _startPollingZrxBalanceAsync(): Promise<void> {
const tokens = _.values(this.props.tokenByAddress);
const zrxToken = _.find(tokens, t => t.symbol === ZRX_TOKEN_SYMBOL);
@@ -609,7 +609,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
isZRXSpinnerVisible: false,
});
}
- private async _fetchBalancesAndAllowancesAsync(tokenAddresses: string[]) {
+ private async _fetchBalancesAndAllowancesAsync(tokenAddresses: string[]): Promise<void> {
const trackedTokenStateByAddress = this.state.trackedTokenStateByAddress;
const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
for (const tokenAddress of tokenAddresses) {
@@ -629,7 +629,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
});
}
}
- private _getInitialTrackedTokenStateByAddress(trackedTokens: Token[]) {
+ private _getInitialTrackedTokenStateByAddress(trackedTokens: Token[]): TokenStateByAddress {
const trackedTokenStateByAddress: TokenStateByAddress = {};
_.each(trackedTokens, token => {
trackedTokenStateByAddress[token.address] = {
@@ -640,7 +640,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
});
return trackedTokenStateByAddress;
}
- private async _refetchTokenStateAsync(tokenAddress: string) {
+ private async _refetchTokenStateAsync(tokenAddress: string): Promise<void> {
const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
const [balance, allowance] = await this.props.blockchain.getTokenBalanceAndAllowanceAsync(
userAddressIfExists,
diff --git a/packages/website/ts/components/top_bar/provider_display.tsx b/packages/website/ts/components/top_bar/provider_display.tsx
index dc6ade841..bebaa5341 100644
--- a/packages/website/ts/components/top_bar/provider_display.tsx
+++ b/packages/website/ts/components/top_bar/provider_display.tsx
@@ -35,7 +35,7 @@ const styles: Styles = {
};
export class ProviderDisplay extends React.Component<ProviderDisplayProps, ProviderDisplayState> {
- public render() {
+ public render(): React.ReactNode {
const isAddressAvailable = !_.isEmpty(this.props.userAddress);
const isExternallyInjectedProvider =
this.props.providerType === ProviderType.Injected && this.props.injectedProviderName !== '0x Public';
@@ -83,7 +83,7 @@ export class ProviderDisplay extends React.Component<ProviderDisplayProps, Provi
</div>
);
}
- public renderPopoverContent(hasInjectedProvider: boolean, hasLedgerProvider: boolean) {
+ public renderPopoverContent(hasInjectedProvider: boolean, hasLedgerProvider: boolean): React.ReactNode {
if (hasInjectedProvider || hasLedgerProvider) {
return (
<ProviderPicker
diff --git a/packages/website/ts/components/top_bar/provider_picker.tsx b/packages/website/ts/components/top_bar/provider_picker.tsx
index b986da873..1ecb8389c 100644
--- a/packages/website/ts/components/top_bar/provider_picker.tsx
+++ b/packages/website/ts/components/top_bar/provider_picker.tsx
@@ -19,7 +19,7 @@ interface ProviderPickerProps {
interface ProviderPickerState {}
export class ProviderPicker extends React.Component<ProviderPickerProps, ProviderPickerState> {
- public render() {
+ public render(): React.ReactNode {
const isLedgerSelected = this.props.providerType === ProviderType.Ledger;
const menuStyle = {
padding: 10,
@@ -46,7 +46,7 @@ export class ProviderPicker extends React.Component<ProviderPickerProps, Provide
</div>
);
}
- private _renderLabel(title: string, shouldShowNetwork: boolean) {
+ private _renderLabel(title: string, shouldShowNetwork: boolean): React.ReactNode {
const label = (
<div className="flex">
<div style={{ fontSize: 14 }}>{title}</div>
@@ -55,7 +55,7 @@ export class ProviderPicker extends React.Component<ProviderPickerProps, Provide
);
return label;
}
- private _renderNetwork() {
+ private _renderNetwork(): React.ReactNode {
const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
return (
<div className="flex" style={{ marginTop: 1 }}>
@@ -70,7 +70,7 @@ export class ProviderPicker extends React.Component<ProviderPickerProps, Provide
</div>
);
}
- private _onProviderRadioChanged(value: string) {
+ private _onProviderRadioChanged(value: string): void {
if (value === ProviderType.Ledger) {
this.props.onToggleLedgerDialog();
} else {
diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx
index 5a1b50310..5fde007d6 100644
--- a/packages/website/ts/components/top_bar/top_bar.tsx
+++ b/packages/website/ts/components/top_bar/top_bar.tsx
@@ -83,7 +83,7 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
style: {},
isNightVersion: false,
};
- public static heightForDisplayType(displayType: TopBarDisplayType) {
+ public static heightForDisplayType(displayType: TopBarDisplayType): number {
const result = displayType === TopBarDisplayType.Expanded ? EXPANDED_HEIGHT : DEFAULT_HEIGHT;
return result + 1;
}
@@ -93,7 +93,7 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
isDrawerOpen: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const isNightVersion = this.props.isNightVersion;
const isExpandedDisplayType = this.props.displayType === TopBarDisplayType.Expanded;
const parentClassNames = `flex mx-auto ${isExpandedDisplayType ? 'pl3 py1' : 'max-width-4'}`;
@@ -278,7 +278,7 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
</div>
);
}
- private _renderDrawer() {
+ private _renderDrawer(): React.ReactNode {
return (
<Drawer
open={this.state.isDrawerOpen}
@@ -447,51 +447,51 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
</div>
);
}
- private _onMenuButtonClick() {
+ private _onMenuButtonClick(): void {
this.setState({
isDrawerOpen: !this.state.isDrawerOpen,
});
}
- private _isViewingPortal() {
+ private _isViewingPortal(): boolean {
return _.includes(this.props.location.pathname, WebsitePaths.Portal);
}
- private _isViewingFAQ() {
+ private _isViewingFAQ(): boolean {
return _.includes(this.props.location.pathname, WebsitePaths.FAQ);
}
- private _isViewing0xjsDocs() {
+ private _isViewing0xjsDocs(): boolean {
return (
_.includes(this.props.location.pathname, WebsitePaths.ZeroExJs) ||
_.includes(this.props.location.pathname, WebsiteLegacyPaths.ZeroExJs)
);
}
- private _isViewingConnectDocs() {
+ private _isViewingConnectDocs(): boolean {
return _.includes(this.props.location.pathname, WebsitePaths.Connect);
}
- private _isViewingSmartContractsDocs() {
+ private _isViewingSmartContractsDocs(): boolean {
return _.includes(this.props.location.pathname, WebsitePaths.SmartContracts);
}
- private _isViewingWeb3WrapperDocs() {
+ private _isViewingWeb3WrapperDocs(): boolean {
return (
_.includes(this.props.location.pathname, WebsitePaths.Web3Wrapper) ||
_.includes(this.props.location.pathname, WebsiteLegacyPaths.Web3Wrapper)
);
}
- private _isViewingSolCompilerDocs() {
+ private _isViewingSolCompilerDocs(): boolean {
return _.includes(this.props.location.pathname, WebsitePaths.SolCompiler);
}
- private _isViewingJsonSchemasDocs() {
+ private _isViewingJsonSchemasDocs(): boolean {
return _.includes(this.props.location.pathname, WebsitePaths.JSONSchemas);
}
- private _isViewingSolCovDocs() {
+ private _isViewingSolCovDocs(): boolean {
return _.includes(this.props.location.pathname, WebsitePaths.SolCov);
}
- private _isViewingSubprovidersDocs() {
+ private _isViewingSubprovidersDocs(): boolean {
return _.includes(this.props.location.pathname, WebsitePaths.Subproviders);
}
- private _isViewingWiki() {
+ private _isViewingWiki(): boolean {
return _.includes(this.props.location.pathname, WebsitePaths.Wiki);
}
- private _shouldDisplayBottomBar() {
+ private _shouldDisplayBottomBar(): boolean {
return (
this._isViewingWiki() ||
this._isViewing0xjsDocs() ||
diff --git a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx
index c0e674b17..2e4254cfa 100644
--- a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx
+++ b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx
@@ -26,7 +26,7 @@ export class TopBarMenuItem extends React.Component<TopBarMenuItemProps, TopBarM
className: '',
isNightVersion: false,
};
- public render() {
+ public render(): React.ReactNode {
const primaryStyles = this.props.isPrimary
? {
borderRadius: 4,
diff --git a/packages/website/ts/components/track_token_confirmation.tsx b/packages/website/ts/components/track_token_confirmation.tsx
index 8c5ba7e6f..294fb8590 100644
--- a/packages/website/ts/components/track_token_confirmation.tsx
+++ b/packages/website/ts/components/track_token_confirmation.tsx
@@ -15,7 +15,7 @@ interface TrackTokenConfirmationProps {
interface TrackTokenConfirmationState {}
export class TrackTokenConfirmation extends React.Component<TrackTokenConfirmationProps, TrackTokenConfirmationState> {
- public render() {
+ public render(): React.ReactNode {
const isMultipleTokens = this.props.tokens.length > 1;
const allTokens = _.values(this.props.tokenByAddress);
return (
diff --git a/packages/website/ts/components/trade_history/trade_history.tsx b/packages/website/ts/components/trade_history/trade_history.tsx
index 635358627..1ca9d866f 100644
--- a/packages/website/ts/components/trade_history/trade_history.tsx
+++ b/packages/website/ts/components/trade_history/trade_history.tsx
@@ -28,16 +28,16 @@ export class TradeHistory extends React.Component<TradeHistoryProps, TradeHistor
sortedFills,
};
}
- public componentWillMount() {
+ public componentWillMount(): void {
this._startPollingForFills();
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
this._stopPollingForFills();
}
- public componentDidMount() {
+ public componentDidMount(): void {
window.scrollTo(0, 0);
}
- public render() {
+ public render(): React.ReactNode {
return (
<div className="lg-px4 md-px4 sm-px2">
<h3>Trade history</h3>
@@ -48,7 +48,7 @@ export class TradeHistory extends React.Component<TradeHistoryProps, TradeHistor
</div>
);
}
- private _renderTrades() {
+ private _renderTrades(): React.ReactNode {
const numNonCustomFills = this._numFillsWithoutCustomERC20Tokens();
if (numNonCustomFills === 0) {
return this._renderEmptyNotice();
@@ -66,14 +66,14 @@ export class TradeHistory extends React.Component<TradeHistoryProps, TradeHistor
);
});
}
- private _renderEmptyNotice() {
+ private _renderEmptyNotice(): React.ReactNode {
return (
<Paper className="mt1 p2 mx-auto center" style={{ width: '80%' }}>
No filled orders yet.
</Paper>
);
}
- private _numFillsWithoutCustomERC20Tokens() {
+ private _numFillsWithoutCustomERC20Tokens(): number {
let numNonCustomFills = 0;
const tokens = _.values(this.props.tokenByAddress);
_.each(this.state.sortedFills, fill => {
@@ -93,7 +93,7 @@ export class TradeHistory extends React.Component<TradeHistoryProps, TradeHistor
});
return numNonCustomFills;
}
- private _startPollingForFills() {
+ private _startPollingForFills(): void {
this._fillPollingIntervalId = window.setInterval(() => {
const sortedFills = this._getSortedFills();
if (!utils.deepEqual(sortedFills, this.state.sortedFills)) {
@@ -103,10 +103,10 @@ export class TradeHistory extends React.Component<TradeHistoryProps, TradeHistor
}
}, FILL_POLLING_INTERVAL);
}
- private _stopPollingForFills() {
+ private _stopPollingForFills(): void {
clearInterval(this._fillPollingIntervalId);
}
- private _getSortedFills() {
+ private _getSortedFills(): Fill[] {
const fillsByHash = tradeHistoryStorage.getUserFillsByHash(this.props.userAddress, this.props.networkId);
const fills = _.values(fillsByHash);
const sortedFills = _.sortBy(fills, [(fill: Fill) => fill.blockTimestamp * -1]);
diff --git a/packages/website/ts/components/trade_history/trade_history_item.tsx b/packages/website/ts/components/trade_history/trade_history_item.tsx
index dbe72259b..adca4d58c 100644
--- a/packages/website/ts/components/trade_history/trade_history_item.tsx
+++ b/packages/website/ts/components/trade_history/trade_history_item.tsx
@@ -23,7 +23,7 @@ interface TradeHistoryItemProps {
interface TradeHistoryItemState {}
export class TradeHistoryItem extends React.Component<TradeHistoryItemProps, TradeHistoryItemState> {
- public render() {
+ public render(): React.ReactNode {
const fill = this.props.fill;
const tokens = _.values(this.props.tokenByAddress);
const takerToken = _.find(tokens, token => {
@@ -88,7 +88,7 @@ export class TradeHistoryItem extends React.Component<TradeHistoryItemProps, Tra
</Paper>
);
}
- private _renderAmounts(makerToken: Token, takerToken: Token) {
+ private _renderAmounts(makerToken: Token, takerToken: Token): React.ReactNode {
const fill = this.props.fill;
const filledTakerTokenAmountInUnits = ZeroEx.toUnitAmount(fill.filledTakerTokenAmount, takerToken.decimals);
const filledMakerTokenAmountInUnits = ZeroEx.toUnitAmount(fill.filledMakerTokenAmount, takerToken.decimals);
@@ -136,7 +136,7 @@ export class TradeHistoryItem extends React.Component<TradeHistoryItemProps, Tra
</div>
);
}
- private _renderDate() {
+ private _renderDate(): React.ReactNode {
const blockMoment = moment.unix(this.props.fill.blockTimestamp);
if (!blockMoment.isValid()) {
return null;
@@ -159,7 +159,7 @@ export class TradeHistoryItem extends React.Component<TradeHistoryItemProps, Tra
</div>
);
}
- private _renderAmount(amount: BigNumber, symbol: string, decimals: number) {
+ private _renderAmount(amount: BigNumber, symbol: string, decimals: number): React.ReactNode {
const unitAmount = ZeroEx.toUnitAmount(amount, decimals);
return (
<span>
diff --git a/packages/website/ts/components/ui/alert.tsx b/packages/website/ts/components/ui/alert.tsx
index f81939255..b571d8c1c 100644
--- a/packages/website/ts/components/ui/alert.tsx
+++ b/packages/website/ts/components/ui/alert.tsx
@@ -7,7 +7,7 @@ interface AlertProps {
message: string | React.ReactNode;
}
-export function Alert(props: AlertProps) {
+export const Alert = (props: AlertProps) => {
const isAlert = props.type === AlertTypes.ERROR;
const errMsgStyles = {
background: isAlert ? colors.red200 : colors.lightestGreen,
@@ -22,4 +22,4 @@ export function Alert(props: AlertProps) {
{props.message}
</div>
);
-}
+};
diff --git a/packages/website/ts/components/ui/copy_icon.tsx b/packages/website/ts/components/ui/copy_icon.tsx
index d58e50815..2c2941067 100644
--- a/packages/website/ts/components/ui/copy_icon.tsx
+++ b/packages/website/ts/components/ui/copy_icon.tsx
@@ -23,14 +23,14 @@ export class CopyIcon extends React.Component<CopyIconProps, CopyIconState> {
isHovering: false,
};
}
- public componentDidUpdate() {
+ public componentDidUpdate(): void {
// Remove tooltip if hover away
if (!this.state.isHovering && this._copyTooltipTimeoutId) {
clearInterval(this._copyTooltipTimeoutId);
this._hideTooltip();
}
}
- public render() {
+ public render(): React.ReactNode {
return (
<div className="inline-block">
<CopyToClipboard text={this.props.data} onCopy={this._onCopy.bind(this)}>
@@ -55,15 +55,15 @@ export class CopyIcon extends React.Component<CopyIconProps, CopyIconState> {
</div>
);
}
- private _setRefToProperty(el: HTMLInputElement) {
+ private _setRefToProperty(el: HTMLInputElement): void {
this._copyable = el;
}
- private _setHoverState(isHovering: boolean) {
+ private _setHoverState(isHovering: boolean): void {
this.setState({
isHovering,
});
}
- private _onCopy() {
+ private _onCopy(): void {
if (this._copyTooltipTimeoutId) {
clearInterval(this._copyTooltipTimeoutId);
}
@@ -73,7 +73,7 @@ export class CopyIcon extends React.Component<CopyIconProps, CopyIconState> {
this._hideTooltip();
}, tooltipLifespanMs);
}
- private _hideTooltip() {
+ private _hideTooltip(): void {
ReactTooltip.hide(ReactDOM.findDOMNode(this._copyable));
}
}
diff --git a/packages/website/ts/components/ui/drop_down.tsx b/packages/website/ts/components/ui/drop_down.tsx
index 63b9eec0b..98a495581 100644
--- a/packages/website/ts/components/ui/drop_down.tsx
+++ b/packages/website/ts/components/ui/drop_down.tsx
@@ -35,15 +35,15 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> {
isDropDownOpen: false,
};
}
- public componentDidMount() {
+ public componentDidMount(): void {
this._popoverCloseCheckIntervalId = window.setInterval(() => {
this._checkIfShouldClosePopover();
}, CHECK_CLOSE_POPOVER_INTERVAL_MS);
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
window.clearInterval(this._popoverCloseCheckIntervalId);
}
- public componentWillReceiveProps(nextProps: DropDownProps) {
+ public componentWillReceiveProps(nextProps: DropDownProps): void {
// HACK: If the popoverContent is updated to a different dimension and the users
// mouse is no longer above it, the dropdown can enter an inconsistent state where
// it believes the user is still hovering over it. In order to remedy this, we
@@ -52,7 +52,7 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> {
// dropdowns from having dynamic content.
this._onHoverOff();
}
- public render() {
+ public render(): React.ReactNode {
return (
<div
style={{ ...this.props.style, width: 'fit-content', height: '100%' }}
@@ -77,11 +77,11 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> {
</div>
);
}
- private _onHover(event: React.FormEvent<HTMLInputElement>) {
+ private _onHover(event: React.FormEvent<HTMLInputElement>): void {
this._isHovering = true;
this._checkIfShouldOpenPopover(event);
}
- private _checkIfShouldOpenPopover(event: React.FormEvent<HTMLInputElement>) {
+ private _checkIfShouldOpenPopover(event: React.FormEvent<HTMLInputElement>): void {
if (this.state.isDropDownOpen) {
return; // noop
}
@@ -91,16 +91,16 @@ export class DropDown extends React.Component<DropDownProps, DropDownState> {
anchorEl: event.currentTarget,
});
}
- private _onHoverOff() {
+ private _onHoverOff(): void {
this._isHovering = false;
}
- private _checkIfShouldClosePopover() {
+ private _checkIfShouldClosePopover(): void {
if (!this.state.isDropDownOpen || this._isHovering) {
return; // noop
}
this._closePopover();
}
- private _closePopover() {
+ private _closePopover(): void {
this.setState({
isDropDownOpen: false,
});
diff --git a/packages/website/ts/components/ui/etherscan_icon.tsx b/packages/website/ts/components/ui/etherscan_icon.tsx
index c1154d3d6..1b032c112 100644
--- a/packages/website/ts/components/ui/etherscan_icon.tsx
+++ b/packages/website/ts/components/ui/etherscan_icon.tsx
@@ -35,6 +35,6 @@ export const EtherScanIcon = (props: EtherScanIconProps) => {
);
};
-function renderIcon() {
+function renderIcon(): React.ReactNode {
return <i style={{ color: colors.amber600 }} className="zmdi zmdi-open-in-new" />;
}
diff --git a/packages/website/ts/components/ui/fake_text_field.tsx b/packages/website/ts/components/ui/fake_text_field.tsx
index 646ae98f6..ac3c30fec 100644
--- a/packages/website/ts/components/ui/fake_text_field.tsx
+++ b/packages/website/ts/components/ui/fake_text_field.tsx
@@ -21,7 +21,7 @@ interface FakeTextFieldProps {
children?: any;
}
-export function FakeTextField(props: FakeTextFieldProps) {
+export const FakeTextField = (props: FakeTextFieldProps) => {
return (
<div className="relative">
{props.label !== '' && <InputLabel text={props.label} />}
@@ -31,4 +31,4 @@ export function FakeTextField(props: FakeTextFieldProps) {
<hr style={styles.hr} />
</div>
);
-}
+};
diff --git a/packages/website/ts/components/ui/flash_message.tsx b/packages/website/ts/components/ui/flash_message.tsx
index 2cb1fc764..2b866676d 100644
--- a/packages/website/ts/components/ui/flash_message.tsx
+++ b/packages/website/ts/components/ui/flash_message.tsx
@@ -19,7 +19,7 @@ export class FlashMessage extends React.Component<FlashMessageProps, FlashMessag
showDurationMs: SHOW_DURATION_MS,
bodyStyle: {},
};
- public render() {
+ public render(): React.ReactNode {
if (!_.isUndefined(this.props.flashMessage)) {
return (
<Snackbar
@@ -34,7 +34,7 @@ export class FlashMessage extends React.Component<FlashMessageProps, FlashMessag
return null;
}
}
- private _onClose() {
+ private _onClose(): void {
this.props.dispatcher.hideFlashMessage();
}
}
diff --git a/packages/website/ts/components/ui/identicon.tsx b/packages/website/ts/components/ui/identicon.tsx
index bad6c2a78..83c86a144 100644
--- a/packages/website/ts/components/ui/identicon.tsx
+++ b/packages/website/ts/components/ui/identicon.tsx
@@ -15,7 +15,7 @@ export class Identicon extends React.Component<IdenticonProps, IdenticonState> {
public static defaultProps: Partial<IdenticonProps> = {
style: {},
};
- public render() {
+ public render(): React.ReactNode {
let address = this.props.address;
if (_.isEmpty(address)) {
address = constants.NULL_ADDRESS;
diff --git a/packages/website/ts/components/ui/lifecycle_raised_button.tsx b/packages/website/ts/components/ui/lifecycle_raised_button.tsx
index c85e11884..b06978f16 100644
--- a/packages/website/ts/components/ui/lifecycle_raised_button.tsx
+++ b/packages/website/ts/components/ui/lifecycle_raised_button.tsx
@@ -42,11 +42,11 @@ export class LifeCycleRaisedButton extends React.Component<LifeCycleRaisedButton
buttonState: ButtonState.READY,
};
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
clearTimeout(this._buttonTimeoutId);
this._didUnmount = true;
}
- public render() {
+ public render(): React.ReactNode {
if (this.props.isHidden) {
return <span />;
}
@@ -77,7 +77,7 @@ export class LifeCycleRaisedButton extends React.Component<LifeCycleRaisedButton
/>
);
}
- public async onClickAsync() {
+ public async onClickAsync(): Promise<void> {
this.setState({
buttonState: ButtonState.LOADING,
});
diff --git a/packages/website/ts/components/ui/menu_item.tsx b/packages/website/ts/components/ui/menu_item.tsx
index 3482f436c..64c0dc49d 100644
--- a/packages/website/ts/components/ui/menu_item.tsx
+++ b/packages/website/ts/components/ui/menu_item.tsx
@@ -24,7 +24,7 @@ export class MenuItem extends React.Component<MenuItemProps, MenuItemState> {
isHovering: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const menuItemStyles = {
cursor: 'pointer',
opacity: this.state.isHovering ? 0.5 : 1,
@@ -43,7 +43,7 @@ export class MenuItem extends React.Component<MenuItemProps, MenuItemState> {
</Link>
);
}
- private _onToggleHover(isHovering: boolean) {
+ private _onToggleHover(isHovering: boolean): void {
this.setState({
isHovering,
});
diff --git a/packages/website/ts/components/ui/party.tsx b/packages/website/ts/components/ui/party.tsx
index 3d94903d1..0d86a6db5 100644
--- a/packages/website/ts/components/ui/party.tsx
+++ b/packages/website/ts/components/ui/party.tsx
@@ -27,7 +27,7 @@ export class Party extends React.Component<PartyProps, PartyState> {
identiconStyle: {},
identiconDiameter: IDENTICON_DIAMETER,
};
- public render() {
+ public render(): React.ReactNode {
const label = this.props.label;
const address = this.props.address;
const identiconDiameter = this.props.identiconDiameter;
diff --git a/packages/website/ts/components/ui/swap_icon.tsx b/packages/website/ts/components/ui/swap_icon.tsx
index e465a8074..4a6000d1b 100644
--- a/packages/website/ts/components/ui/swap_icon.tsx
+++ b/packages/website/ts/components/ui/swap_icon.tsx
@@ -17,7 +17,7 @@ export class SwapIcon extends React.Component<SwapIconProps, SwapIconState> {
isHovering: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const swapStyles = {
color: this.state.isHovering ? colors.amber600 : colors.amber800,
fontSize: 50,
@@ -34,7 +34,7 @@ export class SwapIcon extends React.Component<SwapIconProps, SwapIconState> {
</div>
);
}
- private _onToggleHover(isHovering: boolean) {
+ private _onToggleHover(isHovering: boolean): void {
this.setState({
isHovering,
});
diff --git a/packages/website/ts/components/ui/token_icon.tsx b/packages/website/ts/components/ui/token_icon.tsx
index ff57a96de..a9ad567ef 100644
--- a/packages/website/ts/components/ui/token_icon.tsx
+++ b/packages/website/ts/components/ui/token_icon.tsx
@@ -11,7 +11,7 @@ interface TokenIconProps {
interface TokenIconState {}
export class TokenIcon extends React.Component<TokenIconProps, TokenIconState> {
- public render() {
+ public render(): React.ReactNode {
const token = this.props.token;
const diameter = this.props.diameter;
return (
diff --git a/packages/website/ts/components/visual_order.tsx b/packages/website/ts/components/visual_order.tsx
index 3bf464e92..76a283547 100644
--- a/packages/website/ts/components/visual_order.tsx
+++ b/packages/website/ts/components/visual_order.tsx
@@ -20,7 +20,7 @@ interface VisualOrderProps {
interface VisualOrderState {}
export class VisualOrder extends React.Component<VisualOrderProps, VisualOrderState> {
- public render() {
+ public render(): React.ReactNode {
const allTokens = _.values(this.props.tokenByAddress);
const makerImage = this.props.makerToken.iconUrl;
const takerImage = this.props.takerToken.iconUrl;
@@ -62,7 +62,7 @@ export class VisualOrder extends React.Component<VisualOrderProps, VisualOrderSt
</div>
);
}
- private _renderAmount(assetToken: AssetToken, token: Token) {
+ private _renderAmount(assetToken: AssetToken, token: Token): React.ReactNode {
const unitAmount = ZeroEx.toUnitAmount(assetToken.amount, token.decimals);
return (
<div style={{ fontSize: 13 }}>
diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 079c0e3b3..95f31582e 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -162,15 +162,15 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
isHoveringSidebar: false,
};
}
- public componentWillMount() {
+ public componentWillMount(): void {
const trackedTokenAddresses = _.keys(this.state.trackedTokenStateByAddress);
// tslint:disable-next-line:no-floating-promises
this._fetchBalancesAndAllowancesAsync(trackedTokenAddresses);
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
this._isUnmounted = true;
}
- public componentWillReceiveProps(nextProps: WalletProps) {
+ public componentWillReceiveProps(nextProps: WalletProps): void {
if (
nextProps.userAddress !== this.props.userAddress ||
nextProps.networkId !== this.props.networkId ||
@@ -196,11 +196,11 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
this._fetchBalancesAndAllowancesAsync(newTokenAddresses);
}
}
- public render() {
+ public render(): React.ReactNode {
const isReadyToRender = this.props.blockchainIsLoaded && this.props.blockchainErr === BlockchainErrs.NoError;
return <div style={styles.root}>{isReadyToRender && this._renderRows()}</div>;
}
- private _renderRows() {
+ private _renderRows(): React.ReactNode {
const isAddressAvailable = !_.isEmpty(this.props.userAddress);
return (
<List style={styles.list}>
@@ -210,7 +210,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
</List>
);
}
- private _renderDisconnectedHeaderRows() {
+ private _renderDisconnectedHeaderRows(): React.ReactElement<{}> {
const userAddress = this.props.userAddress;
const primaryText = 'wallet';
return (
@@ -223,7 +223,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
/>
);
}
- private _renderDisconnectedRows() {
+ private _renderDisconnectedRows(): React.ReactElement<{}> {
return (
<WalletDisconnectedItem
key={DISCONNECTED_ITEM_KEY}
@@ -233,7 +233,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
/>
);
}
- private _renderConnectedHeaderRows() {
+ private _renderConnectedHeaderRows(): React.ReactElement<{}> {
const userAddress = this.props.userAddress;
const primaryText = utils.getAddressBeginAndEnd(userAddress);
return (
@@ -246,7 +246,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
/>
);
}
- private _renderBody() {
+ private _renderBody(): React.ReactElement<{}> {
const bodyStyle: React.CSSProperties = {
...styles.bodyInnerDiv,
overflow: this.state.isHoveringSidebar ? 'auto' : 'hidden',
@@ -263,17 +263,17 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
</ListItem>
);
}
- private _onSidebarHover(event: React.FormEvent<HTMLInputElement>) {
+ private _onSidebarHover(event: React.FormEvent<HTMLInputElement>): void {
this.setState({
isHoveringSidebar: true,
});
}
- private _onSidebarHoverOff() {
+ private _onSidebarHoverOff(): void {
this.setState({
isHoveringSidebar: false,
});
}
- private _renderFooterRows() {
+ private _renderFooterRows(): React.ReactElement<{}> {
return (
<ListItem
key={FOOTER_ITEM_KEY}
@@ -302,7 +302,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
/>
);
}
- private _renderEthRows() {
+ private _renderEthRows(): React.ReactNode {
const primaryText = this._renderAmount(
this.props.userEtherBalanceInWei,
constants.DECIMAL_PLACES_ETH,
@@ -352,7 +352,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
</div>
);
}
- private _renderTokenRows() {
+ private _renderTokenRows(): React.ReactNode {
const trackedTokens = this.props.trackedTokens;
const trackedTokensStartingWithEtherToken = trackedTokens.sort(
firstBy((t: Token) => t.symbol !== ETHER_TOKEN_SYMBOL)
@@ -361,7 +361,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
);
return _.map(trackedTokensStartingWithEtherToken, this._renderTokenRow.bind(this));
}
- private _renderTokenRow(token: Token, index: number) {
+ private _renderTokenRow(token: Token, index: number): React.ReactNode {
const tokenState = this.state.trackedTokenStateByAddress[token.address];
const tokenLink = sharedUtils.getEtherScanLinkIfExists(
token.address,
@@ -415,7 +415,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
</div>
);
}
- private _renderAccessoryItems(config: AccessoryItemConfig) {
+ private _renderAccessoryItems(config: AccessoryItemConfig): React.ReactElement<{}> {
const shouldShowWrappedEtherAction = !_.isUndefined(config.wrappedEtherDirection);
const shouldShowToggle = !_.isUndefined(config.allowanceToggleConfig);
return (
@@ -431,7 +431,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
</div>
);
}
- private _renderAllowanceToggle(config: AllowanceToggleConfig) {
+ private _renderAllowanceToggle(config: AllowanceToggleConfig): React.ReactNode {
return (
<AllowanceToggle
networkId={this.props.networkId}
@@ -446,13 +446,13 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
/>
);
}
- private _renderAmount(amount: BigNumber, decimals: number, symbol: string) {
+ private _renderAmount(amount: BigNumber, decimals: number, symbol: string): React.ReactNode {
const unitAmount = ZeroEx.toUnitAmount(amount, decimals);
const formattedAmount = unitAmount.toPrecision(TOKEN_AMOUNT_DISPLAY_PRECISION);
const result = `${formattedAmount} ${symbol}`;
return <div style={styles.amountLabel}>{result}</div>;
}
- private _renderValue(amount: BigNumber, decimals: number, price?: BigNumber) {
+ private _renderValue(amount: BigNumber, decimals: number, price?: BigNumber): React.ReactNode {
if (_.isUndefined(price)) {
return null;
}
@@ -462,7 +462,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
const result = `$${formattedAmount}`;
return result;
}
- private _renderTokenIcon(token: Token, tokenLink?: string) {
+ private _renderTokenIcon(token: Token, tokenLink?: string): React.ReactElement<{}> {
const tooltipId = `tooltip-${token.address}`;
const tokenIcon = <TokenIcon token={token} diameter={ICON_DIMENSION} />;
if (_.isUndefined(tokenLink)) {
@@ -475,7 +475,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
);
}
}
- private _renderWrappedEtherButton(wrappedEtherDirection: Side) {
+ private _renderWrappedEtherButton(wrappedEtherDirection: Side): React.ReactNode {
const isWrappedEtherDirectionOpen = this.state.wrappedEtherDirection === wrappedEtherDirection;
let buttonLabel;
let buttonIcon;
@@ -510,7 +510,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
/>
);
}
- private _getInitialTrackedTokenStateByAddress(tokenAddresses: string[]) {
+ private _getInitialTrackedTokenStateByAddress(tokenAddresses: string[]): TokenStateByAddress {
const trackedTokenStateByAddress: TokenStateByAddress = {};
_.each(tokenAddresses, tokenAddress => {
trackedTokenStateByAddress[tokenAddress] = {
@@ -521,7 +521,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
});
return trackedTokenStateByAddress;
}
- private async _fetchBalancesAndAllowancesAsync(tokenAddresses: string[]) {
+ private async _fetchBalancesAndAllowancesAsync(tokenAddresses: string[]): Promise<void> {
const balanceAndAllowanceTupleByAddress: ItemByAddress<BigNumber[]> = {};
const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
for (const tokenAddress of tokenAddresses) {
@@ -554,7 +554,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
});
}
}
- private async _refetchTokenStateAsync(tokenAddress: string) {
+ private async _refetchTokenStateAsync(tokenAddress: string): Promise<void> {
await this._fetchBalancesAndAllowancesAsync([tokenAddress]);
}
private async _getPriceByAddressAsync(tokenAddresses: string[]): Promise<ItemByAddress<BigNumber>> {
@@ -584,17 +584,17 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
return {};
}
}
- private _openWrappedEtherActionRow(wrappedEtherDirection: Side) {
+ private _openWrappedEtherActionRow(wrappedEtherDirection: Side): void {
this.setState({
wrappedEtherDirection,
});
}
- private _closeWrappedEtherActionRow() {
+ private _closeWrappedEtherActionRow(): void {
this.setState({
wrappedEtherDirection: undefined,
});
}
- private _getEthToken() {
+ private _getEthToken(): Token {
const tokens = _.values(this.props.tokenByAddress);
const etherToken = _.find(tokens, { symbol: ETHER_TOKEN_SYMBOL });
return etherToken;
diff --git a/packages/website/ts/components/wallet/wrap_ether_item.tsx b/packages/website/ts/components/wallet/wrap_ether_item.tsx
index a38163770..2ed924bcd 100644
--- a/packages/website/ts/components/wallet/wrap_ether_item.tsx
+++ b/packages/website/ts/components/wallet/wrap_ether_item.tsx
@@ -64,7 +64,7 @@ export class WrapEtherItem extends React.Component<WrapEtherItemProps, WrapEther
isEthConversionHappening: false,
};
}
- public render() {
+ public render(): React.ReactNode {
const etherBalanceInEth = ZeroEx.toUnitAmount(this.props.userEtherBalanceInWei, constants.DECIMAL_PLACES_ETH);
const isWrappingEth = this.props.direction === Side.Deposit;
const topLabelText = isWrappingEth ? 'Convert ETH into WETH 1:1' : 'Convert WETH into ETH 1:1';
@@ -116,20 +116,20 @@ export class WrapEtherItem extends React.Component<WrapEtherItemProps, WrapEther
/>
);
}
- private _onValueChange(isValid: boolean, amount?: BigNumber) {
+ private _onValueChange(isValid: boolean, amount?: BigNumber): void {
this.setState({
currentInputAmount: amount,
currentInputHasErrors: !isValid,
});
}
- private _renderIsEthConversionHappeningSpinner() {
+ private _renderIsEthConversionHappeningSpinner(): React.ReactElement<{}> {
return this.state.isEthConversionHappening ? (
<div className="pl1" style={{ paddingTop: 10 }}>
<i className="zmdi zmdi-spinner zmdi-hc-spin" />
</div>
) : null;
}
- private _renderWrapEtherConfirmationButton() {
+ private _renderWrapEtherConfirmationButton(): React.ReactElement<{}> {
const isWrappingEth = this.props.direction === Side.Deposit;
const labelText = isWrappingEth ? 'wrap' : 'unwrap';
return (
@@ -138,13 +138,13 @@ export class WrapEtherItem extends React.Component<WrapEtherItemProps, WrapEther
backgroundColor={colors.wrapEtherConfirmationButton}
label={labelText}
labelStyle={styles.wrapEtherConfirmationButtonLabel}
- onClick={this._wrapEtherConfirmationAction.bind(this)}
+ onClick={this._wrapEtherConfirmationActionAsync.bind(this)}
disabled={this.state.isEthConversionHappening}
/>
</div>
);
}
- private async _wrapEtherConfirmationAction() {
+ private async _wrapEtherConfirmationActionAsync(): Promise<void> {
this.setState({
isEthConversionHappening: true,
});
diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx
index 49bcdeaac..f255f81e7 100644
--- a/packages/website/ts/index.tsx
+++ b/packages/website/ts/index.tsx
@@ -35,7 +35,7 @@ import 'less/all.less';
// At the same time webpack statically parses for System.import() to determine bundle chunk split points
// so each lazy import needs it's own `System.import()` declaration.
const LazyPortal =
- utils.isDevelopment() || utils.isStaging()
+ utils.isDevelopment() || utils.isStaging() || utils.isDogfood()
? createLazyComponent('Portal', async () =>
System.import<any>(/* webpackChunkName: "portal" */ 'ts/containers/portal'),
)
diff --git a/packages/website/ts/lazy_component.tsx b/packages/website/ts/lazy_component.tsx
index 48800c2dd..dce06ed8d 100644
--- a/packages/website/ts/lazy_component.tsx
+++ b/packages/website/ts/lazy_component.tsx
@@ -21,22 +21,22 @@ export class LazyComponent extends React.Component<LazyComponentProps, LazyCompo
component: undefined,
};
}
- public componentWillMount() {
+ public componentWillMount(): void {
// tslint:disable-next-line:no-floating-promises
this._loadComponentFireAndForgetAsync(this.props);
}
- public componentWillReceiveProps(nextProps: LazyComponentProps) {
+ public componentWillReceiveProps(nextProps: LazyComponentProps): void {
if (nextProps.reactComponentPromise !== this.props.reactComponentPromise) {
// tslint:disable-next-line:no-floating-promises
this._loadComponentFireAndForgetAsync(nextProps);
}
}
- public render() {
+ public render(): React.ReactNode {
return _.isUndefined(this.state.component)
? null
: React.createElement(this.state.component, this.props.reactComponentProps);
}
- private async _loadComponentFireAndForgetAsync(props: LazyComponentProps) {
+ private async _loadComponentFireAndForgetAsync(props: LazyComponentProps): Promise<void> {
const component = await props.reactComponentPromise;
this.setState({
component,
diff --git a/packages/website/ts/local_storage/local_storage.ts b/packages/website/ts/local_storage/local_storage.ts
index d94e6877b..20a533a91 100644
--- a/packages/website/ts/local_storage/local_storage.ts
+++ b/packages/website/ts/local_storage/local_storage.ts
@@ -1,7 +1,7 @@
import * as _ from 'lodash';
export const localStorage = {
- doesExist() {
+ doesExist(): boolean {
return !!window.localStorage;
},
getItemIfExists(key: string): string {
@@ -14,13 +14,13 @@ export const localStorage = {
}
return item;
},
- setItem(key: string, value: string) {
+ setItem(key: string, value: string): void {
if (!this.doesExist || _.isUndefined(value)) {
return;
}
window.localStorage.setItem(key, value);
},
- removeItem(key: string) {
+ removeItem(key: string): void {
if (!this.doesExist) {
return;
}
diff --git a/packages/website/ts/local_storage/trade_history_storage.tsx b/packages/website/ts/local_storage/trade_history_storage.tsx
index df731236e..cc764d98e 100644
--- a/packages/website/ts/local_storage/trade_history_storage.tsx
+++ b/packages/website/ts/local_storage/trade_history_storage.tsx
@@ -14,7 +14,7 @@ export const tradeHistoryStorage = {
// Clear all fill related localStorage if we've updated the config variable in an update
// that introduced a backward incompatible change requiring the user to re-fetch the fills from
// the blockchain
- clearIfRequired() {
+ clearIfRequired(): void {
const lastClearFillDate = localStorage.getItemIfExists(FILL_CLEAR_KEY);
if (lastClearFillDate !== configs.LAST_LOCAL_STORAGE_FILL_CLEARANCE_DATE) {
const localStorageKeys = localStorage.getAllKeys();
@@ -26,7 +26,7 @@ export const tradeHistoryStorage = {
}
localStorage.setItem(FILL_CLEAR_KEY, configs.LAST_LOCAL_STORAGE_FILL_CLEARANCE_DATE);
},
- addFillToUser(userAddress: string, networkId: number, fill: Fill) {
+ addFillToUser(userAddress: string, networkId: number, fill: Fill): void {
const fillsByHash = this.getUserFillsByHash(userAddress, networkId);
const fillHash = this._getFillHash(fill);
const doesFillExist = !_.isUndefined(fillsByHash[fillHash]);
@@ -38,7 +38,7 @@ export const tradeHistoryStorage = {
const userFillsKey = this._getUserFillsKey(userAddress, networkId);
localStorage.setItem(userFillsKey, userFillsJSONString);
},
- removeFillFromUser(userAddress: string, networkId: number, fill: Fill) {
+ removeFillFromUser(userAddress: string, networkId: number, fill: Fill): void {
const fillsByHash = this.getUserFillsByHash(userAddress, networkId);
const fillHash = this._getFillHash(fill);
const doesFillExist = !_.isUndefined(fillsByHash[fillHash]);
@@ -74,15 +74,15 @@ export const tradeHistoryStorage = {
const blockNumber = _.parseInt(blockNumberStr);
return blockNumber;
},
- setFillsLatestBlock(userAddress: string, networkId: number, blockNumber: number) {
+ setFillsLatestBlock(userAddress: string, networkId: number, blockNumber: number): void {
const userFillsLatestBlockKey = this._getFillsLatestBlockKey(userAddress, networkId);
localStorage.setItem(userFillsLatestBlockKey, `${blockNumber}`);
},
- _getUserFillsKey(userAddress: string, networkId: number) {
+ _getUserFillsKey(userAddress: string, networkId: number): string {
const userFillsKey = `${FILLS_KEY}-${userAddress}-${networkId}`;
return userFillsKey;
},
- _getFillsLatestBlockKey(userAddress: string, networkId: number) {
+ _getFillsLatestBlockKey(userAddress: string, networkId: number): string {
const userFillsLatestBlockKey = `${FILLS_LATEST_BLOCK}-${userAddress}-${networkId}`;
return userFillsLatestBlockKey;
},
diff --git a/packages/website/ts/pages/about/about.tsx b/packages/website/ts/pages/about/about.tsx
index d78cca703..360cbb136 100644
--- a/packages/website/ts/pages/about/about.tsx
+++ b/packages/website/ts/pages/about/about.tsx
@@ -128,9 +128,6 @@ const teamRow4: ProfileInfo[] = [
github: '',
medium: '',
},
-];
-
-const teamRow5: ProfileInfo[] = [
{
name: 'Greg Hysen',
title: 'Blockchain Engineer',
@@ -140,6 +137,9 @@ const teamRow5: ProfileInfo[] = [
github: 'https://github.com/hysz',
medium: '',
},
+];
+
+const teamRow5: ProfileInfo[] = [
{
name: 'Remco Bloemen',
title: 'Technical Fellow',
@@ -149,6 +149,14 @@ const teamRow5: ProfileInfo[] = [
github: 'http://github.com/recmo',
medium: '',
},
+ {
+ name: 'Francesco Agosti',
+ title: 'Senior Frontend Engineer',
+ description: `Full-stack engineer. Previously senior software engineer at Yelp. Computer science Duke.`,
+ image: 'images/team/fragosti.png',
+ linkedIn: 'https://www.linkedin.com/in/fragosti/',
+ github: 'http://github.com/fragosti',
+ },
];
const advisors: ProfileInfo[] = [
@@ -210,10 +218,10 @@ const styles: Styles = {
};
export class About extends React.Component<AboutProps, AboutState> {
- public componentDidMount() {
+ public componentDidMount(): void {
window.scrollTo(0, 0);
}
- public render() {
+ public render(): React.ReactNode {
return (
<div style={{ backgroundColor: colors.lightestGrey }}>
<DocumentTitle title="0x About Us" />
@@ -284,7 +292,7 @@ export class About extends React.Component<AboutProps, AboutState> {
</div>
);
}
- private _renderProfiles(profiles: ProfileInfo[]) {
+ private _renderProfiles(profiles: ProfileInfo[]): React.ReactNode {
const numIndiv = profiles.length;
const colSize = utils.getColSize(numIndiv);
return _.map(profiles, profile => {
diff --git a/packages/website/ts/pages/about/profile.tsx b/packages/website/ts/pages/about/profile.tsx
index 4361da103..dd046a8cb 100644
--- a/packages/website/ts/pages/about/profile.tsx
+++ b/packages/website/ts/pages/about/profile.tsx
@@ -22,7 +22,7 @@ interface ProfileProps {
profileInfo: ProfileInfo;
}
-export function Profile(props: ProfileProps) {
+export const Profile = (props: ProfileProps) => {
return (
<div className={`lg-col md-col lg-col-${props.colSize} md-col-6`}>
<div style={{ maxWidth: 300 }} className="mx-auto lg-px3 md-px3 sm-px4 sm-pb3">
@@ -53,9 +53,9 @@ export function Profile(props: ProfileProps) {
</div>
</div>
);
-}
+};
-function renderSocialMediaIcons(profileInfo: ProfileInfo) {
+function renderSocialMediaIcons(profileInfo: ProfileInfo): React.ReactNode {
const icons = [
renderSocialMediaIcon('zmdi-github-box', profileInfo.github),
renderSocialMediaIcon('zmdi-linkedin-box', profileInfo.linkedIn),
@@ -64,7 +64,7 @@ function renderSocialMediaIcons(profileInfo: ProfileInfo) {
return icons;
}
-function renderSocialMediaIcon(iconName: string, url: string) {
+function renderSocialMediaIcon(iconName: string, url: string): React.ReactNode {
if (_.isEmpty(url)) {
return null;
}
diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx
index be8ae02f4..17efc56ed 100644
--- a/packages/website/ts/pages/documentation/doc_page.tsx
+++ b/packages/website/ts/pages/documentation/doc_page.tsx
@@ -59,7 +59,7 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> {
docAgnosticFormat: undefined,
};
}
- public componentWillMount() {
+ public componentWillMount(): void {
const pathName = this.props.location.pathname;
const lastSegment = pathName.substr(pathName.lastIndexOf('/') + 1);
const versions = findVersions(lastSegment);
@@ -67,10 +67,10 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> {
// tslint:disable-next-line:no-floating-promises
this._fetchJSONDocsFireAndForgetAsync(preferredVersionIfExists);
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
this._isUnmounted = true;
}
- public render() {
+ public render(): React.ReactNode {
const menuSubsectionsBySection = _.isUndefined(this.state.docAgnosticFormat)
? {}
: this.props.docsInfo.getMenuSubsectionsBySection(this.state.docAgnosticFormat);
@@ -135,7 +135,7 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> {
});
}
}
- private _getSourceUrl() {
+ private _getSourceUrl(): string {
const url = this.props.docsInfo.packageUrl;
let pkg = docIdToSubpackageName[this.props.docsInfo.id];
let tagPrefix = pkg;
@@ -155,7 +155,7 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> {
const sourceUrl = `${url}/blob/${tagPrefix}%40${this.props.docsVersion}/packages${pkg}`;
return sourceUrl;
}
- private _onVersionSelected(semver: string) {
+ private _onVersionSelected(semver: string): void {
let path = window.location.pathname;
const lastChar = path[path.length - 1];
if (_.isFinite(_.parseInt(lastChar))) {
diff --git a/packages/website/ts/pages/faq/faq.tsx b/packages/website/ts/pages/faq/faq.tsx
index 701031d44..c9295d806 100644
--- a/packages/website/ts/pages/faq/faq.tsx
+++ b/packages/website/ts/pages/faq/faq.tsx
@@ -404,10 +404,10 @@ const sections: FAQSection[] = [
];
export class FAQ extends React.Component<FAQProps, FAQState> {
- public componentDidMount() {
+ public componentDidMount(): void {
window.scrollTo(0, 0);
}
- public render() {
+ public render(): React.ReactNode {
return (
<div>
<DocumentTitle title="0x FAQ" />
@@ -422,7 +422,7 @@ export class FAQ extends React.Component<FAQProps, FAQState> {
</div>
);
}
- private _renderSections() {
+ private _renderSections(): React.ReactNode {
const renderedSections = _.map(sections, (section: FAQSection, i: number) => {
const isFirstSection = i === 0;
return (
@@ -434,7 +434,7 @@ export class FAQ extends React.Component<FAQProps, FAQState> {
});
return renderedSections;
}
- private _renderQuestions(questions: FAQQuestion[], isFirstSection: boolean) {
+ private _renderQuestions(questions: FAQQuestion[], isFirstSection: boolean): React.ReactNode {
const renderedQuestions = _.map(questions, (question: FAQQuestion, i: number) => {
const isFirstQuestion = i === 0;
return (
diff --git a/packages/website/ts/pages/faq/question.tsx b/packages/website/ts/pages/faq/question.tsx
index 240dae910..28ea6881a 100644
--- a/packages/website/ts/pages/faq/question.tsx
+++ b/packages/website/ts/pages/faq/question.tsx
@@ -20,7 +20,7 @@ export class Question extends React.Component<QuestionProps, QuestionState> {
isExpanded: props.shouldDisplayExpanded,
};
}
- public render() {
+ public render(): React.ReactNode {
return (
<div className="py1">
<Card
@@ -43,7 +43,7 @@ export class Question extends React.Component<QuestionProps, QuestionState> {
</div>
);
}
- private _onExchangeChange() {
+ private _onExchangeChange(): void {
this.setState({
isExpanded: !this.state.isExpanded,
});
diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx
index a63c24fb7..02ecfa117 100644
--- a/packages/website/ts/pages/landing/landing.tsx
+++ b/packages/website/ts/pages/landing/landing.tsx
@@ -177,14 +177,14 @@ export class Landing extends React.Component<LandingProps, LandingState> {
};
this._throttledScreenWidthUpdate = _.throttle(this._updateScreenWidth.bind(this), THROTTLE_TIMEOUT);
}
- public componentDidMount() {
+ public componentDidMount(): void {
window.addEventListener('resize', this._throttledScreenWidthUpdate);
window.scrollTo(0, 0);
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
window.removeEventListener('resize', this._throttledScreenWidthUpdate);
}
- public render() {
+ public render(): React.ReactNode {
return (
<div id="landing" className="clearfix" style={{ color: colors.grey500 }}>
<DocumentTitle title="0x Protocol" />
@@ -218,7 +218,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
</div>
);
}
- private _renderHero() {
+ private _renderHero(): React.ReactNode {
const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm;
const buttonLabelStyle: React.CSSProperties = {
textTransform: 'none',
@@ -305,7 +305,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
</div>
);
}
- private _renderWhatsNew() {
+ private _renderWhatsNew(): React.ReactNode {
return (
<div className="sm-center sm-px1">
<a href={WHATS_NEW_URL} target="_blank" className="inline-block text-decoration-none">
@@ -327,7 +327,12 @@ export class Landing extends React.Component<LandingProps, LandingState> {
</div>
);
}
- private _renderProjects(projects: Project[], title: string, backgroundColor: string, isTitleCenter: boolean) {
+ private _renderProjects(
+ projects: Project[],
+ title: string,
+ backgroundColor: string,
+ isTitleCenter: boolean,
+ ): React.ReactNode {
const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm;
const projectList = _.map(projects, (project: Project, i: number) => {
const isRelayersOnly = projects.length === 12;
@@ -393,7 +398,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
</div>
);
}
- private _renderTokenizationSection() {
+ private _renderTokenizationSection(): React.ReactNode {
const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm;
return (
<div className="clearfix lg-py4 md-py4 sm-pb4 sm-pt2" style={{ backgroundColor: colors.grey100 }}>
@@ -424,7 +429,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
</div>
);
}
- private _renderProtocolSection() {
+ private _renderProtocolSection(): React.ReactNode {
const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm;
return (
<div className="clearfix pt4" style={{ backgroundColor: colors.heroGrey }}>
@@ -469,7 +474,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
</div>
);
}
- private _renderBuildingBlocksSection() {
+ private _renderBuildingBlocksSection(): React.ReactNode {
const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm;
const descriptionStyle: React.CSSProperties = {
fontFamily: 'Roboto Mono',
@@ -526,7 +531,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
</div>
);
}
- private _renderBlockChipImage() {
+ private _renderBlockChipImage(): React.ReactNode {
const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm;
return (
<div className="col lg-col-6 md-col-6 col-12 sm-center">
@@ -534,7 +539,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
</div>
);
}
- private _renderTokenCloud() {
+ private _renderTokenCloud(): React.ReactNode {
const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm;
return (
<div className="col lg-col-6 md-col-6 col-12 center">
@@ -542,7 +547,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
</div>
);
}
- private _renderAssetTypes() {
+ private _renderAssetTypes(): React.ReactNode {
const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm;
const assetTypes: AssetType[] = [
{
@@ -585,7 +590,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
});
return assets;
}
- private _renderInfoBoxes() {
+ private _renderInfoBoxes(): React.ReactNode {
const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm;
const boxStyle: React.CSSProperties = {
maxWidth: 253,
@@ -648,7 +653,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
</div>
);
}
- private _renderUseCases() {
+ private _renderUseCases(): React.ReactNode {
const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm;
const useCases: UseCase[] = [
@@ -746,7 +751,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
</div>
);
}
- private _renderCallToAction() {
+ private _renderCallToAction(): React.ReactNode {
const isSmallScreen = this.state.screenWidth === ScreenWidths.Sm;
const buttonLabelStyle: React.CSSProperties = {
textTransform: 'none',
@@ -793,7 +798,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
</div>
);
}
- private _updateScreenWidth() {
+ private _updateScreenWidth(): void {
const newScreenWidth = utils.getScreenWidth();
if (newScreenWidth !== this.state.screenWidth) {
this.setState({
@@ -801,7 +806,7 @@ export class Landing extends React.Component<LandingProps, LandingState> {
});
}
}
- private _onLanguageSelected(language: Language) {
+ private _onLanguageSelected(language: Language): void {
this.props.dispatcher.updateSelectedLanguage(language);
}
} // tslint:disable:max-file-line-count
diff --git a/packages/website/ts/pages/not_found.tsx b/packages/website/ts/pages/not_found.tsx
index ff25a35e9..96c73d4ec 100644
--- a/packages/website/ts/pages/not_found.tsx
+++ b/packages/website/ts/pages/not_found.tsx
@@ -21,7 +21,7 @@ const styles: Styles = {
};
export class NotFound extends React.Component<NotFoundProps, NotFoundState> {
- public render() {
+ public render(): React.ReactNode {
return (
<div>
<TopBar blockchainIsLoaded={false} location={this.props.location} translate={this.props.translate} />
diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx
index edca5834d..720c1cc37 100644
--- a/packages/website/ts/pages/wiki/wiki.tsx
+++ b/packages/website/ts/pages/wiki/wiki.tsx
@@ -69,19 +69,19 @@ export class Wiki extends React.Component<WikiProps, WikiState> {
isHoveringSidebar: false,
};
}
- public componentDidMount() {
+ public componentDidMount(): void {
window.addEventListener('hashchange', this._onHashChanged.bind(this), false);
}
- public componentWillMount() {
+ public componentWillMount(): void {
// tslint:disable-next-line:no-floating-promises
this._fetchArticlesBySectionAsync();
}
- public componentWillUnmount() {
+ public componentWillUnmount(): void {
this._isUnmounted = true;
clearTimeout(this._wikiBackoffTimeoutId);
window.removeEventListener('hashchange', this._onHashChanged.bind(this), false);
}
- public render() {
+ public render(): React.ReactNode {
const menuSubsectionsBySection = _.isUndefined(this.state.articlesBySection)
? {}
: this._getMenuSubsectionsBySection(this.state.articlesBySection);
@@ -171,7 +171,7 @@ export class Wiki extends React.Component<WikiProps, WikiState> {
const sections = _.map(sectionNames, sectionName => this._renderSection(sectionName));
return sections;
}
- private _renderSection(sectionName: string) {
+ private _renderSection(sectionName: string): React.ReactNode {
const articles = this.state.articlesBySection[sectionName];
const renderedArticles = _.map(articles, (article: Article) => {
const githubLink = `${constants.URL_GITHUB_WIKI}/edit/master/${sectionName}/${article.fileName}`;
@@ -227,7 +227,7 @@ export class Wiki extends React.Component<WikiProps, WikiState> {
}
}
}
- private _getMenuSubsectionsBySection(articlesBySection: ArticlesBySection) {
+ private _getMenuSubsectionsBySection(articlesBySection: ArticlesBySection): { [section: string]: string[] } {
const sectionNames = _.keys(articlesBySection);
const menuSubsectionsBySection: { [section: string]: string[] } = {};
for (const sectionName of sectionNames) {
@@ -237,17 +237,17 @@ export class Wiki extends React.Component<WikiProps, WikiState> {
}
return menuSubsectionsBySection;
}
- private _onSidebarHover(event: React.FormEvent<HTMLInputElement>) {
+ private _onSidebarHover(event: React.FormEvent<HTMLInputElement>): void {
this.setState({
isHoveringSidebar: true,
});
}
- private _onSidebarHoverOff() {
+ private _onSidebarHoverOff(): void {
this.setState({
isHoveringSidebar: false,
});
}
- private _onHashChanged(event: any) {
+ private _onHashChanged(event: any): void {
const hash = window.location.hash.slice(1);
sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
}
diff --git a/packages/website/ts/redux/dispatcher.ts b/packages/website/ts/redux/dispatcher.ts
index 13e9a10cc..981522360 100644
--- a/packages/website/ts/redux/dispatcher.ts
+++ b/packages/website/ts/redux/dispatcher.ts
@@ -22,47 +22,47 @@ export class Dispatcher {
this._dispatch = dispatch;
}
// Portal
- public resetState() {
+ public resetState(): void {
this._dispatch({
type: ActionTypes.ResetState,
});
}
- public updateNodeVersion(nodeVersion: string) {
+ public updateNodeVersion(nodeVersion: string): void {
this._dispatch({
data: nodeVersion,
type: ActionTypes.UpdateNodeVersion,
});
}
- public updateScreenWidth(screenWidth: ScreenWidths) {
+ public updateScreenWidth(screenWidth: ScreenWidths): void {
this._dispatch({
data: screenWidth,
type: ActionTypes.UpdateScreenWidth,
});
}
- public swapAssetTokenSymbols() {
+ public swapAssetTokenSymbols(): void {
this._dispatch({
type: ActionTypes.SwapAssetTokens,
});
}
- public updateOrderSalt(salt: BigNumber) {
+ public updateOrderSalt(salt: BigNumber): void {
this._dispatch({
data: salt,
type: ActionTypes.UpdateOrderSalt,
});
}
- public updateUserSuppliedOrderCache(order: Order) {
+ public updateUserSuppliedOrderCache(order: Order): void {
this._dispatch({
data: order,
type: ActionTypes.UpdateUserSuppliedOrderCache,
});
}
- public updateShouldBlockchainErrDialogBeOpen(shouldBeOpen: boolean) {
+ public updateShouldBlockchainErrDialogBeOpen(shouldBeOpen: boolean): void {
this._dispatch({
data: shouldBeOpen,
type: ActionTypes.UpdateShouldBlockchainErrDialogBeOpen,
});
}
- public updateChosenAssetToken(side: Side, token: AssetToken) {
+ public updateChosenAssetToken(side: Side, token: AssetToken): void {
this._dispatch({
data: {
side,
@@ -71,7 +71,7 @@ export class Dispatcher {
type: ActionTypes.UpdateChosenAssetToken,
});
}
- public updateChosenAssetTokenAddress(side: Side, address: string) {
+ public updateChosenAssetTokenAddress(side: Side, address: string): void {
this._dispatch({
data: {
address,
@@ -80,43 +80,43 @@ export class Dispatcher {
type: ActionTypes.UpdateChosenAssetTokenAddress,
});
}
- public updateOrderTakerAddress(address: string) {
+ public updateOrderTakerAddress(address: string): void {
this._dispatch({
data: address,
type: ActionTypes.UpdateOrderTakerAddress,
});
}
- public updateUserAddress(address?: string) {
+ public updateUserAddress(address?: string): void {
this._dispatch({
data: address,
type: ActionTypes.UpdateUserAddress,
});
}
- public updateOrderExpiry(unixTimestampSec: BigNumber) {
+ public updateOrderExpiry(unixTimestampSec: BigNumber): void {
this._dispatch({
data: unixTimestampSec,
type: ActionTypes.UpdateOrderExpiry,
});
}
- public encounteredBlockchainError(err: BlockchainErrs) {
+ public encounteredBlockchainError(err: BlockchainErrs): void {
this._dispatch({
data: err,
type: ActionTypes.BlockchainErrEncountered,
});
}
- public updateBlockchainIsLoaded(isLoaded: boolean) {
+ public updateBlockchainIsLoaded(isLoaded: boolean): void {
this._dispatch({
data: isLoaded,
type: ActionTypes.UpdateBlockchainIsLoaded,
});
}
- public addTokenToTokenByAddress(token: Token) {
+ public addTokenToTokenByAddress(token: Token): void {
this._dispatch({
data: token,
type: ActionTypes.AddTokenToTokenByAddress,
});
}
- public removeTokenToTokenByAddress(token: Token) {
+ public removeTokenToTokenByAddress(token: Token): void {
this._dispatch({
data: token,
type: ActionTypes.RemoveTokenFromTokenByAddress,
@@ -127,7 +127,7 @@ export class Dispatcher {
networkId: number,
userAddressIfExists: string | undefined,
sideToAssetToken: SideToAssetToken,
- ) {
+ ): void {
this._dispatch({
data: {
tokenByAddress,
@@ -138,36 +138,36 @@ export class Dispatcher {
type: ActionTypes.BatchDispatch,
});
}
- public updateTokenByAddress(tokens: Token[]) {
+ public updateTokenByAddress(tokens: Token[]): void {
this._dispatch({
data: tokens,
type: ActionTypes.UpdateTokenByAddress,
});
}
- public forceTokenStateRefetch() {
+ public forceTokenStateRefetch(): void {
this._dispatch({
type: ActionTypes.ForceTokenStateRefetch,
});
}
- public updateECSignature(ecSignature: ECSignature) {
+ public updateECSignature(ecSignature: ECSignature): void {
this._dispatch({
data: ecSignature,
type: ActionTypes.UpdateOrderECSignature,
});
}
- public updateUserWeiBalance(balance: BigNumber) {
+ public updateUserWeiBalance(balance: BigNumber): void {
this._dispatch({
data: balance,
type: ActionTypes.UpdateUserEtherBalance,
});
}
- public updateNetworkId(networkId: number) {
+ public updateNetworkId(networkId: number): void {
this._dispatch({
data: networkId,
type: ActionTypes.UpdateNetworkId,
});
}
- public updateOrderFillAmount(amount: BigNumber) {
+ public updateOrderFillAmount(amount: BigNumber): void {
this._dispatch({
data: amount,
type: ActionTypes.UpdateOrderFillAmount,
@@ -175,13 +175,13 @@ export class Dispatcher {
}
// Docs
- public updateCurrentDocsVersion(version: string) {
+ public updateCurrentDocsVersion(version: string): void {
this._dispatch({
data: version,
type: ActionTypes.UpdateLibraryVersion,
});
}
- public updateAvailableDocVersions(versions: string[]) {
+ public updateAvailableDocVersions(versions: string[]): void {
this._dispatch({
data: versions,
type: ActionTypes.UpdateAvailableLibraryVersions,
@@ -189,30 +189,30 @@ export class Dispatcher {
}
// Shared
- public showFlashMessage(msg: string | React.ReactNode) {
+ public showFlashMessage(msg: string | React.ReactNode): void {
this._dispatch({
data: msg,
type: ActionTypes.ShowFlashMessage,
});
}
- public hideFlashMessage() {
+ public hideFlashMessage(): void {
this._dispatch({
type: ActionTypes.HideFlashMessage,
});
}
- public updateProviderType(providerType: ProviderType) {
+ public updateProviderType(providerType: ProviderType): void {
this._dispatch({
type: ActionTypes.UpdateProviderType,
data: providerType,
});
}
- public updateInjectedProviderName(injectedProviderName: string) {
+ public updateInjectedProviderName(injectedProviderName: string): void {
this._dispatch({
type: ActionTypes.UpdateInjectedProviderName,
data: injectedProviderName,
});
}
- public updateSelectedLanguage(language: Language) {
+ public updateSelectedLanguage(language: Language): void {
this._dispatch({
type: ActionTypes.UpdateSelectedLanguage,
data: language,
diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts
index a628f65c2..bb8f1472b 100644
--- a/packages/website/ts/redux/reducer.ts
+++ b/packages/website/ts/redux/reducer.ts
@@ -91,7 +91,7 @@ const INITIAL_STATE: State = {
translate: new Translate(),
};
-export function reducer(state: State = INITIAL_STATE, action: Action) {
+export function reducer(state: State = INITIAL_STATE, action: Action): State {
switch (action.type) {
// Portal
case ActionTypes.ResetState:
diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts
index 58929a0c6..5caf5e73c 100644
--- a/packages/website/ts/types.ts
+++ b/packages/website/ts/types.ts
@@ -506,7 +506,7 @@ export interface TokenState {
export interface WebsiteBackendRelayerInfo {
name: string;
- dailyTxnVolume: string;
+ weeklyTxnVolume: string;
url: string;
appUrl?: string;
headerImgUrl?: string;
diff --git a/packages/website/ts/utils/analytics.ts b/packages/website/ts/utils/analytics.ts
index 37c47c7b0..928e45bc3 100644
--- a/packages/website/ts/utils/analytics.ts
+++ b/packages/website/ts/utils/analytics.ts
@@ -5,10 +5,10 @@ import { utils } from 'ts/utils/utils';
import * as Web3 from 'web3';
export const analytics = {
- init() {
+ init(): void {
ReactGA.initialize(configs.GOOGLE_ANALYTICS_ID);
},
- logEvent(category: string, action: string, label: string, value?: any) {
+ logEvent(category: string, action: string, label: string, value?: any): void {
ReactGA.event({
category,
action,
@@ -16,7 +16,7 @@ export const analytics = {
value,
});
},
- async logProviderAsync(web3IfExists: Web3) {
+ async logProviderAsync(web3IfExists: Web3): Promise<void> {
await utils.onPageLoadAsync();
const providerType = !_.isUndefined(web3IfExists)
? utils.getProviderType(web3IfExists.currentProvider)
diff --git a/packages/website/ts/utils/backend_client.ts b/packages/website/ts/utils/backend_client.ts
index 63e06fda7..c440b1604 100644
--- a/packages/website/ts/utils/backend_client.ts
+++ b/packages/website/ts/utils/backend_client.ts
@@ -1,8 +1,8 @@
import * as _ from 'lodash';
import { ArticlesBySection, WebsiteBackendGasInfo, WebsiteBackendPriceInfo, WebsiteBackendRelayerInfo } from 'ts/types';
-import { configs } from 'ts/utils/configs';
import { fetchUtils } from 'ts/utils/fetch_utils';
+import { utils } from 'ts/utils/utils';
const ETH_GAS_STATION_ENDPOINT = '/eth_gas_station';
const PRICES_ENDPOINT = '/prices';
@@ -11,7 +11,7 @@ const WIKI_ENDPOINT = '/wiki';
export const backendClient = {
async getGasInfoAsync(): Promise<WebsiteBackendGasInfo> {
- const result = await fetchUtils.requestAsync(configs.BACKEND_BASE_URL, ETH_GAS_STATION_ENDPOINT);
+ const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), ETH_GAS_STATION_ENDPOINT);
return result;
},
async getPriceInfoAsync(tokenSymbols: string[]): Promise<WebsiteBackendPriceInfo> {
@@ -22,15 +22,15 @@ export const backendClient = {
const queryParams = {
tokens: joinedTokenSymbols,
};
- const result = await fetchUtils.requestAsync(configs.BACKEND_BASE_URL, PRICES_ENDPOINT, queryParams);
+ const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), PRICES_ENDPOINT, queryParams);
return result;
},
async getRelayerInfosAsync(): Promise<WebsiteBackendRelayerInfo[]> {
- const result = await fetchUtils.requestAsync(configs.BACKEND_BASE_URL, RELAYERS_ENDPOINT);
+ const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), RELAYERS_ENDPOINT);
return result;
},
async getWikiArticlesBySectionAsync(): Promise<ArticlesBySection> {
- const result = await fetchUtils.requestAsync(configs.BACKEND_BASE_URL, WIKI_ENDPOINT);
+ const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), WIKI_ENDPOINT);
return result;
},
};
diff --git a/packages/website/ts/utils/configs.ts b/packages/website/ts/utils/configs.ts
index a54fc56a8..9fec814b7 100644
--- a/packages/website/ts/utils/configs.ts
+++ b/packages/website/ts/utils/configs.ts
@@ -1,5 +1,6 @@
import * as _ from 'lodash';
import { Environments, OutdatedWrappedEtherByNetworkId, PublicNodeUrlsByNetworkId } from 'ts/types';
+import { utils } from 'ts/utils/utils';
const BASE_URL = window.location.origin;
const isDevelopment = _.includes(
@@ -10,13 +11,15 @@ const INFURA_API_KEY = 'T5WSC8cautR4KXyYgsRs';
export const configs = {
AMOUNT_DISPLAY_PRECSION: 5,
- BACKEND_BASE_URL: 'https://website-api.0xproject.com',
+ BACKEND_BASE_PROD_URL: 'https://website-api.0xproject.com',
+ BACKEND_BASE_STAGING_URL: 'http://ec2-52-91-181-85.compute-1.amazonaws.com',
BASE_URL,
BITLY_ACCESS_TOKEN: 'ffc4c1a31e5143848fb7c523b39f91b9b213d208',
DEFAULT_DERIVATION_PATH: `44'/60'/0'`,
// WARNING: ZRX & WETH MUST always be default trackedTokens
DEFAULT_TRACKED_TOKEN_SYMBOLS: ['WETH', 'ZRX'],
DOMAIN_STAGING: 'staging-0xproject.s3-website-us-east-1.amazonaws.com',
+ DOMAIN_DOGFOOD: 'dogfood-0xproject.s3-website-us-east-1.amazonaws.com',
DOMAIN_DEVELOPMENT: '0xproject.localhost:3572',
DOMAIN_PRODUCTION: '0xproject.com',
ENVIRONMENT: isDevelopment ? Environments.DEVELOPMENT : Environments.PRODUCTION,
diff --git a/packages/website/ts/utils/translate.ts b/packages/website/ts/utils/translate.ts
index 5148e48ad..39924b6f7 100644
--- a/packages/website/ts/utils/translate.ts
+++ b/packages/website/ts/utils/translate.ts
@@ -42,10 +42,10 @@ export class Translate {
}
this.setLanguage(language);
}
- public getLanguage() {
+ public getLanguage(): Language {
return this._selectedLanguage;
}
- public setLanguage(language: Language) {
+ public setLanguage(language: Language): void {
const isLanguageSupported = !_.isUndefined(languageToTranslations[language]);
if (!isLanguageSupported) {
throw new Error(`${language} not supported`);
@@ -53,7 +53,7 @@ export class Translate {
this._selectedLanguage = language;
this._translation = languageToTranslations[language];
}
- public get(key: Key, decoration?: Deco) {
+ public get(key: Key, decoration?: Deco): string {
let text = this._translation[key];
if (!_.isUndefined(decoration) && !_.includes(languagesWithoutCaps, this._selectedLanguage)) {
switch (decoration) {
@@ -77,7 +77,7 @@ export class Translate {
}
return text;
}
- private _capitalize(text: string) {
+ private _capitalize(text: string): string {
return `${text.charAt(0).toUpperCase()}${text.slice(1)}`;
}
}
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index 472870f31..3c99bd2fe 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -24,16 +24,18 @@ import * as u2f from 'ts/vendor/u2f_api';
const LG_MIN_EM = 64;
const MD_MIN_EM = 52;
+const isDogfood = (): boolean => _.includes(window.location.href, configs.DOMAIN_DOGFOOD);
+
export const utils = {
- assert(condition: boolean, message: string) {
+ assert(condition: boolean, message: string): void {
if (!condition) {
throw new Error(message);
}
},
- spawnSwitchErr(name: string, value: any) {
+ spawnSwitchErr(name: string, value: any): Error {
return new Error(`Unexpected switch value: ${value} encountered for ${name}`);
},
- isNumeric(n: string) {
+ isNumeric(n: string): boolean {
return !isNaN(parseFloat(n)) && isFinite(Number(n));
},
// This default unix timestamp is used for orders where the user does not specify an expiry date.
@@ -106,13 +108,13 @@ export const utils = {
};
return order;
},
- async sleepAsync(ms: number) {
- return new Promise(resolve => setTimeout(resolve, ms));
+ async sleepAsync(ms: number): Promise<NodeJS.Timer> {
+ return new Promise<NodeJS.Timer>(resolve => setTimeout(resolve, ms));
},
- deepEqual(actual: any, expected: any, opts?: { strict: boolean }) {
+ deepEqual(actual: any, expected: any, opts?: { strict: boolean }): boolean {
return deepEqual(actual, expected, opts);
},
- getColSize(items: number) {
+ getColSize(items: number): number {
const bassCssGridSize = 12; // Source: http://basscss.com/#basscss-grid
const colSize = bassCssGridSize / items;
if (!_.isInteger(colSize)) {
@@ -120,7 +122,7 @@ export const utils = {
}
return colSize;
},
- getScreenWidth() {
+ getScreenWidth(): ScreenWidths {
const documentEl = document.documentElement;
const body = document.getElementsByTagName('body')[0];
const widthInPx = window.innerWidth || documentEl.clientWidth || body.clientWidth;
@@ -162,7 +164,7 @@ export const utils = {
// This checks the error message returned from an injected Web3 instance on the page
// after a user was prompted to sign a message or send a transaction and decided to
// reject the request.
- didUserDenyWeb3Request(errMsg: string) {
+ didUserDenyWeb3Request(errMsg: string): boolean {
const metamaskDenialErrMsg = 'User denied';
const paritySignerDenialErrMsg = 'Request has been rejected';
const ledgerDenialErrMsg = 'Invalid status 6985';
@@ -172,7 +174,7 @@ export const utils = {
_.includes(errMsg, ledgerDenialErrMsg);
return isUserDeniedErrMsg;
},
- getCurrentEnvironment() {
+ getCurrentEnvironment(): string {
switch (location.host) {
case configs.DOMAIN_DEVELOPMENT:
return 'development';
@@ -188,7 +190,7 @@ export const utils = {
const truncatedAddress = `${address.substring(0, 6)}...${address.substr(-4)}`; // 0x3d5a...b287
return truncatedAddress;
},
- hasUniqueNameAndSymbol(tokens: Token[], token: Token) {
+ hasUniqueNameAndSymbol(tokens: Token[], token: Token): boolean {
if (token.isRegistered) {
return true; // Since it's registered, it is the canonical token
}
@@ -269,7 +271,7 @@ export const utils = {
);
return isTestNetwork;
},
- getCurrentBaseUrl() {
+ getCurrentBaseUrl(): string {
const port = window.location.port;
const hasPort = !_.isUndefined(port);
const baseUrl = `https://${window.location.hostname}${hasPort ? `:${port}` : ''}`;
@@ -302,10 +304,14 @@ export const utils = {
}
return parsedProviderName;
},
- isDevelopment() {
+ getBackendBaseUrl(): string {
+ return isDogfood() ? configs.BACKEND_BASE_STAGING_URL : configs.BACKEND_BASE_PROD_URL;
+ },
+ isDevelopment(): boolean {
return configs.ENVIRONMENT === Environments.DEVELOPMENT;
},
- isStaging() {
+ isStaging(): boolean {
return _.includes(window.location.href, configs.DOMAIN_STAGING);
},
+ isDogfood,
};
diff --git a/yarn.lock b/yarn.lock
index 20c650279..f6b48b286 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6,15 +6,6 @@
version "0.3.9"
resolved "https://registry.yarnpkg.com/8fold-marked/-/8fold-marked-0.3.9.tgz#bb89c645612f8ccfaffac1ca6e3c11f168c9cf59"
-"@0xproject/tslint-config@0.4.13":
- version "0.4.13"
- resolved "https://registry.yarnpkg.com/@0xproject/tslint-config/-/tslint-config-0.4.13.tgz#98c71c5ae5e80315a23eda0134cc9f6f4438cac2"
- dependencies:
- lodash "^4.17.4"
- tslint "5.8.0"
- tslint-eslint-rules "^4.1.1"
- tslint-react "^3.2.0"
-
"@0xproject/types@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@0xproject/types/-/types-0.5.0.tgz#ba3cfbc11a8c6344b57c9680aa7df2ea84b9bf05"
@@ -54,6 +45,17 @@
dependencies:
events "^2.0.0"
+"@mrmlnc/readdir-enhanced@^2.2.1":
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
+ dependencies:
+ call-me-maybe "^1.0.1"
+ glob-to-regexp "^0.3.0"
+
+"@sindresorhus/is@^0.7.0":
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"
+
"@sinonjs/formatio@^2.0.0":
version "2.0.0"
resolved "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz#84db7e9eb5531df18a8c5e0bfb6e449e55e654b2"
@@ -503,6 +505,10 @@ ansi-align@^2.0.0:
dependencies:
string-width "^2.0.0"
+ansi-escapes@^1.0.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
+
ansi-escapes@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30"
@@ -539,10 +545,18 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1:
dependencies:
color-convert "^1.9.0"
+ansi-styles@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178"
+
ansi-wrap@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf"
+any-observable@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.2.0.tgz#c67870058003579009083f54ac0abafb5c33d242"
+
any-promise@1.3.0, any-promise@^1.0.0, any-promise@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
@@ -668,7 +682,7 @@ array-unique@^0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
-arrify@^1.0.1:
+arrify@^1.0.0, arrify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
@@ -710,6 +724,14 @@ assign-symbols@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
+ast-types@0.10.1:
+ version "0.10.1"
+ resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.10.1.tgz#f52fca9715579a14f841d67d7f8d25432ab6a3dd"
+
+ast-types@0.11.3:
+ version "0.11.3"
+ resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.3.tgz#c20757fe72ee71278ea0ff3d87e5c2ca30d9edf8"
+
async-child-process@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/async-child-process/-/async-child-process-1.1.1.tgz#27d0a598b5738707f9898c048bd231340583747b"
@@ -740,7 +762,7 @@ async@1.x, async@^1.4.0, async@^1.4.2, async@^1.5.0, async@^1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
-async@2.6.0, async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0:
+async@2.6.0, async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4"
dependencies:
@@ -850,6 +872,14 @@ babel-generator@^6.18.0, babel-generator@^6.26.0:
source-map "^0.5.7"
trim-right "^1.0.1"
+babel-helper-bindify-decorators@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330"
+ dependencies:
+ babel-runtime "^6.22.0"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
babel-helper-builder-binary-assignment-operator-visitor@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664"
@@ -884,6 +914,15 @@ babel-helper-explode-assignable-expression@^6.24.1:
babel-traverse "^6.24.1"
babel-types "^6.24.1"
+babel-helper-explode-class@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz#7dc2a3910dee007056e1e31d640ced3d54eaa9eb"
+ dependencies:
+ babel-helper-bindify-decorators "^6.24.1"
+ babel-runtime "^6.22.0"
+ babel-traverse "^6.24.1"
+ babel-types "^6.24.1"
+
babel-helper-function-name@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9"
@@ -967,15 +1006,55 @@ babel-plugin-syntax-async-functions@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
+babel-plugin-syntax-async-generators@^6.5.0:
+ version "6.13.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a"
+
+babel-plugin-syntax-class-constructor-call@^6.18.0:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416"
+
+babel-plugin-syntax-class-properties@^6.8.0:
+ version "6.13.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de"
+
+babel-plugin-syntax-decorators@^6.13.0:
+ version "6.13.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b"
+
+babel-plugin-syntax-dynamic-import@^6.18.0:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da"
+
babel-plugin-syntax-exponentiation-operator@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"
+babel-plugin-syntax-export-extensions@^6.8.0:
+ version "6.13.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721"
+
+babel-plugin-syntax-flow@^6.18.0:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d"
+
+babel-plugin-syntax-object-rest-spread@^6.8.0:
+ version "6.13.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
+
babel-plugin-syntax-trailing-function-commas@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3"
-babel-plugin-transform-async-to-generator@^6.22.0:
+babel-plugin-transform-async-generator-functions@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db"
+ dependencies:
+ babel-helper-remap-async-to-generator "^6.24.1"
+ babel-plugin-syntax-async-generators "^6.5.0"
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-to-generator@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761"
dependencies:
@@ -983,6 +1062,33 @@ babel-plugin-transform-async-to-generator@^6.22.0:
babel-plugin-syntax-async-functions "^6.8.0"
babel-runtime "^6.22.0"
+babel-plugin-transform-class-constructor-call@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9"
+ dependencies:
+ babel-plugin-syntax-class-constructor-call "^6.18.0"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-class-properties@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac"
+ dependencies:
+ babel-helper-function-name "^6.24.1"
+ babel-plugin-syntax-class-properties "^6.8.0"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+
+babel-plugin-transform-decorators@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz#788013d8f8c6b5222bdf7b344390dfd77569e24d"
+ dependencies:
+ babel-helper-explode-class "^6.24.1"
+ babel-plugin-syntax-decorators "^6.13.0"
+ babel-runtime "^6.22.0"
+ babel-template "^6.24.1"
+ babel-types "^6.24.1"
+
babel-plugin-transform-es2015-arrow-functions@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221"
@@ -995,7 +1101,7 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.22.0:
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-block-scoping@^6.23.0:
+babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es2015-block-scoping@^6.24.1:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f"
dependencies:
@@ -1005,7 +1111,7 @@ babel-plugin-transform-es2015-block-scoping@^6.23.0:
babel-types "^6.26.0"
lodash "^4.17.4"
-babel-plugin-transform-es2015-classes@^6.23.0:
+babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db"
dependencies:
@@ -1019,33 +1125,33 @@ babel-plugin-transform-es2015-classes@^6.23.0:
babel-traverse "^6.24.1"
babel-types "^6.24.1"
-babel-plugin-transform-es2015-computed-properties@^6.22.0:
+babel-plugin-transform-es2015-computed-properties@^6.22.0, babel-plugin-transform-es2015-computed-properties@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3"
dependencies:
babel-runtime "^6.22.0"
babel-template "^6.24.1"
-babel-plugin-transform-es2015-destructuring@^6.23.0:
+babel-plugin-transform-es2015-destructuring@^6.22.0, babel-plugin-transform-es2015-destructuring@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d"
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-duplicate-keys@^6.22.0:
+babel-plugin-transform-es2015-duplicate-keys@^6.22.0, babel-plugin-transform-es2015-duplicate-keys@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e"
dependencies:
babel-runtime "^6.22.0"
babel-types "^6.24.1"
-babel-plugin-transform-es2015-for-of@^6.23.0:
+babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for-of@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691"
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-function-name@^6.22.0:
+babel-plugin-transform-es2015-function-name@^6.22.0, babel-plugin-transform-es2015-function-name@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b"
dependencies:
@@ -1076,7 +1182,7 @@ babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-e
babel-template "^6.26.0"
babel-types "^6.26.0"
-babel-plugin-transform-es2015-modules-systemjs@^6.23.0:
+babel-plugin-transform-es2015-modules-systemjs@^6.23.0, babel-plugin-transform-es2015-modules-systemjs@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23"
dependencies:
@@ -1084,7 +1190,7 @@ babel-plugin-transform-es2015-modules-systemjs@^6.23.0:
babel-runtime "^6.22.0"
babel-template "^6.24.1"
-babel-plugin-transform-es2015-modules-umd@^6.23.0:
+babel-plugin-transform-es2015-modules-umd@^6.23.0, babel-plugin-transform-es2015-modules-umd@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468"
dependencies:
@@ -1092,14 +1198,14 @@ babel-plugin-transform-es2015-modules-umd@^6.23.0:
babel-runtime "^6.22.0"
babel-template "^6.24.1"
-babel-plugin-transform-es2015-object-super@^6.22.0:
+babel-plugin-transform-es2015-object-super@^6.22.0, babel-plugin-transform-es2015-object-super@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d"
dependencies:
babel-helper-replace-supers "^6.24.1"
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-parameters@^6.23.0:
+babel-plugin-transform-es2015-parameters@^6.23.0, babel-plugin-transform-es2015-parameters@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b"
dependencies:
@@ -1110,7 +1216,7 @@ babel-plugin-transform-es2015-parameters@^6.23.0:
babel-traverse "^6.24.1"
babel-types "^6.24.1"
-babel-plugin-transform-es2015-shorthand-properties@^6.22.0:
+babel-plugin-transform-es2015-shorthand-properties@^6.22.0, babel-plugin-transform-es2015-shorthand-properties@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0"
dependencies:
@@ -1123,7 +1229,7 @@ babel-plugin-transform-es2015-spread@^6.22.0:
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-sticky-regex@^6.22.0:
+babel-plugin-transform-es2015-sticky-regex@^6.22.0, babel-plugin-transform-es2015-sticky-regex@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc"
dependencies:
@@ -1137,13 +1243,13 @@ babel-plugin-transform-es2015-template-literals@^6.22.0:
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-typeof-symbol@^6.23.0:
+babel-plugin-transform-es2015-typeof-symbol@^6.22.0, babel-plugin-transform-es2015-typeof-symbol@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372"
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-unicode-regex@^6.22.0:
+babel-plugin-transform-es2015-unicode-regex@^6.22.0, babel-plugin-transform-es2015-unicode-regex@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9"
dependencies:
@@ -1151,7 +1257,7 @@ babel-plugin-transform-es2015-unicode-regex@^6.22.0:
babel-runtime "^6.22.0"
regexpu-core "^2.0.0"
-babel-plugin-transform-exponentiation-operator@^6.22.0:
+babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-exponentiation-operator@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e"
dependencies:
@@ -1159,7 +1265,28 @@ babel-plugin-transform-exponentiation-operator@^6.22.0:
babel-plugin-syntax-exponentiation-operator "^6.8.0"
babel-runtime "^6.22.0"
-babel-plugin-transform-regenerator@^6.22.0:
+babel-plugin-transform-export-extensions@^6.22.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653"
+ dependencies:
+ babel-plugin-syntax-export-extensions "^6.8.0"
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-flow-strip-types@^6.8.0:
+ version "6.22.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf"
+ dependencies:
+ babel-plugin-syntax-flow "^6.18.0"
+ babel-runtime "^6.22.0"
+
+babel-plugin-transform-object-rest-spread@^6.22.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06"
+ dependencies:
+ babel-plugin-syntax-object-rest-spread "^6.8.0"
+ babel-runtime "^6.26.0"
+
+babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.24.1:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f"
dependencies:
@@ -1207,7 +1334,63 @@ babel-preset-env@^1.3.2:
invariant "^2.2.2"
semver "^5.3.0"
-babel-register@^6.26.0:
+babel-preset-es2015@^6.9.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939"
+ dependencies:
+ babel-plugin-check-es2015-constants "^6.22.0"
+ babel-plugin-transform-es2015-arrow-functions "^6.22.0"
+ babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
+ babel-plugin-transform-es2015-block-scoping "^6.24.1"
+ babel-plugin-transform-es2015-classes "^6.24.1"
+ babel-plugin-transform-es2015-computed-properties "^6.24.1"
+ babel-plugin-transform-es2015-destructuring "^6.22.0"
+ babel-plugin-transform-es2015-duplicate-keys "^6.24.1"
+ babel-plugin-transform-es2015-for-of "^6.22.0"
+ babel-plugin-transform-es2015-function-name "^6.24.1"
+ babel-plugin-transform-es2015-literals "^6.22.0"
+ babel-plugin-transform-es2015-modules-amd "^6.24.1"
+ babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
+ babel-plugin-transform-es2015-modules-systemjs "^6.24.1"
+ babel-plugin-transform-es2015-modules-umd "^6.24.1"
+ babel-plugin-transform-es2015-object-super "^6.24.1"
+ babel-plugin-transform-es2015-parameters "^6.24.1"
+ babel-plugin-transform-es2015-shorthand-properties "^6.24.1"
+ babel-plugin-transform-es2015-spread "^6.22.0"
+ babel-plugin-transform-es2015-sticky-regex "^6.24.1"
+ babel-plugin-transform-es2015-template-literals "^6.22.0"
+ babel-plugin-transform-es2015-typeof-symbol "^6.22.0"
+ babel-plugin-transform-es2015-unicode-regex "^6.24.1"
+ babel-plugin-transform-regenerator "^6.24.1"
+
+babel-preset-stage-1@^6.5.0:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0"
+ dependencies:
+ babel-plugin-transform-class-constructor-call "^6.24.1"
+ babel-plugin-transform-export-extensions "^6.22.0"
+ babel-preset-stage-2 "^6.24.1"
+
+babel-preset-stage-2@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1"
+ dependencies:
+ babel-plugin-syntax-dynamic-import "^6.18.0"
+ babel-plugin-transform-class-properties "^6.24.1"
+ babel-plugin-transform-decorators "^6.24.1"
+ babel-preset-stage-3 "^6.24.1"
+
+babel-preset-stage-3@^6.24.1:
+ version "6.24.1"
+ resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz#836ada0a9e7a7fa37cb138fb9326f87934a48395"
+ dependencies:
+ babel-plugin-syntax-trailing-function-commas "^6.22.0"
+ babel-plugin-transform-async-generator-functions "^6.24.1"
+ babel-plugin-transform-async-to-generator "^6.24.1"
+ babel-plugin-transform-exponentiation-operator "^6.24.1"
+ babel-plugin-transform-object-rest-spread "^6.22.0"
+
+babel-register@^6.26.0, babel-register@^6.9.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071"
dependencies:
@@ -1266,10 +1449,14 @@ babelify@^7.3.0:
babel-core "^6.0.14"
object-assign "^4.0.0"
-babylon@^6.1.21, babylon@^6.18.0:
+babylon@^6.1.21, babylon@^6.17.3, babylon@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
+babylon@^7.0.0-beta.30:
+ version "7.0.0-beta.46"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.46.tgz#b6ddaba81bbb130313932757ff9c195d527088b6"
+
backoff@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f"
@@ -1406,6 +1593,10 @@ binary-extensions@^1.0.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205"
+binaryextensions@2:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.1.1.tgz#3209a51ca4a4ad541a3b8d3d6a6d5b83a2485935"
+
bindings@^1.2.1, bindings@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7"
@@ -1788,6 +1979,18 @@ cache-base@^1.0.1:
union-value "^1.0.0"
unset-value "^1.0.0"
+cacheable-request@^2.1.1:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d"
+ dependencies:
+ clone-response "1.0.2"
+ get-stream "3.0.0"
+ http-cache-semantics "3.8.1"
+ keyv "3.0.0"
+ lowercase-keys "1.0.0"
+ normalize-url "2.0.1"
+ responselike "1.0.2"
+
cachedown@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/cachedown/-/cachedown-1.0.0.tgz#d43f036e4510696b31246d7db31ebf0f7ac32d15"
@@ -1803,6 +2006,10 @@ caching-transform@^1.0.0:
mkdirp "^0.5.1"
write-file-atomic "^1.1.4"
+call-me-maybe@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b"
+
camelcase-keys@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
@@ -1899,7 +2106,7 @@ chain-function@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/chain-function/-/chain-function-1.0.0.tgz#0d4ab37e7e18ead0bdc47b920764118ce58733dc"
-chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.3:
+chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
@@ -1917,6 +2124,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.3
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
+chalk@~0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f"
+ dependencies:
+ ansi-styles "~1.0.0"
+ has-color "~0.1.0"
+ strip-ansi "~0.1.0"
+
change-emitter@^0.1.2:
version "0.1.6"
resolved "https://registry.yarnpkg.com/change-emitter/-/change-emitter-0.1.6.tgz#e8b2fe3d7f1ab7d69a32199aff91ea6931409515"
@@ -2011,6 +2226,12 @@ cli-boxes@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143"
+cli-cursor@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
+ dependencies:
+ restore-cursor "^1.0.1"
+
cli-cursor@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
@@ -2023,6 +2244,10 @@ cli-progress@1.7.0:
dependencies:
colors "^1.1.2"
+cli-spinners@^0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c"
+
cli-table2@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/cli-table2/-/cli-table2-0.2.0.tgz#2d1ef7f218a0e786e214540562d4bd177fe32d97"
@@ -2032,6 +2257,19 @@ cli-table2@0.2.0:
optionalDependencies:
colors "^1.1.2"
+cli-table@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23"
+ dependencies:
+ colors "1.0.3"
+
+cli-truncate@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574"
+ dependencies:
+ slice-ansi "0.0.4"
+ string-width "^1.0.1"
+
cli-width@^1.0.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-1.1.1.tgz#a4d293ef67ebb7b88d4a4d42c0ccf00c4d1e366d"
@@ -2068,6 +2306,12 @@ clone-buffer@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
+clone-response@1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
+ dependencies:
+ mimic-response "^1.0.0"
+
clone-stats@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1"
@@ -2171,7 +2415,7 @@ colormin@^1.0.5:
css-color-names "0.0.4"
has "^1.0.1"
-colors@1.0.x:
+colors@1.0.3, colors@1.0.x:
version "1.0.3"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b"
@@ -2530,6 +2774,10 @@ core-js@^2.4.0, core-js@^2.5.0:
version "2.5.5"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.5.tgz#b14dde936c640c0579a6b50cabcc132dd6127e3b"
+core-js@^2.4.1:
+ version "2.5.6"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.6.tgz#0fe6d45bf3cac3ac364a9d72de7576f4eb221b9d"
+
core-util-is@1.0.2, core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@@ -2615,6 +2863,16 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0:
shebang-command "^1.2.0"
which "^1.2.9"
+cross-spawn@^6.0.5:
+ version "6.0.5"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
+ dependencies:
+ nice-try "^1.0.4"
+ path-key "^2.0.1"
+ semver "^5.5.0"
+ shebang-command "^1.2.0"
+ which "^1.2.9"
+
cryptiles@2.x.x:
version "2.0.5"
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
@@ -2802,12 +3060,20 @@ dargs@^4.0.1:
dependencies:
number-is-nan "^1.0.0"
+dargs@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/dargs/-/dargs-5.1.0.tgz#ec7ea50c78564cd36c9d5ec18f66329fade27829"
+
dashdash@^1.12.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
dependencies:
assert-plus "^1.0.0"
+date-fns@^1.27.2:
+ version "1.29.0"
+ resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6"
+
date-now@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
@@ -2816,7 +3082,7 @@ dateformat@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062"
-dateformat@^3.0.0:
+dateformat@^3.0.0, dateformat@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
@@ -2951,6 +3217,10 @@ deep-equal@~0.2.1:
version "0.2.2"
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-0.2.2.tgz#84b745896f34c684e98f2ce0e42abaf43bba017d"
+deep-extend@^0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.5.1.tgz#b894a9dd90d3023fbf1c55a394fb858eb2066f1f"
+
deep-extend@~0.4.0:
version "0.4.2"
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f"
@@ -3079,6 +3349,10 @@ destroy@~1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
+detect-conflict@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/detect-conflict/-/detect-conflict-1.0.1.tgz#088657a66a961c05019db7c4230883b1c6b4176e"
+
detect-file@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7"
@@ -3109,7 +3383,7 @@ diff@3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
-diff@^3.1.0, diff@^3.2.0:
+diff@^3.1.0, diff@^3.2.0, diff@^3.3.1, diff@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
@@ -3249,6 +3523,10 @@ ecc-jsbn@~0.1.1:
dependencies:
jsbn "~0.1.0"
+editions@^1.3.3:
+ version "1.3.4"
+ resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.4.tgz#3662cb592347c3168eb8e498a0ff73271d67f50b"
+
editor@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/editor/-/editor-1.0.0.tgz#60c7f87bd62bcc6a894fa8ccd6afb7823a24f742"
@@ -3257,10 +3535,18 @@ ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
+ejs@^2.5.9:
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.6.1.tgz#498ec0d495655abc6f23cd61868d926464071aa0"
+
electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30:
version "1.3.42"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.42.tgz#95c33bf01d0cc405556aec899fe61fd4d76ea0f9"
+elegant-spinner@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e"
+
elliptic@6.3.3:
version "6.3.3"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.3.tgz#5482d9646d54bcb89fd7d994fc9e2e9568876e3f"
@@ -3326,10 +3612,22 @@ enhanced-resolve@^3.4.0:
object-assign "^4.0.1"
tapable "^0.2.7"
+enhanced-resolve@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz#e34a6eaa790f62fccd71d93959f56b2b432db10a"
+ dependencies:
+ graceful-fs "^4.1.2"
+ memory-fs "^0.4.0"
+ tapable "^1.0.0"
+
entities@^1.1.1, entities@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
+envinfo@^4.4.2:
+ version "4.4.2"
+ resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-4.4.2.tgz#472c49f3a8b9bca73962641ce7cb692bf623cd1c"
+
errno@^0.1.1, errno@^0.1.3, errno@~0.1.1:
version "0.1.7"
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618"
@@ -3342,6 +3640,13 @@ error-ex@^1.2.0, error-ex@^1.3.1:
dependencies:
is-arrayish "^0.2.1"
+error@^7.0.2:
+ version "7.0.2"
+ resolved "https://registry.yarnpkg.com/error/-/error-7.0.2.tgz#a5f75fff4d9926126ddac0ea5dc38e689153cb02"
+ dependencies:
+ string-template "~0.2.1"
+ xtend "~4.0.0"
+
es-abstract@^1.4.3, es-abstract@^1.5.0, es-abstract@^1.7.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681"
@@ -3459,7 +3764,7 @@ esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1:
version "2.7.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
-esprima@^4.0.0:
+esprima@^4.0.0, esprima@~4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
@@ -3643,12 +3948,6 @@ ethereumjs-blockstream@^2.0.6:
source-map-support "0.4.14"
uuid "3.0.1"
-ethereumjs-testrpc@^6.0.3:
- version "6.0.3"
- resolved "https://registry.yarnpkg.com/ethereumjs-testrpc/-/ethereumjs-testrpc-6.0.3.tgz#7a0b87bf3670f92f607f98fa6a78801d9741b124"
- dependencies:
- webpack "^3.0.0"
-
ethereumjs-tx@^1.0.0, ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.0, ethereumjs-tx@^1.3.3:
version "1.3.4"
resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.4.tgz#c2304912f6c07af03237ad8675ac036e290dad48"
@@ -3847,6 +4146,10 @@ exenv@^1.2.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d"
+exit-hook@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8"
+
expand-brackets@^0.1.4:
version "0.1.5"
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
@@ -3948,6 +4251,14 @@ external-editor@^2.0.4:
iconv-lite "^0.4.17"
tmp "^0.0.33"
+external-editor@^2.1.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5"
+ dependencies:
+ chardet "^0.4.0"
+ iconv-lite "^0.4.17"
+ tmp "^0.0.33"
+
extglob@^0.3.1:
version "0.3.2"
resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
@@ -3997,6 +4308,16 @@ fast-deep-equal@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
+fast-glob@^2.0.2:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.1.tgz#686c2345be88f3741e174add0be6f2e5b6078889"
+ dependencies:
+ "@mrmlnc/readdir-enhanced" "^2.2.1"
+ glob-parent "^3.1.0"
+ is-glob "^4.0.0"
+ merge2 "^1.2.1"
+ micromatch "^3.1.10"
+
fast-json-stable-stringify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
@@ -4053,7 +4374,7 @@ fetch-ponyfill@^4.0.0:
dependencies:
node-fetch "~1.7.1"
-figures@^1.3.5:
+figures@^1.3.5, figures@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
dependencies:
@@ -4186,6 +4507,12 @@ first-chunk-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e"
+first-chunk-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz#1bdecdb8e083c0664b91945581577a43a9f31d70"
+ dependencies:
+ readable-stream "^2.0.2"
+
flagged-respawn@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.0.tgz#4e79ae9b2eb38bf86b3bb56bf3e0a56aa5fcabd7"
@@ -4194,6 +4521,10 @@ flatten@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
+flow-parser@^0.*:
+ version "0.72.0"
+ resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.72.0.tgz#6c8041e76ac7d0be1a71ce29c00cd1435fb6013c"
+
flush-write-stream@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd"
@@ -4268,7 +4599,7 @@ fresh@0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
-from2@^2.1.0:
+from2@^2.1.0, from2@^2.1.1:
version "2.3.0"
resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af"
dependencies:
@@ -4366,6 +4697,13 @@ functional-red-black-tree@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
+ganache-cli@^6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.1.0.tgz#486c846497204b644166b5f0f74c9b41d02bdc25"
+ dependencies:
+ source-map-support "^0.5.3"
+ webpack-cli "^2.0.9"
+
ganache-core@0xProject/ganache-core:
version "2.1.0"
resolved "https://codeload.github.com/0xProject/ganache-core/tar.gz/a5bf2cdd541beed1bae5a6e7bbab22541345dd42"
@@ -4457,6 +4795,10 @@ get-stdin@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398"
+get-stream@3.0.0, get-stream@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
+
get-stream@^2.2.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de"
@@ -4464,10 +4806,6 @@ get-stream@^2.2.0:
object-assign "^4.0.1"
pinkie-promise "^2.0.0"
-get-stream@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
-
get-value@^2.0.3, get-value@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
@@ -4478,6 +4816,13 @@ getpass@^0.1.1:
dependencies:
assert-plus "^1.0.0"
+gh-got@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/gh-got/-/gh-got-6.0.0.tgz#d74353004c6ec466647520a10bd46f7299d268d0"
+ dependencies:
+ got "^7.0.0"
+ is-plain-obj "^1.1.0"
+
ghauth@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/ghauth/-/ghauth-2.0.1.tgz#79b7d68b0bcf8e7d0852a23b147539dfd314acf6"
@@ -4528,6 +4873,19 @@ github-url-to-object@^1.4.2:
dependencies:
is-url "^1.1.0"
+github-username@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/github-username/-/github-username-4.1.0.tgz#cbe280041883206da4212ae9e4b5f169c30bf417"
+ dependencies:
+ gh-got "^6.0.0"
+
+glob-all@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/glob-all/-/glob-all-3.1.0.tgz#8913ddfb5ee1ac7812656241b03d5217c64b02ab"
+ dependencies:
+ glob "^7.0.5"
+ yargs "~1.2.6"
+
glob-base@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
@@ -4693,6 +5051,18 @@ globby@^7.1.1:
pify "^3.0.0"
slash "^1.0.0"
+globby@^8.0.0, globby@^8.0.1:
+ version "8.0.1"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50"
+ dependencies:
+ array-union "^1.0.1"
+ dir-glob "^2.0.0"
+ fast-glob "^2.0.2"
+ glob "^7.1.2"
+ ignore "^3.3.5"
+ pify "^3.0.0"
+ slash "^1.0.0"
+
globule@~0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5"
@@ -4707,7 +5077,7 @@ glogg@^1.0.0:
dependencies:
sparkles "^1.0.0"
-got@7.1.0, got@^7.1.0:
+got@7.1.0, got@^7.0.0, got@^7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a"
dependencies:
@@ -4742,6 +5112,28 @@ got@^6.7.1:
unzip-response "^2.0.1"
url-parse-lax "^1.0.0"
+got@^8.2.0:
+ version "8.3.1"
+ resolved "https://registry.yarnpkg.com/got/-/got-8.3.1.tgz#093324403d4d955f5a16a7a8d39955d055ae10ed"
+ dependencies:
+ "@sindresorhus/is" "^0.7.0"
+ cacheable-request "^2.1.1"
+ decompress-response "^3.3.0"
+ duplexer3 "^0.1.4"
+ get-stream "^3.0.0"
+ into-stream "^3.1.0"
+ is-retry-allowed "^1.1.0"
+ isurl "^1.0.0-alpha5"
+ lowercase-keys "^1.0.0"
+ mimic-response "^1.0.0"
+ p-cancelable "^0.4.0"
+ p-timeout "^2.0.1"
+ pify "^3.0.0"
+ safe-buffer "^5.1.1"
+ timed-out "^4.0.1"
+ url-parse-lax "^3.0.0"
+ url-to-options "^1.0.1"
+
graceful-fs@^3.0.0:
version "3.0.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818"
@@ -4760,6 +5152,12 @@ graceful-fs@~1.2.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
+grouped-queue@^0.3.3:
+ version "0.3.3"
+ resolved "https://registry.yarnpkg.com/grouped-queue/-/grouped-queue-0.3.3.tgz#c167d2a5319c5a0e0964ef6a25b7c2df8996c85c"
+ dependencies:
+ lodash "^4.17.2"
+
growl@1.10.3:
version "1.10.3"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f"
@@ -4867,6 +5265,10 @@ has-ansi@^2.0.0:
dependencies:
ansi-regex "^2.0.0"
+has-color@~0.1.0:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f"
+
has-flag@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
@@ -5076,6 +5478,10 @@ htmlparser2@^3.9.0:
inherits "^2.0.1"
readable-stream "^2.0.2"
+http-cache-semantics@3.8.1:
+ version "3.8.1"
+ resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2"
+
http-deceiver@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87"
@@ -5329,6 +5735,24 @@ inquirer@^3.2.2:
strip-ansi "^4.0.0"
through "^2.3.6"
+inquirer@^5.1.0, inquirer@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.2.0.tgz#db350c2b73daca77ff1243962e9f22f099685726"
+ dependencies:
+ ansi-escapes "^3.0.0"
+ chalk "^2.0.0"
+ cli-cursor "^2.1.0"
+ cli-width "^2.0.0"
+ external-editor "^2.1.0"
+ figures "^2.0.0"
+ lodash "^4.3.0"
+ mute-stream "0.0.7"
+ run-async "^2.2.0"
+ rxjs "^5.5.2"
+ string-width "^2.1.0"
+ strip-ansi "^4.0.0"
+ through "^2.3.6"
+
intel@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/intel/-/intel-1.2.0.tgz#11d1147eb6b3f4582bdf5337b37d541584e9e41e"
@@ -5346,10 +5770,17 @@ internal-ip@1.2.0:
dependencies:
meow "^3.3.0"
-interpret@^1.0.0:
+interpret@^1.0.0, interpret@^1.0.4:
version "1.1.0"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"
+into-stream@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6"
+ dependencies:
+ from2 "^2.1.1"
+ p-is-promise "^1.1.0"
+
invariant@^2.0.0, invariant@^2.2.1, invariant@^2.2.2:
version "2.2.4"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
@@ -5593,6 +6024,12 @@ is-object@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470"
+is-observable@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-0.2.0.tgz#b361311d83c6e5d726cabf5e250b0237106f5ae2"
+ dependencies:
+ symbol-observable "^0.2.2"
+
is-odd@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24"
@@ -5653,10 +6090,16 @@ is-relative@^1.0.0:
dependencies:
is-unc-path "^1.0.0"
-is-retry-allowed@^1.0.0:
+is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
+is-scoped@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-scoped/-/is-scoped-1.0.0.tgz#449ca98299e713038256289ecb2b540dc437cb30"
+ dependencies:
+ scoped-regex "^1.0.0"
+
is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
@@ -5727,6 +6170,10 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+isbinaryfile@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621"
+
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
@@ -5818,6 +6265,14 @@ istanbul@^0.4.5:
which "^1.1.1"
wordwrap "^1.0.0"
+istextorbinary@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/istextorbinary/-/istextorbinary-2.2.1.tgz#a5231a08ef6dd22b268d0895084cf8d58b5bec53"
+ dependencies:
+ binaryextensions "2"
+ editions "^1.3.3"
+ textextensions "2"
+
isurl@^1.0.0-alpha5:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67"
@@ -5873,6 +6328,46 @@ jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
+jscodeshift@^0.4.0:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.4.1.tgz#da91a1c2eccfa03a3387a21d39948e251ced444a"
+ dependencies:
+ async "^1.5.0"
+ babel-plugin-transform-flow-strip-types "^6.8.0"
+ babel-preset-es2015 "^6.9.0"
+ babel-preset-stage-1 "^6.5.0"
+ babel-register "^6.9.0"
+ babylon "^6.17.3"
+ colors "^1.1.2"
+ flow-parser "^0.*"
+ lodash "^4.13.1"
+ micromatch "^2.3.7"
+ node-dir "0.1.8"
+ nomnom "^1.8.1"
+ recast "^0.12.5"
+ temp "^0.8.1"
+ write-file-atomic "^1.2.0"
+
+jscodeshift@^0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.5.0.tgz#bdb7b6cc20dd62c16aa728c3fa2d2fe66ca7c748"
+ dependencies:
+ babel-plugin-transform-flow-strip-types "^6.8.0"
+ babel-preset-es2015 "^6.9.0"
+ babel-preset-stage-1 "^6.5.0"
+ babel-register "^6.9.0"
+ babylon "^7.0.0-beta.30"
+ colors "^1.1.2"
+ flow-parser "^0.*"
+ lodash "^4.13.1"
+ micromatch "^2.3.7"
+ neo-async "^2.5.0"
+ node-dir "0.1.8"
+ nomnom "^1.8.1"
+ recast "^0.14.1"
+ temp "^0.8.1"
+ write-file-atomic "^1.2.0"
+
jsesc@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
@@ -5881,6 +6376,10 @@ jsesc@~0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
+json-buffer@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
+
json-loader@^0.5.4:
version "0.5.7"
resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d"
@@ -5992,6 +6491,12 @@ keycode@^2.1.8:
version "2.2.0"
resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.2.0.tgz#3d0af56dc7b8b8e5cba8d0a97f107204eec22b04"
+keyv@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373"
+ dependencies:
+ json-buffer "3.0.0"
+
killable@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b"
@@ -6221,6 +6726,54 @@ liquid-json@0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/liquid-json/-/liquid-json-0.3.1.tgz#9155a18136d8a6b2615e5f16f9a2448ab6b50eea"
+listr-silent-renderer@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e"
+
+listr-update-renderer@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz#344d980da2ca2e8b145ba305908f32ae3f4cc8a7"
+ dependencies:
+ chalk "^1.1.3"
+ cli-truncate "^0.2.1"
+ elegant-spinner "^1.0.1"
+ figures "^1.7.0"
+ indent-string "^3.0.0"
+ log-symbols "^1.0.2"
+ log-update "^1.0.2"
+ strip-ansi "^3.0.1"
+
+listr-verbose-renderer@^0.4.0:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35"
+ dependencies:
+ chalk "^1.1.3"
+ cli-cursor "^1.0.2"
+ date-fns "^1.27.2"
+ figures "^1.7.0"
+
+listr@^0.13.0:
+ version "0.13.0"
+ resolved "https://registry.yarnpkg.com/listr/-/listr-0.13.0.tgz#20bb0ba30bae660ee84cc0503df4be3d5623887d"
+ dependencies:
+ chalk "^1.1.3"
+ cli-truncate "^0.2.1"
+ figures "^1.7.0"
+ indent-string "^2.1.0"
+ is-observable "^0.2.0"
+ is-promise "^2.1.0"
+ is-stream "^1.1.0"
+ listr-silent-renderer "^1.1.1"
+ listr-update-renderer "^0.4.0"
+ listr-verbose-renderer "^0.4.0"
+ log-symbols "^1.0.2"
+ log-update "^1.0.2"
+ ora "^0.2.3"
+ p-map "^1.1.1"
+ rxjs "^5.4.2"
+ stream-to-observable "^0.2.0"
+ strip-ansi "^3.0.1"
+
load-json-file@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
@@ -6497,6 +7050,10 @@ lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.17.5,
version "4.17.5"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
+lodash@^4.17.10:
+ version "4.17.10"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
+
lodash@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551"
@@ -6505,6 +7062,25 @@ log-driver@^1.2.5:
version "1.2.7"
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
+log-symbols@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18"
+ dependencies:
+ chalk "^1.0.0"
+
+log-symbols@^2.1.0, log-symbols@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"
+ dependencies:
+ chalk "^2.0.1"
+
+log-update@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1"
+ dependencies:
+ ansi-escapes "^1.0.0"
+ cli-cursor "^1.0.2"
+
loglevel@^1.4.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa"
@@ -6538,6 +7114,10 @@ loud-rejection@^1.0.0:
currently-unhandled "^0.4.1"
signal-exit "^3.0.0"
+lowercase-keys@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306"
+
lowercase-keys@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
@@ -6585,6 +7165,12 @@ make-dir@^1.0.0:
dependencies:
pify "^3.0.0"
+make-dir@^1.1.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
+ dependencies:
+ pify "^3.0.0"
+
make-iterator@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6"
@@ -6663,6 +7249,30 @@ media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
+mem-fs-editor@^4.0.0:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/mem-fs-editor/-/mem-fs-editor-4.0.2.tgz#55a79b1e824da631254c4c95ba6366602c77af90"
+ dependencies:
+ commondir "^1.0.1"
+ deep-extend "^0.5.1"
+ ejs "^2.5.9"
+ glob "^7.0.3"
+ globby "^8.0.0"
+ isbinaryfile "^3.0.2"
+ mkdirp "^0.5.0"
+ multimatch "^2.0.0"
+ rimraf "^2.2.8"
+ through2 "^2.0.0"
+ vinyl "^2.0.1"
+
+mem-fs@^1.1.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/mem-fs/-/mem-fs-1.1.3.tgz#b8ae8d2e3fcb6f5d3f9165c12d4551a065d989cc"
+ dependencies:
+ through2 "^2.0.0"
+ vinyl "^1.1.0"
+ vinyl-file "^2.0.0"
+
mem@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76"
@@ -6736,6 +7346,10 @@ merge-stream@^1.0.0:
dependencies:
readable-stream "^2.0.1"
+merge2@^1.2.1:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.2.tgz#03212e3da8d86c4d8523cebd6318193414f94e34"
+
merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.2.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.1.tgz#7d4e7263a9c85c1679187cad4a6d71f48d524c71"
@@ -6771,7 +7385,7 @@ micromatch@^2.3.11, micromatch@^2.3.7:
parse-glob "^3.0.4"
regex-cache "^0.4.2"
-micromatch@^3.0.3, micromatch@^3.0.4, micromatch@^3.1.4, micromatch@^3.1.8:
+micromatch@^3.0.3, micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8:
version "3.1.10"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
dependencies:
@@ -7013,6 +7627,15 @@ multicast-dns@^6.0.1:
dns-packet "^1.3.1"
thunky "^1.0.2"
+multimatch@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b"
+ dependencies:
+ array-differ "^1.0.0"
+ array-union "^1.0.1"
+ arrify "^1.0.0"
+ minimatch "^3.0.0"
+
multipipe@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
@@ -7107,6 +7730,10 @@ next-tick@1:
version "1.0.0"
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
+nice-try@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4"
+
nise@^1.2.0:
version "1.3.3"
resolved "https://registry.yarnpkg.com/nise/-/nise-1.3.3.tgz#c17a850066a8a1dfeb37f921da02441afc4a82ba"
@@ -7137,6 +7764,10 @@ node-abi@^2.2.0:
dependencies:
semver "^5.4.1"
+node-dir@0.1.8:
+ version "0.1.8"
+ resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.8.tgz#55fb8deb699070707fb67f91a460f0448294c77d"
+
node-fetch@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.1.tgz#369ca70b82f50c86496104a6c776d274f4e4a2d4"
@@ -7229,6 +7860,13 @@ nodemon@^1.11.0:
undefsafe "^2.0.2"
update-notifier "^2.3.0"
+nomnom@^1.8.1:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7"
+ dependencies:
+ chalk "~0.4.0"
+ underscore "~1.6.0"
+
noms@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859"
@@ -7278,6 +7916,14 @@ normalize-range@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
+normalize-url@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6"
+ dependencies:
+ prepend-http "^2.0.0"
+ query-string "^5.0.1"
+ sort-keys "^2.0.0"
+
normalize-url@^1.4.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
@@ -7466,6 +8112,10 @@ once@~1.3.0:
dependencies:
wrappy "1"
+onetime@^1.0.0:
+ version "1.1.0"
+ resolved "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
+
onetime@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
@@ -7513,6 +8163,15 @@ optionator@^0.8.1:
type-check "~0.3.2"
wordwrap "~1.0.0"
+ora@^0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4"
+ dependencies:
+ chalk "^1.1.1"
+ cli-cursor "^1.0.2"
+ cli-spinners "^0.1.2"
+ object-assign "^4.0.1"
+
orchestrator@^0.3.0:
version "0.3.8"
resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e"
@@ -7575,10 +8234,28 @@ p-cancelable@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa"
+p-cancelable@^0.4.0:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0"
+
+p-each-series@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71"
+ dependencies:
+ p-reduce "^1.0.0"
+
p-finally@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
+p-is-promise@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e"
+
+p-lazy@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-lazy/-/p-lazy-1.0.0.tgz#ec53c802f2ee3ac28f166cc82d0b2b02de27a835"
+
p-limit@^1.0.0, p-limit@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c"
@@ -7595,12 +8272,22 @@ p-map@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b"
+p-reduce@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa"
+
p-timeout@^1.1.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386"
dependencies:
p-finally "^1.0.0"
+p-timeout@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038"
+ dependencies:
+ p-finally "^1.0.0"
+
p-try@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
@@ -7736,7 +8423,7 @@ path-is-inside@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
-path-key@^2.0.0:
+path-key@^2.0.0, path-key@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
@@ -8273,6 +8960,10 @@ prepend-http@^1.0.0, prepend-http@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
+prepend-http@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
+
preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
@@ -8281,6 +8972,10 @@ prettier@^1.11.1:
version "1.12.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325"
+prettier@^1.5.3:
+ version "1.12.1"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325"
+
pretty-bytes@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-1.0.4.tgz#0a22e8210609ad35542f8c8d5d2159aff0751c84"
@@ -8288,6 +8983,10 @@ pretty-bytes@^1.0.4:
get-stdin "^4.0.1"
meow "^3.1.0"
+pretty-bytes@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
+
pretty-hrtime@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
@@ -8299,7 +8998,7 @@ pretty-ms@3.1.0:
parse-ms "^1.0.0"
plur "^2.1.2"
-private@^0.1.6, private@^0.1.7:
+private@^0.1.6, private@^0.1.7, private@~0.1.5:
version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
@@ -8786,6 +9485,13 @@ react@^15.5.4:
object-assign "^4.1.1"
prop-types "^15.6.0"
+read-chunk@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/read-chunk/-/read-chunk-2.1.0.tgz#6a04c0928005ed9d42e1a6ac5600e19cbc7ff655"
+ dependencies:
+ pify "^3.0.0"
+ safe-buffer "^5.1.1"
+
read-cmd-shim@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b"
@@ -8889,6 +9595,25 @@ readline2@^0.1.1:
mute-stream "0.0.4"
strip-ansi "^2.0.1"
+recast@^0.12.5:
+ version "0.12.9"
+ resolved "https://registry.yarnpkg.com/recast/-/recast-0.12.9.tgz#e8e52bdb9691af462ccbd7c15d5a5113647a15f1"
+ dependencies:
+ ast-types "0.10.1"
+ core-js "^2.4.1"
+ esprima "~4.0.0"
+ private "~0.1.5"
+ source-map "~0.6.1"
+
+recast@^0.14.1:
+ version "0.14.7"
+ resolved "https://registry.yarnpkg.com/recast/-/recast-0.14.7.tgz#4f1497c2b5826d42a66e8e3c9d80c512983ff61d"
+ dependencies:
+ ast-types "0.11.3"
+ esprima "~4.0.0"
+ private "~0.1.5"
+ source-map "~0.6.1"
+
rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
@@ -9193,6 +9918,19 @@ resolve@~1.5.0:
dependencies:
path-parse "^1.0.5"
+responselike@1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
+ dependencies:
+ lowercase-keys "^1.0.0"
+
+restore-cursor@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541"
+ dependencies:
+ exit-hook "^1.0.0"
+ onetime "^1.0.0"
+
restore-cursor@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
@@ -9254,7 +9992,7 @@ rollbar@^0.6.5:
optionalDependencies:
decache "^3.0.5"
-run-async@^2.2.0:
+run-async@^2.0.0, run-async@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
dependencies:
@@ -9284,6 +10022,12 @@ rx@^2.4.3:
version "2.5.3"
resolved "https://registry.yarnpkg.com/rx/-/rx-2.5.3.tgz#21adc7d80f02002af50dae97fd9dbf248755f566"
+rxjs@^5.4.2, rxjs@^5.5.2:
+ version "5.5.10"
+ resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.10.tgz#fde02d7a614f6c8683d0d1957827f492e09db045"
+ dependencies:
+ symbol-observable "1.0.1"
+
safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
@@ -9322,6 +10066,10 @@ schema-utils@^0.4.5:
ajv "^6.1.0"
ajv-keywords "^3.1.0"
+scoped-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/scoped-regex/-/scoped-regex-1.0.0.tgz#a346bb1acd4207ae70bd7c0c7ca9e566b6baddb8"
+
scrypt-js@2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.3.tgz#bb0040be03043da9a012a2cea9fc9f852cfc87d4"
@@ -9582,6 +10330,14 @@ shelljs@^0.7.0, shelljs@^0.7.3:
interpret "^1.0.0"
rechoir "^0.6.2"
+shelljs@^0.8.0:
+ version "0.8.2"
+ resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35"
+ dependencies:
+ glob "^7.0.0"
+ interpret "^1.0.0"
+ rechoir "^0.6.2"
+
shelljs@^0.8.1:
version "0.8.1"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.1.tgz#729e038c413a2254c4078b95ed46e0397154a9f1"
@@ -9642,6 +10398,10 @@ slash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
+slice-ansi@0.0.4:
+ version "0.0.4"
+ resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
+
slide@^1.1.5:
version "1.1.6"
resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"
@@ -9913,7 +10673,7 @@ split@0.3:
dependencies:
through "2"
-split@^1.0.0:
+split@^1.0.0, split@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9"
dependencies:
@@ -10021,6 +10781,12 @@ stream-shift@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952"
+stream-to-observable@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.2.0.tgz#59d6ea393d87c2c0ddac10aa0d561bc6ba6f0e10"
+ dependencies:
+ any-observable "^0.2.0"
+
stream-to-pull-stream@^1.7.1:
version "1.7.2"
resolved "https://registry.yarnpkg.com/stream-to-pull-stream/-/stream-to-pull-stream-1.7.2.tgz#757609ae1cebd33c7432d4afbe31ff78650b9dde"
@@ -10046,6 +10812,10 @@ string-editor@^0.1.0:
dependencies:
editor "^1.0.0"
+string-template@~0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add"
+
string-width@^1.0.1, string-width@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
@@ -10109,6 +10879,10 @@ strip-ansi@^4.0.0:
dependencies:
ansi-regex "^3.0.0"
+strip-ansi@~0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991"
+
strip-bom-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee"
@@ -10116,6 +10890,13 @@ strip-bom-stream@^1.0.0:
first-chunk-stream "^1.0.0"
strip-bom "^2.0.0"
+strip-bom-stream@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz#f87db5ef2613f6968aa545abfe1ec728b6a829ca"
+ dependencies:
+ first-chunk-stream "^2.0.0"
+ strip-bom "^2.0.0"
+
strip-bom@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794"
@@ -10250,7 +11031,15 @@ swarm-js@0.1.37:
tar.gz "^1.0.5"
xhr-request-promise "^0.1.2"
-symbol-observable@^1.0.3, symbol-observable@^1.0.4, symbol-observable@^1.2.0:
+symbol-observable@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"
+
+symbol-observable@^0.2.2:
+ version "0.2.4"
+ resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40"
+
+symbol-observable@^1.0.3, symbol-observable@^1.0.4:
version "1.2.0"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"
@@ -10262,6 +11051,10 @@ tapable@^0.2.5, tapable@^0.2.7:
version "0.2.8"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22"
+tapable@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2"
+
tape@^4.4.0, tape@^4.6.3, tape@^4.8.0:
version "4.9.0"
resolved "https://registry.yarnpkg.com/tape/-/tape-4.9.0.tgz#855c08360395133709d34d3fbf9ef341eb73ca6a"
@@ -10355,7 +11148,7 @@ temp-write@^3.3.0:
temp-dir "^1.0.0"
uuid "^3.0.1"
-temp@^0.8.3:
+temp@^0.8.1, temp@^0.8.3:
version "0.8.3"
resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59"
dependencies:
@@ -10393,6 +11186,14 @@ text-extensions@^1.0.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.7.0.tgz#faaaba2625ed746d568a23e4d0aacd9bf08a8b39"
+text-table@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
+
+textextensions@2:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.2.0.tgz#38ac676151285b658654581987a0ce1a4490d286"
+
thenby@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/thenby/-/thenby-1.2.3.tgz#62465b07e3d8b9466f01026df837f738e0faaa69"
@@ -10409,6 +11210,10 @@ thenify-all@^1.0.0, thenify-all@^1.6.0:
dependencies:
any-promise "^1.0.0"
+throat@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a"
+
through2-filter@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec"
@@ -10860,6 +11665,10 @@ underscore@1.8.3:
version "1.8.3"
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022"
+underscore@~1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8"
+
underscore@~1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.7.0.tgz#6bbaf0877500d36be34ecaa584e0db9fef035209"
@@ -10974,6 +11783,10 @@ unset-value@^1.0.0:
has-value "^0.3.1"
isobject "^3.0.0"
+untildify@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/untildify/-/untildify-3.0.2.tgz#7f1f302055b3fea0f3e81dc78eb36766cb65e3f1"
+
unzip-response@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97"
@@ -11013,6 +11826,12 @@ url-parse-lax@^1.0.0:
dependencies:
prepend-http "^1.0.1"
+url-parse-lax@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
+ dependencies:
+ prepend-http "^2.0.0"
+
url-parse@1.0.x:
version "1.0.5"
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b"
@@ -11118,6 +11937,10 @@ uvm@1.7.0:
lodash "4.17.4"
uuid "3.0.1"
+v8-compile-cache@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-1.1.2.tgz#8d32e4f16974654657e676e0e467a348e89b0dc4"
+
v8flags@^2.0.2:
version "2.1.1"
resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4"
@@ -11178,6 +12001,17 @@ vfile@^2.0.0:
unist-util-stringify-position "^1.0.0"
vfile-message "^1.0.0"
+vinyl-file@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-2.0.0.tgz#a7ebf5ffbefda1b7d18d140fcb07b223efb6751a"
+ dependencies:
+ graceful-fs "^4.1.2"
+ pify "^2.3.0"
+ pinkie-promise "^2.0.0"
+ strip-bom "^2.0.0"
+ strip-bom-stream "^2.0.0"
+ vinyl "^1.1.0"
+
vinyl-fs@^0.3.0:
version "0.3.14"
resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6"
@@ -11228,7 +12062,7 @@ vinyl@^0.5.0:
clone-stats "^0.0.1"
replace-ext "0.0.1"
-vinyl@^1.0.0:
+vinyl@^1.0.0, vinyl@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884"
dependencies:
@@ -11236,7 +12070,7 @@ vinyl@^1.0.0:
clone-stats "^0.0.1"
replace-ext "0.0.1"
-vinyl@^2.0.0:
+vinyl@^2.0.0, vinyl@^2.0.1:
version "2.1.0"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c"
dependencies:
@@ -11578,6 +12412,43 @@ web3@^1.0.0-beta.30:
web3-shh "1.0.0-beta.34"
web3-utils "1.0.0-beta.34"
+webpack-addons@^1.1.5:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/webpack-addons/-/webpack-addons-1.1.5.tgz#2b178dfe873fb6e75e40a819fa5c26e4a9bc837a"
+ dependencies:
+ jscodeshift "^0.4.0"
+
+webpack-cli@^2.0.9:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-2.1.3.tgz#65d166851abaa56067ef3f716b02a97ba6bbe84d"
+ dependencies:
+ chalk "^2.3.2"
+ cross-spawn "^6.0.5"
+ diff "^3.5.0"
+ enhanced-resolve "^4.0.0"
+ envinfo "^4.4.2"
+ glob-all "^3.1.0"
+ global-modules "^1.0.0"
+ got "^8.2.0"
+ import-local "^1.0.0"
+ inquirer "^5.1.0"
+ interpret "^1.0.4"
+ jscodeshift "^0.5.0"
+ listr "^0.13.0"
+ loader-utils "^1.1.0"
+ lodash "^4.17.5"
+ log-symbols "^2.2.0"
+ mkdirp "^0.5.1"
+ p-each-series "^1.0.0"
+ p-lazy "^1.0.0"
+ prettier "^1.5.3"
+ supports-color "^5.3.0"
+ v8-compile-cache "^1.1.2"
+ webpack-addons "^1.1.5"
+ yargs "^11.1.0"
+ yeoman-environment "^2.0.0"
+ yeoman-generator "^2.0.4"
+
webpack-dev-middleware@1.12.2, webpack-dev-middleware@^1.10.0:
version "1.12.2"
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e"
@@ -11631,7 +12502,7 @@ webpack-sources@^1.0.1:
source-list-map "^2.0.0"
source-map "~0.6.1"
-webpack@^3.0.0, webpack@^3.1.0, webpack@^3.11.0:
+webpack@^3.1.0, webpack@^3.11.0:
version "3.11.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.11.0.tgz#77da451b1d7b4b117adaf41a1a93b5742f24d894"
dependencies:
@@ -11772,7 +12643,7 @@ wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
-write-file-atomic@^1.1.4:
+write-file-atomic@^1.1.4, write-file-atomic@^1.2.0:
version "1.3.4"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f"
dependencies:
@@ -11820,6 +12691,18 @@ ws@^5.1.1:
dependencies:
async-limiter "~1.0.0"
+wsrun@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/wsrun/-/wsrun-2.2.0.tgz#fe05ca2c466e9281059d255b2773e7964dbcb3a7"
+ dependencies:
+ bluebird "^3.5.1"
+ chalk "^2.3.0"
+ glob "^7.1.2"
+ lodash "^4.17.4"
+ split "^1.0.1"
+ throat "^4.1.0"
+ yargs "^10.0.3"
+
x-is-function@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/x-is-function/-/x-is-function-1.0.4.tgz#5d294dc3d268cbdd062580e0c5df77a391d1fa1e"
@@ -11944,7 +12827,7 @@ yargs-parser@^9.0.2:
dependencies:
camelcase "^4.1.0"
-yargs@11.1.0:
+yargs@11.1.0, yargs@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77"
dependencies:
@@ -12051,6 +12934,12 @@ yargs@^8.0.2:
y18n "^3.2.1"
yargs-parser "^7.0.0"
+yargs@~1.2.6:
+ version "1.2.6"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-1.2.6.tgz#9c7b4a82fd5d595b2bf17ab6dcc43135432fe34b"
+ dependencies:
+ minimist "^0.1.0"
+
yargs@~3.10.0:
version "3.10.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
@@ -12067,6 +12956,56 @@ yauzl@^2.4.2:
buffer-crc32 "~0.2.3"
fd-slicer "~1.0.1"
+yeoman-environment@^2.0.0, yeoman-environment@^2.0.5:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/yeoman-environment/-/yeoman-environment-2.1.0.tgz#175f49ad693aff41c8998d32f6103c20c62ec37b"
+ dependencies:
+ chalk "^2.1.0"
+ cross-spawn "^6.0.5"
+ debug "^3.1.0"
+ diff "^3.3.1"
+ escape-string-regexp "^1.0.2"
+ globby "^8.0.1"
+ grouped-queue "^0.3.3"
+ inquirer "^5.2.0"
+ is-scoped "^1.0.0"
+ lodash "^4.17.10"
+ log-symbols "^2.1.0"
+ mem-fs "^1.1.0"
+ strip-ansi "^4.0.0"
+ text-table "^0.2.0"
+ untildify "^3.0.2"
+
+yeoman-generator@^2.0.4:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/yeoman-generator/-/yeoman-generator-2.0.5.tgz#57b0b3474701293cc9ec965288f3400b00887c81"
+ dependencies:
+ async "^2.6.0"
+ chalk "^2.3.0"
+ cli-table "^0.3.1"
+ cross-spawn "^6.0.5"
+ dargs "^5.1.0"
+ dateformat "^3.0.3"
+ debug "^3.1.0"
+ detect-conflict "^1.0.0"
+ error "^7.0.2"
+ find-up "^2.1.0"
+ github-username "^4.0.0"
+ istextorbinary "^2.2.1"
+ lodash "^4.17.10"
+ make-dir "^1.1.0"
+ mem-fs-editor "^4.0.0"
+ minimist "^1.2.0"
+ pretty-bytes "^4.0.2"
+ read-chunk "^2.1.0"
+ read-pkg-up "^3.0.0"
+ rimraf "^2.6.2"
+ run-async "^2.0.0"
+ shelljs "^0.8.0"
+ text-table "^0.2.0"
+ through2 "^2.0.0"
+ yeoman-environment "^2.0.5"
+
zeppelin-solidity@1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/zeppelin-solidity/-/zeppelin-solidity-1.8.0.tgz#049fcde7daea9fc85210f8c6db9f8cd1ab8a853a"