@itwin/build-tools 4.1.0-dev.8 → 4.1.0-dev.80

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,82 @@
1
1
  # Change Log - @itwin/build-tools
2
2
 
3
- This log was last generated on Tue, 25 Apr 2023 17:50:35 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 24 Jul 2023 12:35:20 GMT and should not be manually modified.
4
+
5
+ ## 4.0.6
6
+ Mon, 24 Jul 2023 05:07:33 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 4.0.5
11
+ Tue, 18 Jul 2023 12:21:56 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 4.0.4
16
+ Wed, 12 Jul 2023 15:50:01 GMT
17
+
18
+ _Version update only_
19
+
20
+ ## 4.0.3
21
+ Mon, 03 Jul 2023 15:28:41 GMT
22
+
23
+ _Version update only_
24
+
25
+ ## 4.0.2
26
+ Wed, 21 Jun 2023 22:04:43 GMT
27
+
28
+ _Version update only_
29
+
30
+ ## 4.0.1
31
+ Wed, 21 Jun 2023 20:29:13 GMT
32
+
33
+ _Version update only_
34
+
35
+ ## 4.0.0
36
+ Mon, 22 May 2023 15:34:14 GMT
37
+
38
+ ### Updates
39
+
40
+ - typescript 5 compatibility
41
+ - Support non-rush repositories by allowing to specify output file locations.
42
+ - Update to eslint@8
43
+ - Fixed 'betools docs' script to set 'packageRoot' to correct relative path from root to package source.
44
+ - Upgrade TypeScript compile target to es2021.
45
+
46
+ ## 3.7.11
47
+ Tue, 11 Jul 2023 17:17:21 GMT
48
+
49
+ _Version update only_
50
+
51
+ ## 3.7.10
52
+ Wed, 05 Jul 2023 13:41:21 GMT
53
+
54
+ _Version update only_
55
+
56
+ ## 3.7.9
57
+ Tue, 20 Jun 2023 12:51:02 GMT
58
+
59
+ _Version update only_
60
+
61
+ ## 3.7.8
62
+ Thu, 01 Jun 2023 17:00:39 GMT
63
+
64
+ _Version update only_
65
+
66
+ ## 3.7.7
67
+ Wed, 24 May 2023 17:27:09 GMT
68
+
69
+ _Version update only_
70
+
71
+ ## 3.7.6
72
+ Mon, 15 May 2023 18:23:40 GMT
73
+
74
+ _Version update only_
75
+
76
+ ## 3.7.5
77
+ Thu, 04 May 2023 19:43:18 GMT
78
+
79
+ _Version update only_
4
80
 
5
81
  ## 3.7.4
6
82
  Tue, 25 Apr 2023 17:50:35 GMT
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
2
  /*---------------------------------------------------------------------------------------------
4
3
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
5
4
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -8,10 +7,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
8
7
  /* eslint-disable @typescript-eslint/no-var-requires */
9
8
  /* eslint-disable no-console */
10
9
  const debugLeaks = process.env.DEBUG_LEAKS;
11
- if (debugLeaks)
10
+ let asyncResourceStats;
11
+ if (debugLeaks) {
12
12
  require("wtfnode");
13
- const path = require("path");
13
+ asyncResourceStats = new Map();
14
+ setupAsyncHooks();
15
+ }
16
+ function setupAsyncHooks() {
17
+ const async_hooks = require("node:async_hooks");
18
+ const init = (asyncId, type, triggerAsyncId, _resource) => {
19
+ const eid = async_hooks.executionAsyncId(); // (An executionAsyncId() of 0 means that it is being executed from C++ with no JavaScript stack above it.)
20
+ const stack = new Error().stack;
21
+ asyncResourceStats.set(asyncId, { type, eid, triggerAsyncId, initStack: stack });
22
+ };
23
+ const destroy = (asyncId) => {
24
+ if (asyncResourceStats.get(asyncId) === undefined) {
25
+ return;
26
+ }
27
+ asyncResourceStats.delete(asyncId);
28
+ };
29
+ const asyncHook = async_hooks.createHook({ init, destroy });
30
+ asyncHook.enable();
31
+ }
14
32
  const fs = require("fs-extra");
33
+ const path = require("path");
15
34
  const { logBuildWarning, logBuildError, failBuild } = require("../scripts/utils/utils");
16
35
  const Base = require("mocha/lib/reporters/base");
17
36
  const Spec = require("mocha/lib/reporters/spec");
@@ -66,6 +85,15 @@ class BentleyMochaReporter extends Spec {
66
85
  const wtf = require("wtfnode");
67
86
  wtf.setLogger("info", console.error);
68
87
  wtf.dump();
88
+ let activeResourcesInfo = process.getActiveResourcesInfo(); // https://nodejs.dev/en/api/v18/process#processgetactiveresourcesinfo (Not added to @types/node yet I suppose)
89
+ console.error(activeResourcesInfo);
90
+ activeResourcesInfo = activeResourcesInfo.map((value) => value.toLowerCase());
91
+ // asyncResourceStats.set(asyncId, {before: 0, after: 0, type, eid, triggerAsyncId, initStack: stack});
92
+ asyncResourceStats.forEach((value, key) => {
93
+ if (activeResourcesInfo.includes(value.type.toLowerCase())) {
94
+ console.error(`asyncId: ${key}: type: ${value.type}, eid: ${value.eid},triggerAsyncId: ${value.triggerAsyncId}, initStack: ${value.initStack}`);
95
+ }
96
+ });
69
97
  }
70
98
  else {
71
99
  console.error("Try running with the DEBUG_LEAKS env var set to see open handles.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/build-tools",
3
- "version": "4.1.0-dev.8",
3
+ "version": "4.1.0-dev.80",
4
4
  "description": "Bentley build tools",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,24 +38,15 @@
38
38
  "yargs": "^17.4.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@itwin/eslint-plugin": "^4.0.0-dev.33",
42
- "@types/node": "^18.11.5",
43
- "eslint": "^8.36.0"
44
- },
45
- "eslintConfig": {
46
- "plugins": [
47
- "@itwin"
48
- ],
49
- "extends": "plugin:@itwin/itwinjs-recommended",
50
- "rules": {
51
- "deprecation/deprecation": "off"
52
- }
41
+ "@itwin/eslint-plugin": "4.0.0-dev.44",
42
+ "@types/node": "18.16.1",
43
+ "eslint": "^8.44.0"
53
44
  },
54
45
  "scripts": {
55
46
  "build": "tsc 1>&2",
56
47
  "clean": "rimraf ../../modules .rush/temp/package-deps*.json",
57
48
  "docs": "",
58
- "lint": "eslint -f visualstudio --config package.json --no-eslintrc \"./src/**/*.ts\" 1>&2",
49
+ "lint": "eslint -f visualstudio \"./src/**/*.ts\" 1>&2",
59
50
  "test": "",
60
51
  "cover": ""
61
52
  }