@alwatr/logger
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -6,2 +6,8 @@ # Change Log | ||
# [2.3.0](https://github.com/Alwatr/eslib/compare/@alwatr/logger@2.2.0...@alwatr/logger@2.3.0) (2023-11-23) | ||
### Features | ||
* **logger/global:** globalScope ([8111c10](https://github.com/Alwatr/eslib/commit/8111c108edff13d433d5f2f50470d00058e761ba)) by @AliMD | ||
# [2.2.0](https://github.com/Alwatr/eslib/compare/@alwatr/logger@2.1.3...@alwatr/logger@2.2.0) (2023-11-14) | ||
@@ -8,0 +14,0 @@ |
@@ -0,2 +1,3 @@ | ||
import './global.js'; | ||
export declare const definePackage: (packageName: string, version: string) => void; | ||
//# sourceMappingURL=define-package.d.ts.map |
@@ -0,3 +1,3 @@ | ||
import './global.js'; | ||
import { createLogger } from './logger.js'; | ||
globalThis.Alwatr ?? (globalThis.Alwatr = { packages: {} }); | ||
Alwatr.packages ?? (Alwatr.packages = {}); | ||
@@ -4,0 +4,0 @@ const logger = createLogger('logger'); |
@@ -0,1 +1,2 @@ | ||
export * from './global.js'; | ||
export * from './logger.js'; | ||
@@ -2,0 +3,0 @@ export * from './define-package.js'; |
@@ -0,3 +1,4 @@ | ||
export * from './global.js'; | ||
export * from './logger.js'; | ||
export * from './define-package.js'; | ||
//# sourceMappingURL=index.js.map |
import type { AlwatrLogger } from './type.js'; | ||
export declare const NODE_MODE: boolean; | ||
export declare const DEV_MODE: boolean; | ||
/** | ||
@@ -5,0 +3,0 @@ * Create a logger function for fancy console debug with custom scope. |
@@ -1,5 +0,2 @@ | ||
export const NODE_MODE = typeof process !== 'undefined'; | ||
export const DEV_MODE = NODE_MODE | ||
? process.env.ALWATR_DEBUG === '1' | ||
: globalThis.localStorage?.getItem('alwatrDebug') === '1'; | ||
import { DEV_MODE, NODE_MODE } from './global.js'; | ||
/** | ||
@@ -6,0 +3,0 @@ * Color list storage for logger. |
{ | ||
"name": "@alwatr/logger", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "Fancy colorful console debugger with custom scope written in tiny TypeScript, ES module.", | ||
@@ -38,5 +38,5 @@ "keywords": [ | ||
"devDependencies": { | ||
"@types/node": "^20.9.0" | ||
"@types/node": "^20.9.4" | ||
}, | ||
"gitHead": "c9c6d5abf5e2aeafa915fde58c73e030ac00db27" | ||
"gitHead": "0f5a2f89263e9bf03a7f5087b0715ea1fc059674" | ||
} |
@@ -1,7 +0,1 @@ | ||
export interface GlobalAlwatr { | ||
packages: Record<string, string>; | ||
} | ||
declare global { | ||
var Alwatr: GlobalAlwatr; | ||
} | ||
export interface AlwatrLogger { | ||
@@ -8,0 +2,0 @@ /** |
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
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
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
44866
24
306