@nx/maven 22.6.0-beta.0 → 22.6.0-beta.10

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.
Binary file
@@ -5,7 +5,8 @@
5
5
  "implementation": "./dist/executors/maven/maven.impl",
6
6
  "batchImplementation": "./dist/executors/maven/maven-batch.impl",
7
7
  "schema": "./dist/executors/maven/schema.json",
8
- "description": "Runs Maven phases and goals via Maven executable."
8
+ "description": "Runs Maven phases and goals via Maven executable.",
9
+ "preferBatch": true
9
10
  }
10
11
  }
11
12
  }
@@ -0,0 +1,7 @@
1
+ import { Tree } from '@nx/devkit';
2
+ /**
3
+ * Migration for @nx/maven v0.0.14
4
+ * Updates the Maven plugin version to 0.0.14 in pom.xml files
5
+ */
6
+ export default function update(tree: Tree): Promise<void>;
7
+ //# sourceMappingURL=update-pom-xml-version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-pom-xml-version.d.ts","sourceRoot":"","sources":["../../../src/migrations/0-0-14/update-pom-xml-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGlC;;;GAGG;AACH,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,iBAG9C"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const pom_xml_updater_1 = require("../../utils/pom-xml-updater");
5
+ /**
6
+ * Migration for @nx/maven v0.0.14
7
+ * Updates the Maven plugin version to 0.0.14 in pom.xml files
8
+ */
9
+ async function update(tree) {
10
+ // Update user pom.xml files
11
+ (0, pom_xml_updater_1.updateNxMavenPluginVersion)(tree, '0.0.14');
12
+ }
@@ -1,12 +1,13 @@
1
+ import { PluginCache } from 'nx/src/utils/plugin-cache-utils';
1
2
  import { MavenAnalysisData } from './types';
2
3
  /**
3
4
  * Read the Maven targets cache from disk
4
5
  */
5
- export declare function readMavenCache(cachePath: string): Record<string, MavenAnalysisData>;
6
+ export declare function readMavenCache(cachePath: string): PluginCache<MavenAnalysisData>;
6
7
  /**
7
8
  * Write the Maven targets cache to disk
8
9
  */
9
- export declare function writeMavenCache(cachePath: string, cache: Record<string, MavenAnalysisData>): void;
10
+ export declare function writeMavenCache(cachePath: string, cache: PluginCache<MavenAnalysisData>): void;
10
11
  /**
11
12
  * Get the cache path for a given options hash
12
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"maven-data-cache.d.ts","sourceRoot":"","sources":["../../src/plugins/maven-data-cache.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,GAChB,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAQnC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GACvC,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,GAClB,MAAM,CAOR;AAQD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAEjE;AAED,wBAAgB,mBAAmB,IAAI,iBAAiB,GAAG,IAAI,CAE9D"}
1
+ {"version":3,"file":"maven-data-cache.d.ts","sourceRoot":"","sources":["../../src/plugins/maven-data-cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,GAChB,WAAW,CAAC,iBAAiB,CAAC,CAEhC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,WAAW,CAAC,iBAAiB,CAAC,GACpC,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,GAClB,MAAM,CAOR;AAQD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAEjE;AAED,wBAAgB,mBAAmB,IAAI,iBAAiB,GAAG,IAAI,CAE9D"}
@@ -6,25 +6,18 @@ exports.getCachePath = getCachePath;
6
6
  exports.setCurrentMavenData = setCurrentMavenData;
7
7
  exports.getCurrentMavenData = getCurrentMavenData;
8
8
  const path_1 = require("path");
9
- const devkit_1 = require("@nx/devkit");
9
+ const plugin_cache_utils_1 = require("nx/src/utils/plugin-cache-utils");
10
10
  /**
11
11
  * Read the Maven targets cache from disk
12
12
  */
13
13
  function readMavenCache(cachePath) {
14
- try {
15
- return process.env.NX_CACHE_PROJECT_GRAPH !== 'false'
16
- ? (0, devkit_1.readJsonFile)(cachePath)
17
- : {};
18
- }
19
- catch {
20
- return {};
21
- }
14
+ return new plugin_cache_utils_1.PluginCache(cachePath);
22
15
  }
