Comparing version 3.0.1 to 4.0.0
{ | ||
"name": "clrsole", | ||
"version": "3.0.1", | ||
"description": "colorful console.log with custom appender", | ||
"main": "index.js", | ||
"directories": { | ||
"lib": "lib", | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"test": "jest --detectOpenHandles --config ./jest.config.js", | ||
"example": "node ./examples/clrsole.js" | ||
}, | ||
"repository": "https://github.com/fengxinming/logger/tree/master/packages/clrsole", | ||
"keywords": [ | ||
"clrsole", | ||
"console", | ||
"logger", | ||
"logging", | ||
"log" | ||
], | ||
"author": "Jesse Feng", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/fengxinming/logger/issues/issues" | ||
}, | ||
"homepage": "https://github.com/fengxinming/logger/tree/master/packages/clrsole#readme", | ||
"publishConfig": { | ||
"main": "index.js" | ||
}, | ||
"dependencies": { | ||
"chalk": "^3.0.0", | ||
"lodash": "^4.17.15", | ||
"moment": "^2.24.0" | ||
} | ||
"name": "clrsole", | ||
"description": "colorful console.log.", | ||
"version": "4.0.0", | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"scripts": { | ||
"deps": "npm run clean && pnpm i", | ||
"clean": "rm -rf node_modules", | ||
"build": "vite build", | ||
"test": "npm run build && node ./test/index.mjs", | ||
"eslint": "eslint --ext .js,.mjs,.jsx,.ts,.tsx --fix --ignore-path .eslintignore ./", | ||
"prepare": "husky", | ||
"prepublishOnly": "npm run build" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/fengxinming/clrsole.git" | ||
}, | ||
"keywords": [ | ||
"console", | ||
"log", | ||
"color" | ||
], | ||
"author": "Jesse Feng <fxm0016@126.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/fengxinming/clrsole/issues" | ||
}, | ||
"homepage": "https://github.com/fengxinming/clrsole#readme", | ||
"dependencies": { | ||
"base-log-factory": "^1.0.2", | ||
"picocolors": "^1.0.0", | ||
"tslib": "^2.6.2" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^19.2.0", | ||
"@commitlint/config-conventional": "^19.1.0", | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
"@types/node": "^20.12.7", | ||
"eslint": "^8.57.0", | ||
"eslint-config-fe": "^2.1.2", | ||
"eslint-plugin-simple-import-sort": "^12.1.0", | ||
"husky": "^9.0.11", | ||
"lint-staged": "^15.2.2", | ||
"vite": "^5.2.9", | ||
"vite-plugin-external": "^4.3.1" | ||
}, | ||
"files": [ | ||
"dist" | ||
] | ||
} |
# clrsole | ||
[![npm package](https://nodei.co/npm/clrsole.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/clrsole) | ||
> colorful console.log | ||
[![NPM version](https://img.shields.io/npm/v/clrsole.svg?style=flat)](https://npmjs.org/package/clrsole) | ||
[![NPM Downloads](https://img.shields.io/npm/dm/clrsole.svg?style=flat)](https://npmjs.org/package/clrsole) | ||
## Usage | ||
```javascript | ||
import { getLogger, clrsole } from 'clrsole'; | ||
const { clrsole, getLogger } = require('clrsole'); | ||
const appLogger = getLogger('app'); | ||
@@ -21,33 +23,5 @@ | ||
// changed syslog levels | ||
// appLogger.levels = require('graylog-sender/lib/syslog-levels'); | ||
appLogger.setLevels([ | ||
{ level: 'EMERGENCY', value: 0, color: 'magentaBright' }, | ||
{ level: 'ALERT', value: 1, color: 'magenta' }, | ||
{ level: 'CRITICAL', value: 2, color: 'redBright' }, | ||
{ level: 'ERROR', value: 3, color: 'red' }, | ||
{ level: 'WARN', value: 4, color: 'yellowBright' }, | ||
{ level: 'NOTICE', value: 5, color: 'yellow' }, | ||
{ level: 'INFO', value: 6, color: 'green' }, | ||
{ level: 'DEBUG', value: 7, color: 'cyan' } | ||
], 'INFO'); | ||
// logging like syslog | ||
appLogger.debug('message', 'message2'); | ||
appLogger.info('message', 'message2'); | ||
appLogger.notice('message', 'message2'); | ||
appLogger.warn('message', 'message2'); | ||
appLogger.error('message', 'message2'); | ||
appLogger.critical('message', 'message2'); | ||
appLogger.alert('message', 'message2'); | ||
appLogger.emergency('message', 'message2'); | ||
// The first param is level | ||
appLogger.log('INFO', 'message', 'message2', ...); | ||
appLogger.log('error', 'message', 'message2', ...); | ||
appLogger.log('message', 'message2', ...); | ||
clrsole.green('green message', ...); | ||
clrsole.red('red message', ...); | ||
``` | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
0
0
7776
11
7
169
26
1
+ Addedbase-log-factory@^1.0.2
+ Addedpicocolors@^1.0.0
+ Addedtslib@^2.6.2
+ Addedbase-log-factory@1.0.2(transitive)
+ Addedpicocolors@1.1.0(transitive)
+ Addedtslib@2.7.0(transitive)
- Removedchalk@^3.0.0
- Removedlodash@^4.17.15
- Removedmoment@^2.24.0
- Removedansi-styles@4.3.0(transitive)
- Removedchalk@3.0.0(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedmoment@2.30.1(transitive)
- Removedsupports-color@7.2.0(transitive)