aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-utils
diff options
context:
space:
mode:
Diffstat (limited to 'packages/dev-utils')
-rw-r--r--packages/dev-utils/CHANGELOG.json36
-rw-r--r--packages/dev-utils/CHANGELOG.md16
-rw-r--r--packages/dev-utils/README.md15
-rw-r--r--packages/dev-utils/package.json16
-rw-r--r--packages/dev-utils/src/web3_factory.ts6
5 files changed, 81 insertions, 8 deletions
diff --git a/packages/dev-utils/CHANGELOG.json b/packages/dev-utils/CHANGELOG.json
index d6cdd1c5a..b6cc74ce7 100644
--- a/packages/dev-utils/CHANGELOG.json
+++ b/packages/dev-utils/CHANGELOG.json
@@ -1,5 +1,41 @@
[
{
+ "version": "1.0.21",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ],
+ "timestamp": 1544739608
+ },
+ {
+ "version": "1.0.20",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ],
+ "timestamp": 1544570656
+ },
+ {
+ "timestamp": 1543401373,
+ "version": "1.0.19",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
+ "timestamp": 1542821676,
+ "version": "1.0.18",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1542208198,
"version": "1.0.17",
"changes": [
diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md
index 4becadf81..9a55e4e58 100644
--- a/packages/dev-utils/CHANGELOG.md
+++ b/packages/dev-utils/CHANGELOG.md
@@ -5,6 +5,22 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v1.0.21 - _December 13, 2018_
+
+ * Dependencies updated
+
+## v1.0.20 - _December 11, 2018_
+
+ * Dependencies updated
+
+## v1.0.19 - _November 28, 2018_
+
+ * Dependencies updated
+
+## v1.0.18 - _November 21, 2018_
+
+ * Dependencies updated
+
## v1.0.17 - _November 14, 2018_
* Dependencies updated
diff --git a/packages/dev-utils/README.md b/packages/dev-utils/README.md
index 73b0b8816..b85159dd8 100644
--- a/packages/dev-utils/README.md
+++ b/packages/dev-utils/README.md
@@ -27,6 +27,21 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol
}
```
+## Troubleshooting
+
+If you are still seeing TS type errors complaining about missing DOM types such as `Response`:
+
+```
+error TS2304: Cannot find name 'Response'.
+```
+
+Then you need to explicitly add the `dom` lib to your compiler options in `tsconfig.json`. The `dom` library is included by default, but customizing the `lib` option can cause it to be dropped.
+
+```
+"compilerOptions": {
+ "lib": [..., "dom"],
+```
+
## Contributing
We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.
diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json
index 3db391131..a3eb4651a 100644
--- a/packages/dev-utils/package.json
+++ b/packages/dev-utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@0x/dev-utils",
- "version": "1.0.17",
+ "version": "1.0.21",
"engines": {
"node": ">=6.12"
},
@@ -29,7 +29,7 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/dev-utils/README.md",
"devDependencies": {
- "@0x/tslint-config": "^1.0.10",
+ "@0x/tslint-config": "^2.0.0",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"make-promises-safe": "^1.1.0",
@@ -41,14 +41,14 @@
"typescript": "3.0.1"
},
"dependencies": {
- "@0x/subproviders": "^2.1.4",
- "@0x/types": "^1.2.1",
- "@0x/typescript-typings": "^3.0.4",
- "@0x/utils": "^2.0.5",
- "@0x/web3-wrapper": "^3.1.4",
+ "@0x/subproviders": "^2.1.8",
+ "@0x/types": "^1.4.1",
+ "@0x/typescript-typings": "^3.0.6",
+ "@0x/utils": "^2.0.8",
+ "@0x/web3-wrapper": "^3.2.1",
"@types/web3-provider-engine": "^14.0.0",
"chai": "^4.0.1",
- "ethereum-types": "^1.1.2",
+ "ethereum-types": "^1.1.4",
"lodash": "^4.17.5"
},
"publishConfig": {
diff --git a/packages/dev-utils/src/web3_factory.ts b/packages/dev-utils/src/web3_factory.ts
index b22bcc88b..5f8981a46 100644
--- a/packages/dev-utils/src/web3_factory.ts
+++ b/packages/dev-utils/src/web3_factory.ts
@@ -17,6 +17,7 @@ export interface Web3Config {
shouldThrowErrorsOnGanacheRPCResponse?: boolean; // default: true
rpcUrl?: string; // default: localhost:8545
shouldUseFakeGasEstimate?: boolean; // default: true
+ ganacheDatabasePath?: string; // default: undefined, creates a tmp dir
}
export const web3Factory = {
@@ -45,9 +46,14 @@ export const web3Factory = {
const shouldThrowErrorsOnGanacheRPCResponse =
_.isUndefined(config.shouldThrowErrorsOnGanacheRPCResponse) ||
config.shouldThrowErrorsOnGanacheRPCResponse;
+ if (!_.isUndefined(config.ganacheDatabasePath)) {
+ // Saving the snapshot to a local db. Ganache requires this directory to exist
+ fs.mkdirSync(config.ganacheDatabasePath);
+ }
provider.addProvider(
new GanacheSubprovider({
vmErrorsOnRPCResponse: shouldThrowErrorsOnGanacheRPCResponse,
+ db_path: config.ganacheDatabasePath,
gasLimit: constants.GAS_LIMIT,
logger,
verbose: env.parseBoolean(EnvVars.VerboseGanache),