node-opcua-leak-detector 2.154.0 → 2.157.0

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": "node-opcua-leak-detector",
3
- "version": "2.154.0",
3
+ "version": "2.157.0",
4
4
  "description": "pure nodejs OPCUA SDK - module leak-detector",
5
5
  "main": "index.js",
6
6
  "type": "index.d.ts",
@@ -11,12 +11,6 @@
11
11
  },
12
12
  "author": "Etienne Rossignon",
13
13
  "license": "MIT",
14
- "dependencies": {
15
- "chalk": "4.1.2",
16
- "node-opcua-assert": "2.139.0",
17
- "node-opcua-debug": "2.153.0",
18
- "node-opcua-object-registry": "2.153.0"
19
- },
20
14
  "repository": {
21
15
  "type": "git",
22
16
  "url": "git://github.com/node-opcua/node-opcua.git"
@@ -30,8 +24,13 @@
30
24
  "internet of things"
31
25
  ],
32
26
  "homepage": "http://node-opcua.github.io/",
33
- "gitHead": "134c73195f93f46c0101b2837bed22754156c916",
27
+ "gitHead": "e0a948ac5379ae8d9cc8200a1b4a31515a35be37",
34
28
  "files": [
35
29
  "src"
36
- ]
30
+ ],
31
+ "dependencies": {
32
+ "chalk": "4.1.2",
33
+ "node-opcua-assert": "2.157.0",
34
+ "node-opcua-object-registry": "2.157.0"
35
+ }
37
36
  }
@@ -347,7 +347,23 @@ ResourceLeakDetector.prototype.stop = function(info) {
347
347
  ResourceLeakDetector.singleton = new ResourceLeakDetector();
348
348
  const resourceLeakDetector = ResourceLeakDetector.singleton;
349
349
 
350
- const { traceFromThisProjectOnly } = require("node-opcua-debug");
350
+ // Local implementation to break cyclic dependency with node-opcua-debug
351
+ function traceFromThisProjectOnly(err) {
352
+ const str = [];
353
+ str.push(" display_trace_from_this_project_only = ");
354
+ if (err) {
355
+ str.push(err.message);
356
+ }
357
+ err = err || new Error("Error used to extract stack trace");
358
+ let stack = err.stack;
359
+ if (stack) {
360
+ stack = stack.split("\n").filter((el) => el.match(/node-opcua/) && !el.match(/node_modules/));
361
+ str.push(stack.join("\n"));
362
+ } else {
363
+ str.push(" NO STACK TO TRACE !!!!");
364
+ }
365
+ return str.join("\n");
366
+ }
351
367
 
352
368
  let testHasFailed = false;
353
369