debug-fabulous 2.0.2 → 2.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "debug-fabulous",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "visionmedia debug extensions rolled into one",
5
5
  "keywords": [
6
6
  "debug",
@@ -22,19 +22,15 @@
22
22
  "umd"
23
23
  ],
24
24
  "scripts": {
25
- "build": "npm run gulp default && npm run roll:it",
25
+ "build": "rollup -c ./rollup.config.js",
26
26
  "coveralls": "cat ./coverage/lcov.info | coveralls",
27
- "docs:api:markdown": "npm run typedoc --theme markdown --exclude ./src/test --out ./docs/api ./src",
28
- "docs:api:website": "npm run typedoc --exclude ./src/test --out docs ./src",
29
- "gulp": "node -r esm ./node_modules/.bin/gulp",
30
- "jest": "node -r esm ./node_modules/.bin/jest",
31
- "lint": "eslint --ext .js,.ts,.tsx *.js src test --color",
27
+ "docs:api:markdown": "npx typedoc --theme markdown --exclude ./src/test --out ./docs/api ./src",
28
+ "docs:api:website": "npx typedoc --exclude ./src/test --out docs ./src",
29
+ "jest": "npx jest",
30
+ "lint": "npm run build && eslint --ext .js,.ts,.tsx *.js src test --color",
32
31
  "mocha": "mocha",
33
- "postinstall:1": "js-common-editorconfig-clone && js-common-babel-config-clone",
34
- "postinstall:2": "js-common-prettierrc-clone",
35
- "prepare": "npm run postinstall:1 && npm run postinstall:2 && sort-package-json",
36
- "roll:it": "rollup -c ./rollup.config.ts",
37
- "test": "npm run lint && npm run jest",
32
+ "prepare": "npx sort-package-json",
33
+ "test": "npm run build && npm run jest",
38
34
  "test:ci": "npm run build && npm run test --coverage && npm run coveralls",
39
35
  "preversion": "npm run build"
40
36
  },
@@ -43,36 +39,29 @@
43
39
  "memoizee": "0.4"
44
40
  },
45
41
  "devDependencies": {
46
- "@raghb1/node-memwatch": "^3.0.1",
42
+ "@biiaidt/node-memwatch": "2.0.1",
43
+ "@commitlint/cli": "^19",
44
+ "@commitlint/config-conventional": "^19",
45
+ "@rollup/plugin-commonjs": "^26.0.1",
46
+ "@rollup/plugin-typescript": "^11.1.6",
47
47
  "@types/debug": "^4",
48
- "@znemz/js-common-babel-config": "^0.0.23",
49
- "@znemz/js-common-babel-config-clone": "^0.0.23",
50
- "@znemz/js-common-editorconfig-clone": "^0.0.23",
51
- "@znemz/js-common-eslint-config": "^0.2.1",
52
- "@znemz/js-common-gulp-monorepo-typescript": "^0.0.23",
53
- "@znemz/js-common-prettierrc-clone": "^0.0.23",
54
- "@znemz/react-extras-jest": "^1.1.0",
48
+ "@types/jest": "^29.5.13",
49
+ "@znemz/js-common-eslint-config": "^0.2.2",
50
+ "@znemz/react-extras-jest": "1.5.1",
55
51
  "JSONStream": "1.X",
56
- "bluebird": "^3.5.5",
52
+ "commitlint": "19",
57
53
  "config": "^3.2.2",
58
54
  "coveralls": "^3.0.4",
59
55
  "del": "^4.1.1",
60
- "esm": "^3.2.22",
61
- "gulp-run": "^1.7.1",
62
- "gulp-typescript": "^5.0.1",
63
56
  "hook-std": "0.X",
57
+ "jest": "^29.7.0",
64
58
  "prettier": "^1.18.2",
65
- "react": "^16.8",
66
- "rollup": "^1.20.1",
67
- "rollup-plugin-commonjs": "^10.1.0",
68
- "rollup-plugin-typescript": "^1.0.1",
69
- "sort-package-json": "^1.21.0",
70
- "typedoc": "~0.15.0",
71
- "typedoc-plugin-markdown": "~2.1.4",
72
- "typescript": "~4.4"
59
+ "rollup": "4.21.3",
60
+ "sort-package-json": "^2.10.1",
61
+ "typescript": "^4.2.4"
73
62
  },
74
63
  "engines": {
75
- "node": ">= 8"
64
+ "node": ">= 14"
76
65
  },
77
66
  "umd": "umd/index.js"
78
67
  }
