Skip to content

Commit

Permalink
Updated dist files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed May 4, 2020
1 parent 17dc022 commit 89a7ad8
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 32 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ Changelog
=========

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

During the v5-BETA, although attempts are made to minimize it, some of the APIs
may change. It is generally recommended that you remove your `node_modules/`,
`package-lock.json` (and similar files for yarn, etc.) and doing an `npm install`
after upgrading to a newer version of the v5-BETA.

ethers/v5.0.0-beta.185 (2020-05-03 21:09)
ethers/v5.0.0-beta.185 (2020-05-03 21:57)
-----------------------------------------

- Removed Cloudflare from test suite; it is down again. ([17dc022](https://github.com/ethers-io/ethers.js/commit/17dc022603afdfe4147638ab4b2704bcef09533f))
- Prevent forceOutput in test reporter from crashing. ([cafd344](https://github.com/ethers-io/ethers.js/commit/cafd34460b194d78092021f1d7e0307130340b68))
- Stall FallbackProvider backends from requests if not in-sync. ([fa6904f](https://github.com/ethers-io/ethers.js/commit/fa6904fef35e7ab888221f3a0613bfe7e6df3594))
- Allow providers to detect their network after instantiation. ([#814](https://github.com/ethers-io/ethers.js/issues/814); [99ae946](https://github.com/ethers-io/ethers.js/commit/99ae946476a317a9d89e5d8f57cf37f8680bfa2b))
- Better messaging on low-level network errors. ([#814](https://github.com/ethers-io/ethers.js/issues/814); [0e3a66c](https://github.com/ethers-io/ethers.js/commit/0e3a66c82959a08f3f4e4ffbca3ae3792ff2548f))
Expand Down
2 changes: 1 addition & 1 deletion packages/tests/lib.esm/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function Reporter(runner) {
function forceOutput() {
if (((getTime() - lastOutput) / 1000) > MAX_DELAY) {
const currentSuite = suites[suites.length - 1];
log('[ Still running suite - test #' + currentSuite._countTotal + ' ]');
log(`[ Still running suite - test # ${(currentSuite ? currentSuite._countTotal : "0")} ]`);
}
}
const timer = setInterval(forceOutput, 1000);
Expand Down
12 changes: 11 additions & 1 deletion packages/tests/lib.esm/test-contract.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
'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) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
import assert from "assert";
import { ethers } from "ethers";
import contractData from "./test-contract.json";
Expand Down Expand Up @@ -31,7 +40,8 @@ function equals(name, actual, expected) {
assert.equal(actual, expected, 'value matches - ' + name);
}
function TestContractEvents() {
return ethers.utils.fetchJson('https://api.ethers.io/api/v1/?action=triggerTest&address=' + contract.address).then(function (data) {
return __awaiter(this, void 0, void 0, function* () {
const data = yield ethers.utils.fetchJson('https://api.ethers.io/api/v1/?action=triggerTest&address=' + contract.address);
console.log(' *** Triggered Transaction Hash: ' + data.hash);
contract.on("error", (error) => {
console.log(error);
Expand Down
5 changes: 3 additions & 2 deletions packages/tests/lib.esm/test-providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,9 @@ function testProvider(providerName, networkName) {
if (providerName === "NodesmithProvider") {
return;
}
// Cloudflare seems down and I want a fix out. RicMoo
//if (providerName === "CloudflareProvider") { return; }
if (providerName === "CloudflareProvider") {
return;
}
if (networkName === "goerli" && providerName === "AlchemyProvider") {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/tests/lib/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function Reporter(runner) {
function forceOutput() {
if (((getTime() - lastOutput) / 1000) > MAX_DELAY) {
var currentSuite = suites[suites.length - 1];
log('[ Still running suite - test #' + currentSuite._countTotal + ' ]');
log("[ Still running suite - test # " + (currentSuite ? currentSuite._countTotal : "0") + " ]");
}
}
var timer = setInterval(forceOutput, 1000);
Expand Down
88 changes: 66 additions & 22 deletions packages/tests/lib/test-contract.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,40 @@
'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) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Expand Down Expand Up @@ -35,13 +71,7 @@ function equals(name, actual, expected) {
assert_1.default.equal(actual, expected, 'value matches - ' + name);
}
function TestContractEvents() {
return ethers_1.ethers.utils.fetchJson('https://api.ethers.io/api/v1/?action=triggerTest&address=' + contract.address).then(function (data) {
console.log(' *** Triggered Transaction Hash: ' + data.hash);
contract.on("error", function (error) {
console.log(error);
assert_1.default(false);
contract.removeAllListeners();
});
return __awaiter(this, void 0, void 0, function () {
function waitForEvent(eventName, expected) {
return new Promise(function (resolve, reject) {
var done = false;
Expand Down Expand Up @@ -69,21 +99,35 @@ function TestContractEvents() {
}
});
}
return new Promise(function (resolve, reject) {
var p0 = '0x06B5955A67D827CDF91823E3bB8F069e6c89c1D6';
var p0_1 = '0x06b5955A67d827CdF91823e3Bb8F069e6C89C1d7';
var p1 = 0x42;
var p1_1 = 0x43;
return Promise.all([
waitForEvent('Test', [p0, p1]),
waitForEvent('TestP0', [p0, p1]),
waitForEvent('TestP0P1', [p0, p1]),
waitForEvent('TestIndexedString', [{ indexed: true, hash: '0x7c5ea36004851c764c44143b1dcb59679b11c9a68e5f41497f6cf3d480715331' }, p1]),
waitForEvent('TestV2', [{ indexed: true }, [p0, p1]]),
waitForEvent('TestV2Nested', [{ indexed: true }, [p0_1, p1_1, [p0, p1]]]),
]).then(function (result) {
resolve();
});
var data;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, ethers_1.ethers.utils.fetchJson('https://api.ethers.io/api/v1/?action=triggerTest&address=' + contract.address)];
case 1:
data = _a.sent();
console.log(' *** Triggered Transaction Hash: ' + data.hash);
contract.on("error", function (error) {
console.log(error);
assert_1.default(false);
contract.removeAllListeners();
});
return [2 /*return*/, new Promise(function (resolve, reject) {
var p0 = '0x06B5955A67D827CDF91823E3bB8F069e6c89c1D6';
var p0_1 = '0x06b5955A67d827CdF91823e3Bb8F069e6C89C1d7';
var p1 = 0x42;
var p1_1 = 0x43;
return Promise.all([
waitForEvent('Test', [p0, p1]),
waitForEvent('TestP0', [p0, p1]),
waitForEvent('TestP0P1', [p0, p1]),
waitForEvent('TestIndexedString', [{ indexed: true, hash: '0x7c5ea36004851c764c44143b1dcb59679b11c9a68e5f41497f6cf3d480715331' }, p1]),
waitForEvent('TestV2', [{ indexed: true }, [p0, p1]]),
waitForEvent('TestV2Nested', [{ indexed: true }, [p0_1, p1_1, [p0, p1]]]),
]).then(function (result) {
resolve();
});
})];
}
});
});
}
Expand Down
5 changes: 3 additions & 2 deletions packages/tests/lib/test-providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,9 @@ function testProvider(providerName, networkName) {
if (providerName === "NodesmithProvider") {
return;
}
// Cloudflare seems down and I want a fix out. RicMoo
//if (providerName === "CloudflareProvider") { return; }
if (providerName === "CloudflareProvider") {
return;
}
if (networkName === "goerli" && providerName === "AlchemyProvider") {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"scripts": {
"test": "exit 1"
},
"tarballHash": "0xac8cf0ee9074b69de2a45675de01bd995355f887a1daed7fadd95cc43195d1d8",
"tarballHash": "0x70cc8736dfbf68427e0ed236bebee488a50d64222fd81ff16eb04950a9ca3d4b",
"types": "./lib/index.d.ts",
"version": "5.0.0-beta.158"
}

0 comments on commit 89a7ad8

Please sign in to comment.