aboutsummaryrefslogtreecommitdiffstats
path: root/packages/assert
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-03-16 00:57:27 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-03-16 00:57:27 +0800
commit76029cbf0915df36266bd5e51add07755297ddda (patch)
treee1692f8cc4ea4642292c61f65ba3911ded26de8e /packages/assert
parentb9c1653c1cf6984d56b7825d8747b48d797fa39e (diff)
parent4a27a7dc581fc6c8a3d4e212ca3712c249a5b417 (diff)
downloaddexon-sol-tools-76029cbf0915df36266bd5e51add07755297ddda.tar
dexon-sol-tools-76029cbf0915df36266bd5e51add07755297ddda.tar.gz
dexon-sol-tools-76029cbf0915df36266bd5e51add07755297ddda.tar.bz2
dexon-sol-tools-76029cbf0915df36266bd5e51add07755297ddda.tar.lz
dexon-sol-tools-76029cbf0915df36266bd5e51add07755297ddda.tar.xz
dexon-sol-tools-76029cbf0915df36266bd5e51add07755297ddda.tar.zst
dexon-sol-tools-76029cbf0915df36266bd5e51add07755297ddda.zip
Merge branch 'development' into feature/sra-report/collection-tests
* development: (97 commits) Keep console.log in monorepo-scripts Enable coverage for all other packages with tests Fix parallel coverage results reporting Fix linter issuesx Remove outdated comment Add script copying to build command Add postpublish script to sol-cov Move configuration into package.json configs section Transform input data before encoding for callAsync and getABIEncodedTransactionData Update CHANGELOGs Consolidate all console.log into the @0xproject/utils package Update coverage badge to show development coverage Configure post build hook Notify coveralls after all tasks have finished Address feedback Revert "Report all coverage reports together" Separate published packages and typescript typings on README Consolidate docs generation and uploading logic Use async/await instead of promise syntax Move changelog entry ...
Diffstat (limited to 'packages/assert')
-rw-r--r--packages/assert/coverage/.gitkeep0
-rw-r--r--packages/assert/package.json11
-rw-r--r--packages/assert/scripts/postpublish.js5
-rw-r--r--packages/assert/src/globals.d.ts7
-rw-r--r--packages/assert/src/monorepo_scripts/postpublish.ts8
5 files changed, 23 insertions, 8 deletions
diff --git a/packages/assert/coverage/.gitkeep b/packages/assert/coverage/.gitkeep
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/packages/assert/coverage/.gitkeep
diff --git a/packages/assert/package.json b/packages/assert/package.json
index 49b0f3390..0c8c64e16 100644
--- a/packages/assert/package.json
+++ b/packages/assert/package.json
@@ -6,13 +6,15 @@
"types": "lib/src/index.d.ts",
"scripts": {
"build:watch": "tsc -w",
- "build": "tsc",
- "clean": "shx rm -rf _bundles lib test_temp",
+ "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
+ "clean": "shx rm -rf _bundles lib test_temp scripts",
"lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'",
"run_mocha": "mocha lib/test/**/*_test.js",
"prepublishOnly": "run-p build",
"test": "run-s clean build run_mocha",
- "test:circleci": "yarn test"
+ "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
+ "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
+ "test:circleci": "yarn test:coverage"
},
"license": "Apache-2.0",
"repository": {
@@ -24,12 +26,15 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/assert/README.md",
"devDependencies": {
+ "@0xproject/monorepo-scripts": "^0.1.12",
"@0xproject/tslint-config": "^0.4.10",
"@types/lodash": "^4.14.86",
"@types/mocha": "^2.2.42",
"@types/valid-url": "^1.0.2",
+ "nyc": "^11.0.1",
"chai": "^4.0.1",
"chai-typescript-typings": "^0.0.4",
+ "copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
diff --git a/packages/assert/scripts/postpublish.js b/packages/assert/scripts/postpublish.js
deleted file mode 100644
index b3e5407c8..000000000
--- a/packages/assert/scripts/postpublish.js
+++ /dev/null
@@ -1,5 +0,0 @@
-const postpublish_utils = require('../../../scripts/postpublish_utils');
-const packageJSON = require('../package.json');
-
-const subPackageName = packageJSON.name;
-postpublish_utils.standardPostPublishAsync(subPackageName); \ No newline at end of file
diff --git a/packages/assert/src/globals.d.ts b/packages/assert/src/globals.d.ts
index 91ed2021e..5476b6bd8 100644
--- a/packages/assert/src/globals.d.ts
+++ b/packages/assert/src/globals.d.ts
@@ -1 +1,8 @@
declare module 'dirty-chai';
+
+declare module '*.json' {
+ const json: any;
+ /* tslint:disable */
+ export default json;
+ /* tslint:enable */
+}
diff --git a/packages/assert/src/monorepo_scripts/postpublish.ts b/packages/assert/src/monorepo_scripts/postpublish.ts
new file mode 100644
index 000000000..dcb99d0f7
--- /dev/null
+++ b/packages/assert/src/monorepo_scripts/postpublish.ts
@@ -0,0 +1,8 @@
+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);