debug-logfmt 1.4.0 → 1.4.3

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.md CHANGED
File without changes
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "debug-logfmt",
3
3
  "description": "debug module using logfmt format",
4
4
  "homepage": "https://github.com/Kikobeats/debug-logfmt",
5
- "version": "1.4.0",
5
+ "version": "1.4.3",
6
6
  "types": "./src/index.d.ts",
7
7
  "main": "src/index.js",
8
8
  "exports": {
@@ -40,7 +40,7 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "@kikobeats/time-span": "~1.0.5",
43
- "debug-fabulous": "~2.0.8",
43
+ "null-prototype-object": "~1.2.2",
44
44
  "pretty-ms": "~7.0.1"
45
45
  },
46
46
  "devDependencies": {
@@ -67,6 +67,19 @@
67
67
  "files": [
68
68
  "src"
69
69
  ],
70
+ "scripts": {
71
+ "clean": "rm -rf node_modules",
72
+ "contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
73
+ "coverage": "nyc report --reporter=text-lcov | coveralls",
74
+ "lint": "standard",
75
+ "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
76
+ "pretest": "npm run lint",
77
+ "pretty": "prettier-standard index.js {core,test,bin,scripts}/**/*.js --single-quote --print-width 100",
78
+ "release": "standard-version -a",
79
+ "release:github": "github-generate-release",
80
+ "release:tags": "git push --follow-tags origin HEAD:master",
81
+ "test": "c8 ava"
82
+ },
70
83
  "license": "MIT",
71
84
  "commitlint": {
72
85
  "extends": [
@@ -96,18 +109,5 @@
96
109
  "simple-git-hooks": {
97
110
  "commit-msg": "npx commitlint --edit",
98
111
  "pre-commit": "npx nano-staged"
99
- },
100
- "scripts": {
101
- "clean": "rm -rf node_modules",
102
- "contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
103
- "coverage": "nyc report --reporter=text-lcov | coveralls",
104
- "lint": "standard",
105
- "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
106
- "pretest": "npm run lint",
107
- "pretty": "prettier-standard index.js {core,test,bin,scripts}/**/*.js --single-quote --print-width 100",
108
- "release": "standard-version -a",
109
- "release:github": "github-generate-release",
110
- "release:tags": "git push --follow-tags origin HEAD:master",
111
- "test": "c8 ava"
112
112
  }
113
- }
113
+ }
package/src/index.js CHANGED
@@ -23,7 +23,7 @@ if (process.env.DEBUG_COLORS === 'false') {
23
23
  }
24
24
  }
25
25
 
26
- const createDebug = require('debug-fabulous')(origDebug)
26
+ const createDebug = require('./lazy')(origDebug)
27
27
 
28
28
  const LEVELS = ['info', 'warn', 'error']
29
29
 
package/src/lazy.js ADDED
@@ -0,0 +1,7 @@
1
+ 'use strict'
2
+
3
+ const NullProtoObj = require('null-prototype-object')
4
+
5
+ const cache = new NullProtoObj()
6
+
7
+ module.exports = ctx => namespace => cache[namespace] || (cache[namespace] = ctx(namespace))