vona-cli-set-api 1.1.175 → 1.1.176

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/dist/index.js CHANGED
@@ -1134,9 +1134,6 @@ class CliBinTest extends BeanCliBase {
1134
1134
  if (argv.coverage) {
1135
1135
  args.push('--experimental-test-coverage');
1136
1136
  }
1137
- if (process.env.TEST_WHYISNODERUNNING === 'true') {
1138
- args.push('--import=why-is-node-running/include');
1139
- }
1140
1137
  args = args.concat([getImportEsm(resolveVonaLocalPaths(projectPath, 'test').generatedDir), testFile, projectPath, (!!argv.coverage).toString(), patterns.join(',')]);
1141
1138
  // args = args.concat(['--experimental-transform-types', getImportEsm(), testFile, projectPath, (!!argv.coverage).toString(), patterns.join(',')]);
1142
1139
  await runTestChild(args, projectPath);
@@ -10,7 +10,7 @@ import { run } from 'node:test';
10
10
  import { lcov, spec } from 'node:test/reporters';
11
11
  import { fileURLToPath } from 'node:url';
12
12
  import { cast, createGeneralApp } from 'vona-core';
13
- import whyIsNodeRunning from 'why-is-node-running';
13
+ import { formatActiveResourceCounts } from "./testDiagnostics.js";
14
14
  const argv = process.argv.slice(2);
15
15
  const projectPath = argv[0];
16
16
  const coverage = argv[1] === 'true';
@@ -66,13 +66,10 @@ async function testRun(projectPath, coverage, patterns) {
66
66
  const closeApplication = async () => {
67
67
  const [_, error] = await catchError(() => app.close());
68
68
  closeError = error;
69
- // handles
69
+ // resource types only; no stack/source inspection
70
70
  if (process.env.TEST_WHYISNODERUNNING === 'true') {
71
71
  await sleep(2000);
72
- const handles = process._getActiveHandles();
73
- if (handles.length > 3) {
74
- whyIsNodeRunning();
75
- }
72
+ console.error(`Active resource counts: ${formatActiveResourceCounts(process.getActiveResourcesInfo())}`);
76
73
  }
77
74
  };
78
75
  const closeApplicationOnce = () => {
@@ -0,0 +1 @@
1
+ export declare function formatActiveResourceCounts(types: readonly string[]): string;
@@ -0,0 +1,6 @@
1
+ export function formatActiveResourceCounts(types) {
2
+ const counts = new Map();
3
+ for (const type of types)
4
+ counts.set(type, (counts.get(type) ?? 0) + 1);
5
+ return JSON.stringify(Object.fromEntries([...counts].toSorted(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))));
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-cli-set-api",
3
- "version": "1.1.175",
4
- "gitHead": "b0a4dbbda3b804afdfacf0792ad37a6e45724349",
3
+ "version": "1.1.176",
4
+ "gitHead": "d4ca173cd034aee6e73d037f86745c9919218f80",
5
5
  "description": "vona cli-set-api",
6
6
  "keywords": [
7
7
  "framework",
@@ -77,7 +77,7 @@
77
77
  "rollup": "^4.60.1",
78
78
  "urllib": "^4.9.0",
79
79
  "uuid": "^11.1.0",
80
- "vona-core": "^5.1.55",
80
+ "vona-core": "^5.1.56",
81
81
  "why-is-node-running": "^3.2.2",
82
82
  "yargs-parser": "^22.0.0"
83
83
  }