@itwin/build-tools 5.1.0-dev.9 → 5.1.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/CHANGELOG.md CHANGED
@@ -1,6 +1,78 @@
1
1
  # Change Log - @itwin/build-tools
2
2
 
3
- This log was last generated on Wed, 30 Apr 2025 13:16:15 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 08 Aug 2025 12:51:53 GMT and should not be manually modified.
4
+
5
+ ## 5.1.0
6
+ Fri, 08 Aug 2025 12:51:53 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 5.0.5
11
+ Wed, 06 Aug 2025 15:34:15 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 5.0.4
16
+ Wed, 16 Jul 2025 14:59:59 GMT
17
+
18
+ _Version update only_
19
+
20
+ ## 5.0.3
21
+ Fri, 11 Jul 2025 00:56:56 GMT
22
+
23
+ _Version update only_
24
+
25
+ ## 5.0.2
26
+ Thu, 26 Jun 2025 22:16:01 GMT
27
+
28
+ _Version update only_
29
+
30
+ ## 5.0.1
31
+ Tue, 17 Jun 2025 18:33:51 GMT
32
+
33
+ _Version update only_
34
+
35
+ ## 5.0.0
36
+ Fri, 13 Jun 2025 20:25:38 GMT
37
+
38
+ ### Updates
39
+
40
+ - Bump `typedoc-plugin-merge-modules` dependency to a version that supports typedoc `0.26`.
41
+ - Bump `typedoc` dependency to a version that supports typescript `5.6`.
42
+ - Deprecate unused --includes flag
43
+ - Fix `typedoc` not finding `typedoc-plugin-merge-modules` plugin when hoisting is disabled.
44
+ - add temporary fix for typedoc@0.26 issue #2802
45
+ - Upgrade @microsoft/api-extractor to 7.49
46
+ - Upgrade compile target to ES2023
47
+ - Dropped support for Node 18
48
+ - Enabled `useDefineForClassFields` TypeScript config flag
49
+ - Bumped `cross-spawn` to `7.0.5`
50
+ - Add a `tsconfig` option to `docs` command to allow specifying a custom TS configuration.
51
+
52
+ ## 4.11.6
53
+ Mon, 16 Jun 2025 15:00:15 GMT
54
+
55
+ _Version update only_
56
+
57
+ ## 4.11.5
58
+ Fri, 06 Jun 2025 13:41:18 GMT
59
+
60
+ _Version update only_
61
+
62
+ ## 4.11.4
63
+ Tue, 03 Jun 2025 16:15:19 GMT
64
+
65
+ _Version update only_
66
+
67
+ ## 4.11.3
68
+ Wed, 28 May 2025 13:56:22 GMT
69
+
70
+ _Version update only_
71
+
72
+ ## 4.11.2
73
+ Tue, 20 May 2025 20:14:45 GMT
74
+
75
+ _Version update only_
4
76
 
5
77
  ## 4.11.1
6
78
  Wed, 30 Apr 2025 13:13: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.9",
3
+ "version": "5.1.0",
4
4
  "description": "Bentley build tools",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,15 +38,16 @@
38
38
  "yargs": "^17.4.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@itwin/eslint-plugin": "5.0.0-dev.1",
41
+ "@itwin/eslint-plugin": "5.2.2-dev.2",
42
42
  "@types/node": "~20.17.0",
43
- "eslint": "^9.13.0"
43
+ "eslint": "^9.31.0"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "tsc 1>&2",
47
47
  "clean": "rimraf -g ../../modules .rush/temp/package-deps*.json",
48
48
  "docs": "",
49
49
  "lint": "eslint \"./src/**/*.ts\" 1>&2",
50
+ "lint-deprecation": "eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \"./src/**/*.ts\"",
50
51
  "test": "",
51
52
  "cover": ""
52
53
  }