Add clean-state tests

This commit is contained in:
Leonid Logvinov 2018-03-26 13:00:56 +02:00
parent 26e9696ddb
commit a2e4aaa9a3
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4
101 changed files with 1696 additions and 1378 deletions

View File

@ -27,6 +27,16 @@ jobs:
key: repo-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo
test-installation:
docker:
- image: circleci/node:6.12
working_directory: ~/repo
steps:
- restore_cache:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn lerna:exec 'yarn pack --filename package.tgz'
- run: yarn test:installation
test-0xjs:
docker:
- image: circleci/node:6.12
@ -174,6 +184,9 @@ workflows:
main:
jobs:
- build
- test-installation:
requires:
- build
- test-0xjs:
requires:
- build

View File

@ -18,35 +18,27 @@ This repository is a monorepo including the 0x protocol smart contracts and nume
### Published Packages
| Package | Version | Description |
| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| [`0x.js`](/packages/0x.js) | [![npm](https://img.shields.io/npm/v/0x.js.svg)](https://www.npmjs.com/package/0x.js) | A Javascript library for interacting with the 0x protocol |
| [`@0xproject/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0xproject/abi-gen.svg)](https://www.npmjs.com/package/@0xproject/abi-gen) | Tool to generate TS wrappers from smart contract ABIs |
| [`@0xproject/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0xproject/assert.svg)](https://www.npmjs.com/package/@0xproject/assert) | Type and schema assertions used by our packages |
| [`@0xproject/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0xproject/base-contract.svg)](https://www.npmjs.com/package/@0xproject/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts |
| [`@0xproject/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0xproject/connect.svg)](https://www.npmjs.com/package/@0xproject/connect) | A Javascript library for interacting with the Standard Relayer API |
| [`@0xproject/deployer`](/packages/deployer) | [![npm](https://img.shields.io/npm/v/@0xproject/deployer.svg)](https://www.npmjs.com/package/@0xproject/deployer) | Solidity project compiler and deployer framework |
| [`@0xproject/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0xproject/dev-utils.svg)](https://www.npmjs.com/package/@0xproject/dev-utils) | Dev utils to be shared across 0x projects and packages |
| [`@0xproject/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0xproject/json-schemas.svg)](https://www.npmjs.com/package/@0xproject/json-schemas) | 0x-related json schemas |
| [`@0xproject/monorepo-scripts`](/packages/monorepo-scripts) | [![npm](https://img.shields.io/npm/v/@0xproject/monorepo-scripts.svg)](https://www.npmjs.com/package/@0xproject/monorepo-scripts) | Monorepo scripts |
| [`@0xproject/react-docs`](/packages/react-docs) | [![npm](https://img.shields.io/npm/v/@0xproject/react-docs.svg)](https://www.npmjs.com/package/@0xproject/react-docs) | React documentation component for rendering TypeDoc & Doxity generated JSON |
| [`@0xproject/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0xproject/react-shared.svg)](https://www.npmjs.com/package/@0xproject/react-shared) | 0x shared react components |
| [`@0xproject/sra-report`](/packages/sra-report) | [![npm](https://img.shields.io/npm/v/@0xproject/sra-report.svg)](https://www.npmjs.com/package/@0xproject/sra-report) | Generate reports for standard relayer API compliance |
| [`@0xproject/sol-cov`](/packages/sol-cov) | [![npm](https://img.shields.io/npm/v/@0xproject/sol-cov.svg)](https://www.npmjs.com/package/@0xproject/sol-cov) | Solidity test coverage tool tool |
| [`@0xproject/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0xproject/subproviders.svg)](https://www.npmjs.com/package/@0xproject/subproviders) | Useful web3 subproviders (e.g LedgerSubprovider) |
| [`@0xproject/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0xproject/tslint-config.svg)](https://www.npmjs.com/package/@0xproject/tslint-config) | Custom 0x development TSLint rules |
| [`@0xproject/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0xproject/types.svg)](https://www.npmjs.com/package/@0xproject/types) | Shared type declarations |
| [`@0xproject/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0xproject/utils.svg)](https://www.npmjs.com/package/@0xproject/utils) | Shared utilities |
| [`@0xproject/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0xproject/web3-wrapper.svg)](https://www.npmjs.com/package/@0xproject/web3-wrapper) | Web3 wrapper |
### TypeScript Typings
| Package | Version | Description |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [`chai-as-promised-typescript-typings`](/packages/chai-as-promised-typescript-typings) | [![npm](https://img.shields.io/npm/v/chai-as-promised-typescript-typings.svg)](https://www.npmjs.com/package/chai-as-promised-typescript-typings) | Chai as promised typescript typings |
| [`chai-typescript-typings`](/packages/chai-typescript-typings) | [![npm](https://img.shields.io/npm/v/chai-typescript-typings.svg)](https://www.npmjs.com/package/chai-typescript-typings) | Chai typescript typings |
| [`ethers-typescript-typings`](/packages/ethers-typescript-typings) | [![npm](https://img.shields.io/npm/v/@0xproject/deployer.svg)](https://www.npmjs.com/package/ethers-typescript-typings) | [Ethers.js](https://github.com/ethers-io/ethers.js/) typescript typings |
| [`web3-typescript-typings`](/packages/web3-typescript-typings) | [![npm](https://img.shields.io/npm/v/web3-typescript-typings.svg)](https://www.npmjs.com/package/web3-typescript-typings) | Web3 typescript typings |
| Package | Version | Description |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| [`0x.js`](/packages/0x.js) | [![npm](https://img.shields.io/npm/v/0x.js.svg)](https://www.npmjs.com/package/0x.js) | A Javascript library for interacting with the 0x protocol |
| [`@0xproject/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0xproject/abi-gen.svg)](https://www.npmjs.com/package/@0xproject/abi-gen) | Tool to generate TS wrappers from smart contract ABIs |
| [`@0xproject/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0xproject/assert.svg)](https://www.npmjs.com/package/@0xproject/assert) | Type and schema assertions used by our packages |
| [`@0xproject/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0xproject/base-contract.svg)](https://www.npmjs.com/package/@0xproject/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts |
| [`@0xproject/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0xproject/connect.svg)](https://www.npmjs.com/package/@0xproject/connect) | A Javascript library for interacting with the Standard Relayer API |
| [`@0xproject/deployer`](/packages/deployer) | [![npm](https://img.shields.io/npm/v/@0xproject/deployer.svg)](https://www.npmjs.com/package/@0xproject/deployer) | Solidity project compiler and deployer framework |
| [`@0xproject/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0xproject/dev-utils.svg)](https://www.npmjs.com/package/@0xproject/dev-utils) | Dev utils to be shared across 0x projects and packages |
| [`@0xproject/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0xproject/json-schemas.svg)](https://www.npmjs.com/package/@0xproject/json-schemas) | 0x-related json schemas |
| [`@0xproject/monorepo-scripts`](/packages/monorepo-scripts) | [![npm](https://img.shields.io/npm/v/@0xproject/monorepo-scripts.svg)](https://www.npmjs.com/package/@0xproject/monorepo-scripts) | Monorepo scripts |
| [`@0xproject/react-docs`](/packages/react-docs) | [![npm](https://img.shields.io/npm/v/@0xproject/react-docs.svg)](https://www.npmjs.com/package/@0xproject/react-docs) | React documentation component for rendering TypeDoc & Doxity generated JSON |
| [`@0xproject/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0xproject/react-shared.svg)](https://www.npmjs.com/package/@0xproject/react-shared) | 0x shared react components |
| [`@0xproject/sra-report`](/packages/sra-report) | [![npm](https://img.shields.io/npm/v/@0xproject/sra-report.svg)](https://www.npmjs.com/package/@0xproject/sra-report) | Generate reports for standard relayer API compliance |
| [`@0xproject/sol-cov`](/packages/sol-cov) | [![npm](https://img.shields.io/npm/v/@0xproject/sol-cov.svg)](https://www.npmjs.com/package/@0xproject/sol-cov) | Solidity test coverage tool tool |
| [`@0xproject/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0xproject/subproviders.svg)](https://www.npmjs.com/package/@0xproject/subproviders) | Useful web3 subproviders (e.g LedgerSubprovider) |
| [`@0xproject/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0xproject/tslint-config.svg)](https://www.npmjs.com/package/@0xproject/tslint-config) | Custom 0x development TSLint rules |
| [`@0xproject/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0xproject/types.svg)](https://www.npmjs.com/package/@0xproject/types) | Shared type declarations |
| [`@0xproject/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0xproject/typescript-typings.svg)](https://www.npmjs.com/package/@0xproject/typescript-typings) | Repository of types for external packages |
| [`@0xproject/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0xproject/utils.svg)](https://www.npmjs.com/package/@0xproject/utils) | Shared utilities |
| [`@0xproject/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0xproject/web3-wrapper.svg)](https://www.npmjs.com/package/@0xproject/web3-wrapper) | Web3 wrapper |
### Private Packages
@ -66,6 +58,13 @@ Dedicated documentation pages:
* [Smart contracts](https://0xproject.com/docs/contracts)
* [Standard Relayer API](https://github.com/0xProject/standard-relayer-api/blob/master/README.md)
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.
```json
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
```
## Contributing
We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.

View File

@ -8,7 +8,9 @@
"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:run": "lerna run",
"lerna:exec": "lerna exec",
"lerna:rebuild": "lerna run clean; lerna run build;",
"lerna:publish":
"yarn install; lerna run clean; lerna run build; lerna publish --registry=https://registry.npmjs.org/"

View File

@ -20,11 +20,10 @@ import { ZeroEx } from '0x.js';
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```
"include": [
"./node_modules/web3-typescript-typings/index.d.ts",
"./node_modules/ethers-typescript-typings/index.d.ts"
]
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
#### UMD:

View File

@ -68,9 +68,7 @@
"awesome-typescript-loader": "^3.1.3",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.12",
"chai-bignumber": "^2.0.1",
"chai-typescript-typings": "^0.0.6",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"json-loader": "^0.5.4",
@ -99,18 +97,17 @@
"@0xproject/types": "^0.4.1",
"@0xproject/utils": "^0.4.3",
"@0xproject/web3-wrapper": "^0.3.1",
"@0xproject/typescript-typings": "^0.0.1",
"bintrees": "^1.0.2",
"bn.js": "^4.11.8",
"ethereumjs-abi": "^0.6.4",
"ethereumjs-blockstream": "^2.0.6",
"ethereumjs-util": "^5.1.1",
"ethers-contracts": "^2.2.1",
"ethers-typescript-typings": "^0.0.4",
"js-sha3": "^0.7.0",
"lodash": "^4.17.4",
"uuid": "^3.1.0",
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.2"
"web3": "^0.20.0"
},
"publishConfig": {
"access": "public"

View File

@ -216,7 +216,7 @@ describe('ZeroEx library', () => {
s: '0x050aa3cc1f2c435e67e114cdce54b9527b4f50548342401bc5d2b77adbdacb02',
};
stubs = [
Sinon.stub((zeroEx as any)._web3Wrapper, 'signTransactionAsync').returns(Promise.resolve(signature)),
Sinon.stub((zeroEx as any)._web3Wrapper, 'signMessageAsync').returns(Promise.resolve(signature)),
Sinon.stub(ZeroEx, 'isValidSignature').returns(true),
];

View File

@ -8,10 +8,6 @@
"./src/**/*",
"./test/**/*",
"../../node_modules/types-bn/index.d.ts",
"../../node_modules/types-ethereumjs-util/index.d.ts",
"../../node_modules/ethers-typescript-typings/index.d.ts",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/chai-typescript-typings/index.d.ts",
"../../node_modules/chai-as-promised-typescript-typings/index.d.ts"
"../../node_modules/types-ethereumjs-util/index.d.ts"
]
}

View File

@ -24,6 +24,7 @@
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
"dependencies": {
"@0xproject/utils": "^0.4.3",
"@0xproject/typescript-typings": "^0.0.1",
"chalk": "^2.3.0",
"glob": "^7.1.2",
"handlebars": "^4.0.11",
@ -45,8 +46,7 @@
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.10.2"
"typescript": "2.7.1"
},
"publishConfig": {
"access": "public"

View File

@ -3,5 +3,5 @@
"compilerOptions": {
"outDir": "lib"
},
"include": ["./src/**/*", "./test/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"]
"include": ["./src/**/*", "./test/**/*"]
}

View File

@ -8,14 +8,6 @@ Standard type and schema assertions to be used across all 0x projects and packag
yarn add @0xproject/assert
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```
"include": [
"./node_modules/web3-typescript-typings/index.d.ts",
]
```
## Usage
```typescript
@ -24,6 +16,14 @@ import { assert } from '@0xproject/assert';
assert.isValidBaseUnitAmount('baseUnitAmount', baseUnitAmount);
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Contributing
We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.

View File

@ -32,7 +32,6 @@
"@types/mocha": "^2.2.42",
"@types/valid-url": "^1.0.2",
"chai": "^4.0.1",
"chai-typescript-typings": "^0.0.6",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"mocha": "^4.0.1",
@ -45,6 +44,7 @@
"dependencies": {
"@0xproject/json-schemas": "^0.7.17",
"@0xproject/utils": "^0.4.3",
"@0xproject/typescript-typings": "^0.0.1",
"lodash": "^4.17.4",
"valid-url": "^1.0.9"
},

View File

@ -3,10 +3,5 @@
"compilerOptions": {
"outDir": "lib"
},
"include": [
"./src/**/*",
"./test/**/*",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/chai-typescript-typings/index.d.ts"
]
"include": ["./src/**/*", "./test/**/*"]
}

View File

@ -10,11 +10,10 @@ yarn add @0xproject/base-contract
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```
"include": [
"./node_modules/web3-typescript-typings/index.d.ts",
"./node_modules/ethers-typescript-typings/index.d.ts"
]
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Usage

View File

@ -32,11 +32,10 @@
"dependencies": {
"@0xproject/types": "^0.4.1",
"@0xproject/web3-wrapper": "^0.3.1",
"@0xproject/typescript-typings": "^0.0.1",
"ethers-contracts": "^2.2.1",
"ethers-typescript-typings": "^0.0.4",
"lodash": "^4.17.4",
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.2"
"web3": "^0.20.0"
},
"publishConfig": {
"access": "public"

View File

@ -3,9 +3,5 @@
"compilerOptions": {
"outDir": "lib"
},
"include": [
"./src/**/*",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/ethers-typescript-typings/index.d.ts"
]
"include": ["./src/**/*"]
}

View File

@ -1,3 +0,0 @@
.*
yarn-error.log
/scripts/

View File

@ -1,3 +0,0 @@
# CHANGELOG
## v0.x.x - _TBD, 2018_

View File

@ -1,43 +0,0 @@
## chai-typescript-typings
Fork of type definitions for chai that includes changes made by dirty-chai
## Installation
```bash
yarn add -D chai-typescript-typings
```
## Usage
Add the following line within an `include` section of your `tsconfig.json`
```json
"./node_modules/chai-typescript-typings/index.d.ts"
```
## Contributing
We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.
Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
### Install Dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Lint
```bash
yarn lint
```

View File

@ -1,6 +0,0 @@
declare module '*.json' {
const json: any;
/* tslint:disable */
export default json;
/* tslint:enable */
}

View File

@ -1,8 +0,0 @@
import { postpublishUtils } from '@0xproject/monorepo-scripts';
import * as packageJSON from '../package.json';
import * as tsConfigJSON from '../tsconfig.json';
const cwd = `${__dirname}/..`;
// tslint:disable-next-line:no-floating-promises
postpublishUtils.runAsync(packageJSON, tsConfigJSON, cwd);

View File

@ -1,28 +0,0 @@
{
"name": "chai-typescript-typings",
"version": "0.0.6",
"description": "Typescript type definitions for chai",
"main": "index.d.ts",
"types": "index.d.ts",
"scripts": {
"build": "tsc && copyfiles -u 1 './lib/**/*' ./scripts",
"clean": "shx rm -rf scripts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/0xProject/0x-monorepo.git"
},
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/chai-typescript-typings#readme",
"devDependencies": {
"@0xproject/monorepo-scripts": "^0.1.14",
"copyfiles": "^1.2.0",
"shx": "^0.2.2"
},
"publishConfig": {
"access": "public"
}
}

View File

@ -1,7 +0,0 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib"
},
"include": ["./monorepo_scripts/**/*"]
}

View File

@ -1,3 +0,0 @@
{
"extends": ["tslint-config-0xproject"]
}

View File

@ -10,10 +10,10 @@ yarn add @0xproject/connect
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```
"include": [
"./node_modules/web3-typescript-typings/index.d.ts",
]
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Usage

View File

@ -53,6 +53,7 @@
"@0xproject/json-schemas": "^0.7.17",
"@0xproject/types": "^0.4.1",
"@0xproject/utils": "^0.4.3",
"@0xproject/typescript-typings": "^0.0.1",
"isomorphic-fetch": "^2.2.1",
"lodash": "^4.17.4",
"query-string": "^5.0.1",
@ -69,8 +70,6 @@
"async-child-process": "^1.1.1",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.12",
"chai-typescript-typings": "^0.0.6",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"fetch-mock": "^5.13.1",
@ -80,8 +79,7 @@
"shx": "^0.2.2",
"tslint": "5.8.0",
"typedoc": "~0.8.0",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.10.2"
"typescript": "2.7.1"
},
"publishConfig": {
"access": "public"

View File

@ -3,11 +3,5 @@
"compilerOptions": {
"outDir": "lib"
},
"include": [
"./src/**/*",
"./test/**/*",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/chai-as-promised-typescript-typings/index.d.ts",
"../../node_modules/chai-typescript-typings/index.d.ts"
]
"include": ["./src/**/*", "./test/**/*"]
}

View File

@ -49,12 +49,9 @@
"@types/yargs": "^10.0.0",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.12",
"chai-bignumber": "^2.0.1",
"chai-typescript-typings": "^0.0.6",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"ethers-typescript-typings": "^0.0.4",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
"prettier": "^1.11.1",
@ -64,7 +61,6 @@
"types-bn": "^0.0.1",
"types-ethereumjs-util": "0xProject/types-ethereumjs-util",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.10.2",
"yargs": "^10.0.3"
},
"dependencies": {
@ -74,6 +70,7 @@
"@0xproject/types": "^0.4.1",
"@0xproject/utils": "^0.4.3",
"@0xproject/web3-wrapper": "^0.3.1",
"@0xproject/typescript-typings": "^0.0.1",
"bluebird": "^3.5.0",
"bn.js": "^4.11.8",
"ethereumjs-abi": "^0.6.4",

View File

@ -8,11 +8,6 @@
"allowJs": true
},
"include": [
"../../node_modules/types-ethereumjs-util/index.d.ts",
"../../node_modules/chai-typescript-typings/index.d.ts",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/ethers-typescript-typings/index.d.ts",
"../../node_modules/chai-as-promised-typescript-typings/index.d.ts",
"../../node_modules/types-ethereumjs-util/index.d.ts",
"../../node_modules/types-bn/index.d.ts",
"./globals.d.ts",

View File

@ -18,6 +18,14 @@ yarn global add @0xproject/deployer
yarn add @0xproject/deployer
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
**Import**
```typescript

View File

@ -53,7 +53,6 @@
"chai": "^4.0.1",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"ethers-typescript-typings": "^0.0.4",
"mocha": "^4.0.1",
"nyc": "^11.0.1",
"shx": "^0.2.2",
@ -68,6 +67,7 @@
"@0xproject/types": "^0.4.1",
"@0xproject/utils": "^0.4.3",
"@0xproject/web3-wrapper": "^0.3.1",
"@0xproject/typescript-typings": "^0.0.1",
"ethereumjs-util": "^5.1.1",
"isomorphic-fetch": "^2.2.1",
"lodash": "^4.17.4",

View File

@ -8,9 +8,6 @@
"./src/**/*",
"./test/**/*",
"../../node_modules/types-bn/index.d.ts",
"../../node_modules/types-ethereumjs-util/index.d.ts",
"../../node_modules/chai-typescript-typings/index.d.ts",
"../../node_modules/ethers-typescript-typings/index.d.ts",
"../../node_modules/web3-typescript-typings/index.d.ts"
"../../node_modules/types-ethereumjs-util/index.d.ts"
]
}

View File

@ -21,8 +21,8 @@ yarn add @0xproject/dev-utils
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```
"include": [
"./node_modules/web3-typescript-typings/index.d.ts",
]
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```

View File

@ -30,7 +30,6 @@
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"chai": "^4.0.1",
"chai-typescript-typings": "^0.0.6",
"copyfiles": "^1.2.0",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
@ -47,6 +46,7 @@
"@0xproject/types": "^0.4.1",
"@0xproject/utils": "^0.4.3",
"@0xproject/web3-wrapper": "^0.3.1",
"@0xproject/typescript-typings": "^0.0.1",
"ethereumjs-util": "^5.1.2",
"lodash": "^4.17.4",
"request-promise-native": "^1.0.5",

View File

@ -7,9 +7,6 @@
"./src/**/*",
"./test/**/*",
"../../node_modules/types-bn/index.d.ts",
"../../node_modules/chai-typescript-typings/index.d.ts",
"../../node_modules/ethers-typescript-typings/index.d.ts",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/types-ethereumjs-util/index.d.ts"
]
}

View File

@ -1,3 +0,0 @@
.*
yarn-error.log
/scripts/

View File

@ -1,5 +0,0 @@
# CHANGELOG
## v0.0.2 - _March 4, 2018_
* Initial types (#413)

View File

@ -1,49 +0,0 @@
## ethers-typescript-typings
There currently isn't an official [Ethers][ethers]
type definition included in the [DefinitelyTyped][definitelytyped] project.
Until that happens, we will continue to improve our own type definition.
If it get's close to comprehensive, we'll add it to [DefinitelyTyped][definitelytyped].
[ethers]: https://github.com/ethers-io/ethers.js
[definitelytyped]: https://github.com/DefinitelyTyped/DefinitelyTyped
## Installation
```bash
yarn add -D ethers-typescript-typings
```
## Usage
Add the following line within an `include` section of your `tsconfig.json`
```json
"./node_modules/ethers-typescript-typings/index.d.ts"
```
## Contributing
We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.
Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
### Install Dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Lint
```bash
yarn lint
```

View File

@ -1,6 +0,0 @@
declare module '*.json' {
const json: any;
/* tslint:disable */
export default json;
/* tslint:enable */
}

View File

@ -1,8 +0,0 @@
import { postpublishUtils } from '@0xproject/monorepo-scripts';
import * as packageJSON from '../package.json';
import * as tsConfigJSON from '../tsconfig.json';
const cwd = `${__dirname}/..`;
// tslint:disable-next-line:no-floating-promises
postpublishUtils.runAsync(packageJSON, tsConfigJSON, cwd);

View File

@ -1,36 +0,0 @@
{
"name": "ethers-typescript-typings",
"version": "0.0.4",
"description": "Typescript type definitions for ethers.js",
"main": "index.d.ts",
"types": "index.d.ts",
"scripts": {
"lint": "tslint index.d.ts",
"build": "tsc && copyfiles -u 1 './lib/**/*' ./scripts",
"clean": "shx rm -rf scripts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/0xProject/0x-monorepo.git"
},
"author": "Fabio Berger",
"contributors": [
"Leonid Logvinov <logvinov.leon@gmail.com>"
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/ethers-typescript-typings#readme",
"devDependencies": {
"@0xproject/monorepo-scripts": "^0.1.14",
"copyfiles": "^1.2.0",
"shx": "^0.2.2",
"tslint": "5.8.0",
"tslint-config-0xproject": "^0.0.2",
"typescript": "2.7.1"
},
"publishConfig": {
"access": "public"
}
}

View File

@ -1,7 +0,0 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib"
},
"include": ["./monorepo_scripts/**/*"]
}

View File

@ -1,3 +0,0 @@
{
"extends": ["tslint-config-0xproject"]
}

View File

@ -12,8 +12,8 @@ yarn add @0xproject/json-schemas
**Import**
```javascript
import { schemas } from '@0xproject/json-schemas';
```typescript
import { SchemaValidator, ValidatorResult, schemas } from '@0xproject/json-schemas';
```
or
@ -22,6 +22,14 @@ or
var schemas = require('@0xproject/json-schemas').schemas;
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Contributing
We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.

View File

@ -39,6 +39,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/json-schemas/README.md",
"dependencies": {
"@0xproject/typescript-typings": "^0.0.1",
"jsonschema": "^1.2.0",
"lodash.values": "^4.3.0"
},
@ -50,7 +51,6 @@
"@types/lodash.values": "^4.3.3",
"@types/mocha": "^2.2.42",
"chai": "^4.0.1",
"chai-typescript-typings": "^0.0.6",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"lodash.foreach": "^4.5.0",

View File

@ -3,10 +3,5 @@
"compilerOptions": {
"outDir": "lib"
},
"include": [
"./src/**/*",
"./test/**/*",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/chai-typescript-typings/index.d.ts"
]
"include": ["./src/**/*", "./test/**/*"]
}

View File

@ -25,6 +25,8 @@
"@0xproject/tslint-config": "0.4.8",
"@types/glob": "^5.0.33",
"@types/node": "^8.0.53",
"@types/rimraf": "^2.0.2",
"lerna-get-packages": "^1.0.0",
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1"
@ -35,7 +37,9 @@
"es6-promisify": "^5.0.0",
"glob": "^7.1.2",
"lodash": "^4.17.4",
"promisify-child-process": "^1.0.5",
"publish-release": "0xproject/publish-release",
"rimraf": "^2.6.2",
"semver-sort": "^0.0.4"
},
"publishConfig": {

View File

@ -6,3 +6,22 @@ declare module 'es6-promisify';
declare module 'semver-sort' {
const desc: (versions: string[]) => string[];
}
declare interface LernaPackage {
location: string;
package: {
private?: boolean;
name: string;
main?: string;
config?: {
additionalTsTypings?: string[];
};
};
}
declare function lernaGetPackages(path: string): LernaPackage[];
// lerna-get-packages declarations
declare module 'lerna-get-packages' {
export = lernaGetPackages;
}
declare module 'promisify-child-process';

View File

@ -0,0 +1,57 @@
#!/usr/bin/env node
import * as fs from 'fs';
import lernaGetPackages = require('lerna-get-packages');
import * as _ from 'lodash';
import * as path from 'path';
import { exec as execAsync } from 'promisify-child-process';
import * as rimraf from 'rimraf';
import { utils } from './utils';
(async () => {
const monorepoRootPath = path.join(__dirname, '../../..');
const lernaPackages = lernaGetPackages(monorepoRootPath);
const installablePackages = _.filter(
lernaPackages,
lernaPackage =>
!lernaPackage.package.private &&
!_.isUndefined(lernaPackage.package.main) &&
lernaPackage.package.main.endsWith('.js'),
);
for (const installableLernaPackage of installablePackages) {
const packagePath = installableLernaPackage.location;
const packageName = installableLernaPackage.package.name;
utils.log(`Testing ${packageName}`);
let result = await execAsync('npm pack', { cwd: packagePath });
const packedPackageFileName = result.stdout.trim();
const testDirectory = path.join(monorepoRootPath, '../test-env');
fs.mkdirSync(testDirectory);
result = await execAsync('yarn init --yes', { cwd: testDirectory });
utils.log(`Installing ${packedPackageFileName}`);
result = await execAsync(`yarn add ${packagePath}/${packedPackageFileName}`, { cwd: testDirectory });
const indexFilePath = path.join(testDirectory, 'index.ts');
fs.writeFileSync(indexFilePath, `import * as Package from '${packageName}'`);
const tsConfig = {
compilerOptions: {
module: 'commonjs',
target: 'es5',
lib: ['es2017', 'dom'],
declaration: true,
noImplicitReturns: true,
pretty: true,
strict: true,
},
include: ['index.ts'],
};
const tsconfigFilePath = path.join(testDirectory, 'tsconfig.json');
fs.writeFileSync(tsconfigFilePath, JSON.stringify(tsConfig, null, 4));
utils.log(`Compiling ${packageName}`);
await execAsync('../node_modules/typescript/bin/tsc', { cwd: testDirectory });
utils.log(`Successfully compiled with ${packageName} as a dependency`);
rimraf.sync(testDirectory);
}
})().catch(err => {
utils.log(err.stdout);
process.exit(1);
});

View File

@ -3,5 +3,5 @@
"compilerOptions": {
"outDir": "lib"
},
"include": ["./src/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"]
"include": ["./src/**/*"]
}

View File

@ -27,8 +27,8 @@
"@types/lodash": "4.14.104",
"@types/material-ui": "0.18.0",
"@types/node": "^8.0.53",
"@types/react": "^15.0.15",
"@types/react-dom": "^0.14.23",
"@types/react": "^16.0.34",
"@types/react-dom": "^16.0.3",
"@types/react-tap-event-plugin": "0.0.30",
"awesome-typescript-loader": "^3.1.3",
"copyfiles": "^1.2.0",

View File

@ -33,6 +33,14 @@ This package exposes both a single `Documentation` react component that will ren
Currently this package still has some external dependencies outside of the `Documentation` component, so please start your project off by copying the [react-docs-example](https://github.com/0xProject/0x-monorepo/tree/development/packages/react-docs-example) directory and modifying it there. If you need changes in the [react-docs](https://github.com/0xProject/0x-monorepo/tree/development/packages/react-docs) package, fork the 0x monorepo, make the required changes and submit a PR. Until we merge it, you can have your project depend on your own custom fork.
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Future improvements
Feel free to contribute to these improvements!

View File

@ -35,8 +35,8 @@
"@types/lodash": "4.14.104",
"@types/material-ui": "0.18.0",
"@types/node": "^8.0.53",
"@types/react": "^15.0.15",
"@types/react-dom": "^0.14.23",
"@types/react": "^16.0.34",
"@types/react-dom": "^16.0.3",
"@types/react-scroll": "0.0.31",
"@types/react-tap-event-plugin": "0.0.30",
"basscss": "^8.0.3",

View File

@ -9,5 +9,5 @@
"*": ["node_modules/@types/*", "*"]
}
},
"include": ["./src/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"]
"include": ["./src/**/*"]
}

View File

@ -8,6 +8,14 @@ Contains React components & frontend types/utils shared between 0x projects.
yarn add @0xproject/react-shared
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Contributing
We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.

View File

@ -33,8 +33,8 @@
"@types/lodash": "4.14.104",
"@types/material-ui": "0.18.0",
"@types/node": "^8.0.53",
"@types/react": "^15.0.15",
"@types/react-dom": "^0.14.23",
"@types/react": "^16.0.34",
"@types/react-dom": "^16.0.3",
"@types/react-scroll": "0.0.31",
"basscss": "^8.0.3",
"is-mobile": "^0.2.2",

View File

@ -40,6 +40,7 @@
"dependencies": {
"@0xproject/subproviders": "^0.8.2",
"@0xproject/utils": "^0.3.4",
"@0xproject/typescript-typings": "^0.0.1",
"ethereumjs-util": "^5.1.1",
"glob": "^7.1.2",
"istanbul": "^0.4.5",
@ -57,7 +58,6 @@
"@types/mocha": "^2.2.42",
"@types/node": "^8.0.53",
"chai": "^4.0.1",
"chai-typescript-typings": "^0.0.6",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"mocha": "^4.0.1",

View File

@ -7,8 +7,6 @@
"./src/**/*",
"./test/**/*",
"../../node_modules/types-bn/index.d.ts",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/chai-typescript-typings/index.d.ts",
"../../node_modules/types-ethereumjs-util/index.d.ts"
]
}

View File

@ -33,6 +33,7 @@
"@0xproject/connect": "^0.6.6",
"@0xproject/json-schemas": "^0.7.17",
"@0xproject/utils": "^0.4.3",
"@0xproject/typescript-typings": "^0.0.1",
"chalk": "^2.3.0",
"lodash": "^4.17.4",
"newman": "^3.9.3",
@ -48,8 +49,6 @@
"@types/yargs": "^10.0.0",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.10",
"chai-typescript-typings": "^0.0.4",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"mocha": "^4.0.1",

View File

@ -3,12 +3,5 @@
"compilerOptions": {
"outDir": "lib"
},
"include": [
"./src/**/*",
"./test/**/*",
"../../node_modules/chai-as-promised-typescript-typings/index.d.ts",
"../../node_modules/chai-typescript-typings/index.d.ts",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/ethers-typescript-typings/index.d.ts"
]
"include": ["./src/**/*", "./test/**/*"]
}

View File

@ -14,10 +14,10 @@ yarn add @0xproject/subproviders
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```
"include": [
"./node_modules/web3-typescript-typings/index.d.ts",
]
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Contributing

View File

@ -36,6 +36,7 @@
"@0xproject/assert": "^0.2.3",
"@0xproject/types": "^0.4.1",
"@0xproject/utils": "^0.4.3",
"@0xproject/typescript-typings": "^0.0.1",
"@ledgerhq/hw-app-eth": "^4.3.0",
"@ledgerhq/hw-transport-u2f": "^4.3.0",
"bn.js": "^4.11.8",
@ -47,8 +48,7 @@
"lodash": "^4.17.4",
"semaphore-async-await": "^1.5.1",
"web3": "^0.20.0",
"web3-provider-engine": "^13.0.1",
"web3-typescript-typings": "^0.10.2"
"web3-provider-engine": "^13.0.1"
},
"devDependencies": {
"@0xproject/monorepo-scripts": "^0.1.14",
@ -59,8 +59,6 @@
"@types/node": "^8.0.53",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.12",
"chai-typescript-typings": "^0.0.6",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"mocha": "^4.0.1",

View File

@ -6,10 +6,7 @@
"include": [
"./src/**/*",
"./test/**/*",
"../../node_modules/chai-typescript-typings/index.d.ts",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/types-bn/index.d.ts",
"../../node_modules/types-ethereumjs-util/index.d.ts",
"../../node_modules/chai-as-promised-typescript-typings/index.d.ts"
"../../node_modules/types-ethereumjs-util/index.d.ts"
]
}

View File

@ -18,6 +18,7 @@
"0x.js": "^0.33.6",
"@0xproject/subproviders": "^0.8.2",
"@0xproject/utils": "^0.4.3",
"@0xproject/typescript-typings": "^0.0.1",
"body-parser": "^1.17.1",
"ethereumjs-tx": "^1.3.3",
"ethereumjs-util": "^5.1.1",
@ -41,7 +42,6 @@
"types-bn": "^0.0.1",
"types-ethereumjs-util": "0xProject/types-ethereumjs-util",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.10.2",
"webpack": "^3.1.0",
"webpack-node-externals": "^1.6.0"
}

View File

@ -6,9 +6,7 @@
},
"include": [
"./src/ts/**/*",
"../../node_modules/ethers-typescript-typings/index.d.ts",
"../../node_modules/types-bn/index.d.ts",
"../../node_modules/types-ethereumjs-util/index.d.ts",
"../../node_modules/web3-typescript-typings/index.d.ts"
"../../node_modules/types-ethereumjs-util/index.d.ts"
]
}

View File

@ -3,5 +3,5 @@
"compilerOptions": {
"outDir": "lib"
},
"include": ["./rules/**/*", "./monorepo_scripts/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"]
"include": ["./rules/**/*", "./monorepo_scripts/**/*"]
}

View File

@ -10,10 +10,10 @@ yarn add -D @0xproject/types
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```
"include": [
"./node_modules/web3-typescript-typings/index.d.ts",
]
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Usage

View File

@ -28,9 +28,9 @@
"typescript": "2.7.1"
},
"dependencies": {
"@0xproject/typescript-typings": "^0.0.1",
"bignumber.js": "~4.1.0",
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.2"
"web3": "^0.20.0"
},
"publishConfig": {
"access": "public"

View File

@ -3,5 +3,5 @@
"compilerOptions": {
"outDir": "lib"
},
"include": ["./src/**/*", "../../node_modules/web3-typescript-typings/index.d.ts"]
"include": ["./src/**/*"]
}

View File

@ -1,21 +1,23 @@
## chai-as-promised-typescript-typings
## @0xproject/typescript-typings
Fork of type definitions for chai-as-promised that includes changes made by dirty-chai
Type repository for external packages used by 0x. This is like our small version of [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped)
## Installation
```bash
yarn add -D chai-as-promised-typescript-typings
yarn add -D @0xproject/typescript-typings
```
## Usage
Add the following line within an `include` section of your `tsconfig.json`
Add the following line within an `compilerOptions` section of your `tsconfig.json`
```json
"./node_modules/chai-as-promised-typescript-typings/index.d.ts"
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"]
```
This will allow the TS compiler to first look into that repo and then fallback to DT types.
## Contributing
We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.

View File

@ -1,9 +1,7 @@
{
"name": "chai-as-promised-typescript-typings",
"version": "0.0.12",
"description": "Typescript type definitions for chai-as-promised",
"main": "index.d.ts",
"types": "index.d.ts",
"name": "@0xproject/typescript-typings",
"version": "0.0.1",
"description": "0x project typescript type definitions",
"scripts": {
"build": "tsc && copyfiles -u 1 './lib/**/*' ./scripts",
"clean": "shx rm -rf scripts"
@ -20,9 +18,9 @@
"bugs": {
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/chai-as-promised-typescript-typings#readme",
"homepage": "https://github.com/0xProject/0x-monorepo/packages/typescript-typings#readme",
"dependencies": {
"chai-typescript-typings": "^0.0.6"
"bignumber.js": "~4.1.0"
},
"devDependencies": {
"@0xproject/monorepo-scripts": "^0.1.14",

View File

@ -10,10 +10,10 @@ yarn add @0xproject/utils
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```
"include": [
"./node_modules/web3-typescript-typings/index.d.ts",
]
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Usage

View File

@ -31,14 +31,13 @@
},
"dependencies": {
"@0xproject/types": "^0.4.1",
"@0xproject/typescript-typings": "^0.0.1",
"@types/node": "^8.0.53",
"bignumber.js": "~4.1.0",
"ethers-contracts": "^2.2.1",
"ethers-typescript-typings": "^0.0.4",
"js-sha3": "^0.7.0",
"lodash": "^4.17.4",
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.2"
"web3": "^0.20.0"
},
"publishConfig": {
"access": "public"

View File

@ -3,9 +3,5 @@
"compilerOptions": {
"outDir": "lib"
},
"include": [
"./src/**/*",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/ethers-typescript-typings/index.d.ts"
]
"include": ["./src/**/*"]
}

View File

@ -1,3 +0,0 @@
.*
yarn-error.log
/scripts/

View File

@ -1,16 +0,0 @@
# CHANGELOG
## v0.10.0 - _March 4, 2018_
* Support ABIv2 (#401)
* Add types for transaction traces (#426)
## v0.9.11 - _February 16, 2018_
* Fix `web3.net.peerCount` to be of type number instead of boolean (#397)
## v0.9.3 - _January 11, 2018_
* Fix `getTransactionReceipt` not returning null (#338)
* Add type for getData on a contract
* Fixed the `defaultAccount` not allowing for `undefined` value (#320)

View File

@ -1,49 +0,0 @@
## web3-typescript-typings
There currently isn't an official [Web3][web3]
type definition included in the [DefinitelyTyped][definitelytyped] project.
Until that happens, we will continue to improve our own type definition.
If it get's close to comprehensive, we'll add it to [DefinitelyTyped][definitelytyped].
[web3]: https://github.com/ethereum/web3.js/
[definitelytyped]: https://github.com/DefinitelyTyped/DefinitelyTyped
## Installation
```bash
yarn add -D web3-typescript-typings
```
## Usage
Add the following line within an `include` section of your `tsconfig.json`
```json
"./node_modules/web3-typescript-typings/index.d.ts"
```
## Contributing
We strongly encourage that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.
Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
### Install Dependencies
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
```bash
yarn config set workspaces-experimental true
```
Then install dependencies
```bash
yarn install
```
### Lint
```bash
yarn lint
```

View File

@ -1,6 +0,0 @@
declare module '*.json' {
const json: any;
/* tslint:disable */
export default json;
/* tslint:enable */
}

View File

@ -1,8 +0,0 @@
import { postpublishUtils } from '@0xproject/monorepo-scripts';
import * as packageJSON from '../package.json';
import * as tsConfigJSON from '../tsconfig.json';
const cwd = `${__dirname}/..`;
// tslint:disable-next-line:no-floating-promises
postpublishUtils.runAsync(packageJSON, tsConfigJSON, cwd);

View File

@ -1,40 +0,0 @@
{
"name": "web3-typescript-typings",
"version": "0.10.2",
"description": "Typescript type definitions for web3",
"main": "index.d.ts",
"types": "index.d.ts",
"scripts": {
"lint": "tslint index.d.ts",
"build": "tsc && copyfiles -u 1 './lib/**/*' ./scripts",
"clean": "shx rm -rf scripts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/0xProject/0x-monorepo.git"
},
"author": "Fabio Berger",
"contributors": [
"Leonid Logvinov <logvinov.leon@gmail.com>"
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/web3-typescript-typings#readme",
"devDependencies": {
"@0xproject/monorepo-scripts": "^0.1.14",
"@types/bignumber.js": "^4.0.2",
"copyfiles": "^1.2.0",
"shx": "^0.2.2",
"tslint": "5.8.0",
"tslint-config-0xproject": "^0.0.2",
"typescript": "2.7.1"
},
"dependencies": {
"bignumber.js": "~4.1.0"
},
"publishConfig": {
"access": "public"
}
}

View File

@ -1,7 +0,0 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib"
},
"include": ["./monorepo_scripts/**/*"]
}

View File

@ -1,3 +0,0 @@
{
"extends": ["tslint-config-0xproject"]
}

View File

@ -12,10 +12,10 @@ yarn add @0xproject/web3-wrapper
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
```
"include": [
"./node_modules/web3-typescript-typings/index.d.ts",
]
```json
"compilerOptions": {
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
}
```
## Contributing

View File

@ -45,11 +45,10 @@
"dependencies": {
"@0xproject/types": "^0.4.1",
"@0xproject/utils": "^0.4.3",
"@0xproject/typescript-typings": "^0.0.1",
"ethers-contracts": "^2.2.1",
"ethers-typescript-typings": "^0.0.4",
"lodash": "^4.17.4",
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.2"
"web3": "^0.20.0"
},
"publishConfig": {
"access": "public"

View File

@ -3,9 +3,5 @@
"compilerOptions": {
"outDir": "lib"
},
"include": [
"./src/**/*",
"../../node_modules/ethers-typescript-typings/index.d.ts",
"../../node_modules/web3-typescript-typings/index.d.ts"
]
"include": ["./src/**/*"]
}

View File

@ -24,6 +24,7 @@
"@0xproject/subproviders": "^0.8.2",
"@0xproject/utils": "^0.4.3",
"@0xproject/web3-wrapper": "^0.3.1",
"@0xproject/typescript-typings": "^0.0.1",
"accounting": "^0.4.1",
"basscss": "^8.0.3",
"blockies": "^0.0.2",
@ -75,9 +76,9 @@
"@types/moment": "^2.13.0",
"@types/node": "^8.0.53",
"@types/query-string": "^5.0.1",
"@types/react": "^15.0.15",
"@types/react": "^16.0.34",
"@types/react-copy-to-clipboard": "^4.2.0",
"@types/react-dom": "^0.14.23",
"@types/react-dom": "^16.0.3",
"@types/react-redux": "^4.4.37",
"@types/react-router-dom": "^4.0.4",
"@types/react-scroll": "0.0.31",
@ -87,7 +88,6 @@
"copy-webpack-plugin": "^4.0.1",
"copyfiles": "^1.2.0",
"css-loader": "0.23.x",
"ethers-typescript-typings": "^0.0.4",
"exports-loader": "0.6.x",
"imports-loader": "0.6.x",
"json-loader": "^0.5.4",
@ -99,7 +99,6 @@
"tslint": "5.8.0",
"tslint-config-0xproject": "^0.0.2",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.10.2",
"webpack": "^3.1.0",
"webpack-dev-middleware": "^1.10.0",
"webpack-dev-server": "^2.5.0"

View File

@ -37,8 +37,8 @@ export class EthWethConversionDialog extends React.Component<
EthWethConversionDialogState
> {
private _isUnmounted: boolean;
constructor() {
super();
constructor(props: EthWethConversionDialogProps) {
super(props);
this._isUnmounted = false;
this.state = {
shouldShowIncompleteErrs: false,

View File

@ -27,8 +27,8 @@ interface SendDialogState {
}
export class SendDialog extends React.Component<SendDialogProps, SendDialogState> {
constructor() {
super();
constructor(props: SendDialogProps) {
super(props);
this.state = {
recipient: '',
shouldShowIncompleteErrs: false,

View File

@ -45,7 +45,7 @@ interface FooterState {
export class Footer extends React.Component<FooterProps, FooterState> {
constructor(props: FooterProps) {
super();
super(props);
this.state = {
selectedLanguage: props.translate.getLanguage(),
};

View File

@ -13,9 +13,5 @@
"*": ["node_modules/@types/*", "*"]
}
},
"include": [
"./ts/**/*",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/ethers-typescript-typings/index.d.ts"
]
"include": ["./ts/**/*"]
}

View File

@ -8,6 +8,7 @@
"experimentalDecorators": true,
"noImplicitReturns": true,
"pretty": true,
"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"],
"strict": true
}
}

Some files were not shown because too many files have changed in this diff Show More