From da12f1e794871752d77fe8bfc316182132c8a9d9 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 10 Jan 2022 14:27:29 +0100 Subject: [PATCH 1/3] Replace colors with chalk in @cosmjs/cli --- .pnp.js | 12 ++++++------ .../cache/chalk-npm-4.1.1-f1ce6bae57-445c12db7a.zip | 3 --- .../cache/chalk-npm-4.1.2-ba8b67ab80-e3901b97d9.zip | 3 +++ CHANGELOG.md | 7 +++++++ packages/cli/package.json | 2 +- packages/cli/src/cli.ts | 9 ++++----- yarn.lock | 12 ++++++------ 7 files changed, 27 insertions(+), 21 deletions(-) delete mode 100644 .yarn/cache/chalk-npm-4.1.1-f1ce6bae57-445c12db7a.zip create mode 100644 .yarn/cache/chalk-npm-4.1.2-ba8b67ab80-e3901b97d9.zip diff --git a/.pnp.js b/.pnp.js index 9192d10a..a9e1a9a8 100755 --- a/.pnp.js +++ b/.pnp.js @@ -912,7 +912,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ], [ "chalk", - "npm:2.4.2" + "npm:4.1.2" ], [ "chokidar", @@ -3275,7 +3275,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@typescript-eslint/parser", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:4.28.4"], ["axios", "npm:0.21.4"], ["babylon", "npm:6.18.0"], - ["colors", "npm:1.4.0"], + ["chalk", "npm:4.1.2"], ["cosmjs-types", "npm:0.2.1"], ["diff", "npm:4.0.2"], ["eslint", "npm:7.26.0"], @@ -6627,10 +6627,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ], "linkType": "HARD", }], - ["npm:4.1.1", { - "packageLocation": "./.yarn/cache/chalk-npm-4.1.1-f1ce6bae57-445c12db7a.zip/node_modules/chalk/", + ["npm:4.1.2", { + "packageLocation": "./.yarn/cache/chalk-npm-4.1.2-ba8b67ab80-e3901b97d9.zip/node_modules/chalk/", "packageDependencies": [ - ["chalk", "npm:4.1.1"], + ["chalk", "npm:4.1.2"], ["ansi-styles", "npm:4.3.0"], ["supports-color", "npm:7.2.0"] ], @@ -7567,7 +7567,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@babel/code-frame", "npm:7.12.11"], ["@eslint/eslintrc", "npm:0.4.1"], ["ajv", "npm:6.12.6"], - ["chalk", "npm:4.1.1"], + ["chalk", "npm:4.1.2"], ["cross-spawn", "npm:7.0.3"], ["debug", "virtual:84aaab4674f4a44ff521c5f62bd452551ef7a2f3aa4df9a02b089f10fb2f0645a919a4bf72c9eb29c0c6447c3e3d72115cf19f79d920f85a14d3f7e8c3fbb38d#npm:4.3.2"], ["doctrine", "npm:3.0.0"], diff --git a/.yarn/cache/chalk-npm-4.1.1-f1ce6bae57-445c12db7a.zip b/.yarn/cache/chalk-npm-4.1.1-f1ce6bae57-445c12db7a.zip deleted file mode 100644 index 4b11d106..00000000 --- a/.yarn/cache/chalk-npm-4.1.1-f1ce6bae57-445c12db7a.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c67e667090c8f118b97ab5e208e25d3b7edbc011e9ae6a181889db0be6ac293b -size 13703 diff --git a/.yarn/cache/chalk-npm-4.1.2-ba8b67ab80-e3901b97d9.zip b/.yarn/cache/chalk-npm-4.1.2-ba8b67ab80-e3901b97d9.zip new file mode 100644 index 00000000..d7a3d8b8 --- /dev/null +++ b/.yarn/cache/chalk-npm-4.1.2-ba8b67ab80-e3901b97d9.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e696d12a661e7b10df03aded4e784df66e5e76b58e68aab43138e42a34eb8852 +size 13756 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6016f652..c332e1d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to ## [Unreleased] +## [0.26.6] - 2022-01-10 + +### Changed + +- @cosmjs/cli: Replace `colors` dependency with `chalk` (see + https://snyk.io/blog/open-source-npm-packages-colors-faker/) + ## [0.26.5] - 2021-11-20 ### Added diff --git a/packages/cli/package.json b/packages/cli/package.json index 9a38b63c..e8036234 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -53,7 +53,7 @@ "@cosmjs/utils": "workspace:packages/utils", "axios": "^0.21.2", "babylon": "^6.18.0", - "colors": "^1.3.3", + "chalk": "^4", "cosmjs-types": "^0.2.0", "diff": "^4", "recast": "^0.20", diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index 62d07995..c247f319 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -1,12 +1,11 @@ import axios from "axios"; +import chalk from "chalk"; import * as fs from "fs"; import { join } from "path"; import yargs from "yargs"; import { TsRepl } from "./tsrepl"; -import colors = require("colors/safe"); - export async function installedPackages(): Promise { return new Promise((resolve, reject) => { fs.readFile(__dirname + "/../package.json", { encoding: "utf8" }, (error, data) => { @@ -49,12 +48,12 @@ export async function main(originalArgs: readonly string[]): Promise { .group(["debug", "selftest"], "Maintainer options") .parse(originalArgs); - console.info(colors.green("Initializing session for you. Have fun!")); + console.info(chalk.green("Initializing session for you. Have fun!")); const visiblePackages = (await installedPackages()).filter( (name) => name.startsWith("@cosmjs/") || name === "axios", ); - console.info(colors.yellow("The following packages have been installed and can be imported:")); - console.info(colors.yellow(visiblePackages.join(", "))); + console.info(chalk.yellow("The following packages have been installed and can be imported:")); + console.info(chalk.yellow(visiblePackages.join(", "))); let init = ""; if (args.selftest) { diff --git a/yarn.lock b/yarn.lock index f5ba6c24..28529bc1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -366,7 +366,7 @@ __metadata: "@typescript-eslint/parser": ^4.28 axios: ^0.21.2 babylon: ^6.18.0 - colors: ^1.3.3 + chalk: ^4 cosmjs-types: ^0.2.0 diff: ^4 eslint: ^7.5 @@ -2692,13 +2692,13 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0": - version: 4.1.1 - resolution: "chalk@npm:4.1.1" +"chalk@npm:^4, chalk@npm:^4.0.0": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" dependencies: ansi-styles: ^4.1.0 supports-color: ^7.1.0 - checksum: 445c12db7aeed0046500a1e4184d31209a77d165654c885a789c41c8598a6a95bd2392180987cac572c967b93a2a730dda778bb7f87fa06ca63fd8592f8cc59f + checksum: e3901b97d953991712bf0b941d586175be7ca5da56a97d25187e07453c6b26cae0ac8d9c7aa9e87e7c5c986fff870771b3a8e2705b3becda868829e2e12c2a65 languageName: node linkType: hard @@ -2857,7 +2857,7 @@ __metadata: languageName: node linkType: hard -"colors@npm:1.4.0, colors@npm:^1.3.3, colors@npm:^1.4.0": +"colors@npm:1.4.0, colors@npm:^1.4.0": version: 1.4.0 resolution: "colors@npm:1.4.0" checksum: a0f266ac041a9774d92cc9624a984707678d2eeec125d54e8d8231075ce36c24c5352fb5d0f90c6ee420d0f63e354417cec716386ad341309334aad18e32b933 From 07247c4dd1b465777b7249ba9c964d616ddbd838 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 10 Jan 2022 15:23:44 +0100 Subject: [PATCH 2/3] Fix diff link to 0.26.6 diff in CHANGELOG --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c332e1d4..724eb4ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -646,7 +646,8 @@ CHANGELOG entries missing. Please see [the diff][0.24.1]. `FeeTable`. @cosmjs/cosmwasm has its own `FeeTable` with those properties. - @cosmjs/sdk38: Rename package to @cosmjs/launchpad. -[unreleased]: https://github.com/cosmos/cosmjs/compare/v0.26.5...HEAD +[unreleased]: https://github.com/cosmos/cosmjs/compare/v0.26.6...HEAD +[0.26.6]: https://github.com/cosmos/cosmjs/compare/v0.26.5...v0.26.6 [0.26.5]: https://github.com/cosmos/cosmjs/compare/v0.26.4...v0.26.5 [0.26.4]: https://github.com/cosmos/cosmjs/compare/v0.26.3...v0.26.4 [0.26.3]: https://github.com/cosmos/cosmjs/compare/v0.26.2...v0.26.3 From f73212346f86779261807872e36098381f0e762b Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 10 Jan 2022 15:25:07 +0100 Subject: [PATCH 3/3] Set version 0.26.6 --- packages/amino/package.json | 2 +- packages/cli/package.json | 2 +- packages/cosmwasm-stargate/package.json | 2 +- packages/crypto/package.json | 2 +- packages/encoding/package.json | 2 +- packages/faucet-client/package.json | 2 +- packages/faucet/package.json | 2 +- packages/json-rpc/package.json | 2 +- packages/launchpad/package.json | 2 +- packages/ledger-amino/package.json | 2 +- packages/math/package.json | 2 +- packages/proto-signing/package.json | 2 +- packages/socket/package.json | 2 +- packages/stargate/package.json | 2 +- packages/stream/package.json | 2 +- packages/tendermint-rpc/package.json | 2 +- packages/utils/package.json | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/amino/package.json b/packages/amino/package.json index 1388556b..a4d1e3c0 100644 --- a/packages/amino/package.json +++ b/packages/amino/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/amino", - "version": "0.26.5", + "version": "0.26.6", "description": "Helpers for Amino based signing which are shared between @cosmjs/launchpad and @cosmjs/stargate.", "contributors": [ "Simon Warta " diff --git a/packages/cli/package.json b/packages/cli/package.json index e8036234..296cc224 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/cli", - "version": "0.26.5", + "version": "0.26.6", "description": "Command line interface", "contributors": [ "IOV SAS ", diff --git a/packages/cosmwasm-stargate/package.json b/packages/cosmwasm-stargate/package.json index 29e18be5..9e6a5031 100644 --- a/packages/cosmwasm-stargate/package.json +++ b/packages/cosmwasm-stargate/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/cosmwasm-stargate", - "version": "0.26.5", + "version": "0.26.6", "description": "CosmWasm SDK", "contributors": [ "Will Clark " diff --git a/packages/crypto/package.json b/packages/crypto/package.json index 71f6eee1..25ea89b7 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/crypto", - "version": "0.26.5", + "version": "0.26.6", "description": "Cryptography resources for blockchain projects", "contributors": [ "IOV SAS ", diff --git a/packages/encoding/package.json b/packages/encoding/package.json index 21fe0d71..57f3ec4b 100644 --- a/packages/encoding/package.json +++ b/packages/encoding/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/encoding", - "version": "0.26.5", + "version": "0.26.6", "description": "Encoding helpers for blockchain projects", "contributors": [ "IOV SAS " diff --git a/packages/faucet-client/package.json b/packages/faucet-client/package.json index 7735ffb1..39ebb87c 100644 --- a/packages/faucet-client/package.json +++ b/packages/faucet-client/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/faucet-client", - "version": "0.26.5", + "version": "0.26.6", "description": "The faucet client", "contributors": [ "Will Clark " diff --git a/packages/faucet/package.json b/packages/faucet/package.json index 51c07f1f..5fa60458 100644 --- a/packages/faucet/package.json +++ b/packages/faucet/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/faucet", - "version": "0.26.5", + "version": "0.26.6", "description": "The faucet", "contributors": [ "Ethan Frey ", diff --git a/packages/json-rpc/package.json b/packages/json-rpc/package.json index e95bcd8c..c6d7163d 100644 --- a/packages/json-rpc/package.json +++ b/packages/json-rpc/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/json-rpc", - "version": "0.26.5", + "version": "0.26.6", "description": "Framework for implementing a JSON-RPC 2.0 API", "contributors": [ "IOV SAS ", diff --git a/packages/launchpad/package.json b/packages/launchpad/package.json index 12a303ea..0c79dc51 100644 --- a/packages/launchpad/package.json +++ b/packages/launchpad/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/launchpad", - "version": "0.26.5", + "version": "0.26.6", "description": "A client library for the Cosmos SDK 0.37 (cosmoshub-3), 0.38 and 0.39 (Launchpad)", "contributors": [ "Ethan Frey ", diff --git a/packages/ledger-amino/package.json b/packages/ledger-amino/package.json index d2d7d8ac..6515fdf6 100644 --- a/packages/ledger-amino/package.json +++ b/packages/ledger-amino/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/ledger-amino", - "version": "0.26.5", + "version": "0.26.6", "description": "A library for signing Amino-encoded transactions using Ledger devices", "contributors": [ "Will Clark " diff --git a/packages/math/package.json b/packages/math/package.json index 77637775..8781e698 100644 --- a/packages/math/package.json +++ b/packages/math/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/math", - "version": "0.26.5", + "version": "0.26.6", "description": "Math helpers for blockchain projects", "contributors": [ "IOV SAS " diff --git a/packages/proto-signing/package.json b/packages/proto-signing/package.json index 532613f9..581f3c83 100644 --- a/packages/proto-signing/package.json +++ b/packages/proto-signing/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/proto-signing", - "version": "0.26.5", + "version": "0.26.6", "description": "Utilities for protobuf based signing (Cosmos SDK 0.40+)", "contributors": [ "Will Clark ", diff --git a/packages/socket/package.json b/packages/socket/package.json index bbf6db1a..aa123547 100644 --- a/packages/socket/package.json +++ b/packages/socket/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/socket", - "version": "0.26.5", + "version": "0.26.6", "description": "Utility functions for working with WebSockets", "contributors": [ "IOV SAS ", diff --git a/packages/stargate/package.json b/packages/stargate/package.json index 9106c23a..41ad9331 100644 --- a/packages/stargate/package.json +++ b/packages/stargate/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/stargate", - "version": "0.26.5", + "version": "0.26.6", "description": "Utilities for Cosmos SDK 0.40", "contributors": [ "Simon Warta " diff --git a/packages/stream/package.json b/packages/stream/package.json index 0ba20e35..62f5e149 100644 --- a/packages/stream/package.json +++ b/packages/stream/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/stream", - "version": "0.26.5", + "version": "0.26.6", "description": "Utility functions for producing and consuming streams", "contributors": [ "IOV SAS ", diff --git a/packages/tendermint-rpc/package.json b/packages/tendermint-rpc/package.json index d1f4a88f..e50eb585 100644 --- a/packages/tendermint-rpc/package.json +++ b/packages/tendermint-rpc/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/tendermint-rpc", - "version": "0.26.5", + "version": "0.26.6", "description": "Tendermint RPC clients", "contributors": [ "IOV SAS ", diff --git a/packages/utils/package.json b/packages/utils/package.json index f7f6a0bd..ba497b82 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@cosmjs/utils", - "version": "0.26.5", + "version": "0.26.6", "description": "Utility tools, primarily for testing code", "contributors": [ "IOV SAS "