Skip to content

Commit

Permalink
Merge pull request #21 from marcol/2.2.0
Browse files Browse the repository at this point in the history
fix(chalk): using cjs chalk
  • Loading branch information
marcol committed Nov 16, 2022
2 parents e4de1ed + edde992 commit 5b5b628
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "sugar-chalk",
"version": "2.1.0",
"version": "2.2.0",
"description": "Sugar syntax for chalk",
"keywords": [
"chalk",
Expand Down Expand Up @@ -36,11 +36,11 @@
"lint:md": "remark .",
"test": "vitest",
"coverage": "vitest run --coverage",
"sandbox": "node sandbox.js",
"sandbox": "node sandbox.js && node sandbox.cjs",
"build": "rollup --config rollup.config.js"
},
"dependencies": {
"chalk": "^5.1.2"
"chalk": "^4.1.2"
},
"devDependencies": {
"@commitlint/cli": "^17.2.0",
Expand Down
18 changes: 18 additions & 0 deletions sandbox.cjs
@@ -0,0 +1,18 @@
const { log, info, debug, done, pass, warn, error, fail, silent } = require('./dist/index.cjs')
const mock = {
OBJ: { a: 1, b: 2 },
MSG: 'My test message'
}

log(mock.OBJ)
info(mock.MSG)
debug(mock.MSG)
warn(mock.MSG)
error(mock.MSG)
fail(mock.MSG)
done(mock.MSG)
pass(mock.MSG)
silent(true)
log('Silent mode - should not be visible')
silent(false)
log('Ended silent mode - message should be visible')
2 changes: 1 addition & 1 deletion sandbox.js
@@ -1,4 +1,4 @@
import { log, info, debug, done, pass, warn, error, fail, silent } from './src/index.js'
import { log, info, debug, done, pass, warn, error, fail, silent } from './dist/index.mjs'
import mock from './__mocks__/mocks.js'

log(mock.OBJ)
Expand Down
10 changes: 9 additions & 1 deletion yarn.lock
Expand Up @@ -924,7 +924,15 @@ chalk@^4.0.0, chalk@^4.1.0:
ansi-styles "^4.1.0"
supports-color "^7.1.0"

chalk@^5.0.0, chalk@^5.1.2:
chalk@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"

chalk@^5.0.0:
version "5.1.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.1.2.tgz#d957f370038b75ac572471e83be4c5ca9f8e8c45"
integrity sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==
Expand Down

0 comments on commit 5b5b628

Please sign in to comment.