@pnpm/logger
Advanced tools
Comparing version 1.0.2 to 2.0.1
@@ -1,5 +0,5 @@ | ||
import logger, { LogError, Logger } from './logger'; | ||
import logger, { Logger } from './logger'; | ||
import streamParser, { createStreamParser, LogBase } from './streamParser'; | ||
import writeToConsole from './writeToConsole'; | ||
export default logger; | ||
export { streamParser, createStreamParser, writeToConsole, LogBase, Logger, LogError }; | ||
export { streamParser, createStreamParser, writeToConsole, LogBase, Logger, }; |
@@ -1,13 +0,16 @@ | ||
declare const _default: Logger<string | object>; | ||
declare const _default: Logger<object>; | ||
export default _default; | ||
export interface LogError<T> { | ||
(err: Error, log?: T): void; | ||
(log?: T): void; | ||
} | ||
export interface Logger<T> { | ||
<Y>(name: string): Logger<Y>; | ||
debug: (log?: T) => void; | ||
info: (log?: T) => void; | ||
warn: (log?: T) => void; | ||
error: LogError<T>; | ||
info: (log: { | ||
message: string; | ||
prefix: string; | ||
}) => void; | ||
warn: (log: { | ||
message: string; | ||
prefix: string; | ||
error?: Error; | ||
}) => void; | ||
error: (err: Error, log?: string | Error) => void; | ||
} |
@@ -1,4 +0,8 @@ | ||
export interface LogBase { | ||
level: 'debug' | 'info' | 'warn' | 'error'; | ||
} | ||
export declare type LogBase = ({ | ||
level: 'debug' | 'error'; | ||
} | { | ||
level: 'info' | 'warn'; | ||
prefix: string; | ||
message: string; | ||
}); | ||
export declare type Reporter = (logObj: LogBase) => void; | ||
@@ -5,0 +9,0 @@ export interface StreamParser { |
{ | ||
"name": "@pnpm/logger", | ||
"version": "1.0.2", | ||
"version": "2.0.1", | ||
"description": "Logger for pnpm", | ||
@@ -20,3 +20,3 @@ "main": "lib/index.js", | ||
"engines": { | ||
"node": ">=4" | ||
"node": ">=6" | ||
}, | ||
@@ -52,3 +52,3 @@ "keywords": [ | ||
"tape": "^4.8.0", | ||
"ts-node": "^6.0.0", | ||
"ts-node": "^7.0.0", | ||
"tslint": "^5.0.0", | ||
@@ -55,0 +55,0 @@ "typescript": "^2.1.5", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
7082
77