Skip to content

Commit

Permalink
Updated dist files (sorted package.json to reduce package version cha…
Browse files Browse the repository at this point in the history
…nge chatter).
  • Loading branch information
ricmoo committed Nov 23, 2019
1 parent 2f0e679 commit f308ba3
Show file tree
Hide file tree
Showing 290 changed files with 1,684 additions and 1,380 deletions.
16 changes: 9 additions & 7 deletions admin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,17 @@ function setupConfig(outDir, moduleType, targetType) {

if (info._ethers_nobuild) { return; }

if (info.browser) {
if (typeof(info.browser) === "string") {
info.browser = update(info.browser);
} else {
for (let key in info.browser) {
info.browser[key] = update(info.browser[key]);
[ "browser", "_browser" ].forEach((key) => {
if (info[key]) {
if (typeof(info[key]) === "string") {
info[key] = update(info[key]);
} else {
for (let k in info[key]) {
info[key][k] = update(info[key][k]);
}
}
}
}
});
savePackage(dirname, info);

let path = resolve(__dirname, "../packages", dirname, "tsconfig.json");
Expand Down
44 changes: 44 additions & 0 deletions admin/cmds/set-option.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const { setupBuild } = require("../build");
const { loadPackage, savePackage } = require("../local");

const arg = process.argv[2];

(async function() {
switch(arg) {
case "esm":
setupBuild(true);
break;

case "cjs":
setupBuild(false);
break;

case "browser-lang-en": {
const info = loadPackage("wordlists");
if (info._browser) {
info.browser = info._browser;
delete info._browser;
savePackage("wordlists", info);
}
break;
}

case "browser-lang-all": {
const info = loadPackage("wordlists");
if (info.browser) {
info._browser = info.browser;
delete info.browser;
savePackage("wordlists", info);
}
break;
}

default:
console.log("unknown option");
return 1;
}
return 0;

})().then((result) => {
process.exit(result);
});
6 changes: 6 additions & 0 deletions admin/cmds/update-exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ const targets = sourceEthers.match(/export\s*{\s*((.|\s)*)}/)[1].trim();

const output = `"use strict";
// To modify this file, you must update ./admin/cmds/update-exports.js
import * as ethers from "./ethers";
if ((<any>global)._ethers == null) {
(<any>global)._ethers = ethers;
}
export { ethers };
export {
Expand Down
8 changes: 1 addition & 7 deletions admin/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ const colorify = require("./log").colorify;

function getScrypt(message, password, salt) {
let progressBar = prompt.getProgressBar(message);
return new Promise((resolve, reject) => {
scrypt(Buffer.from(password), Buffer.from(salt), (1 << 17), 8, 1, 64, (error, progress, key) => {
if (error) { return reject(error); }
progressBar(progress);
if (key) { resolve(key); }
});
});
return scrypt.scrypt(Buffer.from(password), Buffer.from(salt), (1 << 17), 8, 1, 64, progressBar);
}

function Config(filename) {
Expand Down
14 changes: 13 additions & 1 deletion admin/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,20 @@ const keccak256 = (function() {
const { dirnames, loadPackage, ROOT } = require("./depgraph");
const { resolve, saveJson } = require("./utils");

function sorted(obj) {
if (Array.isArray(obj)) { return obj.map(sorted); }
if (obj == null || typeof(obj) !== "object") { return obj; }

const keys = Object.keys(obj);
keys.sort();

const result = { };
keys.forEach((key) => { result[key] = sorted(obj[key]); });
return result;
}

function savePackage(dirname, info) {
return saveJson(resolve(ROOT, dirname, "package.json"), info);
return saveJson(resolve(ROOT, dirname, "package.json"), sorted(info));
}

async function createTarball(dirname) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build-all": "npm run build-esm && npm run build-cjs",
"clean": "node ./admin/cmds/reset-build.js && tsc --build --clean ./tsconfig.project.json",
"_dist_prepare": "npm run clean && npm run bootstrap && npm run build && node ./admin/cmds/update-exports.js",
"_dist_ethers": "rollup -c && rollup -c --configMinify && rollup -c --configModule && rollup -c --configModule --configMinify && rollup -c rollup-wordlists.config.js",
"_dist_ethers": "npm run _distMinLangAll && npm run _distMinLangEn && rollup -c && rollup -c --configModule",
"_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",
Expand Down
2 changes: 1 addition & 1 deletion packages/abi/lib.esm/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "abi/5.0.0-beta.141";
export declare const version = "abi/5.0.0-beta.142";
2 changes: 1 addition & 1 deletion packages/abi/lib.esm/_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "abi/5.0.0-beta.141";
export const version = "abi/5.0.0-beta.142";
2 changes: 1 addition & 1 deletion packages/abi/lib/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "abi/5.0.0-beta.141";
export declare const version = "abi/5.0.0-beta.142";
2 changes: 1 addition & 1 deletion packages/abi/lib/_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "abi/5.0.0-beta.141";
exports.version = "abi/5.0.0-beta.142";
22 changes: 11 additions & 11 deletions packages/abi/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{
"name": "@ethersproject/abi",
"version": "5.0.0-beta.141",
"description": "Utilities and Classes for parsing, formatting and managing Ethereum ABIs.",
"main": "./lib/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Richard Moore <[email protected]>",
"dependencies": {
"@ethersproject/address": ">=5.0.0-beta.128",
"@ethersproject/bignumber": ">=5.0.0-beta.130",
Expand All @@ -17,21 +11,27 @@
"@ethersproject/properties": ">=5.0.0-beta.131",
"@ethersproject/strings": ">=5.0.0-beta.130"
},
"description": "Utilities and Classes for parsing, formatting and managing Ethereum ABIs.",
"ethereum": "donations.ethers.eth",
"keywords": [
"Ethereum",
"ethers"
],
"author": "Richard Moore <[email protected]>",
"license": "MIT",
"main": "./lib/index.js",
"module": "./lib.esm/index.js",
"name": "@ethersproject/abi",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git://github.com/ethers-io/ethers.js.git"
},
"module": "./lib.esm/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0xadfbb4cb8f2b47899564234f2856265474ba5f2530b2658e43ae931b929b4a93",
"types": "./lib/index.d.ts",
"ethereum": "donations.ethers.eth",
"tarballHash": "0x8ab039f54add63e60520103856dcec83107f301a5d712a92cc6207a0ddbf3ffc"
"version": "5.0.0-beta.142"
}
2 changes: 1 addition & 1 deletion packages/abi/src.ts/_version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "abi/5.0.0-beta.141";
export const version = "abi/5.0.0-beta.142";
2 changes: 1 addition & 1 deletion packages/abstract-provider/lib.esm/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "abstract-provider/5.0.0-beta.134";
export declare const version = "abstract-provider/5.0.0-beta.135";
2 changes: 1 addition & 1 deletion packages/abstract-provider/lib.esm/_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "abstract-provider/5.0.0-beta.134";
export const version = "abstract-provider/5.0.0-beta.135";
2 changes: 1 addition & 1 deletion packages/abstract-provider/lib/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "abstract-provider/5.0.0-beta.134";
export declare const version = "abstract-provider/5.0.0-beta.135";
2 changes: 1 addition & 1 deletion packages/abstract-provider/lib/_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "abstract-provider/5.0.0-beta.134";
exports.version = "abstract-provider/5.0.0-beta.135";
22 changes: 11 additions & 11 deletions packages/abstract-provider/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{
"name": "@ethersproject/abstract-provider",
"version": "5.0.0-beta.134",
"description": "An Abstract Class for describing an Ethereum Provider for ethers.",
"main": "./lib/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Richard Moore <[email protected]>",
"dependencies": {
"@ethersproject/bignumber": ">=5.0.0-beta.130",
"@ethersproject/bytes": ">=5.0.0-beta.129",
Expand All @@ -15,21 +9,27 @@
"@ethersproject/transactions": ">=5.0.0-beta.128",
"@ethersproject/web": ">=5.0.0-beta.129"
},
"description": "An Abstract Class for describing an Ethereum Provider for ethers.",
"ethereum": "donations.ethers.eth",
"keywords": [
"Ethereum",
"ethers"
],
"author": "Richard Moore <[email protected]>",
"license": "MIT",
"main": "./lib/index.js",
"module": "./lib.esm/index.js",
"name": "@ethersproject/abstract-provider",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git://github.com/ethers-io/ethers.js.git"
},
"module": "./lib.esm/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0xc5b12b9ba34634fee7767507821dcf075ec7d41a3ce2bcb9bd60eeac30aa9f99",
"types": "./lib/index.d.ts",
"ethereum": "donations.ethers.eth",
"tarballHash": "0x8046905ec7f3ebbe9c3657de9487b1e859a17e2fe71665bc074a9ae682241cf6"
"version": "5.0.0-beta.135"
}
2 changes: 1 addition & 1 deletion packages/abstract-provider/src.ts/_version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "abstract-provider/5.0.0-beta.134";
export const version = "abstract-provider/5.0.0-beta.135";
2 changes: 1 addition & 1 deletion packages/abstract-signer/lib.esm/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "abstract-signer/5.0.0-beta.136";
export declare const version = "abstract-signer/5.0.0-beta.137";
2 changes: 1 addition & 1 deletion packages/abstract-signer/lib.esm/_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "abstract-signer/5.0.0-beta.136";
export const version = "abstract-signer/5.0.0-beta.137";
2 changes: 1 addition & 1 deletion packages/abstract-signer/lib/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "abstract-signer/5.0.0-beta.136";
export declare const version = "abstract-signer/5.0.0-beta.137";
2 changes: 1 addition & 1 deletion packages/abstract-signer/lib/_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "abstract-signer/5.0.0-beta.136";
exports.version = "abstract-signer/5.0.0-beta.137";
22 changes: 11 additions & 11 deletions packages/abstract-signer/package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"name": "@ethersproject/abstract-signer",
"version": "5.0.0-beta.136",
"description": "An Abstract Class for desribing an Ethereum Signer for ethers.",
"main": "./lib/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Richard Moore <[email protected]>",
"dependencies": {
"@ethersproject/abstract-provider": ">=5.0.0-beta.131",
"@ethersproject/bignumber": ">=5.0.0-beta.130",
"@ethersproject/bytes": ">=5.0.0-beta.129",
"@ethersproject/logger": ">=5.0.0-beta.129",
"@ethersproject/properties": ">=5.0.0-beta.131"
},
"description": "An Abstract Class for desribing an Ethereum Signer for ethers.",
"ethereum": "donations.ethers.eth",
"keywords": [
"Ethereum",
"ethers"
],
"author": "Richard Moore <[email protected]>",
"license": "MIT",
"main": "./lib/index.js",
"module": "./lib.esm/index.js",
"name": "@ethersproject/abstract-signer",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git://github.com/ethers-io/ethers.js.git"
},
"module": "./lib.esm/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x715e7c449f450ad4bf5db8da4e27d7b86a9eebeb911eab63a913791dcbe4f6e9",
"types": "./lib/index.d.ts",
"ethereum": "donations.ethers.eth",
"tarballHash": "0xb15621c33c076e145b49f77d1fb608f584ae52db026ba52673102eed4bdff2e9"
"version": "5.0.0-beta.137"
}
2 changes: 1 addition & 1 deletion packages/abstract-signer/src.ts/_version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "abstract-signer/5.0.0-beta.136";
export const version = "abstract-signer/5.0.0-beta.137";
2 changes: 1 addition & 1 deletion packages/address/lib.esm/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "address/5.0.0-beta.132";
export declare const version = "address/5.0.0-beta.133";
2 changes: 1 addition & 1 deletion packages/address/lib.esm/_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "address/5.0.0-beta.132";
export const version = "address/5.0.0-beta.133";
2 changes: 1 addition & 1 deletion packages/address/lib/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "address/5.0.0-beta.132";
export declare const version = "address/5.0.0-beta.133";
2 changes: 1 addition & 1 deletion packages/address/lib/_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "address/5.0.0-beta.132";
exports.version = "address/5.0.0-beta.133";
22 changes: 11 additions & 11 deletions packages/address/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{
"name": "@ethersproject/address",
"version": "5.0.0-beta.132",
"description": "Utilities for handling Ethereum Addresses for ethers.",
"main": "./lib/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Richard Moore <[email protected]>",
"dependencies": {
"@ethersproject/bignumber": ">=5.0.0-beta.130",
"@ethersproject/bytes": ">=5.0.0-beta.129",
Expand All @@ -14,21 +8,27 @@
"@ethersproject/rlp": ">=5.0.0-beta.126",
"bn.js": "^4.4.0"
},
"description": "Utilities for handling Ethereum Addresses for ethers.",
"ethereum": "donations.ethers.eth",
"keywords": [
"Ethereum",
"ethers"
],
"author": "Richard Moore <[email protected]>",
"license": "MIT",
"main": "./lib/index.js",
"module": "./lib.esm/index.js",
"name": "@ethersproject/address",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git://github.com/ethers-io/ethers.js.git"
},
"module": "./lib.esm/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"tarballHash": "0x42fd431912caff42462eff8a503ff701df38fe1a9b58443d7318613ce45c87c3",
"types": "./lib/index.d.ts",
"ethereum": "donations.ethers.eth",
"tarballHash": "0x525c2a6354d1fb020e134ffa657ab8283c8448da95c2fd8b7e4291a71ced794e"
"version": "5.0.0-beta.133"
}
2 changes: 1 addition & 1 deletion packages/address/src.ts/_version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "address/5.0.0-beta.132";
export const version = "address/5.0.0-beta.133";
2 changes: 1 addition & 1 deletion packages/base64/lib.esm/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "base64/5.0.0-beta.130";
export declare const version = "base64/5.0.0-beta.131";
2 changes: 1 addition & 1 deletion packages/base64/lib.esm/_version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = "base64/5.0.0-beta.130";
export const version = "base64/5.0.0-beta.131";
2 changes: 1 addition & 1 deletion packages/base64/lib/_version.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare const version = "base64/5.0.0-beta.130";
export declare const version = "base64/5.0.0-beta.131";
2 changes: 1 addition & 1 deletion packages/base64/lib/_version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "base64/5.0.0-beta.130";
exports.version = "base64/5.0.0-beta.131";
Loading

0 comments on commit f308ba3

Please sign in to comment.