e22m4u 2 месяцев назад
Родитель
Сommit
6416bf96e1
2 измененных файлов с 12 добавлено и 10 удалено
  1. 7 5
      dist/cjs/index.cjs
  2. 5 5
      package.json

+ 7 - 5
dist/cjs/index.cjs

@@ -558,12 +558,12 @@ var _Debuggable = class _Debuggable {
    * @returns {Function}
    */
   getDebuggerFor(method) {
-    return this.debug.withHash().withNs(method.name);
+    const name = method.name || "anonymous";
+    return this.debug.withHash().withNs(name);
   }
   /**
    * Constructor.
    *
-   * @param {object|undefined} container
    * @param {DebuggableOptions|undefined} options
    */
   constructor(options = void 0) {
@@ -575,10 +575,12 @@ var _Debuggable = class _Debuggable {
     } else {
       this.debug = createDebugger(className);
     }
-    const noEnvNs = Boolean(options.noEnvNs);
-    if (noEnvNs) this.debug = this.debug.withoutEnvNs();
+    const noEnvironmentNamespace = Boolean(options.noEnvironmentNamespace);
+    if (noEnvironmentNamespace) this.debug = this.debug.withoutEnvNs();
     this.ctorDebug = this.debug.withNs("constructor").withHash();
-    this.ctorDebug(_Debuggable.INSTANTIATION_MESSAGE);
+    const noInstantiationMessage = Boolean(options.noInstantiationMessage);
+    if (!noInstantiationMessage)
+      this.ctorDebug(_Debuggable.INSTANTIATION_MESSAGE);
   }
 };
 __name(_Debuggable, "Debuggable");

+ 5 - 5
package.json

@@ -45,13 +45,13 @@
     "@e22m4u/js-repository": "~0.5.0"
   },
   "devDependencies": {
-    "@commitlint/cli": "~19.8.1",
-    "@commitlint/config-conventional": "~19.8.1",
+    "@commitlint/cli": "~20.1.0",
+    "@commitlint/config-conventional": "~20.0.0",
     "@eslint/js": "~9.36.0",
     "c8": "~10.1.3",
-    "chai": "~6.0.1",
+    "chai": "~6.2.0",
     "chai-as-promised": "~8.0.2",
-    "dotenv": "~17.2.2",
+    "dotenv": "~17.2.3",
     "esbuild": "~0.25.10",
     "eslint": "~9.36.0",
     "eslint-config-prettier": "~10.1.8",
@@ -59,7 +59,7 @@
     "eslint-plugin-mocha": "~11.1.0",
     "globals": "~16.4.0",
     "husky": "~9.1.7",
-    "mocha": "~11.7.2",
+    "mocha": "~11.7.3",
     "prettier": "~3.6.2",
     "rimraf": "~6.0.1"
   }