@betterer/logger
Advanced tools
Comparing version 3.1.1 to 4.0.0
@@ -6,2 +6,44 @@ # Change Log | ||
# [4.0.0](https://github.com/phenomnomnominal/betterer/compare/v3.1.2...v4.0.0) (2021-02-27) | ||
### Bug Fixes | ||
* **docs 📚:** restore header image ([#544](https://github.com/phenomnomnominal/betterer/issues/544)) ([e30a941](https://github.com/phenomnomnominal/betterer/commit/e30a941cc8badd79c4eaf505449ed56fda1be1bf)) | ||
### Code Refactoring | ||
* **betterer 🔧:** rewrite pretty much everything v4.0.0 ([#543](https://github.com/phenomnomnominal/betterer/issues/543)) ([48b85bd](https://github.com/phenomnomnominal/betterer/commit/48b85bd9482cb42673556917508ac741ab970587)), closes [#223](https://github.com/phenomnomnominal/betterer/issues/223) [#227](https://github.com/phenomnomnominal/betterer/issues/227) [#233](https://github.com/phenomnomnominal/betterer/issues/233) [#234](https://github.com/phenomnomnominal/betterer/issues/234) [#235](https://github.com/phenomnomnominal/betterer/issues/235) [#236](https://github.com/phenomnomnominal/betterer/issues/236) [#237](https://github.com/phenomnomnominal/betterer/issues/237) [#226](https://github.com/phenomnomnominal/betterer/issues/226) [#238](https://github.com/phenomnomnominal/betterer/issues/238) [#239](https://github.com/phenomnomnominal/betterer/issues/239) [#240](https://github.com/phenomnomnominal/betterer/issues/240) [#243](https://github.com/phenomnomnominal/betterer/issues/243) [#248](https://github.com/phenomnomnominal/betterer/issues/248) [#250](https://github.com/phenomnomnominal/betterer/issues/250) [#251](https://github.com/phenomnomnominal/betterer/issues/251) [#254](https://github.com/phenomnomnominal/betterer/issues/254) [#255](https://github.com/phenomnomnominal/betterer/issues/255) [#257](https://github.com/phenomnomnominal/betterer/issues/257) [#267](https://github.com/phenomnomnominal/betterer/issues/267) [#268](https://github.com/phenomnomnominal/betterer/issues/268) [#271](https://github.com/phenomnomnominal/betterer/issues/271) [#272](https://github.com/phenomnomnominal/betterer/issues/272) [#273](https://github.com/phenomnomnominal/betterer/issues/273) [#276](https://github.com/phenomnomnominal/betterer/issues/276) [#310](https://github.com/phenomnomnominal/betterer/issues/310) [#314](https://github.com/phenomnomnominal/betterer/issues/314) [#315](https://github.com/phenomnomnominal/betterer/issues/315) [#316](https://github.com/phenomnomnominal/betterer/issues/316) [#317](https://github.com/phenomnomnominal/betterer/issues/317) [#320](https://github.com/phenomnomnominal/betterer/issues/320) [#321](https://github.com/phenomnomnominal/betterer/issues/321) [#322](https://github.com/phenomnomnominal/betterer/issues/322) [#327](https://github.com/phenomnomnominal/betterer/issues/327) [#328](https://github.com/phenomnomnominal/betterer/issues/328) [#330](https://github.com/phenomnomnominal/betterer/issues/330) [#331](https://github.com/phenomnomnominal/betterer/issues/331) [#336](https://github.com/phenomnomnominal/betterer/issues/336) [#338](https://github.com/phenomnomnominal/betterer/issues/338) [#350](https://github.com/phenomnomnominal/betterer/issues/350) [#339](https://github.com/phenomnomnominal/betterer/issues/339) [#367](https://github.com/phenomnomnominal/betterer/issues/367) [#370](https://github.com/phenomnomnominal/betterer/issues/370) [#399](https://github.com/phenomnomnominal/betterer/issues/399) [#400](https://github.com/phenomnomnominal/betterer/issues/400) [#401](https://github.com/phenomnomnominal/betterer/issues/401) [#402](https://github.com/phenomnomnominal/betterer/issues/402) [#403](https://github.com/phenomnomnominal/betterer/issues/403) [#404](https://github.com/phenomnomnominal/betterer/issues/404) [#410](https://github.com/phenomnomnominal/betterer/issues/410) [#411](https://github.com/phenomnomnominal/betterer/issues/411) [#412](https://github.com/phenomnomnominal/betterer/issues/412) [#414](https://github.com/phenomnomnominal/betterer/issues/414) [#453](https://github.com/phenomnomnominal/betterer/issues/453) [#454](https://github.com/phenomnomnominal/betterer/issues/454) [#455](https://github.com/phenomnomnominal/betterer/issues/455) [#456](https://github.com/phenomnomnominal/betterer/issues/456) [#467](https://github.com/phenomnomnominal/betterer/issues/467) [#468](https://github.com/phenomnomnominal/betterer/issues/468) [#457](https://github.com/phenomnomnominal/betterer/issues/457) [#482](https://github.com/phenomnomnominal/betterer/issues/482) [#483](https://github.com/phenomnomnominal/betterer/issues/483) [#485](https://github.com/phenomnomnominal/betterer/issues/485) [#486](https://github.com/phenomnomnominal/betterer/issues/486) [#489](https://github.com/phenomnomnominal/betterer/issues/489) [#490](https://github.com/phenomnomnominal/betterer/issues/490) [#492](https://github.com/phenomnomnominal/betterer/issues/492) [#493](https://github.com/phenomnomnominal/betterer/issues/493) [#494](https://github.com/phenomnomnominal/betterer/issues/494) [#495](https://github.com/phenomnomnominal/betterer/issues/495) [#496](https://github.com/phenomnomnominal/betterer/issues/496) [#498](https://github.com/phenomnomnominal/betterer/issues/498) [#502](https://github.com/phenomnomnominal/betterer/issues/502) [#503](https://github.com/phenomnomnominal/betterer/issues/503) [#504](https://github.com/phenomnomnominal/betterer/issues/504) [#505](https://github.com/phenomnomnominal/betterer/issues/505) [#520](https://github.com/phenomnomnominal/betterer/issues/520) [#526](https://github.com/phenomnomnominal/betterer/issues/526) [#530](https://github.com/phenomnomnominal/betterer/issues/530) [#533](https://github.com/phenomnomnominal/betterer/issues/533) [#539](https://github.com/phenomnomnominal/betterer/issues/539) [#540](https://github.com/phenomnomnominal/betterer/issues/540) [#542](https://github.com/phenomnomnominal/betterer/issues/542) [#541](https://github.com/phenomnomnominal/betterer/issues/541) | ||
### BREAKING CHANGES | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
* chore(betterer 🕸): remove check for completed eslint rules | ||
* **betterer 🔧:** Changes to the public API | ||
* **betterer 🔧:** Changes to the public API | ||
## [3.1.1](https://github.com/phenomnomnominal/betterer/compare/v3.1.0...v3.1.1) (2020-10-29) | ||
@@ -8,0 +50,0 @@ |
@@ -1,2 +0,3 @@ | ||
export { br, code, error, info, logo, overwrite, success, warn, unmute, mute, debug } from './logger'; | ||
export * from './types'; | ||
export { codeΔ } from './code'; | ||
export { diffΔ } from './diff'; | ||
export { BettererLogger, BettererLogMessage, BettererLogCode, BettererLoggerCodeInfo, BettererLoggerMessages } from './types'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.debug = exports.mute = exports.unmute = exports.warn = exports.success = exports.overwrite = exports.logo = exports.info = exports.error = exports.code = exports.br = void 0; | ||
var tslib_1 = require("tslib"); | ||
var logger_1 = require("./logger"); | ||
Object.defineProperty(exports, "br", { enumerable: true, get: function () { return logger_1.br; } }); | ||
Object.defineProperty(exports, "code", { enumerable: true, get: function () { return logger_1.code; } }); | ||
Object.defineProperty(exports, "error", { enumerable: true, get: function () { return logger_1.error; } }); | ||
Object.defineProperty(exports, "info", { enumerable: true, get: function () { return logger_1.info; } }); | ||
Object.defineProperty(exports, "logo", { enumerable: true, get: function () { return logger_1.logo; } }); | ||
Object.defineProperty(exports, "overwrite", { enumerable: true, get: function () { return logger_1.overwrite; } }); | ||
Object.defineProperty(exports, "success", { enumerable: true, get: function () { return logger_1.success; } }); | ||
Object.defineProperty(exports, "warn", { enumerable: true, get: function () { return logger_1.warn; } }); | ||
Object.defineProperty(exports, "unmute", { enumerable: true, get: function () { return logger_1.unmute; } }); | ||
Object.defineProperty(exports, "mute", { enumerable: true, get: function () { return logger_1.mute; } }); | ||
Object.defineProperty(exports, "debug", { enumerable: true, get: function () { return logger_1.debug; } }); | ||
tslib_1.__exportStar(require("./types"), exports); | ||
exports.diffΔ = exports.codeΔ = void 0; | ||
var code_1 = require("./code"); | ||
Object.defineProperty(exports, "code\u0394", { enumerable: true, get: function () { return code_1.codeΔ; } }); | ||
var diff_1 = require("./diff"); | ||
Object.defineProperty(exports, "diff\u0394", { enumerable: true, get: function () { return diff_1.diffΔ; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -1,4 +0,3 @@ | ||
import * as logUpdate from 'log-update'; | ||
export declare type BettererLoggerMessages = ReadonlyArray<string>; | ||
export declare type BettererLogger = (...messages: BettererLoggerMessages) => void; | ||
export declare type BettererLoggerMessages = Array<string>; | ||
export declare type BettererLogMessage = (...messages: BettererLoggerMessages) => Promise<void>; | ||
export declare type BettererLoggerCodeInfo = { | ||
@@ -8,5 +7,15 @@ message: string; | ||
fileText: string; | ||
start: number; | ||
end: number; | ||
line: number; | ||
column: number; | ||
length: number; | ||
}; | ||
export declare type BettererLoggerOverwriteDone = typeof logUpdate['done']; | ||
export declare type BettererLogCode = (codeInfo: BettererLoggerCodeInfo) => Promise<void>; | ||
export declare type BettererLogger = { | ||
code: BettererLogCode; | ||
debug: BettererLogMessage; | ||
error: BettererLogMessage; | ||
info: BettererLogMessage; | ||
progress: BettererLogMessage; | ||
success: BettererLogMessage; | ||
warn: BettererLogMessage; | ||
}; |
{ | ||
"name": "@betterer/logger", | ||
"description": "logger for @betterer/betterer", | ||
"version": "3.1.1", | ||
"version": "4.0.0", | ||
"license": "MIT", | ||
@@ -24,17 +24,20 @@ "publishConfig": { | ||
"scripts": { | ||
"compile": "tsc -b ." | ||
"compile": "tsc -b .", | ||
"api": "ts-api-guardian --out ../../goldens/api/@betterer/logger.d.ts dist/index.d.ts" | ||
}, | ||
"engines": { | ||
"node": ">=12" | ||
}, | ||
"dependencies": { | ||
"@babel/code-frame": "^7.10.3", | ||
"chalk": "^4.1.0", | ||
"@betterer/errors": "^4.0.0", | ||
"jest-diff": "^26.6.2", | ||
"lines-and-columns": "^1.1.6", | ||
"log-update": "^4.0.0", | ||
"npmlog": "^4.1.2", | ||
"react": "^16.13.1", | ||
"tslib": "^2.0.3" | ||
}, | ||
"devDependencies": { | ||
"@types/babel__code-frame": "^7.0.1", | ||
"@types/npmlog": "^4.1.2" | ||
"@types/babel__code-frame": "^7.0.1" | ||
}, | ||
"gitHead": "1367466c849e75733e87ce55c4e84e44a173324e" | ||
"gitHead": "e4068ade2596567bc53c6486280af3d882b40aa7" | ||
} |
@@ -1,2 +0,2 @@ | ||
[![Betterer](https://raw.githubusercontent.com/phenomnomnominal/betterer/master/docs/logo.png)](https://phenomnomnominal.github.io/betterer/) | ||
[![Betterer](https://raw.githubusercontent.com/phenomnomnominal/betterer/master/website/static/img/header.png)](https://phenomnomnominal.github.io/betterer/) | ||
@@ -9,67 +9,4 @@ # `@betterer/logger` | ||
## Usage | ||
## Docs | ||
### Code | ||
```typescript | ||
import { code } from '@betterer/logger'; | ||
code({ | ||
filePath: './file.js', | ||
fileText: 'function add (a, b) {\n return a + b;\n}', | ||
start: 24, | ||
end: 37 | ||
}); | ||
``` | ||
![Example output for code logger](/packages/logger/images/code.png?raw=true) | ||
--- | ||
### Error | ||
```typescript | ||
import { error } from '@betterer/logger'; | ||
error('message'); | ||
``` | ||
![Example output for error logger](/packages/logger/images/error.png?raw=true) | ||
--- | ||
### Info | ||
```typescript | ||
import { info } from '@betterer/logger'; | ||
info('message'); | ||
``` | ||
![Example output for info logger](/packages/logger/images/info.png?raw=true) | ||
--- | ||
### Success | ||
```typescript | ||
import { success } from '@betterer/logger'; | ||
success('message'); | ||
``` | ||
![Example output for success logger](/packages/logger/images/success.png?raw=true) | ||
--- | ||
### Warning | ||
```typescript | ||
import { warn } from '@betterer/logger'; | ||
warn('message'); | ||
``` | ||
![Example output for warn logger](/packages/logger/images/warn.png?raw=true) | ||
--- | ||
[Check out the docs at `phenomnomnominal.github.io/betterer`! 🎉](https://phenomnomnominal.github.io/betterer/docs/logger) |
Sorry, the diff of this file is not supported yet
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
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
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
49457
1
46
561
12
2
1
+ Added@betterer/errors@^4.0.0
+ Addedjest-diff@^26.6.2
+ Addedreact@^16.13.1
+ Added@betterer/errors@4.0.0(transitive)
+ Added@jest/types@26.6.2(transitive)
+ Added@types/istanbul-lib-coverage@2.0.6(transitive)
+ Added@types/istanbul-lib-report@3.0.3(transitive)
+ Added@types/istanbul-reports@3.0.4(transitive)
+ Added@types/node@22.10.2(transitive)
+ Added@types/yargs@15.0.19(transitive)
+ Added@types/yargs-parser@21.0.3(transitive)
+ Addeddiff-sequences@26.6.2(transitive)
+ Addedjest-diff@26.6.2(transitive)
+ Addedjest-get-type@26.3.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedpretty-format@26.6.2(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedreact@16.14.0(transitive)
+ Addedreact-is@16.13.117.0.2(transitive)
+ Addedundici-types@6.20.0(transitive)
- Removedchalk@^4.1.0
- Removedlog-update@^4.0.0
- Removednpmlog@^4.1.2
- Removedansi-escapes@4.3.2(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedaproba@1.2.0(transitive)
- Removedare-we-there-yet@1.1.7(transitive)
- Removedastral-regex@2.0.0(transitive)
- Removedcli-cursor@3.1.0(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedconsole-control-strings@1.1.0(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddelegates@1.0.0(transitive)
- Removedemoji-regex@8.0.0(transitive)
- Removedgauge@2.7.4(transitive)
- Removedhas-unicode@2.0.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-fullwidth-code-point@1.0.03.0.0(transitive)
- Removedisarray@1.0.0(transitive)
- Removedlog-update@4.0.0(transitive)
- Removedmimic-fn@2.1.0(transitive)
- Removednpmlog@4.1.2(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedonetime@5.1.2(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedrestore-cursor@3.1.0(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedslice-ansi@4.0.0(transitive)
- Removedstring-width@1.0.24.2.3(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedstrip-ansi@3.0.16.0.1(transitive)
- Removedtype-fest@0.21.3(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedwide-align@1.1.5(transitive)
- Removedwrap-ansi@6.2.0(transitive)