diff --git a/.pnp.js b/.pnp.js index 9192d10ab4..a9e1a9a8e1 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 4b11d106af..0000000000 --- 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 0000000000..d7a3d8b8f2 --- /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 6016f65239..c332e1d449 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 9a38b63c45..e803623438 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 62d0799514..c247f31907 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 f5ba6c2496..28529bc1a1 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