@alwatr/logger 4.0.6 → 4.0.8

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,19 @@
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.8](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.7...@alwatr/logger@4.0.8) (2024-11-02)
7
+
8
+ ### Dependencies update
9
+
10
+ * update ([4434ba6](https://github.com/Alwatr/nanolib/commit/4434ba67c3f576bb1a0c307fbdb263c43cd9733a)) by @AliMD
11
+
12
+ ## [4.0.7](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.6...@alwatr/logger@4.0.7) (2024-10-25)
13
+
14
+ ### Dependencies update
15
+
16
+ * bump the development-dependencies group across 1 directory with 2 updates ([2dfda9e](https://github.com/Alwatr/nanolib/commit/2dfda9ec38a595f1fd961490d1a2fbf060f20a66)) by @dependabot[bot]
17
+ * bump the development-dependencies group with 8 updates ([16847ac](https://github.com/Alwatr/nanolib/commit/16847acba91da027c422e3910d0f2dcc1f084e93)) by @dependabot[bot]
18
+
6
19
  ## [4.0.6](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.5...@alwatr/logger@4.0.6) (2024-10-12)
7
20
 
8
21
  **Note:** Version bump only for package @alwatr/logger
@@ -11,18 +24,18 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
24
 
12
25
  ### Bug Fixes
13
26
 
14
- * **logger:** Update default debug mode logic for prevent side-effects ([42101d6](https://github.com/Alwatr/nanolib/commit/42101d6471bd0d4e88e47dc8321dddc1cd63cec8)) by @AliMD
27
+ - **logger:** Update default debug mode logic for prevent side-effects ([42101d6](https://github.com/Alwatr/nanolib/commit/42101d6471bd0d4e88e47dc8321dddc1cd63cec8)) by @AliMD
15
28
 
16
29
  ### Code Refactoring
17
30
 
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
31
+ - **logger:** prevent side-effects ([e084894](https://github.com/Alwatr/nanolib/commit/e084894cdc4b46d52d99be872f5f789fe83c3cc0)) by @mohammadhonarvar
32
+ - prevent side-effects ([01e00e1](https://github.com/Alwatr/nanolib/commit/01e00e191385cc92b28677df0c01a085916ae677)) by @mohammadhonarvar
20
33
 
21
34
  ## [4.0.4](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.3...@alwatr/logger@4.0.4) (2024-10-11)
22
35
 
23
36
  ### Miscellaneous Chores
24
37
 
25
- * include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @AliMD
38
+ - include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @AliMD
26
39
 
27
40
  ## [4.0.3](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.2...@alwatr/logger@4.0.3) (2024-10-11)
28
41
 
@@ -32,7 +45,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
32
45
 
33
46
  ### Dependencies update
34
47
 
35
- * bump the development-dependencies group with 10 updates ([fa4aaf0](https://github.com/Alwatr/nanolib/commit/fa4aaf04c907ecae06aa14000ce35216170c15ad)) by @dependabot[bot]
48
+ - bump the development-dependencies group with 10 updates ([fa4aaf0](https://github.com/Alwatr/nanolib/commit/fa4aaf04c907ecae06aa14000ce35216170c15ad)) by @dependabot[bot]
36
49
 
37
50
  ## [4.0.1](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@4.0.0...@alwatr/logger@4.0.1) (2024-10-08)
38
51
 
@@ -42,31 +55,31 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
42
55
 
43
56
  ### ⚠ BREAKING CHANGES
44
57
 
45
- * **logger:** logModule renamed to logFileModule
46
- * **logger:** definePackage and dedupt remove!
58
+ - **logger:** logModule renamed to logFileModule
59
+ - **logger:** definePackage and dedupt remove!
47
60
 
48
61
  ### Features
49
62
 
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
63
+ - **logger:** add logStep method to logger ([860aeed](https://github.com/Alwatr/nanolib/commit/860aeedb2da390ee3d47c037b22a37f73e6dbbbc)) by @AliMD
64
+ - use `package-tracer` ([cc3c5f9](https://github.com/Alwatr/nanolib/commit/cc3c5f9c1a3d03f0d81b46835665f16a0426fd0d)) by @mohammadhonarvar
52
65
 
53
66
  ### Bug Fixes
54
67
 
55
- * all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @mohammadhonarvar
68
+ - all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @mohammadhonarvar
56
69
 
57
70
  ### Code Refactoring
58
71
 
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
72
+ - **logger:** remove definePackage from logger ([c8a9d0c](https://github.com/Alwatr/nanolib/commit/c8a9d0cdcc3e45e7a33731ec6ee6a496451e9eb1)) by @mohammadhonarvar
73
+ - **logger:** rename logModule to logFileModule ([1f6bd71](https://github.com/Alwatr/nanolib/commit/1f6bd71272007f5bbc90258ffa13b7d851e0918c)) by @AliMD
61
74
 
62
75
  ### Miscellaneous Chores
63
76
 
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
77
+ - **logger:** change the license to AGPL-3.0 ([4bb4673](https://github.com/Alwatr/nanolib/commit/4bb4673972069a307e799cad9a5078b0288a9340)) by @AliMD
78
+ - Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @AliMD
66
79
 
67
80
  ### Dependencies update
68
81
 
69
- * bump @types/node ([3d80fed](https://github.com/Alwatr/nanolib/commit/3d80fedaf720af792feb060c2f81c737ebb84e11)) by @dependabot[bot]
82
+ - bump @types/node ([3d80fed](https://github.com/Alwatr/nanolib/commit/3d80fedaf720af792feb060c2f81c737ebb84e11)) by @dependabot[bot]
70
83
 
71
84
  ## [3.2.14](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.13...@alwatr/logger@3.2.14) (2024-09-21)
72
85
 
@@ -76,14 +89,14 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
76
89
 
77
90
  ### Dependencies update
78
91
 
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
92
+ - bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @dependabot[bot]
93
+ - update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @AliMD
81
94
 
82
95
  ## [3.2.12](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.11...@alwatr/logger@3.2.12) (2024-08-31)
83
96
 
84
97
  ### Miscellaneous Chores
85
98
 
86
- * Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @
99
+ - Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @
87
100
 
88
101
  ## [3.2.11](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.10...@alwatr/logger@3.2.11) (2024-08-31)
89
102
 
@@ -93,19 +106,19 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
93
106
 
94
107
  ### Dependencies update
95
108
 
96
- * update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @AliMD
109
+ - update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @AliMD
97
110
 
98
111
  ## [3.2.9](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.8...@alwatr/logger@3.2.9) (2024-07-04)
99
112
 
100
113
  ### Dependencies update
101
114
 
102
- * update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @
115
+ - update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @
103
116
 
104
117
  ## [3.2.8](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.7...@alwatr/logger@3.2.8) (2024-05-12)
105
118
 
106
119
  ### Dependencies update
107
120
 
108
- * upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @AliMD
121
+ - upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @AliMD
109
122
 
110
123
  ## [3.2.7](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.6...@alwatr/logger@3.2.7) (2024-04-25)
111
124
 
@@ -119,11 +132,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
119
132
 
120
133
  ### Bug Fixes
121
134
 
122
- * exported types by add .js extensions to all imports ([fc3d83e](https://github.com/Alwatr/nanolib/commit/fc3d83e8f375da97ba276314b2e6966aa82c9b3f)) by @AliMD
135
+ - exported types by add .js extensions to all imports ([fc3d83e](https://github.com/Alwatr/nanolib/commit/fc3d83e8f375da97ba276314b2e6966aa82c9b3f)) by @AliMD
123
136
 
124
137
  ### Miscellaneous Chores
125
138
 
126
- * **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @AliMD
139
+ - **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @AliMD
127
140
 
128
141
  ## [3.2.4](https://github.com/Alwatr/nanolib/compare/@alwatr/logger@3.2.3...@alwatr/logger@3.2.4) (2024-01-24)
129
142
 
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.8 */
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.8");
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.8 */
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.8");
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.8",
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.8",
71
+ "@alwatr/platform-info": "^1.2.8"
72
72
  },
73
73
  "devDependencies": {
74
- "@alwatr/nano-build": "^2.0.2",
74
+ "@alwatr/nano-build": "^2.0.4",
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.6",
78
78
  "typescript": "^5.6.3"
79
79
  },
80
- "gitHead": "15d12342d2e69fbb6129675cce620132c5bd0bfc"
80
+ "gitHead": "5aecc962a161034aa9213dcc5fb3c1cece9eaca2"
81
81
  }