aboutsummaryrefslogtreecommitdiffstats
path: root/packages/assert
diff options
context:
space:
mode:
Diffstat (limited to 'packages/assert')
-rw-r--r--packages/assert/README.md18
-rw-r--r--packages/assert/package.json5
-rw-r--r--packages/assert/src/index.ts2
3 files changed, 8 insertions, 17 deletions
diff --git a/packages/assert/README.md b/packages/assert/README.md
index 598fee613..1f2139d47 100644
--- a/packages/assert/README.md
+++ b/packages/assert/README.md
@@ -46,28 +46,16 @@ yarn install
### Build
-If this is your **first** time building this package, you must first build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory:
+To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-yarn lerna:rebuild
+PKG=@0xproject/assert yarn build
```
Or continuously rebuild on change:
```bash
-yarn dev
-```
-
-You can also build this specific package by running the following from within its directory:
-
-```bash
-yarn build
-```
-
-or continuously rebuild on change:
-
-```bash
-yarn build:watch
+PKG=@0xproject/assert yarn watch
```
### Clean
diff --git a/packages/assert/package.json b/packages/assert/package.json
index f86bbb33f..c6d77c1bd 100644
--- a/packages/assert/package.json
+++ b/packages/assert/package.json
@@ -1,11 +1,14 @@
{
"name": "@0xproject/assert",
"version": "0.2.9",
+ "engines": {
+ "node" : ">=6.12"
+ },
"description": "Provides a standard way of performing type and schema validation across 0x projects",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"scripts": {
- "build:watch": "tsc -w",
+ "watch": "tsc -w",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib test_temp scripts",
"lint": "tslint --project .",
diff --git a/packages/assert/src/index.ts b/packages/assert/src/index.ts
index 938daab92..f3b3651d5 100644
--- a/packages/assert/src/index.ts
+++ b/packages/assert/src/index.ts
@@ -10,7 +10,7 @@ export const assert = {
const isBigNumber = _.isObject(value) && (value as any).isBigNumber;
this.assert(isBigNumber, this.typeAssertionMessage(variableName, 'BigNumber', value));
},
- isValidBaseUnitAmount(variableName: string, value: BigNumber) {
+ isValidBaseUnitAmount(variableName: string, value: BigNumber): void {
assert.isBigNumber(variableName, value);
const isNegative = value.lessThan(0);
this.assert(!isNegative, `${variableName} cannot be a negative number, found value: ${value.toNumber()}`);