@@ -1,4 +0,0 @@
1
- import { Debug } from 'debug';
2
- import { DebugLazy } from './internals';
3
- declare function debugFactory(debugApi?: Debug): DebugLazy;
4
- export default debugFactory;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var lazyEval_1 = __importDefault(require("./extensions/lazyEval"));
7
- function debugFactory(debugApi) {
8
- if (debugApi === void 0) { debugApi = require('debug'); }
9
- debugApi = (0, lazyEval_1.default)(debugApi);
10
- return debugApi;
11
- }
12
- module.exports = debugFactory;
13
- exports.default = debugFactory;
@@ -1,3 +0,0 @@
1
- import { Debug } from 'debug';
2
- declare const lazyEval: (debugInst: Debug) => any;
3
- export default lazyEval;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
- if (ar || !(i in from)) {
5
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
- ar[i] = from[i];
7
- }
8
- }
9
- return to.concat(ar || Array.prototype.slice.call(from));
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- var memoizee_1 = __importDefault(require("memoizee"));
16
- var extend = function (_debugger) {
17
- var wrapped = function (formatter) {
18
- var args = [];
19
- for (var _i = 1; _i < arguments.length; _i++) {
20
- args[_i - 1] = arguments[_i];
21
- }
22
- if (typeof formatter === 'function') {
23
- var ret = formatter();
24
- var toApply = Array.isArray(ret) ? ret : [ret];
25
- return _debugger.apply(void 0, toApply);
26
- }
27
- return _debugger.apply(void 0, __spreadArray([formatter], args, false));
28
- };
29
- return Object.assign(wrapped, _debugger);
30
- };
31
- var lazyEval = function (debugInst) {
32
- function debug(namespace) {
33
- function noop() { }
34
- var instance = debugInst(namespace);
35
- if (!instance.enabled) {
36
- return Object.assign(noop, instance);
37
- }
38
- return extend(instance);
39
- }
40
- var debugMemoized = (0, memoizee_1.default)(debug);
41
- return Object.assign(debugMemoized, debugInst);
42
- };
43
- exports.default = lazyEval;
@@ -1,2 +0,0 @@
1
- import { DebuggerExtSpawn, DebugFabulous } from '../internals';
2
- export default function spawnFactory(namespace?: string, debugFabFactory?: DebugFabulous): DebuggerExtSpawn;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function spawnFactory(namespace, debugFabFactory) {
4
- if (namespace === void 0) { namespace = ''; }
5
- if (debugFabFactory === void 0) { debugFabFactory = require('../debugFabFactory')(); }
6
- function createDebugger(base, ns) {
7
- if (base === void 0) { base = ''; }
8
- if (ns === void 0) { ns = ''; }
9
- var newNs = ns ? [base, ns].join(':') : base;
10
- var debug = debugFabFactory(newNs);
11
- debug.spawn = spawn;
12
- return debug;
13
- }
14
- function spawn(ns) {
15
- return createDebugger(this.namespace, ns);
16
- }
17
- return createDebugger(namespace);
18
- }
19
- exports.default = spawnFactory;
package/lib/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { DebugFabulous } from './internals';
2
- export * from './internals';
3
- declare const fabulous: DebugFabulous;
4
- export default fabulous;
package/lib/index.js DELETED
@@ -1,21 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- var __importDefault = (this && this.__importDefault) || function (mod) {
13
- return (mod && mod.__esModule) ? mod : { "default": mod };
14
- };
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- var debugFabFactory_1 = __importDefault(require("./debugFabFactory"));
17
- var spawn_1 = __importDefault(require("./extensions/spawn"));
18
- __exportStar(require("./internals"), exports);
19
- var fabulous = Object.assign(debugFabFactory_1.default, { spawnable: spawn_1.default });
20
- module.exports = fabulous;
21
- exports.default = fabulous;
@@ -1,17 +0,0 @@
1
- import { Debug, Debugger } from 'debug';
2
- export interface DebugLazy extends Debug {
3
- (namespace: string): DebuggerExt;
4
- }
5
- export interface DebugFabulous extends DebugLazy {
6
- (namespace: string): DebuggerExt;
7
- spawnable: (_namespace: string, _debugFabFactory?: Debug) => DebuggerExtSpawn;
8
- }
9
- export declare type LazyDebugFunc = () => string | any[];
10
- export interface DebuggerExt extends Debugger {
11
- (lazyFunc: LazyDebugFunc): void;
12
- (...args: any[]): void;
13
- spawn: (ns: string) => DebuggerExt;
14
- }
15
- export interface DebuggerExtSpawn extends DebuggerExt {
16
- spawn: (ns: string) => DebuggerExt;
17
- }
package/lib/internals.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });