From d89d076c9fd0dd311804831b1ac0ea955efd4b6d Mon Sep 17 00:00:00 2001 From: "S. Amir Mohammad Najafi" Date: Wed, 3 Jan 2024 21:25:39 +0330 Subject: [PATCH] feat(logger): use alwatr dedupe BREAKING CHANGE: define packages removed and must use @alwatr/dedupe instead --- packages/logger/README.md | 2 +- packages/logger/package.json | 1 + packages/logger/src/main.ts | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/logger/README.md b/packages/logger/README.md index e3e7e9ff..45c637c2 100644 --- a/packages/logger/README.md +++ b/packages/logger/README.md @@ -1,4 +1,4 @@ -# Alwatr Logger - `@alwatr/logger` +# Logger Fancy colorful console debugger with custom scope written in tiny TypeScript, ES module. diff --git a/packages/logger/package.json b/packages/logger/package.json index 0744576e..137476ed 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -73,6 +73,7 @@ "typescript": "^5.3.3" }, "dependencies": { + "@alwatr/dedupe": "workspace:^", "@alwatr/platform-info": "workspace:^" } } diff --git a/packages/logger/src/main.ts b/packages/logger/src/main.ts index a7852117..7e31bb2f 100644 --- a/packages/logger/src/main.ts +++ b/packages/logger/src/main.ts @@ -1,7 +1,12 @@ +/// + +import {definePackage} from '@alwatr/dedupe'; import {platformInfo} from '@alwatr/platform-info'; import type {AlwatrLogger} from './type.js'; +definePackage('@alwatr/dedupe', __package_version__); + export const debugMode = platformInfo.development || platformInfo.isCli ? process.env.DEBUG !== undefined && process.env.DEBUG !== '' : typeof localStorage !== 'undefined' && localStorage.getItem('debug') === '1';