Skip to content

Commit 7123460

Browse files
committed
feature: @putout/engine-runner: debug -> obug
1 parent 70a0d25 commit 7123460

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

packages/engine-runner/lib/debug.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

3-
const debug = require('debug');
3+
const {createDebug} = require('obug');
44

55
module.exports.createDebug = (namespace) => {
6-
const log = debug(namespace);
6+
const log = createDebug(namespace);
77

88
return new Proxy(log, {
99
apply(target, thisArg, args) {

packages/engine-runner/lib/includer/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
'use strict';
22

3-
const log = require('debug')('putout:runner:include');
3+
const {createDebug} = require('../debug');
4+
45
const maybeArray = require('../maybe-array');
56
const {validate} = require('../validate');
6-
7+
const log = createDebug('putout:runner:include');
78
const stub = () => [];
89
const good = () => true;
910

packages/engine-runner/lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const {traverse: defaultTraverse} = require('@putout/babel');
44
const once = require('once');
5-
const debug = require('debug')('putout:runner:find');
5+
const {createDebug} = require('./debug');
66

77
const runFix = require('./run-fix');
88
const mergeVisitors = require('./merge-visitors');
@@ -17,7 +17,7 @@ const {declare} = require('./declarator/index.js');
1717
const {scan} = require('./scanner/index.js');
1818

1919
const {getPath, getPosition} = require('./get-position');
20-
20+
const debug = createDebug('putout:runner:find');
2121
const isRemoved = (a) => a?.removed;
2222

2323
module.exports.runPlugins = ({ast, shebang, fix, fixCount = 2, plugins, progress = createProgress(), traverse = defaultTraverse}) => {

packages/engine-runner/lib/scanner/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ const {
1010
start,
1111
} = require('@putout/operator-filesystem');
1212

13-
const log = require('debug')('putout:runner:scanner');
14-
1513
const fromSimple = require('@putout/plugin-filesystem/from-simple');
1614
const toSimple = require('@putout/plugin-filesystem/to-simple');
15+
const {createDebug} = require('../debug');
16+
const log = createDebug('putout:runner:scanner');
1717

1818
module.exports.scan = ({rule, plugin, msg, options}, {progress}) => {
1919
const {

packages/engine-runner/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
"@putout/operator-filesystem": "^9.0.0",
3737
"@putout/operator-json": "^2.0.0",
3838
"@putout/plugin-filesystem": "^11.0.0",
39-
"debug": "^4.1.1",
4039
"fullstore": "^3.0.0",
4140
"jessy": "^4.0.0",
4241
"nessy": "^5.2.0",
42+
"obug": "^2.1.1",
4343
"once": "^1.4.0",
4444
"try-catch": "^3.0.0",
4545
"wraptile": "^3.0.0"
@@ -68,7 +68,7 @@
6868
},
6969
"license": "MIT",
7070
"engines": {
71-
"node": ">=20"
71+
"node": ">=20.19"
7272
},
7373
"publishConfig": {
7474
"access": "public"

0 commit comments

Comments
 (0)