aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-10-16 04:30:12 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-10-16 04:38:59 +0800
commitf0e483798339b24b599c408949265cca54d7e58b (patch)
tree06b29905d48aecb4890b65f8113306ef69e00f32 /packages
parent003ab1e5b311bfedcffce07f03035e42736a47af (diff)
downloaddexon-sol-tools-f0e483798339b24b599c408949265cca54d7e58b.tar
dexon-sol-tools-f0e483798339b24b599c408949265cca54d7e58b.tar.gz
dexon-sol-tools-f0e483798339b24b599c408949265cca54d7e58b.tar.bz2
dexon-sol-tools-f0e483798339b24b599c408949265cca54d7e58b.tar.lz
dexon-sol-tools-f0e483798339b24b599c408949265cca54d7e58b.tar.xz
dexon-sol-tools-f0e483798339b24b599c408949265cca54d7e58b.tar.zst
dexon-sol-tools-f0e483798339b24b599c408949265cca54d7e58b.zip
Fix failing doc generation tests
Diffstat (limited to 'packages')
-rw-r--r--packages/0x.js/package.json2
-rw-r--r--packages/0x.js/src/globals.d.ts6
-rw-r--r--packages/0x.js/src/index.ts23
-rw-r--r--packages/0x.js/typedoc-tsconfig.json2
-rw-r--r--packages/contract-wrappers/src/index.ts2
-rw-r--r--packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts11
-rw-r--r--packages/order-watcher/src/index.ts1
7 files changed, 29 insertions, 18 deletions
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json
index 1a57edd45..26e9c954d 100644
--- a/packages/0x.js/package.json
+++ b/packages/0x.js/package.json
@@ -42,7 +42,9 @@
},
"license": "Apache-2.0",
"devDependencies": {
+ "@0xproject/contract-addresses": "^1.0.0",
"@0xproject/abi-gen": "^1.0.13",
+ "@0xproject/abi-gen-wrappers": "^1.0.0",
"@0xproject/dev-utils": "^1.0.12",
"@0xproject/migrations": "^1.0.14",
"@0xproject/monorepo-scripts": "^1.0.11",
diff --git a/packages/0x.js/src/globals.d.ts b/packages/0x.js/src/globals.d.ts
deleted file mode 100644
index 94e63a32d..000000000
--- a/packages/0x.js/src/globals.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-declare module '*.json' {
- const json: any;
- /* tslint:disable */
- export default json;
- /* tslint:enable */
-}
diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts
index ce3f616aa..7fd48da37 100644
--- a/packages/0x.js/src/index.ts
+++ b/packages/0x.js/src/index.ts
@@ -1,3 +1,5 @@
+export { ContractAddresses } from '@0xproject/contract-addresses';
+
export { assetDataUtils, signatureUtils, generatePseudoRandomSalt, orderHashUtils } from '@0xproject/order-utils';
export {
@@ -18,6 +20,16 @@ export {
TransactionOpts,
OrderStatus,
OrderInfo,
+ EventCallback,
+ DecodedLogEvent,
+ TransactionEncoder,
+ BalanceAndAllowance,
+ OrderAndTraderInfo,
+ TraderInfo,
+ ValidateOrderFillableOpts,
+} from '@0xproject/contract-wrappers';
+
+export {
WETH9Events,
WETH9WithdrawalEventArgs,
WETH9ApprovalEventArgs,
@@ -38,16 +50,9 @@ export {
ExchangeSignatureValidatorApprovalEventArgs,
ExchangeFillEventArgs,
ExchangeCancelEventArgs,
- ExchangeEvents,
- EventCallback,
- DecodedLogEvent,
ExchangeEventArgs,
- TransactionEncoder,
- BalanceAndAllowance,
- OrderAndTraderInfo,
- TraderInfo,
- ValidateOrderFillableOpts,
-} from '@0xproject/contract-wrappers';
+ ExchangeEvents,
+} from '@0xproject/abi-gen-wrappers';
export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0xproject/order-watcher';
diff --git a/packages/0x.js/typedoc-tsconfig.json b/packages/0x.js/typedoc-tsconfig.json
index c9b0af1ae..a4c669cb6 100644
--- a/packages/0x.js/typedoc-tsconfig.json
+++ b/packages/0x.js/typedoc-tsconfig.json
@@ -3,5 +3,5 @@
"compilerOptions": {
"outDir": "lib"
},
- "include": ["./src/**/*", "./test/**/*"]
+ "include": ["./src/**/*"]
}
diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts
index 50dfe88be..f24828153 100644
--- a/packages/contract-wrappers/src/index.ts
+++ b/packages/contract-wrappers/src/index.ts
@@ -1,3 +1,5 @@
+export { ContractAddresses } from '@0xproject/contract-addresses';
+
export {
WETH9Events,
WETH9WithdrawalEventArgs,
diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts
index de52b3a47..4fea94414 100644
--- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts
+++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts
@@ -1,4 +1,4 @@
-import { readFileSync, writeFileSync } from 'fs';
+import { existsSync, readFileSync, writeFileSync } from 'fs';
import * as _ from 'lodash';
import * as path from 'path';
import { exec as execAsync } from 'promisify-child-process';
@@ -103,6 +103,9 @@ export class DocGenerateAndUploadUtils {
switch (node.kind) {
case ts.SyntaxKind.ExportDeclaration: {
const exportClause = (node as any).exportClause;
+ if (_.isUndefined(exportClause)) {
+ return;
+ }
const exportPath = exportClause.parent.moduleSpecifier.text;
_.each(exportClause.elements, element => {
const exportItem = element.name.escapedText;
@@ -187,7 +190,11 @@ export class DocGenerateAndUploadUtils {
const typeDocExtraFileIncludes: string[] = this._getTypeDocFileIncludesForPackage();
// In order to avoid TS errors, we need to pass TypeDoc the package's global.d.ts file
- typeDocExtraFileIncludes.push(path.join(this._packagePath, 'src', 'globals.d.ts'));
+ // if it exists.
+ const globalTypeDefinitionsPath = path.join(this._packagePath, 'src', 'globals.d.ts');
+ if (existsSync(globalTypeDefinitionsPath)) {
+ typeDocExtraFileIncludes.push(globalTypeDefinitionsPath);
+ }
utils.log(`GENERATE_UPLOAD_DOCS: Generating Typedoc JSON for ${this._packageName}...`);
const jsonFilePath = path.join(this._packagePath, 'generated_docs', 'index.json');
diff --git a/packages/order-watcher/src/index.ts b/packages/order-watcher/src/index.ts
index 8280c73a4..6e862a427 100644
--- a/packages/order-watcher/src/index.ts
+++ b/packages/order-watcher/src/index.ts
@@ -12,6 +12,7 @@ export {
export { OnOrderStateChangeCallback, OrderWatcherConfig } from './types';
+export { ContractAddresses } from '@0xproject/contract-addresses';
export { SignedOrder } from '@0xproject/types';
export {
JSONRPCRequestPayload,