@itwin/build-tools 4.1.0-dev.7 → 4.1.0-dev.70

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,77 @@
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 Tue, 18 Jul 2023 13:47:06 GMT and should not be manually modified.
4
+
5
+ ## 4.0.5
6
+ Tue, 18 Jul 2023 12:21:56 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 4.0.4
11
+ Wed, 12 Jul 2023 15:50:01 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 4.0.3
16
+ Mon, 03 Jul 2023 15:28:41 GMT
17
+
18
+ _Version update only_
19
+
20
+ ## 4.0.2
21
+ Wed, 21 Jun 2023 22:04:43 GMT
22
+
23
+ _Version update only_
24
+
25
+ ## 4.0.1
26
+ Wed, 21 Jun 2023 20:29:13 GMT
27
+
28
+ _Version update only_
29
+
30
+ ## 4.0.0
31
+ Mon, 22 May 2023 15:34:14 GMT
32
+
33
+ ### Updates
34
+
35
+ - typescript 5 compatibility
36
+ - Support non-rush repositories by allowing to specify output file locations.
37
+ - Update to eslint@8
38
+ - Fixed 'betools docs' script to set 'packageRoot' to correct relative path from root to package source.
39
+ - Upgrade TypeScript compile target to es2021.
40
+
41
+ ## 3.7.11
42
+ Tue, 11 Jul 2023 17:17:21 GMT
43
+
44
+ _Version update only_
45
+
46
+ ## 3.7.10
47
+ Wed, 05 Jul 2023 13:41:21 GMT
48
+
49
+ _Version update only_
50
+
51
+ ## 3.7.9
52
+ Tue, 20 Jun 2023 12:51:02 GMT
53
+
54
+ _Version update only_
55
+
56
+ ## 3.7.8
57
+ Thu, 01 Jun 2023 17:00:39 GMT
58
+
59
+ _Version update only_
60
+
61
+ ## 3.7.7
62
+ Wed, 24 May 2023 17:27:09 GMT
63
+
64
+ _Version update only_
65
+
66
+ ## 3.7.6
67
+ Mon, 15 May 2023 18:23:40 GMT
68
+
69
+ _Version update only_
70
+
71
+ ## 3.7.5
72
+ Thu, 04 May 2023 19:43:18 GMT
73
+
74
+ _Version update only_
4
75
 
5
76
  ## 3.7.4
6
77
  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.7",
3
+ "version": "4.1.0-dev.70",
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
  }