diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-03-06 07:08:56 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-03-06 07:08:56 +0800 |
commit | d171ce4fba97847a617fc4c8fd7e3b759586c933 (patch) | |
tree | c800ae90713a098cd00a418bffe516776b579baf /packages/connect | |
parent | 92b9dbd706768fd0edfc8f72a90f197abd8b3d66 (diff) | |
parent | 994935b5da0b15796958a32c5bab0a25b9430b5a (diff) | |
download | dexon-sol-tools-d171ce4fba97847a617fc4c8fd7e3b759586c933.tar dexon-sol-tools-d171ce4fba97847a617fc4c8fd7e3b759586c933.tar.gz dexon-sol-tools-d171ce4fba97847a617fc4c8fd7e3b759586c933.tar.bz2 dexon-sol-tools-d171ce4fba97847a617fc4c8fd7e3b759586c933.tar.lz dexon-sol-tools-d171ce4fba97847a617fc4c8fd7e3b759586c933.tar.xz dexon-sol-tools-d171ce4fba97847a617fc4c8fd7e3b759586c933.tar.zst dexon-sol-tools-d171ce4fba97847a617fc4c8fd7e3b759586c933.zip |
Merge branch 'development' into feature/sra-reporter
* development: (79 commits)
remove from devDeps
Remove date for now
Add ethers typescript typings to 0x.js deps. The library works without this atm since another dep of 0x.js has it as a dep. But it's more robust to have it here.
Add missing instructions to add external types to tsconfig.json after installing the package
Fix bugs in postpublish_utils.js
Update @0xproject/utils in top-level package.json
Changelog tweaks
Publish
Updated CHANGELOGS
Fix typo
Add PR number to changelog entry
Add changelog update to subproviders package
Add `numberOfAccounts` param to `LedgerSubprovider` method `getAccountsAsync` and add tests
Remove unnecessary type assertion
Fix comments
Add comments
Don't need any external packages for 0x connect docs yet
Instead of adding `@0xproject/types` to tsconfig.json, let's only add it when calling TypeDoc
Fix styling
Make prettier ignore postpublish_utils
...
Diffstat (limited to 'packages/connect')
-rw-r--r-- | packages/connect/CHANGELOG.md | 2 | ||||
-rw-r--r-- | packages/connect/README.md | 8 | ||||
-rw-r--r-- | packages/connect/package.json | 24 | ||||
-rw-r--r-- | packages/connect/scripts/postpublish.js | 8 | ||||
-rw-r--r-- | packages/connect/scripts/stagedocs.js | 32 |
5 files changed, 47 insertions, 27 deletions
diff --git a/packages/connect/CHANGELOG.md b/packages/connect/CHANGELOG.md index 75ffb5274..e1fb7c795 100644 --- a/packages/connect/CHANGELOG.md +++ b/packages/connect/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG -## v0.6.1 - _February 16, 2018_ +## v0.6.2 - _February 16, 2018_ * Fix JSON parse empty response (#407) diff --git a/packages/connect/README.md b/packages/connect/README.md index 7302322e6..393ea70a0 100644 --- a/packages/connect/README.md +++ b/packages/connect/README.md @@ -8,6 +8,14 @@ This repository contains a Javascript library that makes it easy to interact wit 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", +] +``` + ## Usage * [Docs](https://0xproject.com/docs/connect) diff --git a/packages/connect/package.json b/packages/connect/package.json index c5c8f4ea0..f2eec9f00 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/connect", - "version": "0.6.1", + "version": "0.6.2", "description": "A javascript library for interacting with the standard relayer api", "keywords": [ "connect", @@ -15,7 +15,7 @@ "build:watch": "tsc -w", "build": "tsc", "clean": "shx rm -rf _bundles lib test_temp", - "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_DIR", + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES", "upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json", "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", @@ -25,7 +25,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/0xProject/0x.js.git" + "url": "https://github.com/0xProject/0x-monorepo.git" }, "author": "Brandon Millman", "license": "Apache-2.0", @@ -33,20 +33,20 @@ "node": ">=6.0.0" }, "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" + "url": "https://github.com/0xProject/0x-monorepo/issues" }, - "homepage": "https://github.com/0xProject/0x.js/packages/connect/README.md", + "homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md", "dependencies": { - "@0xproject/assert": "^0.0.20", - "@0xproject/json-schemas": "^0.7.12", - "@0xproject/utils": "^0.3.4", + "@0xproject/assert": "^0.1.0", + "@0xproject/json-schemas": "^0.7.13", + "@0xproject/utils": "^0.4.0", "isomorphic-fetch": "^2.2.1", "lodash": "^4.17.4", "query-string": "^5.0.1", "websocket": "^1.0.25" }, "devDependencies": { - "@0xproject/tslint-config": "^0.4.9", + "@0xproject/tslint-config": "^0.4.10", "@types/fetch-mock": "^5.12.1", "@types/lodash": "^4.14.86", "@types/mocha": "^2.2.42", @@ -54,8 +54,8 @@ "@types/websocket": "^0.0.34", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", - "chai-as-promised-typescript-typings": "^0.0.9", - "chai-typescript-typings": "^0.0.3", + "chai-as-promised-typescript-typings": "^0.0.10", + "chai-typescript-typings": "^0.0.4", "copyfiles": "^1.2.0", "dirty-chai": "^2.0.1", "fetch-mock": "^5.13.1", @@ -65,6 +65,6 @@ "tslint": "5.8.0", "typedoc": "~0.8.0", "typescript": "2.7.1", - "web3-typescript-typings": "^0.9.11" + "web3-typescript-typings": "^0.10.0" } } diff --git a/packages/connect/scripts/postpublish.js b/packages/connect/scripts/postpublish.js index 869bad099..e447615f9 100644 --- a/packages/connect/scripts/postpublish.js +++ b/packages/connect/scripts/postpublish.js @@ -1,10 +1,16 @@ const execAsync = require('async-child-process').execAsync; const postpublish_utils = require('../../../scripts/postpublish_utils'); const packageJSON = require('../package.json'); +const tsConfig = require('../tsconfig.json'); const cwd = __dirname + '/..'; const subPackageName = packageJSON.name; const S3BucketPath = 's3://connect-docs-jsons/'; +// Include any external packages that are part of the @0xproject/connect public interface +// to this array so that TypeDoc picks it up and adds it to the Docs JSON +const fileIncludes = [...tsConfig.include]; +const fileIncludesAdjusted = postpublish_utils.adjustFileIncludePaths(fileIncludes, __dirname); +const projectFiles = fileIncludesAdjusted.join(' '); let tag; let version; @@ -19,7 +25,7 @@ postpublish_utils .then(function(release) { console.log('POSTPUBLISH: Release successful, generating docs...'); const jsonFilePath = __dirname + '/../' + postpublish_utils.generatedDocsDirectoryName + '/index.json'; - return execAsync('JSON_FILE_PATH=' + jsonFilePath + ' PROJECT_DIR=' + __dirname + '/.. yarn docs:json', { + return execAsync('JSON_FILE_PATH=' + jsonFilePath + ' PROJECT_FILES="' + projectFiles + '" yarn docs:json', { cwd, }); }) diff --git a/packages/connect/scripts/stagedocs.js b/packages/connect/scripts/stagedocs.js index 868112a37..58272ab86 100644 --- a/packages/connect/scripts/stagedocs.js +++ b/packages/connect/scripts/stagedocs.js @@ -1,24 +1,30 @@ const execAsync = require('async-child-process').execAsync; const postpublish_utils = require('../../../scripts/postpublish_utils'); +const tsConfig = require('../tsconfig.json'); const cwd = __dirname + '/..'; const S3BucketPath = 's3://staging-connect-docs-jsons/'; const jsonFilePath = __dirname + '/../' + postpublish_utils.generatedDocsDirectoryName + '/index.json'; const version = process.env.DOCS_VERSION; +// Include any external packages that are part of the @0xproject/connect public interface +// to this array so that TypeDoc picks it up and adds it to the Docs JSON +const fileIncludes = [...tsConfig.include]; +const fileIncludesAdjusted = postpublish_utils.adjustFileIncludePaths(fileIncludes, __dirname); +const projectFiles = fileIncludesAdjusted.join(' '); -execAsync('JSON_FILE_PATH=' + jsonFilePath + ' PROJECT_DIR=' + __dirname + '/.. yarn docs:json', { +execAsync('JSON_FILE_PATH=' + jsonFilePath + ' PROJECT_FILES="' + projectFiles + '" yarn docs:json', { cwd, }) -.then(function(result) { - if (result.stderr !== '') { - throw new Error(result.stderr); - } - const fileName = 'v' + version + '.json'; - const s3Url = S3BucketPath + fileName; - return execAsync('S3_URL=' + s3Url + ' yarn upload_docs_json', { - cwd, + .then(function(result) { + if (result.stderr !== '') { + throw new Error(result.stderr); + } + const fileName = 'v' + version + '.json'; + const s3Url = S3BucketPath + fileName; + return execAsync('S3_URL=' + s3Url + ' yarn upload_docs_json', { + cwd, + }); + }) + .catch(function(err) { + console.log(err); }); -}) -.catch(function(err) { - console.log(err); -}); |