Skip to content

Commit aee3500

Browse files
committed
fix: add enable/disable methods to debug stub
The debug stub was missing the `enable()` and `disable()` methods that the debug package provides. This caused errors when socket-cli re-bundles the lib code and calls `debug.enable(namespace)`.
1 parent e6ae8d6 commit aee3500

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/build-externals/stubs/debug.cjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ function debug() {
1515
return function noop() {}
1616
}
1717

18-
// Common debug properties
18+
// Static properties matching the debug package API.
1919
debug.enabled = false
2020
debug.names = []
2121
debug.skips = []
2222
debug.formatters = {}
2323

24+
// Enable/disable debug namespaces (no-op since debug is stubbed out).
25+
debug.enable = function enable() {}
26+
debug.disable = function disable() {
27+
return ''
28+
}
29+
2430
module.exports = debug

0 commit comments

Comments
 (0)