23
16
  /**
24
17
  * Write the Maven targets cache to disk
25
18
  */
26
19
  function writeMavenCache(cachePath, cache) {
27
- (0, devkit_1.writeJsonFile)(cachePath, cache);
20
+ cache.writeToDisk(cachePath);
28
21
  }
29
22
  /**
30
23
  * Get the cache path for a given options hash
@@ -39,7 +39,7 @@ exports.createNodes = [
39
39
  const hash = (0, devkit_1.hashArray)(hashes);
40
40
  try {
41
41
  // Try to get cached data first (skip cache if in verbose mode)
42
- let mavenData = isVerbose ? null : mavenCache[hash];
42
+ let mavenData = isVerbose ? null : mavenCache.get(hash);
43
43
  // If no cached data or cache is stale, run fresh Maven analysis
44
44
  if (!mavenData) {
45
45
  mavenData = await (0, maven_analyzer_1.runMavenAnalysis)(context.workspaceRoot, {
@@ -47,7 +47,7 @@ exports.createNodes = [
47
47
  verbose: isVerbose,
48
48
  });
49
49
  // Cache the results with the hash
50
- mavenCache[hash] = mavenData;
50
+ mavenCache.set(hash, mavenData);
51
51
  }
52
52
  // Store in module-level variable for createDependencies to use
53
53
  (0, maven_data_cache_1.setCurrentMavenData)(mavenData);
@@ -1,3 +1,3 @@
1
1
  export declare const nxVersion: any;
2
- export declare const mavenPluginVersion = "0.0.13";
2
+ export declare const mavenPluginVersion = "0.0.14";
3
3
  //# sourceMappingURL=versions.d.ts.map
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mavenPluginVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
- exports.mavenPluginVersion = '0.0.13';
5
+ exports.mavenPluginVersion = '0.0.14';
package/executors.json CHANGED
@@ -5,7 +5,8 @@
5
5
  "implementation": "./dist/executors/maven/maven.impl",
6
6
  "batchImplementation": "./dist/executors/maven/maven-batch.impl",
7
7
  "schema": "./dist/executors/maven/schema.json",
8
- "description": "Runs Maven phases and goals via Maven executable."
8
+ "description": "Runs Maven phases and goals via Maven executable.",
9
+ "preferBatch": true
9
10
  }
10
11
  }
11
12
  }
package/migrations.json CHANGED
@@ -36,6 +36,12 @@
36
36
  "version": "22.5.0-beta.4",
37
37
  "description": "Update Maven plugin version from 0.0.12 to 0.0.13 in pom.xml files",
38
38
  "factory": "./dist/migrations/0-0-13/update-pom-xml-version"
39
+ },
40
+ "update-0-0-14": {
41
+ "cli": "nx",
42
+ "version": "22.6.0-beta.1",
43
+ "description": "Update Maven plugin version from 0.0.13 to 0.0.14 in pom.xml files",
44
+ "factory": "./dist/migrations/0-0-14/update-pom-xml-version"
39
45
  }
40
46
  }
41
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/maven",
3
- "version": "22.6.0-beta.0",
3
+ "version": "22.6.0-beta.10",
4
4
  "private": false,
5
5
  "description": "Nx plugin for Maven integration",
6
6
  "repository": {
@@ -46,7 +46,7 @@
46
46
  "author": "Victor Savkin",
47
47
  "license": "MIT",
48
48
  "dependencies": {
49
- "@nx/devkit": "22.6.0-beta.0",
49
+ "@nx/devkit": "22.6.0-beta.10",
50
50
  "@xmldom/xmldom": "^0.8.10",
51
51
  "tslib": "^2.3.0"
52
52
  },
@@ -56,7 +56,7 @@
56
56
  "@types/xmldom": "^0.1.34",
57
57
  "jest": "^30.0.2",
58
58
  "memfs": "^4.9.2",
59
- "nx": "22.6.0-beta.0",
59
+ "nx": "22.6.0-beta.10",
60
60
  "ts-jest": "^29.4.0",
61
61
  "typescript": "~5.9.2"
62
62
  },