diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-08 03:45:48 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-08 03:45:48 +0800 |
commit | 20f93185975d16c77492f05eb86dd89695539cd9 (patch) | |
tree | 37b0380cbe98b8a44a350232d4125a1cc77b06b0 /packages | |
parent | b646c8441467212e60f03c868a55d6ab70720aba (diff) | |
parent | 9bc6ebde4e4425799ed3ddfb50495029865e3ae8 (diff) | |
download | dexon-sol-tools-20f93185975d16c77492f05eb86dd89695539cd9.tar dexon-sol-tools-20f93185975d16c77492f05eb86dd89695539cd9.tar.gz dexon-sol-tools-20f93185975d16c77492f05eb86dd89695539cd9.tar.bz2 dexon-sol-tools-20f93185975d16c77492f05eb86dd89695539cd9.tar.lz dexon-sol-tools-20f93185975d16c77492f05eb86dd89695539cd9.tar.xz dexon-sol-tools-20f93185975d16c77492f05eb86dd89695539cd9.tar.zst dexon-sol-tools-20f93185975d16c77492f05eb86dd89695539cd9.zip |
Merge branch 'v2-prototype' into feature/combinatorial-testing
* v2-prototype:
Fix linter issue
Fix linter issue
Fix tslint issues
Fix missing paths
Fixed path
Use source-map-support package to include correct line numbers in mocha
move generated contract wrappers from `contract_wrappers/generated/` to `generated_contract_wrappers` in package with no non-generated contract wrappers
Diffstat (limited to 'packages')
41 files changed, 80 insertions, 79 deletions
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index d18960b5d..96e870851 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -20,17 +20,17 @@ "build:all": "run-p build:umd:prod build:commonjs; exit 0;", "pre_build": "run-s generate_contract_wrappers copy_artifacts", "copy_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts", - "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", - "lint": "tslint --project . --exclude **/src/contract_wrappers/generated/**/*", + "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/generated_contract_wrappers --backend ethers", + "lint": "tslint --project . --exclude **/src/generated_contract_wrapper/**/*", "test:circleci": "run-s test:coverage", "test": "yarn run_mocha", "rebuild_and_test": "run-s build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "clean": "shx rm -rf _bundles lib test_temp scripts src/contract_wrappers/generated", + "clean": "shx rm -rf _bundles lib test_temp scripts src/generated_contract_wrappers", "build:umd:prod": "NODE_ENV=production webpack", "build:commonjs": "tsc && copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", - "run_mocha": "mocha lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", "manual:postpublish": "yarn build; node ./scripts/postpublish.js", "docs:stage": "node scripts/stage_docs.js", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES", @@ -54,9 +54,9 @@ "../contract-wrappers/src/contract_wrappers/token_transfer_proxy_wrapper.ts", "../contract-wrappers/src/contract_wrappers/token_wrapper.ts", "../order-watcher/src/order_watcher/order_watcher.ts", - "./src/contract_wrappers/generated/ether_token.ts", - "./src/contract_wrappers/generated/token.ts", - "./src/contract_wrappers/generated/exchange.ts" + "./src/generated_contract_wrappers/ether_token.ts", + "./src/generated_contract_wrappers/token.ts", + "./src/generated_contract_wrappers/exchange.ts" ], "s3BucketPath": "s3://doc-jsons/0x.js/", "s3StagingBucketPath": "s3://staging-doc-jsons/0x.js/" diff --git a/packages/assert/package.json b/packages/assert/package.json index 9e4fcbbf0..e9e3bec32 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -12,7 +12,7 @@ "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "clean": "shx rm -rf lib test_temp scripts", "lint": "tslint --project .", - "run_mocha": "mocha lib/test/**/*_test.js --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit", "prepublishOnly": "run-p build", "test": "yarn run_mocha", "rebuild_and_test": "run-s clean build test", diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json index cb27e9efa..595bca3a9 100644 --- a/packages/base-contract/package.json +++ b/packages/base-contract/package.json @@ -14,7 +14,7 @@ "test": "yarn run_mocha", "rebuild_and_test": "run-s clean build test", "test:circleci": "yarn test:coverage", - "run_mocha": "mocha lib/test/**/*_test.js --bail --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "lint": "tslint --project . --exclude **/src/contract_wrappers/**/*", diff --git a/packages/connect/package.json b/packages/connect/package.json index 5079467e4..6b5a5a7b0 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -20,7 +20,7 @@ "clean": "shx rm -rf lib test_temp scripts", "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", "lint": "tslint --project .", - "run_mocha": "mocha lib/test/**/*_test.js --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit", "test": "run-s copy_test_fixtures run_mocha", "rebuild_and_test": "run-s clean build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 71c2ee780..d5d4bfbc8 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -24,7 +24,7 @@ "update_compact_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts", "update_test_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/1.0.0/$i.json test/artifacts; done;", "clean": "shx rm -rf _bundles lib test_temp scripts test/artifacts src/contract_wrappers/generated", - "run_mocha": "mocha lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", "manual:postpublish": "yarn build; node ./scripts/postpublish.js" }, "config": { diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 3f9160fa7..99c507197 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -18,11 +18,11 @@ "test": "yarn run_mocha", "rebuild_and_test": "run-s build test", "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", + "run_mocha": "mocha --require source-map-support/register 'lib/test/**/*.js' --timeout 100000 --bail --exit", "compile": "sol-compiler", - "clean": "shx rm -rf lib src/contract_wrappers/generated", + "clean": "shx rm -rf lib src/generated_contract_wrappers", "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", + "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers", "lint": "tslint --project . --exclude **/src/contract_wrappers/**/* --exclude **/lib/**/*", "coverage:report:text": "istanbul report text", "coverage:report:html": "istanbul report html && open coverage/index.html", diff --git a/packages/contracts/src/utils/erc20_wrapper.ts b/packages/contracts/src/utils/erc20_wrapper.ts index efb245c89..fc42fbff2 100644 --- a/packages/contracts/src/utils/erc20_wrapper.ts +++ b/packages/contracts/src/utils/erc20_wrapper.ts @@ -3,8 +3,8 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; -import { DummyERC20TokenContract } from '../contract_wrappers/generated/dummy_e_r_c20_token'; -import { ERC20ProxyContract } from '../contract_wrappers/generated/e_r_c20_proxy'; +import { DummyERC20TokenContract } from '../generated_contract_wrappers/dummy_e_r_c20_token'; +import { ERC20ProxyContract } from '../generated_contract_wrappers/e_r_c20_proxy'; import { artifacts } from './artifacts'; import { constants } from './constants'; diff --git a/packages/contracts/src/utils/erc721_wrapper.ts b/packages/contracts/src/utils/erc721_wrapper.ts index 13fdf630e..b20d9acd2 100644 --- a/packages/contracts/src/utils/erc721_wrapper.ts +++ b/packages/contracts/src/utils/erc721_wrapper.ts @@ -4,8 +4,8 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; -import { DummyERC721TokenContract } from '../contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC721ProxyContract } from '../contract_wrappers/generated/e_r_c721_proxy'; +import { DummyERC721TokenContract } from '../generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC721ProxyContract } from '../generated_contract_wrappers/e_r_c721_proxy'; import { artifacts } from './artifacts'; import { constants } from './constants'; diff --git a/packages/contracts/src/utils/exchange_wrapper.ts b/packages/contracts/src/utils/exchange_wrapper.ts index 7af243466..a8ca5183e 100644 --- a/packages/contracts/src/utils/exchange_wrapper.ts +++ b/packages/contracts/src/utils/exchange_wrapper.ts @@ -4,7 +4,7 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types'; import * as _ from 'lodash'; -import { ExchangeContract } from '../contract_wrappers/generated/exchange'; +import { ExchangeContract } from '../generated_contract_wrappers/exchange'; import { constants } from './constants'; import { formatters } from './formatters'; diff --git a/packages/contracts/src/utils/multi_sig_wrapper.ts b/packages/contracts/src/utils/multi_sig_wrapper.ts index 8c4dbcedf..f0098bd5e 100644 --- a/packages/contracts/src/utils/multi_sig_wrapper.ts +++ b/packages/contracts/src/utils/multi_sig_wrapper.ts @@ -3,8 +3,8 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types'; import * as _ from 'lodash'; -import { AssetProxyOwnerContract } from '../contract_wrappers/generated/asset_proxy_owner'; -import { MultiSigWalletContract } from '../contract_wrappers/generated/multi_sig_wallet'; +import { AssetProxyOwnerContract } from '../generated_contract_wrappers/asset_proxy_owner'; +import { MultiSigWalletContract } from '../generated_contract_wrappers/multi_sig_wallet'; import { LogDecoder } from './log_decoder'; diff --git a/packages/contracts/src/utils/token_registry_wrapper.ts b/packages/contracts/src/utils/token_registry_wrapper.ts index 240c06fdc..91895aa59 100644 --- a/packages/contracts/src/utils/token_registry_wrapper.ts +++ b/packages/contracts/src/utils/token_registry_wrapper.ts @@ -1,7 +1,7 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Provider } from 'ethereum-types'; -import { TokenRegistryContract } from '../contract_wrappers/generated/token_registry'; +import { TokenRegistryContract } from '../generated_contract_wrappers/token_registry'; import { Token } from './types'; diff --git a/packages/contracts/test/asset_proxy/authorizable.ts b/packages/contracts/test/asset_proxy/authorizable.ts index 922baa856..347d060d6 100644 --- a/packages/contracts/test/asset_proxy/authorizable.ts +++ b/packages/contracts/test/asset_proxy/authorizable.ts @@ -2,7 +2,7 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; import * as chai from 'chai'; import 'make-promises-safe'; -import { MixinAuthorizableContract } from '../../src/contract_wrappers/generated/mixin_authorizable'; +import { MixinAuthorizableContract } from '../../src/generated_contract_wrappers/mixin_authorizable'; import { artifacts } from '../../src/utils/artifacts'; import { expectRevertOrAlwaysFailingTransactionAsync } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; diff --git a/packages/contracts/test/asset_proxy/proxies.ts b/packages/contracts/test/asset_proxy/proxies.ts index eb2a1544f..d14280c5f 100644 --- a/packages/contracts/test/asset_proxy/proxies.ts +++ b/packages/contracts/test/asset_proxy/proxies.ts @@ -4,10 +4,10 @@ import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; -import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c20_token'; -import { DummyERC721TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; import { expectRevertOrAlwaysFailingTransactionAsync } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; import { constants } from '../../src/utils/constants'; diff --git a/packages/contracts/test/asset_proxy_owner.ts b/packages/contracts/test/asset_proxy_owner.ts index 692622e1e..cbe429b12 100644 --- a/packages/contracts/test/asset_proxy_owner.ts +++ b/packages/contracts/test/asset_proxy_owner.ts @@ -10,8 +10,8 @@ import { ExecutionContractEventArgs, ExecutionFailureContractEventArgs, SubmissionContractEventArgs, -} from '../src/contract_wrappers/generated/asset_proxy_owner'; -import { MixinAuthorizableContract } from '../src/contract_wrappers/generated/mixin_authorizable'; +} from '../src/generated_contract_wrappers/asset_proxy_owner'; +import { MixinAuthorizableContract } from '../src/generated_contract_wrappers/mixin_authorizable'; import { artifacts } from '../src/utils/artifacts'; import { expectRevertOrAlwaysFailingTransactionAsync, diff --git a/packages/contracts/test/ether_token.ts b/packages/contracts/test/ether_token.ts index 5fa63f8ad..e2fc69aee 100644 --- a/packages/contracts/test/ether_token.ts +++ b/packages/contracts/test/ether_token.ts @@ -4,7 +4,7 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; import 'make-promises-safe'; -import { WETH9Contract } from '../src/contract_wrappers/generated/weth9'; +import { WETH9Contract } from '../src/generated_contract_wrappers/weth9'; import { artifacts } from '../src/utils/artifacts'; import { expectInsufficientFundsAsync, expectRevertOrAlwaysFailingTransactionAsync } from '../src/utils/assertions'; import { chaiSetup } from '../src/utils/chai_setup'; diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index 5ec04c4dd..bee74cca8 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -8,15 +8,15 @@ import { LogWithDecodedArgs } from 'ethereum-types'; import ethUtil = require('ethereumjs-util'); import 'make-promises-safe'; -import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c20_token'; -import { DummyERC721TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; import { CancelContractEventArgs, ExchangeContract, FillContractEventArgs, -} from '../../src/contract_wrappers/generated/exchange'; +} from '../../src/generated_contract_wrappers/exchange'; import { artifacts } from '../../src/utils/artifacts'; import { expectRevertOrAlwaysFailingTransactionAsync } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; diff --git a/packages/contracts/test/exchange/dispatcher.ts b/packages/contracts/test/exchange/dispatcher.ts index 7804a2db9..02d43a132 100644 --- a/packages/contracts/test/exchange/dispatcher.ts +++ b/packages/contracts/test/exchange/dispatcher.ts @@ -4,10 +4,10 @@ import { AssetProxyId } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; -import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c20_token'; -import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; -import { TestAssetProxyDispatcherContract } from '../../src/contract_wrappers/generated/test_asset_proxy_dispatcher'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; +import { TestAssetProxyDispatcherContract } from '../../src/generated_contract_wrappers/test_asset_proxy_dispatcher'; import { artifacts } from '../../src/utils/artifacts'; import { expectRevertOrAlwaysFailingTransactionAsync } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; diff --git a/packages/contracts/test/exchange/libs.ts b/packages/contracts/test/exchange/libs.ts index 8553e49c8..b12934014 100644 --- a/packages/contracts/test/exchange/libs.ts +++ b/packages/contracts/test/exchange/libs.ts @@ -4,7 +4,7 @@ import { SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; -import { TestLibsContract } from '../../src/contract_wrappers/generated/test_libs'; +import { TestLibsContract } from '../../src/generated_contract_wrappers/test_libs'; import { addressUtils } from '../../src/utils/address_utils'; import { artifacts } from '../../src/utils/artifacts'; import { chaiSetup } from '../../src/utils/chai_setup'; diff --git a/packages/contracts/test/exchange/match_orders.ts b/packages/contracts/test/exchange/match_orders.ts index 7c2ae4db8..aab3308ae 100644 --- a/packages/contracts/test/exchange/match_orders.ts +++ b/packages/contracts/test/exchange/match_orders.ts @@ -6,11 +6,11 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; import * as _ from 'lodash'; -import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c20_token'; -import { DummyERC721TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; -import { ExchangeContract } from '../../src/contract_wrappers/generated/exchange'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; +import { ExchangeContract } from '../../src/generated_contract_wrappers/exchange'; import { artifacts } from '../../src/utils/artifacts'; import { expectRevertOrAlwaysFailingTransactionAsync } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; diff --git a/packages/contracts/test/exchange/signature_validator.ts b/packages/contracts/test/exchange/signature_validator.ts index bc3368d5f..79db620b4 100644 --- a/packages/contracts/test/exchange/signature_validator.ts +++ b/packages/contracts/test/exchange/signature_validator.ts @@ -4,7 +4,7 @@ import { SignedOrder } from '@0xproject/types'; import * as chai from 'chai'; import ethUtil = require('ethereumjs-util'); -import { TestSignatureValidatorContract } from '../../src/contract_wrappers/generated/test_signature_validator'; +import { TestSignatureValidatorContract } from '../../src/generated_contract_wrappers/test_signature_validator'; import { addressUtils } from '../../src/utils/address_utils'; import { artifacts } from '../../src/utils/artifacts'; import { chaiSetup } from '../../src/utils/chai_setup'; diff --git a/packages/contracts/test/exchange/transactions.ts b/packages/contracts/test/exchange/transactions.ts index e24978815..60e674a95 100644 --- a/packages/contracts/test/exchange/transactions.ts +++ b/packages/contracts/test/exchange/transactions.ts @@ -4,10 +4,10 @@ import { AssetProxyId, OrderWithoutExchangeAddress, SignedOrder } from '@0xproje import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; -import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c20_token'; -import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; -import { ExchangeContract } from '../../src/contract_wrappers/generated/exchange'; -import { WhitelistContract } from '../../src/contract_wrappers/generated/whitelist'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ExchangeContract } from '../../src/generated_contract_wrappers/exchange'; +import { WhitelistContract } from '../../src/generated_contract_wrappers/whitelist'; import { artifacts } from '../../src/utils/artifacts'; import { expectRevertOrAlwaysFailingTransactionAsync } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts index 6a522e50e..258e1ff81 100644 --- a/packages/contracts/test/exchange/wrapper.ts +++ b/packages/contracts/test/exchange/wrapper.ts @@ -7,11 +7,11 @@ import * as chai from 'chai'; import * as _ from 'lodash'; import 'make-promises-safe'; -import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c20_token'; -import { DummyERC721TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c721_token'; -import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy'; -import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy'; -import { ExchangeContract } from '../../src/contract_wrappers/generated/exchange'; +import { DummyERC20TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c20_token'; +import { DummyERC721TokenContract } from '../../src/generated_contract_wrappers/dummy_e_r_c721_token'; +import { ERC20ProxyContract } from '../../src/generated_contract_wrappers/e_r_c20_proxy'; +import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c721_proxy'; +import { ExchangeContract } from '../../src/generated_contract_wrappers/exchange'; import { artifacts } from '../../src/utils/artifacts'; import { expectRevertOrAlwaysFailingTransactionAsync } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; diff --git a/packages/contracts/test/libraries/lib_bytes.ts b/packages/contracts/test/libraries/lib_bytes.ts index baac497e8..0996cdc84 100644 --- a/packages/contracts/test/libraries/lib_bytes.ts +++ b/packages/contracts/test/libraries/lib_bytes.ts @@ -4,7 +4,7 @@ import BN = require('bn.js'); import * as chai from 'chai'; import ethUtil = require('ethereumjs-util'); -import { TestLibBytesContract } from '../../src/contract_wrappers/generated/test_lib_bytes'; +import { TestLibBytesContract } from '../../src/generated_contract_wrappers/test_lib_bytes'; import { artifacts } from '../../src/utils/artifacts'; import { expectRevertOrOtherErrorAsync } from '../../src/utils/assertions'; import { chaiSetup } from '../../src/utils/chai_setup'; diff --git a/packages/contracts/test/multi_sig_with_time_lock.ts b/packages/contracts/test/multi_sig_with_time_lock.ts index 48bc9b4e0..f630743e1 100644 --- a/packages/contracts/test/multi_sig_with_time_lock.ts +++ b/packages/contracts/test/multi_sig_with_time_lock.ts @@ -7,7 +7,7 @@ import 'make-promises-safe'; import { MultiSigWalletWithTimeLockContract, SubmissionContractEventArgs, -} from '../src/contract_wrappers/generated/multi_sig_wallet_with_time_lock'; +} from '../src/generated_contract_wrappers/multi_sig_wallet_with_time_lock'; import { artifacts } from '../src/utils/artifacts'; import { expectRevertOrAlwaysFailingTransactionAsync } from '../src/utils/assertions'; import { chaiSetup } from '../src/utils/chai_setup'; diff --git a/packages/contracts/test/token_registry.ts b/packages/contracts/test/token_registry.ts index 9526c9dcf..f368fd73d 100644 --- a/packages/contracts/test/token_registry.ts +++ b/packages/contracts/test/token_registry.ts @@ -5,7 +5,7 @@ import ethUtil = require('ethereumjs-util'); import * as _ from 'lodash'; import 'make-promises-safe'; -import { TokenRegistryContract } from '../src/contract_wrappers/generated/token_registry'; +import { TokenRegistryContract } from '../src/generated_contract_wrappers/token_registry'; import { artifacts } from '../src/utils/artifacts'; import { expectRevertOrAlwaysFailingTransactionAsync } from '../src/utils/assertions'; import { chaiSetup } from '../src/utils/chai_setup'; diff --git a/packages/contracts/test/tutorials/arbitrage.ts b/packages/contracts/test/tutorials/arbitrage.ts index df01f31bb..32fcedb43 100644 --- a/packages/contracts/test/tutorials/arbitrage.ts +++ b/packages/contracts/test/tutorials/arbitrage.ts @@ -8,12 +8,12 @@ // import ethUtil = require('ethereumjs-util'); // import * as Web3 from 'web3'; -// import { AccountLevelsContract } from '../../src/contract_wrappers/generated/account_levels'; -// import { ArbitrageContract } from '../../src/contract_wrappers/generated/arbitrage'; -// import { DummyTokenContract } from '../../src/contract_wrappers/generated/dummy_token'; -// import { EtherDeltaContract } from '../../src/contract_wrappers/generated/ether_delta'; -// import { ExchangeContract } from '../../src/contract_wrappers/generated/exchange'; -// import { TokenTransferProxyContract } from '../../src/contract_wrappers/generated/token_transfer_proxy'; +// import { AccountLevelsContract } from '../../src/generated_contract_wrappers/account_levels'; +// import { ArbitrageContract } from '../../src/generated_contract_wrappers/arbitrage'; +// import { DummyTokenContract } from '../../src/generated_contract_wrappers/dummy_token'; +// import { EtherDeltaContract } from '../../src/generated_contract_wrappers/ether_delta'; +// import { ExchangeContract } from '../../src/generated_contract_wrappers/exchange'; +// import { TokenTransferProxyContract } from '../../src/generated_contract_wrappers/token_transfer_proxy'; // import { artifacts } from '../../util/artifacts'; // import { Balances } from '../../util/balances'; // import { constants } from '../../util/constants'; diff --git a/packages/contracts/test/unlimited_allowance_token.ts b/packages/contracts/test/unlimited_allowance_token.ts index ae9e80270..0c3f5094b 100644 --- a/packages/contracts/test/unlimited_allowance_token.ts +++ b/packages/contracts/test/unlimited_allowance_token.ts @@ -3,7 +3,7 @@ import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import 'make-promises-safe'; -import { DummyERC20TokenContract } from '../src/contract_wrappers/generated/dummy_e_r_c20_token'; +import { DummyERC20TokenContract } from '../src/generated_contract_wrappers/dummy_e_r_c20_token'; import { artifacts } from '../src/utils/artifacts'; import { expectRevertOrOtherErrorAsync } from '../src/utils/assertions'; import { chaiSetup } from '../src/utils/chai_setup'; diff --git a/packages/contracts/test/zrx_token.ts b/packages/contracts/test/zrx_token.ts index 0dbafce69..996030000 100644 --- a/packages/contracts/test/zrx_token.ts +++ b/packages/contracts/test/zrx_token.ts @@ -4,7 +4,7 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; import 'make-promises-safe'; -import { ZRXTokenContract } from '../src/contract_wrappers/generated/zrx_token'; +import { ZRXTokenContract } from '../src/generated_contract_wrappers/zrx_token'; import { artifacts } from '../src/utils/artifacts'; import { chaiSetup } from '../src/utils/chai_setup'; import { constants } from '../src/utils/constants'; diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index e4beacd15..cac3863a6 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -13,7 +13,7 @@ "test": "yarn run_mocha", "rebuild_and_test": "run-s clean build test", "test:circleci": "yarn test:coverage", - "run_mocha": "mocha lib/test/**/*_test.js --bail --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "clean": "shx rm -rf lib scripts", diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index cb4b998f4..c6ab369b3 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -15,7 +15,7 @@ "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", - "run_mocha": "mocha lib/test/**/*_test.js --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit", "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", diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index 35e54314a..74b55b592 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -17,7 +17,7 @@ "test": "yarn run_mocha", "rebuild_and_test": "run-s build test", "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", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js lib/test/global_hooks.js --bail --exit", "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", "coverage:report:text": "istanbul report text", "coverage:report:html": "istanbul report html && open coverage/index.html", diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index 3a97b99e3..6c5ad6780 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -18,7 +18,7 @@ "test": "yarn run_mocha", "rebuild_and_test": "run-s build test", "test:circleci": "yarn test:coverage", - "run_mocha": "mocha lib/test/**/*_test.js --bail --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "clean": "shx rm -rf lib scripts lib/src/artifacts src/generated_contract_wrappers", diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index b67df2e4c..2e5dfb094 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -25,7 +25,7 @@ "update_compact_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts", "update_test_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/1.0.0/$i.json test/artifacts; done;", "clean": "shx rm -rf _bundles lib test_temp scripts test/artifacts src/generated_contract_wrappers", - "run_mocha": "mocha lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", "manual:postpublish": "yarn build; node ./scripts/postpublish.js" }, "config": { diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts index f25076213..140aa341b 100644 --- a/packages/order-watcher/src/order_watcher/order_watcher.ts +++ b/packages/order-watcher/src/order_watcher/order_watcher.ts @@ -39,7 +39,6 @@ import { } from '../generated_contract_wrappers/token'; import { OnOrderStateChangeCallback, OrderWatcherConfig, OrderWatcherError } from '../types'; import { assert } from '../utils/assert'; -import { utils } from '../utils/utils'; import { EventWatcher } from './event_watcher'; import { ExpirationWatcher } from './expiration_watcher'; diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 0bd51972d..14eba283f 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -14,7 +14,7 @@ "update_contract_fixtures": "copyfiles 'test/fixtures/contracts/**/*' ./lib", "test": "yarn run_mocha", "rebuild_and_test": "run-s build test", - "run_mocha": "mocha lib/test/*_test.js --bail --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "clean": "shx rm -rf lib scripts", diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index 616b30912..2b4c1db40 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -17,7 +17,7 @@ "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", - "run_mocha": "mocha lib/test/**/*_test.js --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit", "clean": "shx rm -rf lib scripts test/fixtures/artifacts src/artifacts", "copy_test_fixtures": "copyfiles 'test/fixtures/**/*' ./lib", "compile_test": "sol-compiler compile", diff --git a/packages/sra-report/package.json b/packages/sra-report/package.json index d2cc7f32a..2e120d661 100644 --- a/packages/sra-report/package.json +++ b/packages/sra-report/package.json @@ -16,7 +16,7 @@ "rebuild_and_test": "run-s clean build test", "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", "copy_test_environments": "copyfiles -u 2 './test/environments/**/*.json' ./lib/test/environments", - "run_mocha": "mocha lib/test/**/*_test.js --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --exit", "manual:postpublish": "yarn build; node ./scripts/postpublish.js" }, "bin": { diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index 743bd6669..b222ace3b 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -12,8 +12,8 @@ "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "clean": "shx rm -rf lib scripts", "lint": "tslint --project .", - "run_mocha_unit": "mocha lib/test/unit/**/*_test.js --timeout 10000 --bail --exit", - "run_mocha_integration": "mocha lib/test/integration/**/*_test.js --timeout 10000 --bail --exit", + "run_mocha_unit": "mocha --require source-map-support/register lib/test/unit/**/*_test.js --timeout 10000 --bail --exit", + "run_mocha_integration": "mocha --require source-map-support/register lib/test/integration/**/*_test.js --timeout 10000 --bail --exit", "test": "npm run test:unit", "test:unit:coverage": "nyc npm run test:unit --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 694f07e45..de2b72ac6 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -15,7 +15,7 @@ "test": "yarn run_mocha", "rebuild_and_test": "run-s clean build test", "test:circleci": "yarn test:coverage", - "run_mocha": "mocha lib/test/**/*_test.js --bail --exit", + "run_mocha": "mocha --require source-map-support/register lib/test/**/*_test.js --bail --exit", "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", diff --git a/packages/website/ts/components/ui/lifecycle_raised_button.tsx b/packages/website/ts/components/ui/lifecycle_raised_button.tsx index a24de56b7..380fbc77d 100644 --- a/packages/website/ts/components/ui/lifecycle_raised_button.tsx +++ b/packages/website/ts/components/ui/lifecycle_raised_button.tsx @@ -2,7 +2,6 @@ import { colors } from '@0xproject/react-shared'; import { errorUtils } from '@0xproject/utils'; import RaisedButton from 'material-ui/RaisedButton'; import * as React from 'react'; -import { utils } from 'ts/utils/utils'; const COMPLETE_STATE_SHOW_LENGTH_MS = 2000; diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index 94efd1cf7..9c3f447fb 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -101,6 +101,9 @@ const docsInfoConfig: DocsInfoConfig = { '"0x.js/src/contract_wrappers/generated/ether_token"', '"0x.js/src/contract_wrappers/generated/token"', '"0x.js/src/contract_wrappers/generated/exchange"', + '"0x.js/src/generated_contract_wrappers/ether_token"', + '"0x.js/src/generated_contract_wrappers/token"', + '"0x.js/src/generated_contract_wrappers/exchange"', ], }, menuSubsectionToVersionWhenIntroduced: { |