@itwin/build-tools 5.1.0-dev.5 → 5.1.0-dev.52

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/CHANGELOG.md CHANGED
@@ -1,6 +1,73 @@
1
1
  # Change Log - @itwin/build-tools
2
2
 
3
- This log was last generated on Thu, 10 Apr 2025 17:50:15 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 26 Jun 2025 22:17:28 GMT and should not be manually modified.
4
+
5
+ ## 5.0.2
6
+ Thu, 26 Jun 2025 22:16:01 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 5.0.1
11
+ Tue, 17 Jun 2025 18:33:51 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 5.0.0
16
+ Fri, 13 Jun 2025 20:25:38 GMT
17
+
18
+ ### Updates
19
+
20
+ - Bump `typedoc-plugin-merge-modules` dependency to a version that supports typedoc `0.26`.
21
+ - Bump `typedoc` dependency to a version that supports typescript `5.6`.
22
+ - Deprecate unused --includes flag
23
+ - Fix `typedoc` not finding `typedoc-plugin-merge-modules` plugin when hoisting is disabled.
24
+ - add temporary fix for typedoc@0.26 issue #2802
25
+ - Upgrade @microsoft/api-extractor to 7.49
26
+ - Upgrade compile target to ES2023
27
+ - Dropped support for Node 18
28
+ - Enabled `useDefineForClassFields` TypeScript config flag
29
+ - Bumped `cross-spawn` to `7.0.5`
30
+ - Add a `tsconfig` option to `docs` command to allow specifying a custom TS configuration.
31
+
32
+ ## 4.11.6
33
+ Mon, 16 Jun 2025 15:00:15 GMT
34
+
35
+ _Version update only_
36
+
37
+ ## 4.11.5
38
+ Fri, 06 Jun 2025 13:41:18 GMT
39
+
40
+ _Version update only_
41
+
42
+ ## 4.11.4
43
+ Tue, 03 Jun 2025 16:15:19 GMT
44
+
45
+ _Version update only_
46
+
47
+ ## 4.11.3
48
+ Wed, 28 May 2025 13:56:22 GMT
49
+
50
+ _Version update only_
51
+
52
+ ## 4.11.2
53
+ Tue, 20 May 2025 20:14:45 GMT
54
+
55
+ _Version update only_
56
+
57
+ ## 4.11.1
58
+ Wed, 30 Apr 2025 13:13:21 GMT
59
+
60
+ _Version update only_
61
+
62
+ ## 4.11.0
63
+ Wed, 16 Apr 2025 15:50:28 GMT
64
+
65
+ ### Updates
66
+
67
+ - Bump `typedoc` dependency to a version that supports typescript `5.6`.
68
+ - Deprecate unused --includes flag
69
+ - add temporary fix for typedoc@0.26 issue #2802
70
+ - Bumped `cross-spawn` to `7.0.5`
4
71
 
5
72
  ## 4.10.13
6
73
  Thu, 10 Apr 2025 17:47:21 GMT
@@ -57,9 +57,54 @@ Object.defineProperty(Base, "color", {
57
57
  });
