Skip to content

Commit

Permalink
refactor: ➖ remove chalk as dependency
Browse files Browse the repository at this point in the history
fixes: #43
  • Loading branch information
kopach committed Nov 22, 2023
1 parent 72fc01b commit b37f235
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
const util = require('util')
const chalk = require('chalk')

const chalk = {
red: (str) => `\u001b[31m${str}`,
gray: (str) => `\u001b[90m${str}`,
white: (str) => `\u001b[37m${str}`,
bold: (str) => `\u001b[1m${str}`
};

const defaultErrorMessage = (methodName, bold) =>
`Expected test not to call ${bold(`console.${methodName}()`)}.\n\n` +
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
"test": "jest tests/index.test.js",
"type-check": "tsc --noEmit index.d.ts"
},
"dependencies": {
"chalk": "^4.1.0"
},
"devDependencies": {
"jest": "^27.5.1",
"np": "^7.2.0",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1635,9 +1635,9 @@ fs.realpath@^1.0.0:
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=

fsevents@^2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
version "2.3.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==

function-bind@^1.1.1:
version "1.1.1"
Expand Down Expand Up @@ -2613,7 +2613,7 @@ jest-worker@^27.5.1:

jest@^27.5.1:
version "27.5.1"
resolved "https://registry.yarnpkg.com/jest/-/jest-27.5.1.tgz#dadf33ba70a779be7a6fc33015843b51494f63fc"
resolved "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz"
integrity sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==
dependencies:
"@jest/core" "^27.5.1"
Expand Down Expand Up @@ -4048,7 +4048,7 @@ typedarray-to-buffer@^3.1.5:

typescript@^4.8.2:
version "4.8.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz"
integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==

unique-string@^2.0.0:
Expand Down

0 comments on commit b37f235

Please sign in to comment.