diff options
Diffstat (limited to 'packages/assert')
-rw-r--r-- | packages/assert/CHANGELOG.json | 18 | ||||
-rw-r--r-- | packages/assert/CHANGELOG.md | 18 | ||||
-rw-r--r-- | packages/assert/README.md | 18 | ||||
-rw-r--r-- | packages/assert/package.json | 19 | ||||
-rw-r--r-- | packages/assert/src/index.ts | 2 |
5 files changed, 46 insertions, 29 deletions
diff --git a/packages/assert/CHANGELOG.json b/packages/assert/CHANGELOG.json index fbd663f8e..f826c7675 100644 --- a/packages/assert/CHANGELOG.json +++ b/packages/assert/CHANGELOG.json @@ -1,5 +1,23 @@ [ { + "timestamp": 1525477860, + "version": "0.2.9", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { + "timestamp": 1525428773, + "version": "0.2.8", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1524044013, "version": "0.2.7", "changes": [ diff --git a/packages/assert/CHANGELOG.md b/packages/assert/CHANGELOG.md index 1daa9205e..ab058b9fc 100644 --- a/packages/assert/CHANGELOG.md +++ b/packages/assert/CHANGELOG.md @@ -5,11 +5,19 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v0.2.9 - _May 5, 2018_ + + * Dependencies updated + +## v0.2.8 - _May 4, 2018_ + + * Dependencies updated + ## v0.2.7 - _April 18, 2018_ * Dependencies updated -## v0.2.6 - _April 12, 2018_ +## v0.2.6 - _April 11, 2018_ * Dependencies updated @@ -21,20 +29,20 @@ CHANGELOG * Dependencies updated -## v0.2.0 - _March 8, 2018_ +## v0.2.0 - _March 7, 2018_ * Rename `isHttpUrl` to `isWebUri` (#412) -## v0.1.0 - _March 4, 2018_ +## v0.1.0 - _March 3, 2018_ * Remove isETHAddressHex checksum address check and assume address will be lowercased (#373) * Add an optional parameter `subSchemas` to `doesConformToSchema` method (#385) -## v0.0.18 - _February 9, 2017_ +## v0.0.18 - _February 8, 2017_ * Fix publishing issue where .npmignore was not properly excluding undesired content (#389) -## v0.0.4 - _November 14, 2017_ +## v0.0.4 - _November 13, 2017_ * Re-publish Assert previously published under NPM package @0xproject/0x-assert * Added assertion isValidBaseUnitAmount which checks both that the value is a valid bigNumber and that it does not contain decimals. 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 e0e7a0d4c..c6d77c1bd 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -1,14 +1,17 @@ { "name": "@0xproject/assert", - "version": "0.2.7", + "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 . 'src/**/*.ts' 'test/**/*.ts'", + "lint": "tslint --project .", "run_mocha": "mocha lib/test/**/*_test.js --exit", "prepublishOnly": "run-p build", "test": "run-s clean build run_mocha", @@ -27,8 +30,8 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/assert/README.md", "devDependencies": { - "@0xproject/monorepo-scripts": "^0.1.18", - "@0xproject/tslint-config": "^0.4.16", + "@0xproject/monorepo-scripts": "^0.1.19", + "@0xproject/tslint-config": "^0.4.17", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", "@types/valid-url": "^1.0.2", @@ -43,9 +46,9 @@ "typescript": "2.7.1" }, "dependencies": { - "@0xproject/json-schemas": "^0.7.21", - "@0xproject/typescript-typings": "^0.2.0", - "@0xproject/utils": "^0.5.2", + "@0xproject/json-schemas": "^0.7.23", + "@0xproject/typescript-typings": "^0.3.1", + "@0xproject/utils": "^0.6.1", "lodash": "^4.17.4", "valid-url": "^1.0.9" }, 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()}`); |