diff --git a/CHANGELOG.md b/CHANGELOG.md index 238e76068..4ac711202 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # CHANGELOG +## 5.0.1 Dec 13, 2020 + +**Important** While this package contains no external interface changes, it doe now compile and ship both cjs and esm modules. This means that modern bundlers will have more information for tree-shaking available. Additionally when using Node with `.mjs` extensions, the esm version imports will be used on recent Node versions. Adding an export map, as here, may have some impacts so a major semver bump is advised. There may be (small) dragons hiding in the dark corners... + +Changes: + +- Build and expose both cjs and esm via exports map +- Use `import type { ... }` form for all type imports +- Align with Substrate master network list +- Debug logs now don't depend on `NODE_ENV`, but rather `DEBUG=` (`*` logs all) +- Limit debug console output via `DEBUG_MAX=` value, trimming when passed +- Add `memoize` util, allowing for function memoization (as used in the API) + + ## 4.2.1 Nov 23, 2020 Changes: diff --git a/package.json b/package.json index 77a1a0f29..6b0413e7e 100644 --- a/package.json +++ b/package.json @@ -25,5 +25,5 @@ "@polkadot/ts": "^0.3.58", "@types/jest": "^26.0.19" }, - "version": "4.2.2-21" + "version": "5.0.0" } diff --git a/packages/keyring/package.json b/packages/keyring/package.json index 2a96531c7..1f9d7022b 100644 --- a/packages/keyring/package.json +++ b/packages/keyring/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/keyring", - "version": "4.2.2-21", + "version": "5.0.0", "description": "Keyring management", "author": "Jaco Greeff ", "maintainers": [], @@ -13,11 +13,11 @@ "homepage": "https://github.com/polkadot-js/common/tree/master/packages/keyring#readme", "dependencies": { "@babel/runtime": "^7.12.5", - "@polkadot/util": "4.2.2-21", - "@polkadot/util-crypto": "4.2.2-21" + "@polkadot/util": "5.0.0", + "@polkadot/util-crypto": "5.0.0" }, "peerDependencies": { - "@polkadot/util": "4.2.2-21", - "@polkadot/util-crypto": "4.2.2-21" + "@polkadot/util": "5.0.0", + "@polkadot/util-crypto": "5.0.0" } } diff --git a/packages/networks/package.json b/packages/networks/package.json index 04bd251e9..ad8bec858 100644 --- a/packages/networks/package.json +++ b/packages/networks/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/networks", - "version": "4.2.2-21", + "version": "5.0.0", "description": "A list of all available Substrate networks and their applicable prefixes", "main": "index.js", "sideEffects": false, @@ -15,7 +15,7 @@ "@babel/runtime": "^7.12.5" }, "devDependencies": { - "@polkadot/util": "4.2.2-21", - "@polkadot/x-fetch": "4.2.2-21" + "@polkadot/util": "5.0.0", + "@polkadot/x-fetch": "5.0.0" } } diff --git a/packages/util-crypto/package.json b/packages/util-crypto/package.json index 96384f82d..0a1210670 100644 --- a/packages/util-crypto/package.json +++ b/packages/util-crypto/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/util-crypto", - "version": "4.2.2-21", + "version": "5.0.0", "description": "A collection of useful crypto utilities for @polkadot", "main": "index.js", "sideEffects": false, @@ -13,10 +13,10 @@ "homepage": "https://github.com/polkadot-js/common/tree/master/packages/util-crypto#readme", "dependencies": { "@babel/runtime": "^7.12.5", - "@polkadot/networks": "4.2.2-21", - "@polkadot/util": "4.2.2-21", + "@polkadot/networks": "5.0.0", + "@polkadot/util": "5.0.0", "@polkadot/wasm-crypto": "^3.0.1", - "@polkadot/x-randomvalues": "4.2.2-21", + "@polkadot/x-randomvalues": "5.0.0", "base-x": "^3.0.8", "blakejs": "^1.1.0", "bn.js": "^4.11.9", @@ -36,6 +36,6 @@ "@types/xxhashjs": "^0.2.2" }, "peerDependencies": { - "@polkadot/util": "4.2.2-21" + "@polkadot/util": "5.0.0" } } diff --git a/packages/util/package.json b/packages/util/package.json index 48928fd38..eb4526c10 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/util", - "version": "4.2.2-21", + "version": "5.0.0", "description": "A collection of useful utilities for @polkadot", "main": "index.js", "author": "Jaco Greeff ", @@ -12,8 +12,8 @@ "homepage": "https://github.com/polkadot-js/common/tree/master/packages/util#readme", "dependencies": { "@babel/runtime": "^7.12.5", - "@polkadot/x-textdecoder": "4.2.2-21", - "@polkadot/x-textencoder": "4.2.2-21", + "@polkadot/x-textdecoder": "5.0.0", + "@polkadot/x-textencoder": "5.0.0", "@types/bn.js": "^4.11.6", "bn.js": "^4.11.9", "camelcase": "^5.3.1", diff --git a/packages/x-fetch/package.json b/packages/x-fetch/package.json index 9359e1f2c..84505902d 100644 --- a/packages/x-fetch/package.json +++ b/packages/x-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/x-fetch", - "version": "4.2.2-21", + "version": "5.0.0", "description": "A cross-environment fetch replacement", "browser": "browser.js", "main": "node.js", diff --git a/packages/x-randomvalues/package.json b/packages/x-randomvalues/package.json index 0d354a3b7..725db6620 100644 --- a/packages/x-randomvalues/package.json +++ b/packages/x-randomvalues/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/x-randomvalues", - "version": "4.2.2-21", + "version": "5.0.0", "description": "A cross-environment window.crypto.getRandomValues replacement", "browser": "browser.js", "main": "node.js", diff --git a/packages/x-textdecoder/package.json b/packages/x-textdecoder/package.json index f835b2da6..7f3b93d36 100644 --- a/packages/x-textdecoder/package.json +++ b/packages/x-textdecoder/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/x-textdecoder", - "version": "4.2.2-21", + "version": "5.0.0", "description": "A TextDecoder replacement", "browser": "browser.js", "main": "node.js", diff --git a/packages/x-textencoder/package.json b/packages/x-textencoder/package.json index 17bb47e7d..118a3fee8 100644 --- a/packages/x-textencoder/package.json +++ b/packages/x-textencoder/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/x-textencoder", - "version": "4.2.2-21", + "version": "5.0.0", "description": "A TextDecoder replacement", "browser": "browser.js", "main": "node.js", diff --git a/packages/x-ws/package.json b/packages/x-ws/package.json index 7dd9f394f..10d4d860a 100644 --- a/packages/x-ws/package.json +++ b/packages/x-ws/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/x-ws", - "version": "4.2.2-21", + "version": "5.0.0", "description": "A cross-environment WebSocket replacement", "browser": "browser.js", "main": "node.js", diff --git a/yarn.lock b/yarn.lock index 8c6e2022a..5dd972a75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1784,21 +1784,21 @@ __metadata: resolution: "@polkadot/keyring@workspace:packages/keyring" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/util": 4.2.2-21 - "@polkadot/util-crypto": 4.2.2-21 + "@polkadot/util": 5.0.0 + "@polkadot/util-crypto": 5.0.0 peerDependencies: - "@polkadot/util": 4.2.2-21 - "@polkadot/util-crypto": 4.2.2-21 + "@polkadot/util": 5.0.0 + "@polkadot/util-crypto": 5.0.0 languageName: unknown linkType: soft -"@polkadot/networks@4.2.2-21, @polkadot/networks@workspace:packages/networks": +"@polkadot/networks@5.0.0, @polkadot/networks@workspace:packages/networks": version: 0.0.0-use.local resolution: "@polkadot/networks@workspace:packages/networks" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/util": 4.2.2-21 - "@polkadot/x-fetch": 4.2.2-21 + "@polkadot/util": 5.0.0 + "@polkadot/x-fetch": 5.0.0 languageName: unknown linkType: soft @@ -1811,15 +1811,15 @@ __metadata: languageName: node linkType: hard -"@polkadot/util-crypto@4.2.2-21, @polkadot/util-crypto@workspace:packages/util-crypto": +"@polkadot/util-crypto@5.0.0, @polkadot/util-crypto@workspace:packages/util-crypto": version: 0.0.0-use.local resolution: "@polkadot/util-crypto@workspace:packages/util-crypto" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/networks": 4.2.2-21 - "@polkadot/util": 4.2.2-21 + "@polkadot/networks": 5.0.0 + "@polkadot/util": 5.0.0 "@polkadot/wasm-crypto": ^3.0.1 - "@polkadot/x-randomvalues": 4.2.2-21 + "@polkadot/x-randomvalues": 5.0.0 "@types/bn.js": ^4.11.6 "@types/create-hash": ^1.2.2 "@types/elliptic": ^6.4.12 @@ -1836,17 +1836,17 @@ __metadata: tweetnacl: ^1.0.3 xxhashjs: ^0.2.2 peerDependencies: - "@polkadot/util": 4.2.2-21 + "@polkadot/util": 5.0.0 languageName: unknown linkType: soft -"@polkadot/util@4.2.2-21, @polkadot/util@workspace:packages/util": +"@polkadot/util@5.0.0, @polkadot/util@workspace:packages/util": version: 0.0.0-use.local resolution: "@polkadot/util@workspace:packages/util" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/x-textdecoder": 4.2.2-21 - "@polkadot/x-textencoder": 4.2.2-21 + "@polkadot/x-textdecoder": 5.0.0 + "@polkadot/x-textencoder": 5.0.0 "@types/bn.js": ^4.11.6 bn.js: ^4.11.9 camelcase: ^5.3.1 @@ -1887,7 +1887,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-fetch@4.2.2-21, @polkadot/x-fetch@workspace:packages/x-fetch": +"@polkadot/x-fetch@5.0.0, @polkadot/x-fetch@workspace:packages/x-fetch": version: 0.0.0-use.local resolution: "@polkadot/x-fetch@workspace:packages/x-fetch" dependencies: @@ -1897,7 +1897,7 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/x-randomvalues@4.2.2-21, @polkadot/x-randomvalues@workspace:packages/x-randomvalues": +"@polkadot/x-randomvalues@5.0.0, @polkadot/x-randomvalues@workspace:packages/x-randomvalues": version: 0.0.0-use.local resolution: "@polkadot/x-randomvalues@workspace:packages/x-randomvalues" dependencies: @@ -1906,7 +1906,7 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/x-textdecoder@4.2.2-21, @polkadot/x-textdecoder@workspace:packages/x-textdecoder": +"@polkadot/x-textdecoder@5.0.0, @polkadot/x-textdecoder@workspace:packages/x-textdecoder": version: 0.0.0-use.local resolution: "@polkadot/x-textdecoder@workspace:packages/x-textdecoder" dependencies: @@ -1914,7 +1914,7 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/x-textencoder@4.2.2-21, @polkadot/x-textencoder@workspace:packages/x-textencoder": +"@polkadot/x-textencoder@5.0.0, @polkadot/x-textencoder@workspace:packages/x-textencoder": version: 0.0.0-use.local resolution: "@polkadot/x-textencoder@workspace:packages/x-textencoder" dependencies: