Skip to content

Commit

Permalink
Updated dist files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Nov 24, 2019
1 parent cf036e1 commit fa9f53d
Show file tree
Hide file tree
Showing 37 changed files with 112 additions and 115 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Changelog

This change log is managed by `scripts/cmds/update-versions` but may be manually updated.

ethers/v5.0.0-beta.162 (2019-11-25 0:02)
----------------------------------------

- Update elliptic package to protect from Minerva timing attack. ([#666](https://github.com/ethers-io/ethers.js/issues/666); [cf036e1](https://github.com/ethers-io/ethers.js/commit/cf036e1ffad3340fcf1c7559d0032493ccc08e6e))
- Browser and node testing works again. ([4470477](https://github.com/ethers-io/ethers.js/commit/4470477d7fd3031f2f3a1fbd9c538468c33c7350))

ethers/v5.0.0-beta.161 (2019-11-23 21:43)
-----------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions admin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function run(progname, args, ignoreErrorStream) {
console.log("ERROR");
console.log(stderr.toString());

let error = new Error("stderr not empty");
let error = new Error(`stderr not empty: ${ progname } ${ JSON.stringify(args) }`);
error.stderr = stderr.toString();
error.stdout = stdout.toString();
error.statusCode = code;
Expand Down Expand Up @@ -105,7 +105,7 @@ function runBuild(buildModule) {
}

function runDist() {
return run("npm", [ "run", "_dist_ethers" ], true);
return run("npm", [ "run", "_dist" ], true);
}

module.exports = {
Expand Down
35 changes: 20 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,26 @@
"_build-esm": "node ./admin/cmds/set-option esm && npm run build",
"_dist-min-all": "node ./admin/cmds/set-option.js browser-lang-all && rollup -c --configMinify && rollup -c --configMinify --configModule && mv ./packages/ethers/dist/ethers.umd.min.js ./packages/ethers/dist/ethers-all.umd.min.js && mv ./packages/ethers/dist/ethers.esm.min.js ./packages/ethers/dist/ethers-all.esm.min.js",
"_dist-min-en": "node ./admin/cmds/set-option.js browser-lang-en && rollup -c --configMinify && rollup -c --configMinify --configModule",
"_dist": "npm run _dist-min-all && npm run _dist-min-en && rollup -c && rollup -c --configModule",
"_dist-full": "rollup -c && rollup -c --configModule",
"_dist": "npm run _dist-min-all && npm run _dist-min-en && npm run _dist-full",
"build-all": "node ./admin/cmds/update-exports.js && npm run _build-esm && npm run _build-cjs && npm run _dist",

"clean": "node ./admin/cmds/reset-build.js && tsc --build --clean ./tsconfig.project.json",

"_dist_ethers": "npm run _distMinLangAll && npm run _distMinLangEn && rollup -c && rollup -c --configModule",
"__dist_ethers": "npm run _dist-min-all && npm run _dist-min-en && npm run _dist-full",

"_dist_prepare": "npm run clean && npm run bootstrap && npm run build && node ./admin/cmds/update-exports.js",
"_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 ./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",
"old-test-check": "if [ \"$RUN_PHANTOMJS\" = \"1\" ]; then npm run-script test-phantomjs; else npm run-script test-node; fi",
"old-test-node": "cd packages/tests && mocha --no-colors --reporter ./tests/reporter ./tests/test-*.js",
"old-test-phantomjs": "cd packages/tests && npm run dist-phantomjs && phantomjs --web-security=false ../../node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js ./test.html ./tests/reporter.js",
"old-test-aion": "npm run dist && npm run test-aion-node",
"old-test-aion-node": "cd packages/aion-tests && mocha --no-colors --reporter ../tests/tests/reporter ./tests/test-*.js",
"__dist_prepare": "npm run clean && npm run bootstrap && npm run build && node ./admin/cmds/update-exports.js",
"__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 ./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",
"__old-test-check": "if [ \"$RUN_PHANTOMJS\" = \"1\" ]; then npm run-script test-phantomjs; else npm run-script test-node; fi",
"__old-test-node": "cd packages/tests && mocha --no-colors --reporter ./tests/reporter ./tests/test-*.js",
"__old-test-phantomjs": "cd packages/tests && npm run dist-phantomjs && phantomjs --web-security=false ../../node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js ./test.html ./tests/reporter.js",
"__old-test-aion": "npm run dist && npm run test-aion-node",
"__old-test-aion-node": "cd packages/aion-tests && mocha --no-colors --reporter ../tests/tests/reporter ./tests/test-*.js",

"_dist-tests-esm": "rollup -c rollup-tests.config.js --configModule",
"_dist-test-umd": "rollup -c rollup-tests.config.js",
Expand All @@ -45,10 +46,14 @@
"test": "if [ \"$TEST\" == \"\" ]; then npm run test-node; else npm run \"test-$TEST\"; fi",

"lock-versions": "node ./admin/cmds/lock-versions",

"build-docs": "flatworm docs.wrm docs",

"update-versions": "npm run _dist_prepare && node ./admin/cmds/update-versions",
"_admin_prepare": "npm run clean && npm run bootstrap && npm run build && node ./admin/cmds/update-exports.js",
"update-versions": "npm run _admin_prepare && node ./admin/cmds/update-versions",

"publish-all": "node ./admin/cmds/publish",

"sync-github": "node ./admin/cmds/cache-github"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/ethers/dist/ethers-all.esm.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/ethers/dist/ethers-all.umd.min.js

Large diffs are not rendered by default.

50 changes: 24 additions & 26 deletions packages/ethers/dist/ethers.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -9941,7 +9941,7 @@ exports.pbkdf2 = pbkdf2;
var browser$3 = unwrapExports(browser$2);
var browser_1$1 = browser$2.pbkdf2;

var version$b = "6.5.0";
var version$b = "6.5.2";
var _package = {
version: version$b
};
Expand Down Expand Up @@ -10027,14 +10027,17 @@ utils.toHex = utils_1.toHex;
utils.encode = utils_1.encode;

// Represent num in a w-NAF form
function getNAF(num, w) {
var naf = [];
function getNAF(num, w, bits) {
var naf = new Array(Math.max(num.bitLength(), bits) + 1);
naf.fill(0);

var ws = 1 << (w + 1);
var k = num.clone();
while (k.cmpn(1) >= 0) {

for (var i = 0; i < naf.length; i++) {
var z;
var mod = k.andln(ws - 1);
if (k.isOdd()) {
var mod = k.andln(ws - 1);
if (mod > (ws >> 1) - 1)
z = (ws >> 1) - mod;
else
Expand All @@ -10043,13 +10046,9 @@ function getNAF(num, w) {
} else {
z = 0;
}
naf.push(z);

// Optimization, shift by word if possible
var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1;
for (var i = 1; i < shift; i++)
naf.push(0);
k.iushrn(shift);
naf[i] = z;
k.iushrn(1);
}

return naf;
Expand Down Expand Up @@ -10166,6 +10165,8 @@ function BaseCurve(type, conf) {
this._wnafT3 = new Array(4);
this._wnafT4 = new Array(4);

this._bitLength = this.n ? this.n.bitLength() : 0;

// Generalized Greg Maxwell's trick
var adjustCount = this.n && this.p.div(this.n);
if (!adjustCount || adjustCount.cmpn(100) > 0) {
Expand All @@ -10189,7 +10190,7 @@ BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {
assert$1(p.precomputed);
var doubles = p._getDoubles();

var naf = getNAF(k, 1);
var naf = getNAF(k, 1, this._bitLength);
var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);
I /= 3;

Expand Down Expand Up @@ -10226,7 +10227,7 @@ BaseCurve.prototype._wnafMul = function _wnafMul(p, k) {
var wnd = nafPoints.points;

// Get NAF form
var naf = getNAF(k, w);
var naf = getNAF(k, w, this._bitLength);

// Add `this`*(N+1) for every w-NAF index
var acc = this.jpoint(null, null, null);
Expand Down Expand Up @@ -10282,8 +10283,8 @@ BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,
var a = i - 1;
var b = i;
if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {
naf[a] = getNAF(coeffs[a], wndWidth[a]);
naf[b] = getNAF(coeffs[b], wndWidth[b]);
naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);
naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);
max = Math.max(naf[a].length, max);
max = Math.max(naf[b].length, max);
continue;
Expand Down Expand Up @@ -10934,8 +10935,9 @@ Point.prototype.getY = function getY() {

Point.prototype.mul = function mul(k) {
k = new bn(k, 16);

if (this._hasDoubles(k))
if (this.isInfinity())
return this;
else if (this._hasDoubles(k))
return this.curve._fixedNafMul(this, k);
else if (this.curve.endo)
return this.curve._endoWnafMulAdd([ this ], [ k ]);
Expand Down Expand Up @@ -12305,7 +12307,7 @@ elliptic.eddsa = eddsa;
});
var elliptic_2 = elliptic_1.ec;

const version$c = "signing-key/5.0.0-beta.134";
const version$c = "signing-key/5.0.0-beta.135";

"use strict";
const logger$f = new Logger(version$c);
Expand Down Expand Up @@ -12522,7 +12524,7 @@ function parse(rawTransaction) {
var _version$2 = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "wordlists/5.0.0-beta.133";
exports.version = "wordlists/5.0.0-beta.134";
});

var _version$3 = unwrapExports(_version$2);
Expand Down Expand Up @@ -12576,9 +12578,7 @@ var Wordlist = /** @class */ (function () {
}
}
}
catch (error) {
console.log("FOOBAR2", error);
}
catch (error) { }
}
};
return Wordlist;
Expand Down Expand Up @@ -18959,7 +18959,7 @@ var utils$1 = /*#__PURE__*/Object.freeze({
Indexed: Indexed
});

const version$l = "ethers/5.0.0-beta.161";
const version$l = "ethers/5.0.0-beta.162";

"use strict";
const errors = Logger.errors;
Expand Down Expand Up @@ -18991,8 +18991,6 @@ try {
anyGlobal._ethers = ethers;
}
}
catch (error) {
console.log("FOOBAR", error);
}
catch (error) { }

export { BigNumber, Contract, ContractFactory, FixedNumber, Signer, VoidSigner, Wallet, browser_1$2 as Wordlist, index$1 as constants, errors, ethers, getDefaultProvider, logger$A as logger, index$2 as providers, utils$1 as utils, version$l as version, browser_2$1 as wordlists };
2 changes: 1 addition & 1 deletion packages/ethers/dist/ethers.esm.min.js

Large diffs are not rendered by default.

50 changes: 24 additions & 26 deletions packages/ethers/dist/ethers.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -10949,7 +10949,7 @@
var browser$3 = unwrapExports(browser$2);
var browser_1$1 = browser$2.pbkdf2;

var version = "6.5.0";
var version = "6.5.2";
var _package = {
version: version
};
Expand Down Expand Up @@ -11035,14 +11035,17 @@
utils.encode = utils_1.encode;

// Represent num in a w-NAF form
function getNAF(num, w) {
var naf = [];
function getNAF(num, w, bits) {
var naf = new Array(Math.max(num.bitLength(), bits) + 1);
naf.fill(0);

var ws = 1 << (w + 1);
var k = num.clone();
while (k.cmpn(1) >= 0) {

for (var i = 0; i < naf.length; i++) {
var z;
var mod = k.andln(ws - 1);
if (k.isOdd()) {
var mod = k.andln(ws - 1);
if (mod > (ws >> 1) - 1)
z = (ws >> 1) - mod;
else
Expand All @@ -11051,13 +11054,9 @@
} else {
z = 0;
}
naf.push(z);

// Optimization, shift by word if possible
var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1;
for (var i = 1; i < shift; i++)
naf.push(0);
k.iushrn(shift);
naf[i] = z;
k.iushrn(1);
}

return naf;
Expand Down Expand Up @@ -11174,6 +11173,8 @@
this._wnafT3 = new Array(4);
this._wnafT4 = new Array(4);

this._bitLength = this.n ? this.n.bitLength() : 0;

// Generalized Greg Maxwell's trick
var adjustCount = this.n && this.p.div(this.n);
if (!adjustCount || adjustCount.cmpn(100) > 0) {
Expand All @@ -11197,7 +11198,7 @@
assert$1(p.precomputed);
var doubles = p._getDoubles();

var naf = getNAF(k, 1);
var naf = getNAF(k, 1, this._bitLength);
var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);
I /= 3;

Expand Down Expand Up @@ -11234,7 +11235,7 @@
var wnd = nafPoints.points;

// Get NAF form
var naf = getNAF(k, w);
var naf = getNAF(k, w, this._bitLength);

// Add `this`*(N+1) for every w-NAF index
var acc = this.jpoint(null, null, null);
Expand Down Expand Up @@ -11290,8 +11291,8 @@
var a = i - 1;
var b = i;
if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {
naf[a] = getNAF(coeffs[a], wndWidth[a]);
naf[b] = getNAF(coeffs[b], wndWidth[b]);
naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);
naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);
max = Math.max(naf[a].length, max);
max = Math.max(naf[b].length, max);
continue;
Expand Down Expand Up @@ -11942,8 +11943,9 @@

Point.prototype.mul = function mul(k) {
k = new bn(k, 16);

if (this._hasDoubles(k))
if (this.isInfinity())
return this;
else if (this._hasDoubles(k))
return this.curve._fixedNafMul(this, k);
else if (this.curve.endo)
return this.curve._endoWnafMulAdd([ this ], [ k ]);
Expand Down Expand Up @@ -13316,7 +13318,7 @@
var _version$o = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "signing-key/5.0.0-beta.134";
exports.version = "signing-key/5.0.0-beta.135";
});

var _version$p = unwrapExports(_version$o);
Expand Down Expand Up @@ -13591,7 +13593,7 @@
var _version$s = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "wordlists/5.0.0-beta.133";
exports.version = "wordlists/5.0.0-beta.134";
});

var _version$t = unwrapExports(_version$s);
Expand Down Expand Up @@ -13645,9 +13647,7 @@
}
}
}
catch (error) {
console.log("FOOBAR2", error);
}
catch (error) { }
}
};
return Wordlist;
Expand Down Expand Up @@ -21404,7 +21404,7 @@
var _version$K = createCommonjsModule(function (module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "ethers/5.0.0-beta.161";
exports.version = "ethers/5.0.0-beta.162";
});

var _version$L = unwrapExports(_version$K);
Expand Down Expand Up @@ -21491,9 +21491,7 @@
anyGlobal._ethers = ethers$1;
}
}
catch (error) {
console.log("FOOBAR", error);
}
catch (error) { }
var ethers_1 = ethers;
exports.Signer = ethers_1.Signer;
exports.Wallet = ethers_1.Wallet;
Expand Down
2 changes: 1 addition & 1 deletion packages/ethers/dist/ethers.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/ethers/lib.esm/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "ethers/5.0.0-beta.161";
export declare const version = "ethers/5.0.0-beta.162";
2 changes: 1 addition & 1 deletion packages/ethers/lib.esm/_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "ethers/5.0.0-beta.161";
export const version = "ethers/5.0.0-beta.162";
4 changes: 1 addition & 3 deletions packages/ethers/lib.esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ try {
anyGlobal._ethers = ethers;
}
}
catch (error) {
console.log("FOOBAR", error);
}
catch (error) { }
export { ethers };
export { Signer, Wallet, VoidSigner, getDefaultProvider, providers, Contract, ContractFactory, BigNumber, FixedNumber, constants, errors, logger, utils, wordlists,
////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion packages/ethers/lib/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "ethers/5.0.0-beta.161";
export declare const version = "ethers/5.0.0-beta.162";
Loading

0 comments on commit fa9f53d

Please sign in to comment.