loglevel-mixin 7.2.6 → 7.2.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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (C) 2015-2025 by Markus Felten
1
+ Copyright (C) 2015-2026 by Markus Felten
2
2
 
3
3
  Permission to use, copy, modify, and/or distribute this software for any
4
4
  purpose with or without fee is hereby granted.
package/README.md CHANGED
@@ -8,7 +8,6 @@
8
8
  [![Styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
9
9
  [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
10
10
  [![Known Vulnerabilities](https://snyk.io/test/github/arlac77/loglevel-mixin/badge.svg)](https://snyk.io/test/github/arlac77/loglevel-mixin)
11
- [![Coverage Status](https://coveralls.io/repos/arlac77/loglevel-mixin/badge.svg)](https://coveralls.io/github/arlac77/loglevel-mixin)
12
11
 
13
12
  # loglevel-mixin
14
13
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "loglevel-mixin",
3
- "version": "7.2.6",
3
+ "version": "7.2.8",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
7
7
  },
8
- "packageManager": "npm@11.6.4+sha512.1118cab46a05a50aee6bff5b1b4fa1df18afff89d57465620a3518035026955db87c5bdf9d207b07b7487d99f2490d450cb774655ad63ec2cba7bf1d0ad25d45",
8
+ "packageManager": "npm@11.10.0+sha512.8bc844e37892200305b98562f13c6c10849d10b3387c8cdaeb4d1a2e32746a79063cba9dd284cf28c26a01c3bf4169b7d3b31b4a5586cc970d6749463108073c",
9
9
  "types": "./types/loglevel-mixin.d.mts",
10
10
  "exports": {
11
11
  ".": {
@@ -39,14 +39,14 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "ava": "^6.4.1",
42
- "browser-ava": "^2.3.44",
42
+ "browser-ava": "^2.3.53",
43
43
  "c8": "^10.1.3",
44
44
  "documentation": "^14.0.3",
45
- "semantic-release": "^25.0.2",
45
+ "semantic-release": "^25.0.3",
46
46
  "typescript": "^5.9.3"
47
47
  },
48
48
  "engines": {
49
- "node": ">=24.11.1"
49
+ "node": ">=24.13.1"
50
50
  },
51
51
  "repository": {
52
52
  "type": "git",
@@ -59,11 +59,7 @@ export function declareLevels(list) {
59
59
  * obj.info('info entry'); // will redirect to theFunction if obj.loglevel is at least info
60
60
  * obj.error('error entry'); // will redirect to theFunction if obj.loglevel is at least error
61
61
  */
62
- export function defineLoggerMethods(
63
- object,
64
- logLevels = defaultLogLevels,
65
- theFunction
66
- ) {
62
+ export function defineLoggerMethods(object, logLevels, theFunction) {
67
63
  Object.defineProperties(
68
64
  object,
69
65
  Object.fromEntries(
@@ -139,7 +135,11 @@ export function LogLevelMixin(
139
135
  * @param {string} level
140
136
  */
141
137
  set logLevel(level) {
142
- this.#logLevel = logLevels[level] || initialLogLevel;
138
+ const logLevel = logLevels[level];
139
+
140
+ if (logLevel) {
141
+ this.#logLevel = logLevel;
142
+ }
143
143
  }
144
144
 
145
145
  /**
@@ -20,7 +20,7 @@ export function declareLevels(list: string[]): any;
20
20
  * obj.info('info entry'); // will redirect to theFunction if obj.loglevel is at least info
21
21
  * obj.error('error entry'); // will redirect to theFunction if obj.loglevel is at least error
22
22
  */
23
- export function defineLoggerMethods(object: any, logLevels?: any, theFunction?: Logger): void;
23
+ export function defineLoggerMethods(object: any, logLevels: any, theFunction?: Logger): void;
24
24
  /**
25
25
  * <!-- skip-example -->
26
26
  * @class