jsii-pacmak 1.85.0 → 1.86.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.
@@ -154,7 +154,7 @@ const version_1 = require("../lib/version");
154
154
  default: false,
155
155
  })
156
156
  .version(version_1.VERSION_DESC).argv;
157
- (0, lib_1.configureLogging)({ level: argv.verbose !== undefined ? argv.verbose : 0 });
157
+ (0, lib_1.configureLogging)({ level: argv.verbose ?? 0 });
158
158
  // Default to 4 threads in case of concurrency, good enough for most situations
159
159
  (0, logging_1.debug)('command line arguments:', argv);
160
160
  if (argv['rosetta-translate-live'] !== undefined &&
package/lib/packaging.js CHANGED
@@ -25,7 +25,7 @@ class JsiiModule {
25
25
  // Quoting (JSON-stringifying) the module directory in order to avoid
26
26
  // problems if there are spaces or other special characters in the path.
27
27
  args.push(JSON.stringify(this.moduleDirectory));
28
- if (logging.level >= logging.LEVEL_VERBOSE) {
28
+ if (logging.level.valueOf() >= logging.LEVEL_VERBOSE) {
29
29
  args.push('--loglevel=verbose');
30
30
  }
31
31
  }
@@ -762,6 +762,7 @@ class DotNetGenerator extends generator_1.Generator {
762
762
  // Emit getters
763
763
  if (backingFieldName != null) {
764
764
  this.code.line(`get => ${backingFieldName};`);
765
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
765
766
  }
766
767
  else if (datatype || prop.const || prop.abstract) {
767
768
  this.code.line('get;');
@@ -51,6 +51,10 @@ class Documentation {
51
51
  this.emitComment(`See: ${docs.link}`);
52
52
  this.emitComment();
53
53
  }
54
+ if (docs.default !== '') {
55
+ this.emitComment(`Default: ${docs.default}`);
56
+ this.emitComment();
57
+ }
54
58
  this.emitStability(docs);
55
59
  }
56
60
  emitStability(docs) {
@@ -80,7 +80,7 @@ class GoClass extends go_type_1.GoType {
80
80
  ? this.pkg.root.findType(this.type.base.fqn)
81
81
  : null;
82
82
  }
83
- return this._extends == null ? undefined : this._extends;
83
+ return this._extends ?? undefined;
84
84
  }
85
85
  get implements() {
86
86
  // Cannot compute in constructor, as dependencies may not have finished
@@ -157,7 +157,9 @@ class GoMethod {
157
157
  return undefined;
158
158
  }
159
159
  get returnsRef() {
160
- if (this.reference?.type?.type.isClassType() ||
160
+ if (
161
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
162
+ this.reference?.type?.type.isClassType() ||
161
163
  this.reference?.type?.type.isInterfaceType()) {
162
164
  return true;
163
165
  }
package/lib/targets/go.js CHANGED
@@ -44,7 +44,12 @@ class Golang extends target_1.Target {
44
44
  logging.info(`[${pkgDir}] Content of ${localGoMod.path} file:\n${localGoMod.content}`);
45
45
  return Promise.reject(e);
46
46
  }
47
- await go('build', ['-modfile', localGoMod.path, './...'], { cwd: pkgDir });
47
+ if (process.env.JSII_BUILD_GO) {
48
+ // This step is taken to ensure that the generated code is compilable
49
+ await go('build', ['-modfile', localGoMod.path, './...'], {
50
+ cwd: pkgDir,
51
+ });
52
+ }
48
53
  // delete local.go.mod and local.go.sum from the output directory so it doesn't get published
49
54
  const localGoSum = `${path.basename(localGoMod.path, '.mod')}.sum`;
50
55
  await fs.remove(path.join(pkgDir, localGoMod.path));
@@ -1922,7 +1922,7 @@ class JavaGenerator extends generator_1.Generator {
1922
1922
  }
1923
1923
  this.code.line('/**');
1924
1924
  for (const line of lines) {
1925
- this.code.line(` * ${line}`);
1925
+ this.code.line(` * ${escapeEndingComment(line)}`);
1926
1926
  }
1927
1927
  this.code.line(' */');
1928
1928
  }
@@ -2618,4 +2618,8 @@ function myMarkDownToJavaDoc(source) {
2618
2618
  function stripNewLines(x) {
2619
2619
  return x.replace(/\n/g, '');
2620
2620
  }
2621
+ // Replace */ with *\/ to avoid closing the comment block
2622
+ function escapeEndingComment(x) {
2623
+ return x.replace(/\*\//g, '*\\/');
2624
+ }
2621
2625
  //# sourceMappingURL=java.js.map
@@ -113,6 +113,7 @@ class Optional {
113
113
  ...context,
114
114
  ignoreOptional: true,
115
115
  });
116
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
116
117
  if (context.ignoreOptional || __classPrivateFieldGet(this, _Optional_wrapped, "f") === Primitive.ANY) {
117
118
  return optionalType;
118
119
  }
package/lib/util.js CHANGED
@@ -150,13 +150,13 @@ async function shell(cmd, args, { retry: retryOptions, ...options } = {}) {
150
150
  const stdout = new Array();
151
151
  const stderr = new Array();
152
152
  child.stdout.on('data', (chunk) => {
153
- if (logging.level >= logging.LEVEL_SILLY) {
153
+ if (logging.level.valueOf() >= logging.LEVEL_SILLY) {
154
154
  process.stderr.write(chunk); // notice - we emit all build output to stderr
155
155
  }
156
156
  stdout.push(Buffer.from(chunk));
157
157
  });
158
158
  child.stderr.on('data', (chunk) => {
159
- if (logging.level >= logging.LEVEL_SILLY) {
159
+ if (logging.level.valueOf() >= logging.LEVEL_SILLY) {
160
160
  process.stderr.write(chunk);
161
161
  }
162
162
  stderr.push(Buffer.from(chunk));
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.85.0 (build 08ee592)";
4
+ export declare const VERSION_DESC = "1.86.0 (build bc5c93a)";
5
5
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
- // Generated at 2023-07-17T11:22:46Z by generate.sh
2
+ // Generated at 2023-08-01T21:59:31Z 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.85.0';
7
+ exports.VERSION = '1.86.0';
8
8
  /** The qualified version number for this jsii-pacmak release (e.g: `X.Y.Z (build #######)`) */
9
- exports.VERSION_DESC = '1.85.0 (build 08ee592)';
9
+ exports.VERSION_DESC = '1.86.0 (build bc5c93a)';
10
10
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsii-pacmak",
3
- "version": "1.85.0",
3
+ "version": "1.86.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.85.0",
41
- "@jsii/spec": "^1.85.0",
40
+ "@jsii/check-node": "1.86.0",
41
+ "@jsii/spec": "^1.86.0",
42
42
  "clone": "^2.1.2",
43
- "codemaker": "^1.85.0",
43
+ "codemaker": "^1.86.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.85.0",
48
- "jsii-rosetta": "^1.85.0",
49
- "semver": "^7.5.1",
47
+ "jsii-reflect": "^1.86.0",
48
+ "jsii-rosetta": "^1.86.0",
49
+ "semver": "^7.5.4",
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.85.0",
56
- "@jsii/java-runtime": "^1.85.0",
57
- "@jsii/go-runtime": "^1.85.0",
58
- "@scope/jsii-calc-lib": "^1.85.0",
55
+ "@jsii/dotnet-runtime": "^1.86.0",
56
+ "@jsii/java-runtime": "^1.86.0",
57
+ "@jsii/go-runtime": "^1.86.0",
58
+ "@scope/jsii-calc-lib": "^1.86.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
63
  "@types/semver": "^7.5.0",
64
64
  "diff": "^5.1.0",
65
- "jsii": "^1.85.0",
66
- "jsii-build-tools": "^1.85.0",
65
+ "jsii": "^1.86.0",
66
+ "jsii-build-tools": "^1.86.0",
67
67
  "jsii-calc": "^3.20.120",
68
- "pyright": "^1.1.314"
68
+ "pyright": "^1.1.319"
69
69
  },
70
70
  "keywords": [
71
71
  "jsii",