@alwatr/logger 4.0.6 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.0.7](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.6...@alwatr/logger@4.0.7) (2024-10-25)
7
+
8
+ ### Dependencies update
9
+
10
+ * bump the development-dependencies group across 1 directory with 2 updates ([2dfda9e](https://github.com/Alwatr/nanolib/commit/2dfda9ec38a595f1fd961490d1a2fbf060f20a66)) by @dependabot[bot]
11
+ * bump the development-dependencies group with 8 updates ([16847ac](https://github.com/Alwatr/nanolib/commit/16847acba91da027c422e3910d0f2dcc1f084e93)) by @dependabot[bot]
12
+
6
13
  ## [4.0.6](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.5...@alwatr/logger@4.0.6) (2024-10-12)
7
14
 
8
15
  **Note:** Version bump only for package @alwatr/logger
@@ -11,18 +18,18 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
18
 
12
19
  ### Bug Fixes
13
20
 
14
- * **logger:** Update default debug mode logic for prevent side-effects ([42101d6](https://github.com/Alwatr/nanolib/commit/42101d6471bd0d4e88e47dc8321dddc1cd63cec8)) by @AliMD
21
+ - **logger:** Update default debug mode logic for prevent side-effects ([42101d6](https://github.com/Alwatr/nanolib/commit/42101d6471bd0d4e88e47dc8321dddc1cd63cec8)) by @AliMD
15
22
 
16
23
  ### Code Refactoring
17
24
 
18
- * **logger:** prevent side-effects ([e084894](https://github.com/Alwatr/nanolib/commit/e084894cdc4b46d52d99be872f5f789fe83c3cc0)) by @mohammadhonarvar
19
- * prevent side-effects ([01e00e1](https://github.com/Alwatr/nanolib/commit/01e00e191385cc92b28677df0c01a085916ae677)) by @mohammadhonarvar
25
+ - **logger:** prevent side-effects ([e084894](https://github.com/Alwatr/nanolib/commit/e084894cdc4b46d52d99be872f5f789fe83c3cc0)) by @mohammadhonarvar
26
+ - prevent side-effects ([01e00e1](https://github.com/Alwatr/nanolib/commit/01e00e191385cc92b28677df0c01a085916ae677)) by @mohammadhonarvar
20
27
 
21
28
  ## [4.0.4](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.3...@alwatr/logger@4.0.4) (2024-10-11)
22
29
 
23
30
  ### Miscellaneous Chores
24
31
 
25
- * include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @AliMD
32
+ - include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @AliMD
26
33
 
27
34
  ## [4.0.3](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.2...@alwatr/logger@4.0.3) (2024-10-11)
28
35
 
@@ -32,7 +39,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
32
39
 
33
40
  ### Dependencies update
34
41
 
35
- * bump the development-dependencies group with 10 updates ([fa4aaf0](https://github.com/Alwatr/nanolib/commit/fa4aaf04c907ecae06aa14000ce35216170c15ad)) by @dependabot[bot]
42
+ - bump the development-dependencies group with 10 updates ([fa4aaf0](https://github.com/Alwatr/nanolib/commit/fa4aaf04c907ecae06aa14000ce35216170c15ad)) by @dependabot[bot]
36
43
 
37
44
  ## [4.0.1](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.0...@alwatr/logger@4.0.1) (2024-10-08)
38
45
 
@@ -42,31 +49,31 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
42
49
 
43
50
  ### ⚠ BREAKING CHANGES
44
51
 
45
- * **logger:** logModule renamed to logFileModule
46
- * **logger:** definePackage and dedupt remove!
52
+ - **logger:** logModule renamed to logFileModule
53
+ - **logger:** definePackage and dedupt remove!
47
54
 
48
55
  ### Features
49
56
 
50
- * **logger:** add logStep method to logger ([860aeed](https://github.com/Alwatr/nanolib/commit/860aeedb2da390ee3d47c037b22a37f73e6dbbbc)) by @AliMD
51
- * use `package-tracer` ([cc3c5f9](https://github.com/Alwatr/nanolib/commit/cc3c5f9c1a3d03f0d81b46835665f16a0426fd0d)) by @mohammadhonarvar
57
+ - **logger:** add logStep method to logger ([860aeed](https://github.com/Alwatr/nanolib/commit/860aeedb2da390ee3d47c037b22a37f73e6dbbbc)) by @AliMD
58
+ - use `package-tracer` ([cc3c5f9](https://github.com/Alwatr/nanolib/commit/cc3c5f9c1a3d03f0d81b46835665f16a0426fd0d)) by @mohammadhonarvar
52
59
 
53
60
  ### Bug Fixes
54
61
 
55
- * all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @mohammadhonarvar
62
+ - all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @mohammadhonarvar
56
63
 
57
64
  ### Code Refactoring
58
65
 
59
- * **logger:** remove definePackage from logger ([c8a9d0c](https://github.com/Alwatr/nanolib/commit/c8a9d0cdcc3e45e7a33731ec6ee6a496451e9eb1)) by @mohammadhonarvar
60
- * **logger:** rename logModule to logFileModule ([1f6bd71](https://github.com/Alwatr/nanolib/commit/1f6bd71272007f5bbc90258ffa13b7d851e0918c)) by @AliMD
66
+ - **logger:** remove definePackage from logger ([c8a9d0c](https://github.com/Alwatr/nanolib/commit/c8a9d0cdcc3e45e7a33731ec6ee6a496451e9eb1)) by @mohammadhonarvar
67
+ - **logger:** rename logModule to logFileModule ([1f6bd71](https://github.com/Alwatr/nanolib/commit/1f6bd71272007f5bbc90258ffa13b7d851e0918c)) by @AliMD
61
68
 
62
69
  ### Miscellaneous Chores
63
70
 
64
- * **logger:** change the license to AGPL-3.0 ([4bb4673](https://github.com/Alwatr/nanolib/commit/4bb4673972069a307e799cad9a5078b0288a9340)) by @AliMD
65
- * Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @AliMD
71
+ - **logger:** change the license to AGPL-3.0 ([4bb4673](https://github.com/Alwatr/nanolib/commit/4bb4673972069a307e799cad9a5078b0288a9340)) by @AliMD
72
+ - Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @AliMD
66
73
 
67
74
  ### Dependencies update
68
75
 
69
- * bump @types/node ([3d80fed](https://github.com/Alwatr/nanolib/commit/3d80fedaf720af792feb060c2f81c737ebb84e11)) by @dependabot[bot]
76
+ - bump @types/node ([3d80fed](https://github.com/Alwatr/nanolib/commit/3d80fedaf720af792feb060c2f81c737ebb84e11)) by @dependabot[bot]
70
77
 
71
78
  ## [3.2.14](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.13...@alwatr/logger@3.2.14) (2024-09-21)
72
79
 
@@ -76,14 +83,14 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
76
83
 
77
84
  ### Dependencies update
78
85
 
79
- * bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @dependabot[bot]
80
- * update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @AliMD
86
+ - bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @dependabot[bot]
87
+ - update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @AliMD
81
88
 
82
89
  ## [3.2.12](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.11...@alwatr/logger@3.2.12) (2024-08-31)
83
90
 
84
91
  ### Miscellaneous Chores
85
92
 
86
- * Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @
93
+ - Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @
87
94
 
88
95
  ## [3.2.11](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.10...@alwatr/logger@3.2.11) (2024-08-31)
89
96
 
@@ -93,19 +100,19 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
93
100
 
94
101
  ### Dependencies update
95
102
 
96
- * update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @AliMD
103
+ - update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @AliMD
97
104
 
98
105
  ## [3.2.9](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.8...@alwatr/logger@3.2.9) (2024-07-04)
99
106
 
100
107
  ### Dependencies update
101
108
 
102
- * update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @
109
+ - update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @
103
110
 
104
111
  ## [3.2.8](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.7...@alwatr/logger@3.2.8) (2024-05-12)
105
112
 
106
113
  ### Dependencies update
107
114
 
108
- * upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @AliMD
115
+ - upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @AliMD
109
116
 
110
117
  ## [3.2.7](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.6...@alwatr/logger@3.2.7) (2024-04-25)
111
118
 
@@ -119,11 +126,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
119
126
 
120
127
  ### Bug Fixes
121
128
 
122
- * exported types by add .js extensions to all imports ([fc3d83e](https://github.com/Alwatr/nanolib/commit/fc3d83e8f375da97ba276314b2e6966aa82c9b3f)) by @AliMD
129
+ - exported types by add .js extensions to all imports ([fc3d83e](https://github.com/Alwatr/nanolib/commit/fc3d83e8f375da97ba276314b2e6966aa82c9b3f)) by @AliMD
123
130
 
124
131
  ### Miscellaneous Chores
125
132
 
126
- * **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @AliMD
133
+ - **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @AliMD
127
134
 
128
135
  ## [3.2.4](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.3...@alwatr/logger@3.2.4) (2024-01-24)
129
136
 
package/README.md CHANGED
@@ -4,10 +4,10 @@ A lightweight, flexible, and colorful console logging library for TypeScript and
4
4
 
5
5
  ### Features
6
6
 
7
- * **Customizable Scopes:** Organize log messages using scopes for easy filtering and debugging.
8
- * **Colorful Output:** Visually distinguish different log levels and scopes with vibrant colors.
9
- * **Debug/Development Mode:** Control log verbosity to optimize performance in production environments.
10
- * **Tiny Footprint:** Minimal overhead, keeping your project lean and efficient.
7
+ - **Customizable Scopes:** Organize log messages using scopes for easy filtering and debugging.
8
+ - **Colorful Output:** Visually distinguish different log levels and scopes with vibrant colors.
9
+ - **Debug/Development Mode:** Control log verbosity to optimize performance in production environments.
10
+ - **Tiny Footprint:** Minimal overhead, keeping your project lean and efficient.
11
11
 
12
12
  ### Installation
13
13
 
@@ -18,33 +18,33 @@ npm install @alwatr/logger
18
18
  ### Usage
19
19
 
20
20
  ```typescript
21
- import { createLogger } from '@alwatr/logger';
21
+ import {createLogger} from '@alwatr/logger';
22
22
 
23
23
  const logger = createLogger('my-module'); // Create a logger with a specific scope
24
24
 
25
25
  function greet(name: string) {
26
- logger.logMethodArgs?.('greet', { name }); // Log the method call with its arguments
27
- console.log(`Hello, ${name}!`);
26
+ logger.logMethodArgs?.('greet', {name}); // Log the method call with its arguments
27
+ console.log(`Hello, ${name}!`);
28
28
  }
29
29
 
30
- greet('Ali');
30
+ greet('Ali');
31
31
  ```
32
32
 
33
33
  ### Log Levels and Methods
34
34
 
35
- * **`logProperty(propertyName, value)`:** Logs a property change (useful for tracking state).
36
- * **`logFileModule(fileName)`:** Logs the module's file name for easy identification.
37
- * **`logMethod(methodName)`:** Logs the entry into a function or method.
38
- * **`logMethodArgs(methodName, args)`:** Logs a method call with its arguments.
39
- * **`logStep(methodName, stepName, props?)`:** Logs specific steps within a method.
40
- * **`logMethodFull(methodName, args, result)`:** Logs a method call with arguments and result.
41
- * **`incident(methodName, code, ...args)`:** Logs an event or expected incident (informational).
42
- * **`accident(methodName, code, ...args)`:** Logs an unexpected incident or handled error (warning).
43
- * **`error(methodName, code, ...args)`:** Logs an unexpected error (critical).
44
- * **`logOther(...args)`:** General-purpose logging with styled scope.
45
- * **`time(label)`:** Starts a timer.
46
- * **`timeEnd(label)`:** Ends a timer and logs the elapsed time.
47
- * **`banner(message)`:** Logs a large, prominent banner message.
35
+ - **`logProperty(propertyName, value)`:** Logs a property change (useful for tracking state).
36
+ - **`logFileModule(fileName)`:** Logs the module's file name for easy identification.
37
+ - **`logMethod(methodName)`:** Logs the entry into a function or method.
38
+ - **`logMethodArgs(methodName, args)`:** Logs a method call with its arguments.
39
+ - **`logStep(methodName, stepName, props?)`:** Logs specific steps within a method.
40
+ - **`logMethodFull(methodName, args, result)`:** Logs a method call with arguments and result.
41
+ - **`incident(methodName, code, ...args)`:** Logs an event or expected incident (informational).
42
+ - **`accident(methodName, code, ...args)`:** Logs an unexpected incident or handled error (warning).
43
+ - **`error(methodName, code, ...args)`:** Logs an unexpected error (critical).
44
+ - **`logOther(...args)`:** General-purpose logging with styled scope.
45
+ - **`time(label)`:** Starts a timer.
46
+ - **`timeEnd(label)`:** Ends a timer and logs the elapsed time.
47
+ - **`banner(message)`:** Logs a large, prominent banner message.
48
48
 
49
49
  ### Enabling Debug Mode
50
50
 
@@ -53,13 +53,13 @@ greet('Ali');
53
53
  1. Open your browser's developer tools.
54
54
  2. Go to the "Application" or "Storage" tab.
55
55
  3. Find "Local Storage" and locate your application's domain.
56
- 4. Add a new key-value pair: `debug` with the value `1`.
56
+ 4. Add a new key-value pair: `ALWATR_DEBUG` with the value `1`.
57
57
  5. Reload the page.
58
58
 
59
59
  Or use the following code snippet in the browser console:
60
60
 
61
61
  ```javascript
62
- window.localStorage?.setItem('debug', '1');
62
+ window.localStorage?.setItem('ALWATR_DEBUG', '1');
63
63
  ```
64
64
 
65
65
  > **Note:** Ensure the browser console's log level is set to include "Verbose" or "All" to see debug messages.
package/dist/main.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /* @alwatr/logger v4.0.6 */
1
+ /* @alwatr/logger v4.0.7 */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -28,7 +28,7 @@ module.exports = __toCommonJS(main_exports);
28
28
  // src/logger.ts
29
29
  var import_package_tracer = require("@alwatr/package-tracer");
30
30
  var import_platform_info = require("@alwatr/platform-info");
31
- __dev_mode__: import_package_tracer.packageTracer.add("@alwatr/logger", "4.0.6");
31
+ __dev_mode__: import_package_tracer.packageTracer.add("@alwatr/logger", "4.0.7");
32
32
  var defaultDebugMode = /* @__PURE__ */ (() => {
33
33
  return import_platform_info.platformInfo.development || (import_platform_info.platformInfo.isCli ? Boolean(process.env.DEBUG) : typeof localStorage !== "undefined" && localStorage.getItem("ALWATR_DEBUG") === "1");
34
34
  })();
package/dist/main.mjs CHANGED
@@ -1,9 +1,9 @@
1
- /* @alwatr/logger v4.0.6 */
1
+ /* @alwatr/logger v4.0.7 */
2
2
 
3
3
  // src/logger.ts
4
4
  import { packageTracer } from "@alwatr/package-tracer";
5
5
  import { platformInfo } from "@alwatr/platform-info";
6
- __dev_mode__: packageTracer.add("@alwatr/logger", "4.0.6");
6
+ __dev_mode__: packageTracer.add("@alwatr/logger", "4.0.7");
7
7
  var defaultDebugMode = /* @__PURE__ */ (() => {
8
8
  return platformInfo.development || (platformInfo.isCli ? Boolean(process.env.DEBUG) : typeof localStorage !== "undefined" && localStorage.getItem("ALWATR_DEBUG") === "1");
9
9
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwatr/logger",
3
- "version": "4.0.6",
3
+ "version": "4.0.7",
4
4
  "description": "Fancy colorful console debugger with custom scope written in tiny TypeScript, ES module.",
5
5
  "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
6
6
  "keywords": [
@@ -67,15 +67,15 @@
67
67
  "clean": "rm -rfv dist *.tsbuildinfo"
68
68
  },
69
69
  "dependencies": {
70
- "@alwatr/package-tracer": "^1.0.6",
71
- "@alwatr/platform-info": "^1.2.6"
70
+ "@alwatr/package-tracer": "^1.0.7",
71
+ "@alwatr/platform-info": "^1.2.7"
72
72
  },
73
73
  "devDependencies": {
74
- "@alwatr/nano-build": "^2.0.2",
74
+ "@alwatr/nano-build": "^2.0.3",
75
75
  "@alwatr/prettier-config": "^1.0.6",
76
- "@alwatr/tsconfig-base": "^1.3.2",
77
- "@types/node": "^22.7.5",
76
+ "@alwatr/tsconfig-base": "^1.3.3",
77
+ "@types/node": "^22.8.0",
78
78
  "typescript": "^5.6.3"
79
79
  },
80
- "gitHead": "15d12342d2e69fbb6129675cce620132c5bd0bfc"
80
+ "gitHead": "a1e430a02f9a5711fc43f19012091bcd8806c4f9"
81
81
  }