@darksheep/logger 1.0.9 → 1.0.10

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
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.10](https://github.com/DarkSheepSoftware/node-packages/compare/logger-v1.0.9...logger-v1.0.10) (2025-01-28)
4
+
5
+
6
+ ### 📦 Dependencies
7
+
8
+ * **pkg:** update dependency deepmerge-ts to v7.1.4 ([#544](https://github.com/DarkSheepSoftware/node-packages/issues/544)) ([7ccc3ae](https://github.com/DarkSheepSoftware/node-packages/commit/7ccc3aefe706fb5451c9ce842e9f656a9f387f64))
9
+ * **pkg:** update dependency traverse to v0.6.11 ([#541](https://github.com/DarkSheepSoftware/node-packages/issues/541)) ([46031e0](https://github.com/DarkSheepSoftware/node-packages/commit/46031e09e530edd52381b89164ff46011c5f9494))
10
+
3
11
  ## [1.0.9](https://github.com/DarkSheepSoftware/node-packages/compare/logger-v1.0.8...logger-v1.0.9) (2024-10-29)
4
12
 
5
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darksheep/logger",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Logging your stuff to where ever you want it",
5
5
  "license": "UNLICENCED",
6
6
  "type": "module",
@@ -23,14 +23,14 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@darksheep/environment": "3.1.0",
26
- "deepmerge-ts": "7.1.3",
26
+ "deepmerge-ts": "7.1.4",
27
27
  "stacktrace-parser": "0.1.10",
28
- "traverse": "0.6.10"
28
+ "traverse": "0.6.11"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/traverse": "~0.6.33",
32
- "nock": "~13.5.0",
33
- "zod": "~3.23.0"
32
+ "nock": "~14.0.0",
33
+ "zod": "~3.24.0"
34
34
  },
35
35
  "engines": {
36
36
  "node": "^20.13.1 || ^22.2.0"
@@ -21,6 +21,5 @@ export const HttpIncomingMessageReplacer = {
21
21
  headers: input.headers,
22
22
  complete: input.complete,
23
23
  destroyed: input.destroyed,
24
- })
25
- ,
24
+ }),
26
25
  };
@@ -2,4 +2,4 @@
2
2
  * @param {string} [channel] - The logging channel.
3
3
  * @returns {import('./logger.js').Logger}
4
4
  */
5
- export function createLogger(channel?: string | undefined): import("./logger.js").Logger;
5
+ export function createLogger(channel?: string): import("./logger.js").Logger;
package/types/logger.d.ts CHANGED
@@ -32,7 +32,7 @@ export class Logger {
32
32
  * @param {import('./utilities/log-types.js').LogContext} [context] - Context to add to the logger.
33
33
  * @param {Options} [options] - Options for the loggers output.
34
34
  */
35
- constructor(context?: import("./utilities/log-types.js").LogContext | undefined, options?: Options | undefined);
35
+ constructor(context?: import("./utilities/log-types.js").LogContext, options?: Options);
36
36
  /** @type {import('./replacer.js').Replacer[]} */
37
37
  replacers: import("./replacer.js").Replacer[];
38
38
  /**
@@ -71,21 +71,21 @@ export class Logger {
71
71
  * @param {import('./utilities/log-types.js').LogContext} [context] - Additional context.
72
72
  * @returns {void}
73
73
  */
74
- critical(message: Error | string, context?: import("./utilities/log-types.js").LogContext | undefined): void;
74
+ critical(message: Error | string, context?: import("./utilities/log-types.js").LogContext): void;
75
75
  /**
76
76
  * Write a log with the level 'debug' - Information that is unlikely to help in production.
77
77
  * @param {Error | string} message - The message to log.
78
78
  * @param {import('./utilities/log-types.js').LogContext} [context] - Additional context.
79
79
  * @returns {void}
80
80
  */
81
- debug(message: Error | string, context?: import("./utilities/log-types.js").LogContext | undefined): void;
81
+ debug(message: Error | string, context?: import("./utilities/log-types.js").LogContext): void;
82
82
  /**
83
83
  * Write a log with the level 'error' - A non critical operation fails.
84
84
  * @param {Error | string} message - The message to log.
85
85
  * @param {import('./utilities/log-types.js').LogContext} [context] - Additional context.
86
86
  * @returns {void}
87
87
  */
88
- error(message: Error | string, context?: import("./utilities/log-types.js").LogContext | undefined): void;
88
+ error(message: Error | string, context?: import("./utilities/log-types.js").LogContext): void;
89
89
  /**
90
90
  * Get a value from the context by key.
91
91
  * @param {string} key - The key to get from the context.
@@ -98,14 +98,14 @@ export class Logger {
98
98
  * @param {import('./utilities/log-types.js').LogContext} [context] - Additional context.
99
99
  * @returns {void}
100
100
  */
101
- info(message: Error | string, context?: import("./utilities/log-types.js").LogContext | undefined): void;
101
+ info(message: Error | string, context?: import("./utilities/log-types.js").LogContext): void;
102
102
  /**
103
103
  * Write a log with the level 'notice' - Information about events that may be unusual.
104
104
  * @param {Error | string} message - The message to log.
105
105
  * @param {import('./utilities/log-types.js').LogContext} [context] - Additional context.
106
106
  * @returns {void}
107
107
  */
108
- notice(message: Error | string, context?: import("./utilities/log-types.js").LogContext | undefined): void;
108
+ notice(message: Error | string, context?: import("./utilities/log-types.js").LogContext): void;
109
109
  /**
110
110
  * Set a value into a new context by key.
111
111
  * @param {string} key - The key to set.
@@ -119,20 +119,20 @@ export class Logger {
119
119
  * @param {import('./utilities/log-types.js').LogContext} [context] - Additional context.
120
120
  * @returns {void}
121
121
  */
122
- silly(message: Error | string, context?: import("./utilities/log-types.js").LogContext | undefined): void;
122
+ silly(message: Error | string, context?: import("./utilities/log-types.js").LogContext): void;
123
123
  /**
124
124
  * Set the trail in the new logger.
125
125
  * @param {string} [trail] - The trail id.
126
126
  * @returns {Logger}
127
127
  */
128
- trail(trail?: string | undefined): Logger;
128
+ trail(trail?: string): Logger;
129
129
  /**
130
130
  * Write a log with the level 'warning' - An operation might fail in the future.
131
131
  * @param {Error | string} message - The message to log.
132
132
  * @param {import('./utilities/log-types.js').LogContext} [context] - Additional context.
133
133
  * @returns {void}
134
134
  */
135
- warning(message: Error | string, context?: import("./utilities/log-types.js").LogContext | undefined): void;
135
+ warning(message: Error | string, context?: import("./utilities/log-types.js").LogContext): void;
136
136
  /**
137
137
  * @template [R=unknown]
138
138
  * @param {() => R} callback - The function to wrap the context in.
@@ -146,7 +146,7 @@ export class Logger {
146
146
  * @param {import('./utilities/log-types.js').LogContext} [context] - Context to add to the log (merged with this.context, and Logger.contexts).
147
147
  * @returns {void}
148
148
  */
149
- write(level: import("./utilities/log-types.js").LogLevel, message: Error | string, context?: import("./utilities/log-types.js").LogContext | undefined): void;
149
+ write(level: import("./utilities/log-types.js").LogLevel, message: Error | string, context?: import("./utilities/log-types.js").LogContext): void;
150
150
  #private;
151
151
  }
152
152
  export type Options = {
@@ -9,4 +9,4 @@ export function checkLogLevel(level: import("./log-types.js").LogLevel): boolean
9
9
  * @param {string} [channel] - The channel to check.
10
10
  * @returns {boolean}
11
11
  */
12
- export function checkLogFilters(channel?: string | undefined): boolean;
12
+ export function checkLogFilters(channel?: string): boolean;
@@ -3,7 +3,7 @@
3
3
  * @param {RegExp[]} [fallback] - Fallback to the following allowed regexp.
4
4
  * @returns {{ allowed: RegExp[], blocked: RegExp[] }}
5
5
  */
6
- export function parseFilters(filter?: string | undefined, fallback?: RegExp[] | undefined): {
6
+ export function parseFilters(filter?: string, fallback?: RegExp[]): {
7
7
  allowed: RegExp[];
8
8
  blocked: RegExp[];
9
9
  };
@@ -4,4 +4,4 @@
4
4
  * @param {string} [node] - The current NODE_ENV.
5
5
  * @returns {import('./log-types.js').LogLevel}
6
6
  */
7
- export function parseLogLevel(input?: string | undefined, node?: string | undefined): import("./log-types.js").LogLevel;
7
+ export function parseLogLevel(input?: string, node?: string): import("./log-types.js").LogLevel;
@@ -12,7 +12,7 @@
12
12
  * @param {string} [stack] - The stacktrace to parse.
13
13
  * @returns {Callsite[]}
14
14
  */
15
- export function parseStack(stack?: string | undefined): Callsite[];
15
+ export function parseStack(stack?: string): Callsite[];
16
16
  export type Callsite = {
17
17
  /**
18
18
  * - The file name for the callsite.