jsii-pacmak 1.124.0 → 1.125.0
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/lib/targets/java.d.ts +17 -0
- package/lib/targets/java.js +38 -34
- package/lib/version.d.ts +1 -1
- package/lib/version.js +3 -3
- package/package.json +10 -10
package/lib/targets/java.d.ts
CHANGED
|
@@ -45,6 +45,23 @@ export default class Java extends Target {
|
|
|
45
45
|
protected readonly generator: JavaGenerator;
|
|
46
46
|
constructor(options: TargetOptions);
|
|
47
47
|
build(sourceDir: string, outDir: string): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Run the maven 'versions:resolve-ranges' plugin
|
|
50
|
+
*
|
|
51
|
+
* Initially, we generate version ranges into the pom file based on the NPM
|
|
52
|
+
* version ranges.
|
|
53
|
+
*
|
|
54
|
+
* At build time, given a dependency version range, Maven will download metadata
|
|
55
|
+
* for all possible versions before every (uncached) build. This takes a long
|
|
56
|
+
* time, before finally resolving to the latest version anyway.
|
|
57
|
+
*
|
|
58
|
+
* Instead, we use the Maven 'versions' plugin to resolve our wide ranges to
|
|
59
|
+
* point versions. We want the "latest matching" version anyway, and if we don't
|
|
60
|
+
* the resolution now (which downloads the .poms of all possible versions) it
|
|
61
|
+
* will happen during every single build.
|
|
62
|
+
*/
|
|
63
|
+
resolveMavenVersions(directory: string): Promise<void>;
|
|
64
|
+
private invokeMaven;
|
|
48
65
|
}
|
|
49
66
|
declare class JavaGenerator extends Generator {
|
|
50
67
|
private static readonly RESERVED_KEYWORDS;
|
package/lib/targets/java.js
CHANGED
|
@@ -67,10 +67,10 @@ class JavaBuilder {
|
|
|
67
67
|
try {
|
|
68
68
|
const tempSourceDir = await this.generateAggregateSourceDir(this.modules, this.options);
|
|
69
69
|
scratchDirs.push(tempSourceDir);
|
|
70
|
-
await resolveMavenVersions(tempSourceDir.directory);
|
|
71
70
|
// Need any old module object to make a target to be able to invoke build, though none of its settings
|
|
72
71
|
// will be used.
|
|
73
72
|
const target = this.makeTarget(this.modules[0], this.options);
|
|
73
|
+
await target.resolveMavenVersions(tempSourceDir.directory);
|
|
74
74
|
const tempOutputDir = await util_1.Scratch.make(async (dir) => {
|
|
75
75
|
logging.debug(`Building Java code to ${dir}`);
|
|
76
76
|
await target.build(tempSourceDir.directory, dir);
|
|
@@ -311,30 +311,59 @@ class Java extends target_1.Target {
|
|
|
311
311
|
}
|
|
312
312
|
async build(sourceDir, outDir) {
|
|
313
313
|
const url = `file://${outDir}`;
|
|
314
|
-
|
|
314
|
+
await this.invokeMaven(sourceDir, ['deploy', `-D=altDeploymentRepository=local::default::${url}`], {
|
|
315
|
+
retry: { maxAttempts: 5 },
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Run the maven 'versions:resolve-ranges' plugin
|
|
320
|
+
*
|
|
321
|
+
* Initially, we generate version ranges into the pom file based on the NPM
|
|
322
|
+
* version ranges.
|
|
323
|
+
*
|
|
324
|
+
* At build time, given a dependency version range, Maven will download metadata
|
|
325
|
+
* for all possible versions before every (uncached) build. This takes a long
|
|
326
|
+
* time, before finally resolving to the latest version anyway.
|
|
327
|
+
*
|
|
328
|
+
* Instead, we use the Maven 'versions' plugin to resolve our wide ranges to
|
|
329
|
+
* point versions. We want the "latest matching" version anyway, and if we don't
|
|
330
|
+
* the resolution now (which downloads the .poms of all possible versions) it
|
|
331
|
+
* will happen during every single build.
|
|
332
|
+
*/
|
|
333
|
+
async resolveMavenVersions(directory) {
|
|
334
|
+
const versionsPluginVersion = '2.20.1';
|
|
335
|
+
await this.invokeMaven(directory, [
|
|
336
|
+
`org.codehaus.mojo:versions-maven-plugin:${versionsPluginVersion}:resolve-ranges`,
|
|
337
|
+
], {
|
|
338
|
+
retry: { maxAttempts: 1 },
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
async invokeMaven(directory, args, options) {
|
|
342
|
+
// Pass through jsii-pacmak --mvn-xyz=... arguments as --xyz=...
|
|
343
|
+
const passThruArgs = new Array();
|
|
315
344
|
for (const arg of Object.keys(this.arguments)) {
|
|
316
345
|
if (!arg.startsWith('mvn-')) {
|
|
317
346
|
continue;
|
|
318
347
|
}
|
|
319
|
-
|
|
320
|
-
|
|
348
|
+
passThruArgs.push(`--${arg.slice(4)}`);
|
|
349
|
+
passThruArgs.push(this.arguments[arg].toString());
|
|
321
350
|
}
|
|
322
351
|
await (0, util_1.subprocess)('mvn', [
|
|
323
352
|
// If we don't run in verbose mode, turn on quiet mode
|
|
324
353
|
...(this.arguments.verbose ? [] : ['--quiet']),
|
|
325
354
|
'--batch-mode',
|
|
326
|
-
...
|
|
327
|
-
|
|
328
|
-
`-D=altDeploymentRepository=local::default::${url}`,
|
|
355
|
+
...args,
|
|
356
|
+
...passThruArgs,
|
|
329
357
|
'--settings=user.xml',
|
|
330
358
|
], {
|
|
331
|
-
cwd:
|
|
359
|
+
cwd: directory,
|
|
332
360
|
env: {
|
|
333
361
|
// Twiddle the JVM settings a little for Maven. Delaying JIT compilation
|
|
334
362
|
// brings down Maven execution time by about 1/3rd (15->10s, 30->20s)
|
|
335
363
|
MAVEN_OPTS: `${process.env.MAVEN_OPTS ?? ''} -XX:+TieredCompilation -XX:TieredStopAtLevel=1`,
|
|
364
|
+
...options?.env,
|
|
336
365
|
},
|
|
337
|
-
|
|
366
|
+
...options,
|
|
338
367
|
});
|
|
339
368
|
}
|
|
340
369
|
}
|
|
@@ -2855,31 +2884,6 @@ function removeIntersections(x) {
|
|
|
2855
2884
|
}
|
|
2856
2885
|
return x;
|
|
2857
2886
|
}
|
|
2858
|
-
/**
|
|
2859
|
-
* Run the maven 'versions:resolve-ranges' plugin
|
|
2860
|
-
*
|
|
2861
|
-
* Initially, we generate version ranges into the pom file based on the NPM
|
|
2862
|
-
* version ranges.
|
|
2863
|
-
*
|
|
2864
|
-
* At build time, given a dependency version range, Maven will download metadata
|
|
2865
|
-
* for all possible versions before every (uncached) build. This takes a long
|
|
2866
|
-
* time, before finally resolving to the latest version anyway.
|
|
2867
|
-
*
|
|
2868
|
-
* Instead, we use the Maven 'versions' plugin to resolve our wide ranges to
|
|
2869
|
-
* point versions. We want the "latest matching" version anyway, and if we don't
|
|
2870
|
-
* the resolution now (which downloads the .poms of all possible versions) it
|
|
2871
|
-
* will happen during every single build.
|
|
2872
|
-
*/
|
|
2873
|
-
async function resolveMavenVersions(directory) {
|
|
2874
|
-
const versionsPluginVersion = '2.20.1';
|
|
2875
|
-
await (0, util_1.subprocess)('mvn', [
|
|
2876
|
-
`org.codehaus.mojo:versions-maven-plugin:${versionsPluginVersion}:resolve-ranges`,
|
|
2877
|
-
'--settings=user.xml',
|
|
2878
|
-
], {
|
|
2879
|
-
cwd: directory,
|
|
2880
|
-
retry: { maxAttempts: 1 },
|
|
2881
|
-
});
|
|
2882
|
-
}
|
|
2883
2887
|
/**
|
|
2884
2888
|
* Whether the given property or method needs to be implemented on a $Proxy class
|
|
2885
2889
|
*
|
package/lib/version.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The short version number for this jsii-pacmak release (e.g: `X.Y.Z`) */
|
|
2
2
|
export declare const VERSION: string;
|
|
3
3
|
/** The qualified version number for this jsii-pacmak release (e.g: `X.Y.Z (build #######)`) */
|
|
4
|
-
export declare const VERSION_DESC = "1.
|
|
4
|
+
export declare const VERSION_DESC = "1.125.0 (build fdbe357)";
|
|
5
5
|
//# sourceMappingURL=version.d.ts.map
|
package/lib/version.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Generated at
|
|
2
|
+
// Generated at 2026-01-05T09:57:35Z by generate.sh
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.VERSION_DESC = exports.VERSION = void 0;
|
|
5
5
|
/** The short version number for this jsii-pacmak release (e.g: `X.Y.Z`) */
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
7
|
-
exports.VERSION = '1.
|
|
7
|
+
exports.VERSION = '1.125.0';
|
|
8
8
|
/** The qualified version number for this jsii-pacmak release (e.g: `X.Y.Z (build #######)`) */
|
|
9
|
-
exports.VERSION_DESC = '1.
|
|
9
|
+
exports.VERSION_DESC = '1.125.0 (build fdbe357)';
|
|
10
10
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsii-pacmak",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.125.0",
|
|
4
4
|
"description": "A code generation framework for jsii backend languages",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -37,24 +37,24 @@
|
|
|
37
37
|
"package": "package-js"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@jsii/check-node": "1.
|
|
41
|
-
"@jsii/spec": "1.
|
|
40
|
+
"@jsii/check-node": "1.125.0",
|
|
41
|
+
"@jsii/spec": "1.125.0",
|
|
42
42
|
"clone": "^2.1.2",
|
|
43
|
-
"codemaker": "^1.
|
|
43
|
+
"codemaker": "^1.125.0",
|
|
44
44
|
"commonmark": "^0.31.2",
|
|
45
45
|
"escape-string-regexp": "^4.0.0",
|
|
46
46
|
"fs-extra": "^10.1.0",
|
|
47
|
-
"jsii-reflect": "^1.
|
|
47
|
+
"jsii-reflect": "^1.125.0",
|
|
48
48
|
"semver": "^7.7.2",
|
|
49
49
|
"spdx-license-list": "^6.10.0",
|
|
50
50
|
"xmlbuilder": "^15.1.1",
|
|
51
51
|
"yargs": "^17.7.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@jsii/dotnet-runtime": "^1.
|
|
55
|
-
"@jsii/go-runtime": "^1.
|
|
56
|
-
"@jsii/java-runtime": "^1.
|
|
57
|
-
"@scope/jsii-calc-lib": "^1.
|
|
54
|
+
"@jsii/dotnet-runtime": "^1.125.0",
|
|
55
|
+
"@jsii/go-runtime": "^1.125.0",
|
|
56
|
+
"@jsii/java-runtime": "^1.125.0",
|
|
57
|
+
"@scope/jsii-calc-lib": "^1.125.0",
|
|
58
58
|
"@types/clone": "^2.1.4",
|
|
59
59
|
"@types/commonmark": "^0.27.10",
|
|
60
60
|
"@types/diff": "^5.2.3",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@types/yargs": "^17.0.33",
|
|
64
64
|
"diff": "^5.2.0",
|
|
65
65
|
"jsii": "^5.9.10",
|
|
66
|
-
"jsii-build-tools": "^1.
|
|
66
|
+
"jsii-build-tools": "^1.125.0",
|
|
67
67
|
"jsii-calc": "^3.20.120",
|
|
68
68
|
"jsii-rosetta": "~5.9.10",
|
|
69
69
|
"pyright": "^1.1.403"
|