Skip to content

Commit

Permalink
Removed export star to fix UMD dist file.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Sep 6, 2019
1 parent e8028d0 commit 4c17c4d
Show file tree
Hide file tree
Showing 64 changed files with 300 additions and 673 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"_dist_ethers": "rollup -c && rollup -c --configMinify && rollup -c --configModule && rollup -c --configModule --configMinify",
"_dist_tests": "rollup -c --configTest && rollup -c --configTest --configMinify && rollup -c --configTest --configModule && rollup -c --configTest --configModule --configMinify",
"_test_prepare": "npm run _dist_prepare && npm run _dist_tests",
"_test_node": "cd packages/tests && mocha --no-colors --reporter ./lib/reporter ./lib/test-*.js",
"_test_node": "cd packages/tests && mocha --no-colors --reporter ./reporter ./lib/test-*.js",
"test_node": "npm run _test_prepare && npm run _test_node",
"_dist_old": "npm run clean && npm run bootstrap && npm run build && lerna run dist",
"old-test": "npm run _dist_old && npm run test-check",
Expand Down
2 changes: 1 addition & 1 deletion packages/abi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
},
"module": "./lib.esm/index.js",
"types": "./lib/index.d.ts",
"tarballHash": "0xe4021eb72e5aed6edb4b6cf5fa70f01afa6f1ae200e40bea8861b60a59759b4a"
"tarballHash": "0x2586b6ca7027e4b47caf53887eae7d3aca64570fb72bcb495838b883be6580f3"
}
8 changes: 4 additions & 4 deletions packages/abstract-provider/lib.esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ export class TransactionOrderForkEvent extends ForkEvent {
///////////////////////////////
// Exported Abstracts
export class Provider {
constructor() {
logger.checkAbstract(new.target, Provider);
defineReadOnly(this, "_isProvider", true);
}
// Alias for "on"
addListener(eventName, listener) {
return this.on(eventName, listener);
Expand All @@ -68,10 +72,6 @@ export class Provider {
removeListener(eventName, listener) {
return this.off(eventName, listener);
}
constructor() {
logger.checkAbstract(new.target, Provider);
defineReadOnly(this, "_isProvider", true);
}
static isProvider(value) {
return !!(value && value._isProvider);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/abstract-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
},
"module": "./lib.esm/index.js",
"types": "./lib/index.d.ts",
"tarballHash": "0x3a2082bb4e5d5f15beb057d863d32cf55a086c6065f05202df62a520f717deea"
"tarballHash": "0x2beb1736c2a9c8023e74c415353bff10587ae1dc49240ec5dc2620171899f2e6"
}
2 changes: 1 addition & 1 deletion packages/abstract-signer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
},
"module": "./lib.esm/index.js",
"types": "./lib/index.d.ts",
"tarballHash": "0xfe7d31b31b069c4f4600f1f7eea2a9f271a6f8f919e0c17fc578acae251237db"
"tarballHash": "0x29ac3c562b144556a1971d8997ddf92f58733e61d15f78c24fc6e0a7ce4e9b28"
}
6 changes: 3 additions & 3 deletions packages/address/lib.esm/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";
// We use this for base 36 maths
import * as BN from "bn.js";
import { BN } from "bn.js";
import { arrayify, hexDataSlice, isHexString, stripZeros } from "@ethersproject/bytes";
import { keccak256 } from "@ethersproject/keccak256";
import { encode } from "@ethersproject/rlp";
Expand Down Expand Up @@ -88,7 +88,7 @@ export function getAddress(address) {
if (address.substring(2, 4) !== ibanChecksum(address)) {
logger.throwArgumentError("bad icap checksum", "address", address);
}
result = (new BN.BN(address.substring(4), 36)).toString(16);
result = (new BN(address.substring(4), 36)).toString(16);
while (result.length < 40) {
result = "0" + result;
}
Expand All @@ -108,7 +108,7 @@ export function isAddress(address) {
return false;
}
export function getIcapAddress(address) {
let base36 = (new BN.BN(getAddress(address).substring(2), 16)).toString(36).toUpperCase();
let base36 = (new BN(getAddress(address).substring(2), 16)).toString(36).toUpperCase();
while (base36.length < 30) {
base36 = "0" + base36;
}
Expand Down
13 changes: 3 additions & 10 deletions packages/address/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
// We use this for base 36 maths
var BN = __importStar(require("bn.js"));
var bn_js_1 = require("bn.js");
var bytes_1 = require("@ethersproject/bytes");
var keccak256_1 = require("@ethersproject/keccak256");
var rlp_1 = require("@ethersproject/rlp");
Expand Down Expand Up @@ -96,7 +89,7 @@ function getAddress(address) {
if (address.substring(2, 4) !== ibanChecksum(address)) {
logger.throwArgumentError("bad icap checksum", "address", address);
}
result = (new BN.BN(address.substring(4), 36)).toString(16);
result = (new bn_js_1.BN(address.substring(4), 36)).toString(16);
while (result.length < 40) {
result = "0" + result;
}
Expand All @@ -118,7 +111,7 @@ function isAddress(address) {
}
exports.isAddress = isAddress;
function getIcapAddress(address) {
var base36 = (new BN.BN(getAddress(address).substring(2), 16)).toString(36).toUpperCase();
var base36 = (new bn_js_1.BN(getAddress(address).substring(2), 16)).toString(36).toUpperCase();
while (base36.length < 30) {
base36 = "0" + base36;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/address/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
},
"module": "./lib.esm/index.js",
"types": "./lib/index.d.ts",
"tarballHash": "0x4cf2a1710526cbee72754e01d0819087d80c4e6f95393dfc9037aeec5ed9cde2"
"tarballHash": "0x3ca47b90abf21da753646b5b888976f067af8e0afceec65a8523c7f708855c6a"
}
2 changes: 1 addition & 1 deletion packages/base64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
},
"module": "./lib.esm/index.js",
"types": "./lib/index.d.ts",
"tarballHash": "0xaf339d29758af1140ec01b737ab3241b28f376a6ff66c85e75d6f8a9b29886f2"
"tarballHash": "0x1b03890d546a6603f6a326246aaa8a9fa0f25fc40c2f4ba5597f7d6196ea8c51"
}
2 changes: 1 addition & 1 deletion packages/basex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
},
"module": "./lib.esm/index.js",
"types": "./lib/index.d.ts",
"tarballHash": "0x229d72d84c96d355704e5ee6947554004006ce117a2e18fe46d9fdf3a7697c97"
"tarballHash": "0x9cad634049ece74f8747f53b37b1f46cca4e00a2aac7184fa17eadc4f8675e40"
}
8 changes: 4 additions & 4 deletions packages/bignumber/lib.esm/bignumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* because it is used by elliptic, so it is required regardles.
*
*/
import * as BN from "bn.js";
import { BN } from "bn.js";
import { hexlify, isBytes, isHexString } from "@ethersproject/bytes";
import { Logger } from "@ethersproject/logger";
import { version } from "./_version";
Expand Down Expand Up @@ -116,7 +116,7 @@ export class BigNumber {
return new BigNumber(_constructorGuard, toHex(value));
}
if (value.match(/^-?[0-9]+$/)) {
return new BigNumber(_constructorGuard, toHex(new BN.BN(value)));
return new BigNumber(_constructorGuard, toHex(new BN(value)));
}
return logger.throwArgumentError("invalid BigNumber string", "value", value);
}
Expand Down Expand Up @@ -197,9 +197,9 @@ function toBigNumber(value) {
function toBN(value) {
let hex = BigNumber.from(value).toHexString();
if (hex[0] === "-") {
return (new BN.BN("-" + hex.substring(3), 16));
return (new BN("-" + hex.substring(3), 16));
}
return new BN.BN(hex.substring(2), 16);
return new BN(hex.substring(2), 16);
}
function throwFault(fault, operation, value) {
let params = { fault: fault, operation: operation };
Expand Down
15 changes: 4 additions & 11 deletions packages/bignumber/lib/bignumber.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
* BigNumber
Expand All @@ -14,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
* because it is used by elliptic, so it is required regardles.
*
*/
var BN = __importStar(require("bn.js"));
var bn_js_1 = require("bn.js");
var bytes_1 = require("@ethersproject/bytes");
var logger_1 = require("@ethersproject/logger");
var _version_1 = require("./_version");
Expand Down Expand Up @@ -126,7 +119,7 @@ var BigNumber = /** @class */ (function () {
return new BigNumber(_constructorGuard, toHex(value));
}
if (value.match(/^-?[0-9]+$/)) {
return new BigNumber(_constructorGuard, toHex(new BN.BN(value)));
return new BigNumber(_constructorGuard, toHex(new bn_js_1.BN(value)));
}
return logger.throwArgumentError("invalid BigNumber string", "value", value);
}
Expand Down Expand Up @@ -209,9 +202,9 @@ function toBigNumber(value) {
function toBN(value) {
var hex = BigNumber.from(value).toHexString();
if (hex[0] === "-") {
return (new BN.BN("-" + hex.substring(3), 16));
return (new bn_js_1.BN("-" + hex.substring(3), 16));
}
return new BN.BN(hex.substring(2), 16);
return new bn_js_1.BN(hex.substring(2), 16);
}
function throwFault(fault, operation, value) {
var params = { fault: fault, operation: operation };
Expand Down
2 changes: 1 addition & 1 deletion packages/bignumber/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
},
"module": "./lib.esm/index.js",
"types": "./lib/index.d.ts",
"tarballHash": "0x9a95bbb76aa2acea22c52711473585eef5196d7400f9144d6d1322e890fb3264"
"tarballHash": "0xcc5966135a40d8007d2916aa352db202de42eeef24197ba94eeb01414232cf41"
}
2 changes: 1 addition & 1 deletion packages/bytes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
},
"module": "./lib.esm/index.js",
"types": "./lib/index.d.ts",
"tarballHash": "0x11da50922c3e91c2fa195a580699ba92774bc3275a1154309ffcff8dee314c8d"
"tarballHash": "0xaedefd50f9571311250bc76aa8698765f69efd5ea43de1ca248ebbf8d34e640e"
}
3 changes: 2 additions & 1 deletion packages/cli/lib.esm/bin/ethers-ens.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env node
'use strict';
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/lib.esm/bin/ethers-ts.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env node
'use strict';
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/lib.esm/bin/ethers.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env node
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/lib.esm/cli.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/lib/bin/ethers-ens.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ var __extends = (this && this.__extends) || (function () {
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/lib/bin/ethers-ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ var __extends = (this && this.__extends) || (function () {
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/lib/bin/ethers.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ var __extends = (this && this.__extends) || (function () {
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ var __extends = (this && this.__extends) || (function () {
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Expand Down
Loading

0 comments on commit 4c17c4d

Please sign in to comment.