diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-07 00:49:22 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-12-07 00:49:22 +0800 |
commit | 0abbdc6b9652a62f32f9f75e06e15f724260591c (patch) | |
tree | bb0db4619e1f87388c3b3b7a13ec87b99b399ddd /packages | |
parent | 06e348f80ba1e5580d18d927600688863f73c423 (diff) | |
parent | 598f1dd2d8a89b0e3ab04b2917138997031bafc6 (diff) | |
download | dexon-sol-tools-0abbdc6b9652a62f32f9f75e06e15f724260591c.tar dexon-sol-tools-0abbdc6b9652a62f32f9f75e06e15f724260591c.tar.gz dexon-sol-tools-0abbdc6b9652a62f32f9f75e06e15f724260591c.tar.bz2 dexon-sol-tools-0abbdc6b9652a62f32f9f75e06e15f724260591c.tar.lz dexon-sol-tools-0abbdc6b9652a62f32f9f75e06e15f724260591c.tar.xz dexon-sol-tools-0abbdc6b9652a62f32f9f75e06e15f724260591c.tar.zst dexon-sol-tools-0abbdc6b9652a62f32f9f75e06e15f724260591c.zip |
Merge branch 'development' into feature/addSubproviders
* development:
Inline function
Introduce a const
Make private
Add version matcher script
Use same versions of dependencies everywhere
Add missing await
Move declaration into proper conditional block
Fix Party element so that an identicon's height is that which was passed in
# Conflicts:
# packages/website/package.json
# yarn.lock
Diffstat (limited to 'packages')
-rw-r--r-- | packages/0x.js/package.json | 14 | ||||
-rw-r--r-- | packages/assert/package.json | 6 | ||||
-rw-r--r-- | packages/connect/package.json | 8 | ||||
-rw-r--r-- | packages/contracts/package.json | 13 | ||||
-rw-r--r-- | packages/json-schemas/package.json | 6 | ||||
-rw-r--r-- | packages/monorepo-scripts/package.json | 34 | ||||
-rw-r--r-- | packages/monorepo-scripts/src/deps_versions.ts | 56 | ||||
-rw-r--r-- | packages/monorepo-scripts/tsconfig.json | 13 | ||||
-rw-r--r-- | packages/monorepo-scripts/tslint.json | 5 | ||||
-rw-r--r-- | packages/tslint-config/package.json | 2 | ||||
-rw-r--r-- | packages/website/package.json | 16 | ||||
-rw-r--r-- | packages/website/ts/blockchain.ts | 2 | ||||
-rw-r--r-- | packages/website/ts/components/ui/lifecycle_raised_button.tsx | 2 | ||||
-rw-r--r-- | packages/website/ts/components/ui/party.tsx | 2 |
14 files changed, 144 insertions, 35 deletions
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 2052823dd..afa6af827 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -50,23 +50,23 @@ "abi-gen-templates": "^0.0.0", "@types/bintrees": "^1.0.2", "@types/jsonschema": "^1.1.1", - "@types/lodash": "^4.14.64", - "@types/mocha": "^2.2.41", - "@types/node": "^8.0.1", + "@types/lodash": "^4.14.86", + "@types/mocha": "^2.2.42", + "@types/node": "^8.0.53", "@types/sinon": "^2.2.2", "@types/uuid": "^3.4.2", "awesome-typescript-loader": "^3.1.3", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", - "chai-as-promised-typescript-typings": "0.0.3", + "chai-as-promised-typescript-typings": "^0.0.3", "chai-bignumber": "^2.0.1", "chai-typescript-typings": "^0.0.1", "copyfiles": "^1.2.0", "coveralls": "^3.0.0", "dirty-chai": "^2.0.1", "json-loader": "^0.5.4", - "mocha": "^4.0.0", - "npm-run-all": "^4.0.2", + "mocha": "^4.0.1", + "npm-run-all": "^4.1.2", "nyc": "^11.0.1", "opn-cli": "^3.1.0", "request": "^2.81.0", @@ -89,7 +89,7 @@ "@0xproject/json-schemas": "^0.6.9", "bignumber.js": "~4.1.0", "bintrees": "^1.0.2", - "bn.js": "4.11.8", + "bn.js": "^4.11.8", "compare-versions": "^3.0.1", "ethereumjs-abi": "^0.6.4", "ethereumjs-blockstream": "^2.0.6", diff --git a/packages/assert/package.json b/packages/assert/package.json index 2594ff038..68d1ebb05 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -24,17 +24,17 @@ "homepage": "https://github.com/0xProject/0x.js/packages/assert/README.md", "devDependencies": { "@0xproject/tslint-config": "^0.2.0", - "@types/lodash": "^4.14.78", + "@types/lodash": "^4.14.86", "@types/mocha": "^2.2.42", "@types/valid-url": "^1.0.2", "chai": "^4.0.1", "chai-typescript-typings": "^0.0.1", "dirty-chai": "^2.0.1", "mocha": "^4.0.1", - "npm-run-all": "^4.1.1", + "npm-run-all": "^4.1.2", "shx": "^0.2.2", "tslint": "5.8.0", - "typescript": "^2.4.2" + "typescript": "~2.6.1" }, "dependencies": { "@0xproject/json-schemas": "^0.6.9", diff --git a/packages/connect/package.json b/packages/connect/package.json index 3a49cc547..2392d9907 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -47,19 +47,19 @@ "devDependencies": { "@0xproject/tslint-config": "^0.2.0", "@types/fetch-mock": "^5.12.1", - "@types/lodash": "^4.14.77", + "@types/lodash": "^4.14.86", "@types/mocha": "^2.2.42", "@types/query-string": "^5.0.1", "@types/websocket": "^0.0.34", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", - "chai-as-promised-typescript-typings": "0.0.3", + "chai-as-promised-typescript-typings": "^0.0.3", "chai-typescript-typings": "^0.0.1", "copyfiles": "^1.2.0", "dirty-chai": "^2.0.1", "fetch-mock": "^5.13.1", - "mocha": "^4.0.0", - "npm-run-all": "^4.0.2", + "mocha": "^4.0.1", + "npm-run-all": "^4.1.2", "shx": "^0.2.2", "tslint": "5.8.0", "typedoc": "~0.8.0", diff --git a/packages/contracts/package.json b/packages/contracts/package.json index f1538e6c5..efa2d94c6 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -29,8 +29,9 @@ "devDependencies": { "@0xproject/tslint-config": "^0.2.0", "@types/bluebird": "^3.5.3", - "@types/lodash": "^4.14.64", - "@types/node": "^8.0.1", + "@types/isomorphic-fetch": "^0.0.34", + "@types/lodash": "^4.14.86", + "@types/node": "^8.0.53", "@types/request-promise-native": "^1.0.2", "@types/yargs": "^8.0.2", "chai": "^4.0.1", @@ -40,13 +41,13 @@ "chai-typescript-typings": "^0.0.1", "copyfiles": "^1.2.0", "dirty-chai": "^2.0.1", - "mocha": "^4.0.0", + "mocha": "^4.0.1", "solc": "^0.4.18", "truffle": "3.4.3", "tslint": "5.8.0", "types-bn": "^0.0.1", "types-ethereumjs-util": "0xProject/types-ethereumjs-util", - "typescript": "^2.6.1", + "typescript": "~2.6.1", "web3-typescript-typings": "^0.7.2", "yargs": "^10.0.3" }, @@ -55,14 +56,14 @@ "@0xproject/json-schemas": "^0.6.9", "bignumber.js": "~4.1.0", "bluebird": "^3.5.0", - "bn.js": "^4.11.6", + "bn.js": "^4.11.8", "es6-promisify": "^5.0.0", "ethereumjs-abi": "^0.6.4", "ethereumjs-util": "^5.1.1", "isomorphic-fetch": "^2.2.1", "lodash": "^4.17.4", "request": "^2.81.0", - "web3": "0.20.0", + "web3": "^0.20.0", "web3-eth-abi": "^1.0.0-beta.24" } } diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 8de796a4d..0181e4dd4 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -32,13 +32,13 @@ "@types/lodash.foreach": "^4.5.3", "@types/lodash.values": "^4.3.3", "@types/mocha": "^2.2.42", - "bignumber.js": "^4.0.2", - "chai": "^4.1.1", + "bignumber.js": "~4.1.0", + "chai": "^4.0.1", "chai-typescript-typings": "^0.0.1", "dirty-chai": "^2.0.1", "lodash.foreach": "^4.5.0", "mocha": "^4.0.1", - "npm-run-all": "^4.1.1", + "npm-run-all": "^4.1.2", "shx": "^0.2.2", "tslint": "5.8.0", "typescript": "~2.6.1" diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json new file mode 100644 index 000000000..3c49429e9 --- /dev/null +++ b/packages/monorepo-scripts/package.json @@ -0,0 +1,34 @@ +{ + "name": "@0xproject/monorepo-scripts", + "version": "0.0.0", + "private": true, + "description": "Helper scripts for the monorepo", + "scripts": { + "deps_versions": "node ./lib/deps_versions.js", + "lint": "tslint --project . 'src/**/*.ts'", + "clean": "shx rm -rf lib", + "build": "tsc" + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/monorepo-scripts/README.md", + "devDependencies": { + "@0xproject/tslint-config": "^0.2.0", + "@types/glob": "^5.0.33", + "@types/node": "^8.0.53", + "shx": "^0.2.2", + "tslint": "5.8.0", + "typescript": "~2.6.1" + }, + "dependencies": { + "chalk": "^2.3.0", + "glob": "^7.1.2", + "lodash": "^4.17.4" + } +} diff --git a/packages/monorepo-scripts/src/deps_versions.ts b/packages/monorepo-scripts/src/deps_versions.ts new file mode 100644 index 000000000..84b024427 --- /dev/null +++ b/packages/monorepo-scripts/src/deps_versions.ts @@ -0,0 +1,56 @@ +#!/usr/bin/env node + +import chalk from 'chalk'; +import * as fs from 'fs'; +import {sync as globSync} from 'glob'; +import * as _ from 'lodash'; + +interface Dependencies { + [depName: string]: string; +} +interface Versions { + [packageName: string]: string; +} +interface VersionsByDependency { + [depName: string]: Versions; +} + +const PACKAGE_JSON_GLOB = '../*/package.json'; + +function log(...args: any[]) { + console.log(...args); // tslint:disable-line:no-console +} + +function getDependencies(path: string): Dependencies { + const file = fs.readFileSync(path).toString(); + const parsed = JSON.parse(file); + const dependencies = { + ...parsed.dependencies, + ...parsed.devDependencies, + }; + return dependencies; +} + +const files = globSync(PACKAGE_JSON_GLOB); +const versionsByDependency: VersionsByDependency = {}; +files.map(path => { + const [_1, packageName, _2] = path.split('/'); + const dependencies = getDependencies(path); + _.map(dependencies, (version: string, depName: string) => { + if (_.isUndefined(versionsByDependency[depName])) { + versionsByDependency[depName] = {}; + } + versionsByDependency[depName][packageName] = version; + }); +}); + +_.map(versionsByDependency, (versions: Versions, depName: string) => { + if (_.uniq(_.values(versions)).length === 1) { + delete versionsByDependency[depName]; + } else { + log(chalk.bold(depName)); + _.map(versions, (version: string, packageName: string) => { + log(`├── ${packageName} -> ${version}`); + }); + } +}); diff --git a/packages/monorepo-scripts/tsconfig.json b/packages/monorepo-scripts/tsconfig.json new file mode 100644 index 000000000..a2d90e5dc --- /dev/null +++ b/packages/monorepo-scripts/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "lib": ["es2015", "dom"], + "outDir": "lib", + "noImplicitAny": true, + "strictNullChecks": true + }, + "include": [ + "./src/**/*" + ] +} diff --git a/packages/monorepo-scripts/tslint.json b/packages/monorepo-scripts/tslint.json new file mode 100644 index 000000000..a07795151 --- /dev/null +++ b/packages/monorepo-scripts/tslint.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "@0xproject/tslint-config" + ] +} diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json index da57ca2ff..2b08d4f56 100644 --- a/packages/tslint-config/package.json +++ b/packages/tslint-config/package.json @@ -30,7 +30,7 @@ "homepage": "https://github.com/0xProject/0x.js/packages/tslint-config/README.md", "devDependencies": { "tslint": "5.8.0", - "typescript": "2.6.1" + "typescript": "~2.6.1" }, "dependencies": { "tslint-react": "^3.2.0" diff --git a/packages/website/package.json b/packages/website/package.json index a1990d958..fc7d65d05 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -34,13 +34,13 @@ "ethereumjs-util": "^5.1.1", "find-versions": "^2.0.0", "is-mobile": "^0.2.2", - "jsonschema": "^1.1.1", + "jsonschema": "^1.2.0", "ledgerco": "0xProject/ledger-node-js-api", "less": "^2.7.2", "lodash": "^4.17.4", "material-ui": "^0.17.1", "moment": "^2.18.1", - "query-string": "^5.0.0", + "query-string": "^5.0.1", "react": "15.6.1", "react-copy-to-clipboard": "^4.2.3", "react-document-title": "^2.0.3", @@ -63,9 +63,8 @@ "thenby": "^1.2.3", "truffle-contract": "2.0.1", "tslint-config-0xproject": "^0.0.2", - "typescript": "^2.4.1", "web3": "^0.20.0", - "web3-provider-engine": "^11.0.0", + "web3-provider-engine": "^13.0.1", "whatwg-fetch": "^2.0.3", "xml-js": "^1.3.2" }, @@ -74,11 +73,11 @@ "@types/dateformat": "^1.0.1", "@types/deep-equal": "^1.0.0", "@types/jsonschema": "^1.1.1", - "@types/lodash": "^4.14.55", + "@types/lodash": "^4.14.86", "@types/material-ui": "0.18.0", "@types/moment": "^2.13.0", - "@types/node": "^7.0.8", - "@types/query-string": "^5.0.0", + "@types/node": "^8.0.53", + "@types/query-string": "^5.0.1", "@types/react": "^15.0.15", "@types/react-copy-to-clipboard": "^4.2.0", "@types/react-dom": "^0.14.23", @@ -100,8 +99,9 @@ "source-map-loader": "^0.1.6", "style-loader": "0.13.x", "tslint": "5.8.0", + "typescript": "~2.6.1", "web3-typescript-typings": "^0.7.2", - "webpack": "3.1.0", + "webpack": "^3.1.0", "webpack-dev-middleware": "^1.10.0", "webpack-dev-server": "^2.5.0" } diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index c32984477..f11c014fb 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -511,7 +511,6 @@ export class Blockchain { const subscriptionId = this.zeroEx.exchange.subscribe( ExchangeEvents.LogFill, indexFilterValues, async (err: Error, decodedLogEvent: DecodedLogEvent<LogFillContractEventArgs>) => { - const decodedLog = decodedLogEvent.log; if (err) { // Note: it's not entirely clear from the documentation which // errors will be thrown by `watch`. For now, let's log the error @@ -522,6 +521,7 @@ export class Blockchain { this.stopWatchingExchangeLogFillEventsAsync(); // fire and forget return; } else { + const decodedLog = decodedLogEvent.log; if (!this.doesLogEventInvolveUser(decodedLog)) { return; // We aren't interested in the fill event } diff --git a/packages/website/ts/components/ui/lifecycle_raised_button.tsx b/packages/website/ts/components/ui/lifecycle_raised_button.tsx index 630f71545..338a3bf76 100644 --- a/packages/website/ts/components/ui/lifecycle_raised_button.tsx +++ b/packages/website/ts/components/ui/lifecycle_raised_button.tsx @@ -83,7 +83,7 @@ export class LifeCycleRaisedButton extends this.setState({ buttonState: ButtonState.LOADING, }); - const didSucceed = this.props.onClickAsyncFn(); + const didSucceed = await this.props.onClickAsyncFn(); if (this.didUnmount) { return; // noop since unmount called before async callback returned. } diff --git a/packages/website/ts/components/ui/party.tsx b/packages/website/ts/components/ui/party.tsx index 2927d9d3d..5bafa6071 100644 --- a/packages/website/ts/components/ui/party.tsx +++ b/packages/website/ts/components/ui/party.tsx @@ -73,7 +73,7 @@ export class Party extends React.Component<PartyProps, PartyState> { /> : <div className="mx-auto" - style={{height: IMAGE_DIMENSION, width: IMAGE_DIMENSION}} + style={{height: identiconDiameter, width: identiconDiameter}} > <Identicon address={this.props.address} |