loglevel-mixin 6.1.4 → 6.1.6

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  [![npm](https://img.shields.io/npm/v/loglevel-mixin.svg)](https://www.npmjs.com/package/loglevel-mixin)
2
2
  [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
3
- [![minified size](https://badgen.net/bundlephobia/min/loglevel-mixin)](https://bundlephobia.com/result?p=loglevel-mixin)
3
+ [![Open Bundle](https://bundlejs.com/badge-light.svg)](https://bundlejs.com/?q=loglevel-mixin)
4
4
  [![downloads](http://img.shields.io/npm/dm/loglevel-mixin.svg?style=flat-square)](https://npmjs.org/package/loglevel-mixin)
5
5
  [![GitHub Issues](https://img.shields.io/github/issues/arlac77/loglevel-mixin.svg?style=flat-square)](https://github.com/arlac77/loglevel-mixin/issues)
6
6
  [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Farlac77%2Floglevel-mixin%2Fbadge\&style=flat)](https://actions-badge.atrox.dev/arlac77/loglevel-mixin/goto)
@@ -79,7 +79,7 @@ Type: [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Sta
79
79
 
80
80
  ### Properties
81
81
 
82
- * `entry` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
82
+ * `entry` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
83
83
 
84
84
  ## Loglevel
85
85
 
@@ -87,8 +87,8 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
87
87
 
88
88
  ### Properties
89
89
 
90
- * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
91
- * `priority` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
90
+ * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
91
+ * `priority` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** 
92
92
 
93
93
  ## defaultLogLevels
94
94
 
@@ -137,7 +137,7 @@ obj.info('info entry'); // will redirect to theFunction if obj.loglevel is at le
137
137
  obj.error('error entry'); // will redirect to theFunction if obj.loglevel is at least error
138
138
  ```
139
139
 
140
- Returns **[undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined)**
140
+ Returns **[undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined)** 
141
141
 
142
142
  ## LOGLEVEL
143
143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loglevel-mixin",
3
- "version": "6.1.4",
3
+ "version": "6.1.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -22,17 +22,17 @@
22
22
  "license": "BSD-2-Clause",
23
23
  "scripts": {
24
24
  "test": "npm run test:ava",
25
- "test:ava": "ava --timeout 2m tests/*.mjs",
26
- "cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 2m tests/*.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
25
+ "test:ava": "ava --timeout 2m tests/*-ava.mjs tests/*-ava-node.mjs",
26
+ "cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 2m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
27
27
  "docs": "documentation readme --section=API ./src/**/*.mjs",
28
28
  "lint": "npm run lint:docs",
29
29
  "lint:docs": "documentation lint ./src/**/*.mjs"
30
30
  },
31
31
  "devDependencies": {
32
- "ava": "^4.3.0",
33
- "c8": "^7.11.3",
34
- "documentation": "^13.2.5",
35
- "semantic-release": "^19.0.3"
32
+ "ava": "^5.1.0",
33
+ "c8": "^7.12.0",
34
+ "documentation": "^14.0.1",
35
+ "semantic-release": "^19.0.5"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=14.19.1"
@@ -74,24 +74,22 @@ export function defineLoggerMethods(
74
74
  {
75
75
  value:
76
76
  theFunction === undefined
77
- ? function(arg,...args) {
77
+ ? function (arg, ...args) {
78
78
  if (this.logLevelPriority >= priority) {
79
79
  this.log(
80
80
  name,
81
- typeof arg === "function"
82
- ? arg(name)
83
- : arg, ...args
81
+ typeof arg === "function" ? arg(name) : arg,
82
+ ...args
84
83
  );
85
84
  }
86
85
  }
87
- : function(arg,...args) {
86
+ : function (arg, ...args) {
88
87
  if (this.logLevelPriority >= priority) {
89
88
  theFunction.call(
90
89
  this,
91
90
  name,
92
- typeof arg === "function"
93
- ? arg(name)
94
- : arg, ...args
91
+ typeof arg === "function" ? arg(name) : arg,
92
+ ...args
95
93
  );
96
94
  }
97
95
  },
@@ -131,7 +129,6 @@ export function LogLevelMixin(
131
129
  initialLogLevel = defaultLogLevels.info
132
130
  ) {
133
131
  const newClass = class extends superclass {
134
-
135
132
  constructor(...args) {
136
133
  super(...args);
137
134
  this[LOGLEVEL] = initialLogLevel;