aboutsummaryrefslogtreecommitdiffstats
path: root/comms/viewfax/Makefile
blob: 04b7210d94b40a190443cd6d93846d5eed8ddf22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# New ports collection makefile for:    viewfax
# Date created:         16 sept 1995
# Whom:                 jmz
#
# $FreeBSD$
#

PORTNAME=   viewfax
PORTVERSION=    2.3
CATEGORIES= comms
MASTER_SITES=   ftp://ftp.leo.org/pub/comp/os/unix/networking/mgetty/

MAINTAINER= jmz@FreeBSD.org

USE_IMAKE=  yes

MAN1=       viewfax.1

.include <bsd.port.mk>
ass='none' style='width: 99.7%;'/> -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;