58
58
  class BentleyMochaReporter extends Spec {
59
59
  _junitReporter;
60
+ _chrome = false;
61
+ _electron = true;
60
62
  constructor(_runner, _options) {
61
63
  super(...arguments);
62
64
  this._junitReporter = new MochaJUnitReporter(...arguments);
65
+ // Detect hangs caused by tests that leave timers/other handles open - not possible in electron frontends.
66
+ if (!("electron" in process.versions)) {
67
+ this._electron = false;
68
+ if (process.argv.length > 1 && process.argv[1].endsWith("certa.js")) {
69
+ for (let i = 2; i < process.argv.length; ++i) {
70
+ if (process.argv[i] === "-r") {
71
+ if (i + 1 < process.argv.length && process.argv[i + 1] === "chrome") {
72
+ this._chrome = true;
73
+ process.on("chrome-test-runner-done", () => {
74
+ this.confirmExit();
75
+ });
76
+ }
77
+ break;
78
+ }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ confirmExit(seconds = 30) {
84
+ // NB: By calling unref() on this timer, we stop it from keeping the process alive, so it will only fire if _something else_ is still keeping
85
+ // the process alive after n seconds. This also has the benefit of preventing the timer from showing up in wtfnode's dump of open handles.
86
+ setTimeout(() => {
87
+ logBuildError(`Handle leak detected. Node was still running ${seconds} seconds after tests completed.`);
88
+ if (debugLeaks) {
89
+ const wtf = require("wtfnode");
90
+ wtf.setLogger("info", console.error);
91
+ wtf.dump();
92
+ let activeResourcesInfo = process.getActiveResourcesInfo(); // https://nodejs.dev/en/api/v18/process#processgetactiveresourcesinfo (Not added to @types/node yet I suppose)
93
+ console.error(activeResourcesInfo);
94
+ activeResourcesInfo = activeResourcesInfo.map((value) => value.toLowerCase());
95
+ // asyncResourceStats.set(asyncId, {before: 0, after: 0, type, eid, triggerAsyncId, initStack: stack});
96
+ asyncResourceStats.forEach((value, key) => {
97
+ if (activeResourcesInfo.includes(value.type.toLowerCase())) {
98
+ console.error(`asyncId: ${key}: type: ${value.type}, eid: ${value.eid},triggerAsyncId: ${value.triggerAsyncId}, initStack: ${value.initStack}`);
99
+ }
100
+ });
101
+ }
102
+ else {
103
+ console.error("Try running with the DEBUG_LEAKS env var set to see open handles.");
104
+ }
105
+ // Not sure why, but process.exit(1) wasn't working here...
106
+ process.kill(process.pid);
107
+ }, seconds * 1000).unref();
63
108
  }
64
109
  epilogue(...args) {
65
110
  // Force test errors to be printed to stderr instead of stdout.
@@ -77,31 +122,9 @@ class BentleyMochaReporter extends Spec {
77
122
  }
78
123
  }
79
124
  // Detect hangs caused by tests that leave timers/other handles open - not possible in electron frontends.
80
- if (!("electron" in process.versions)) {
81
- // NB: By calling unref() on this timer, we stop it from keeping the process alive, so it will only fire if _something else_ is still keeping
82
- // the process alive after 30 seconds. This also has the benefit of preventing the timer from showing up in wtfnode's dump of open handles.
83
- setTimeout(() => {
84
- logBuildError(`Handle leak detected. Node was still running 30 seconds after tests completed.`);
85
- if (debugLeaks) {
86
- const wtf = require("wtfnode");
87
- wtf.setLogger("info", console.error);
88
- wtf.dump();
89
- let activeResourcesInfo = process.getActiveResourcesInfo(); // https://nodejs.dev/en/api/v18/process#processgetactiveresourcesinfo (Not added to @types/node yet I suppose)
90
- console.error(activeResourcesInfo);
91
- activeResourcesInfo = activeResourcesInfo.map((value) => value.toLowerCase());
92
- // asyncResourceStats.set(asyncId, {before: 0, after: 0, type, eid, triggerAsyncId, initStack: stack});
93
- asyncResourceStats.forEach((value, key) => {
94
- if (activeResourcesInfo.includes(value.type.toLowerCase())) {
95
- console.error(`asyncId: ${key}: type: ${value.type}, eid: ${value.eid},triggerAsyncId: ${value.triggerAsyncId}, initStack: ${value.initStack}`);
96
- }
97
- });
98
- }
99
- else {
100
- console.error("Try running with the DEBUG_LEAKS env var set to see open handles.");
101
- }
102
- // Not sure why, but process.exit(1) wasn't working here...
103
- process.kill(process.pid);
104
- }, 30 * 1000).unref();
125
+ if (!this._electron && !this._chrome) {
126
+ // Not running in Chrome or Electron, so check for open handles.
127
+ this.confirmExit(30);
105
128
  }
106
129
  if (!this.stats.pending)
107
130
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/build-tools",
3
- "version": "5.1.0-dev.5",
3
+ "version": "5.1.0-dev.52",
4
4
  "description": "Bentley build tools",
5
5
  "license": "MIT",
6
6
  "repository": {