jsii-pacmak 1.81.0 → 1.83.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/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import './suppress-jsii-upgrade-prompts';
1
2
  import { UnknownSnippetMode } from 'jsii-rosetta';
2
3
  import { TargetName } from './targets';
3
4
  import { Timers } from './timer';
package/lib/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.pacmak = exports.configureLogging = exports.TargetName = void 0;
4
+ require("./suppress-jsii-upgrade-prompts");
4
5
  const jsii_reflect_1 = require("jsii-reflect");
5
6
  const jsii_rosetta_1 = require("jsii-rosetta");
6
7
  const path_1 = require("path");
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=suppress-jsii-upgrade-prompts.d.ts.map
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Suppress the upgrade prompt from jsii and jsii-rosetta
3
+ process.env.JSII_SUPPRESS_UPGRADE_PROMPT = '1';
4
+ //# sourceMappingURL=suppress-jsii-upgrade-prompts.js.map
@@ -351,6 +351,10 @@ class JavaGenerator extends generator_1.Generator {
351
351
  if (!propertyName) {
352
352
  return propertyName;
353
353
  }
354
+ if (propertyName === '_') {
355
+ // Slightly different pattern for this one
356
+ return '__';
357
+ }
354
358
  if (JavaGenerator.RESERVED_KEYWORDS.includes(propertyName)) {
355
359
  return `${propertyName}Value`;
356
360
  }
@@ -364,6 +368,10 @@ class JavaGenerator extends generator_1.Generator {
364
368
  if (!methodName) {
365
369
  return methodName;
366
370
  }
371
+ if (methodName === '_') {
372
+ // Different pattern for this one. Also this should never happen, who names a function '_' ??
373
+ return 'doIt';
374
+ }
367
375
  if (JavaGenerator.RESERVED_KEYWORDS.includes(methodName)) {
368
376
  return `do${(0, naming_util_1.jsiiToPascalCase)(methodName)}`;
369
377
  }
@@ -661,7 +669,7 @@ class JavaGenerator extends generator_1.Generator {
661
669
  this.code.openFile(packageInfoFile);
662
670
  this.code.line('/**');
663
671
  if (mod.readme) {
664
- for (const line of (0, jsii_rosetta_1.markDownToJavaDoc)(this.convertSamplesInMarkdown(mod.readme.markdown, {
672
+ for (const line of myMarkDownToJavaDoc(this.convertSamplesInMarkdown(mod.readme.markdown, {
665
673
  api: 'moduleReadme',
666
674
  moduleFqn: mod.name,
667
675
  })).split('\n')) {
@@ -688,7 +696,7 @@ class JavaGenerator extends generator_1.Generator {
688
696
  this.code.openFile(packageInfoFile);
689
697
  this.code.line('/**');
690
698
  if (mod.readme) {
691
- for (const line of (0, jsii_rosetta_1.markDownToJavaDoc)(this.convertSamplesInMarkdown(mod.readme.markdown, {
699
+ for (const line of myMarkDownToJavaDoc(this.convertSamplesInMarkdown(mod.readme.markdown, {
692
700
  api: 'moduleReadme',
693
701
  moduleFqn,
694
702
  })).split('\n')) {
@@ -798,6 +806,8 @@ class JavaGenerator extends generator_1.Generator {
798
806
  '-J-XX:+TieredCompilation',
799
807
  '-J-XX:TieredStopAtLevel=1',
800
808
  ],
809
+ doclint: 'none',
810
+ quiet: 'true',
801
811
  },
802
812
  },
803
813
  {
@@ -1529,7 +1539,7 @@ class JavaGenerator extends generator_1.Generator {
1529
1539
  // Final build method
1530
1540
  this.code.line();
1531
1541
  this.code.line('/**');
1532
- this.code.line(` * @returns a newly built instance of {@link ${builtType}}.`);
1542
+ this.code.line(` * @return a newly built instance of {@link ${builtType}}.`);
1533
1543
  this.code.line(' */');
1534
1544
  this.emitStabilityAnnotations(cls.initializer);
1535
1545
  this.code.line('@Override');
@@ -1567,7 +1577,7 @@ class JavaGenerator extends generator_1.Generator {
1567
1577
  this.code.line(` * ${paramJavadoc(prop.fieldName, prop.nullable, summary)}`);
1568
1578
  if (prop.docs?.remarks != null) {
1569
1579
  const indent = ' '.repeat(7 + prop.fieldName.length);
1570
- const remarks = (0, jsii_rosetta_1.markDownToJavaDoc)(this.convertSamplesInMarkdown(prop.docs.remarks, {
1580
+ const remarks = myMarkDownToJavaDoc(this.convertSamplesInMarkdown(prop.docs.remarks, {
1571
1581
  api: 'member',
1572
1582
  fqn: prop.definingType.fqn,
1573
1583
  memberName: prop.jsiiName,
@@ -1848,13 +1858,13 @@ class JavaGenerator extends generator_1.Generator {
1848
1858
  const docs = (doc.docs = doc.docs ?? {});
1849
1859
  const paras = [];
1850
1860
  if (docs.summary) {
1851
- paras.push((0, _utils_1.renderSummary)(docs));
1861
+ paras.push(stripNewLines(myMarkDownToJavaDoc((0, _utils_1.renderSummary)(docs))));
1852
1862
  }
1853
1863
  else if (defaultText) {
1854
- paras.push(defaultText);
1864
+ paras.push(myMarkDownToJavaDoc(defaultText));
1855
1865
  }
1856
1866
  if (docs.remarks) {
1857
- paras.push((0, jsii_rosetta_1.markDownToJavaDoc)(this.convertSamplesInMarkdown(docs.remarks, apiLoc)).trimRight());
1867
+ paras.push(myMarkDownToJavaDoc(this.convertSamplesInMarkdown(docs.remarks, apiLoc)).trimRight());
1858
1868
  }
1859
1869
  if (docs.default) {
1860
1870
  paras.push(`Default: ${docs.default}`); // NOTE: there is no annotation in JavaDoc for this
@@ -1873,17 +1883,17 @@ class JavaGenerator extends generator_1.Generator {
1873
1883
  //
1874
1884
  // Hence, we just resort to HTML-encoding everything (same as we do for code
1875
1885
  // examples that have been translated from MarkDown).
1876
- paras.push((0, jsii_rosetta_1.markDownToJavaDoc)(['```', convertedExample, '```'].join('\n')));
1886
+ paras.push(myMarkDownToJavaDoc(['```', convertedExample, '```'].join('\n')));
1877
1887
  }
1878
1888
  const tagLines = [];
1879
1889
  if (docs.returns) {
1880
- tagLines.push(`@return ${docs.returns}`);
1890
+ tagLines.push(`@return ${myMarkDownToJavaDoc(docs.returns)}`);
1881
1891
  }
1882
1892
  if (docs.see) {
1883
1893
  tagLines.push(`@see <a href="${escape(docs.see)}">${escape(docs.see)}</a>`);
1884
1894
  }
1885
1895
  if (docs.deprecated) {
1886
- tagLines.push(`@deprecated ${docs.deprecated}`);
1896
+ tagLines.push(`@deprecated ${myMarkDownToJavaDoc(docs.deprecated)}`);
1887
1897
  }
1888
1898
  // Params
1889
1899
  if (doc.parameters) {
@@ -2406,6 +2416,7 @@ JavaGenerator.RESERVED_KEYWORDS = [
2406
2416
  'void',
2407
2417
  'volatile',
2408
2418
  'while',
2419
+ '_',
2409
2420
  ];
2410
2421
  /**
2411
2422
  * Looks up the `@jsii/java-runtime` package from the local repository.
@@ -2435,7 +2446,7 @@ function isNullable(optionalValue) {
2435
2446
  function paramJavadoc(name, optional, summary) {
2436
2447
  const parts = ['@param', name];
2437
2448
  if (summary) {
2438
- parts.push(endWithPeriod(summary));
2449
+ parts.push(stripNewLines(myMarkDownToJavaDoc(endWithPeriod(summary))));
2439
2450
  }
2440
2451
  if (!optional) {
2441
2452
  parts.push('This parameter is required.');
@@ -2588,4 +2599,18 @@ function containsUnionType(typeRef) {
2588
2599
  (spec.isCollectionTypeReference(typeRef) &&
2589
2600
  containsUnionType(typeRef.collection.elementtype)));
2590
2601
  }
2602
+ function myMarkDownToJavaDoc(source) {
2603
+ if (source.includes('{@link') || source.includes('{@code')) {
2604
+ // Slightly dirty hack: if we are seeing this, it means the docstring was provided literally
2605
+ // in this file. These strings are safe to not be escaped, and in fact escaping them will
2606
+ // break them: they will turn into `{&#64;`, which breaks the JavaDoc markup.
2607
+ //
2608
+ // Since docstring do not (or at least should not) contain JavaDoc literals, this is safe.
2609
+ return source;
2610
+ }
2611
+ return (0, jsii_rosetta_1.markDownToJavaDoc)(source);
2612
+ }
2613
+ function stripNewLines(x) {
2614
+ return x.replace(/\n/g, '');
2615
+ }
2591
2616
  //# sourceMappingURL=java.js.map
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.81.0 (build 80988b0)";
4
+ export declare const VERSION_DESC = "1.83.0 (build fd4544d)";
5
5
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
- // Generated at 2023-05-10T16:34:01Z by generate.sh
2
+ // Generated at 2023-06-07T11:13:38Z 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.81.0';
7
+ exports.VERSION = '1.83.0';
8
8
  /** The qualified version number for this jsii-pacmak release (e.g: `X.Y.Z (build #######)`) */
9
- exports.VERSION_DESC = '1.81.0 (build 80988b0)';
9
+ exports.VERSION_DESC = '1.83.0 (build fd4544d)';
10
10
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsii-pacmak",
3
- "version": "1.81.0",
3
+ "version": "1.83.0",
4
4
  "description": "A code generation framework for jsii backend languages",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -37,35 +37,35 @@
37
37
  "package": "package-js"
38
38
  },
39
39
  "dependencies": {
40
- "@jsii/check-node": "1.81.0",
41
- "@jsii/spec": "^1.81.0",
40
+ "@jsii/check-node": "1.83.0",
41
+ "@jsii/spec": "^1.83.0",
42
42
  "clone": "^2.1.2",
43
- "codemaker": "^1.81.0",
43
+ "codemaker": "^1.83.0",
44
44
  "commonmark": "^0.30.0",
45
45
  "escape-string-regexp": "^4.0.0",
46
46
  "fs-extra": "^10.1.0",
47
- "jsii-reflect": "^1.81.0",
48
- "jsii-rosetta": "^1.81.0",
49
- "semver": "^7.5.0",
47
+ "jsii-reflect": "^1.83.0",
48
+ "jsii-rosetta": "^1.83.0",
49
+ "semver": "^7.5.1",
50
50
  "spdx-license-list": "^6.6.0",
51
51
  "xmlbuilder": "^15.1.1",
52
52
  "yargs": "^16.2.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@jsii/dotnet-runtime": "^1.81.0",
56
- "@jsii/java-runtime": "^1.81.0",
57
- "@jsii/go-runtime": "^1.81.0",
58
- "@scope/jsii-calc-lib": "^1.81.0",
55
+ "@jsii/dotnet-runtime": "^1.83.0",
56
+ "@jsii/java-runtime": "^1.83.0",
57
+ "@jsii/go-runtime": "^1.83.0",
58
+ "@scope/jsii-calc-lib": "^1.83.0",
59
59
  "@types/clone": "^2.1.1",
60
60
  "@types/diff": "^5.0.3",
61
61
  "@types/commonmark": "^0.27.6",
62
62
  "@types/fs-extra": "^9.0.13",
63
- "@types/semver": "^7.3.13",
63
+ "@types/semver": "^7.5.0",
64
64
  "diff": "^5.1.0",
65
- "jsii": "^1.81.0",
66
- "jsii-build-tools": "^1.81.0",
65
+ "jsii": "^1.83.0",
66
+ "jsii-build-tools": "^1.83.0",
67
67
  "jsii-calc": "^3.20.120",
68
- "pyright": "^1.1.304"
68
+ "pyright": "^1.1.311"
69
69
  },
70
70
  "keywords": [
71
71
  "jsii",