@nx/maven 23.2.0-beta.10 → 23.2.0-beta.12

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/README.md CHANGED
@@ -7,9 +7,9 @@
7
7
 
8
8
  <div style="text-align: center;">
9
9
 
10
- [![License](https://img.shields.io/npm/l/@nx/workspace.svg?style=flat-square)]()
10
+ [![License](https://img.shields.io/npm/l/@nx/workspace.svg?style=flat-square)](<>)
11
11
  [![NPM Version](https://badge.fury.io/js/nx.svg)](https://www.npmjs.com/package/nx)
12
- [![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)]()
12
+ [![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](<>)
13
13
  [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
14
14
  [![Join us on the Official Nx Discord Server](https://img.shields.io/discord/1143497901675401286?label=discord)](https://go.nx.dev/community)
15
15
  [![Nx Sandboxing](https://staging.nx.app/workspaces/62d013ea0852fe0a2df74438/sandbox-badge.svg)](https://nx.dev/docs/features/ci-features/sandboxing)
Binary file
Binary file
@@ -4,6 +4,7 @@ import { MavenAnalysisData, MavenPluginOptions } from './types';
4
4
  * Safe to call even if nothing is running.
5
5
  */
6
6
  export declare function cancelPendingMavenAnalysis(): void;
7
+ export declare function getAnalysisTimeoutMs(): number;
7
8
  /**
8
9
  * Run Maven analysis using our Kotlin analyzer plugin
9
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"maven-analyzer.d.ts","sourceRoot":"","sources":["../../src/plugins/maven-analyzer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAahE;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAKjD;AAaD;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CA8J5B"}
1
+ {"version":3,"file":"maven-analyzer.d.ts","sourceRoot":"","sources":["../../src/plugins/maven-analyzer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAiBhE;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAKjD;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAS7C;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAgK5B"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cancelPendingMavenAnalysis = cancelPendingMavenAnalysis;
4
+ exports.getAnalysisTimeoutMs = getAnalysisTimeoutMs;
4
5
  exports.runMavenAnalysis = runMavenAnalysis;
5
6
  const path_1 = require("path");
6
7
  const fs_1 = require("fs");
@@ -8,6 +9,9 @@ const devkit_1 = require("@nx/devkit");
8
9
  const detect_maven_executable_1 = require("../utils/detect-maven-executable");
9
10
  const internal_1 = require("@nx/devkit/internal");
10
11
  const DEFAULT_ANALYSIS_TIMEOUT_SECONDS = (0, internal_1.isCI)() ? 600 : 120;
12
+ // setTimeout silently clamps a delay past the 32-bit signed max to 1ms, which
13
+ // would abort immediately — the opposite of what a large value asks for.
14
+ const MAX_TIMEOUT_MS = 2 ** 31 - 1;
11
15
  let currentAbortController;
12
16
  /**
13
17
  * Cancel any in-flight Maven analysis process.
@@ -24,7 +28,7 @@ function getAnalysisTimeoutMs() {
24
28
  if (envTimeout) {
25
29
  const parsed = Number(envTimeout);
26
30
  if (!Number.isNaN(parsed) && parsed > 0) {
27
- return parsed * 1000;
31
+ return Math.min(parsed * 1000, MAX_TIMEOUT_MS);
28
32
  }
29
33
  }
30
34
  return DEFAULT_ANALYSIS_TIMEOUT_SECONDS * 1000;
@@ -78,6 +82,8 @@ async function runMavenAnalysis(workspaceRoot, options) {
78
82
  cwd: workspaceRoot,
79
83
  stdio: 'pipe', // Always use pipe so we can control output
80
84
  });
85
+ // A plugin worker torn down by `nx reset` would otherwise orphan the build.
86
+ (0, internal_1.killChildOnHostExit)(child);
81
87
  // On abort, kill the entire process tree and settle immediately — a
82
88
  // wedged process that outlives the kill signal would otherwise keep
83
89
  // this promise pending and the abort error would never surface.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/maven",
3
- "version": "23.2.0-beta.10",
3
+ "version": "23.2.0-beta.12",
4
4
  "private": false,
5
5
  "description": "Nx plugin for Maven integration",
6
6
  "repository": {
@@ -51,7 +51,7 @@
51
51
  "dependencies": {
52
52
  "@xmldom/xmldom": "^0.8.10",
53
53
  "tslib": "^2.3.0",
54
- "@nx/devkit": "23.2.0-beta.10"
54
+ "@nx/devkit": "23.2.0-beta.12"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/jest": "30.0.0",
@@ -61,7 +61,7 @@
61
61
  "memfs": "^4.9.2",
62
62
  "ts-jest": "^29.4.7",
63
63
  "typescript": "~6.0.3",
64
- "nx": "23.2.0-beta.10"
64
+ "nx": "23.2.0-beta.12"
65
65
  },
66
66
  "publishConfig": {
67
67
  "access": "public"