jsii-pacmak 1.65.0 → 1.65.1

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.
@@ -217,7 +217,7 @@ class UserType {
217
217
  // Identify declarations that are not yet initialized and hence cannot be
218
218
  // used as part of a type qualification. Since this is not a forward
219
219
  // reference, the type was already emitted and its un-qualified name must
220
- // be used instead of it's locally qualified name.
220
+ // be used instead of its locally qualified name.
221
221
  const nestingParent = surroundingTypeFqns
222
222
  ?.map((fqn) => toPythonFqn(fqn, assembly).pythonFqn)
223
223
  ?.reverse()
@@ -233,7 +233,7 @@ class UserType {
233
233
  // This is not for a type annotation, so we should be at a point in time
234
234
  // where the surrounding symbol has been defined entirely, so we can
235
235
  // refer to it "normally" now.
236
- return { pythonType: pythonFqn.substring(nestingParent.length + 1) };
236
+ return { pythonType: pythonFqn.slice(packageName.length + 1) };
237
237
  }
238
238
  // We'll just make a module-qualified reference at this point.
239
239
  return {
@@ -251,7 +251,7 @@ class UserType {
251
251
  .substring(0, 8);
252
252
  const alias = `_${toImport}_${aliasSuffix}`;
253
253
  return {
254
- pythonType: [alias, ...nested].join('.'),
254
+ pythonType: wrapType([alias, ...nested].join('.')),
255
255
  requiredImport: {
256
256
  sourcePackage: relativeImportPath(submodulePythonName, typeSubmodulePythonName),
257
257
  item: `${toImport} as ${alias}`,
@@ -394,6 +394,7 @@ class BaseMethod {
394
394
  const paramType = (0, type_name_1.toTypeName)(prop.prop).pythonType({
395
395
  ...context,
396
396
  parameterType: true,
397
+ typeAnnotation: true,
397
398
  });
398
399
  const paramDefault = prop.prop.optional ? ' = None' : '';
399
400
  pythonParams.push(`${paramName}: ${paramType}${paramDefault}`);
@@ -739,7 +740,10 @@ class Struct extends BasePythonClassType {
739
740
  // Re-type struct arguments that were passed as "dict". Do this before validating argument types...
740
741
  for (const member of members.filter((m) => m.isStruct(this.generator))) {
741
742
  // Note that "None" is NOT an instance of dict (that's convenient!)
742
- const typeName = (0, type_name_1.toPythonFullName)(member.type.type.fqn, context.assembly);
743
+ const typeName = (0, type_name_1.toTypeName)(member.type.type).pythonType({
744
+ ...context,
745
+ typeAnnotation: false,
746
+ });
743
747
  code.openBlock(`if isinstance(${member.pythonName}, dict)`);
744
748
  code.line(`${member.pythonName} = ${typeName}(**${member.pythonName})`);
745
749
  code.closeBlock();
package/lib/version.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** The short version number for this JSII compiler (e.g: `X.Y.Z`) */
2
- export declare const VERSION = "1.65.0";
2
+ export declare const VERSION = "1.65.1";
3
3
  /** The qualified version number for this JSII compiler (e.g: `X.Y.Z (build #######)`) */
4
- export declare const VERSION_DESC = "1.65.0 (build 7a02b7f)";
4
+ export declare const VERSION_DESC = "1.65.1 (build b0947e4)";
5
5
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
- // Generated at 2022-08-18T14:34:45Z by generate.sh
2
+ // Generated at 2022-08-29T17:36:17Z 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 compiler (e.g: `X.Y.Z`) */
6
- exports.VERSION = '1.65.0';
6
+ exports.VERSION = '1.65.1';
7
7
  /** The qualified version number for this JSII compiler (e.g: `X.Y.Z (build #######)`) */
8
- exports.VERSION_DESC = '1.65.0 (build 7a02b7f)';
8
+ exports.VERSION_DESC = '1.65.1 (build b0947e4)';
9
9
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsii-pacmak",
3
- "version": "1.65.0",
3
+ "version": "1.65.1",
4
4
  "description": "A code generation framework for jsii backend languages",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -37,33 +37,33 @@
37
37
  "package": "package-js"
38
38
  },
39
39
  "dependencies": {
40
- "@jsii/check-node": "1.65.0",
41
- "@jsii/spec": "^1.65.0",
40
+ "@jsii/check-node": "1.65.1",
41
+ "@jsii/spec": "^1.65.1",
42
42
  "clone": "^2.1.2",
43
- "codemaker": "^1.65.0",
43
+ "codemaker": "^1.65.1",
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.65.0",
48
- "jsii-rosetta": "^1.65.0",
47
+ "jsii-reflect": "^1.65.1",
48
+ "jsii-rosetta": "^1.65.1",
49
49
  "semver": "^7.3.7",
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.65.0",
56
- "@jsii/java-runtime": "^1.65.0",
57
- "@jsii/go-runtime": "^1.65.0",
58
- "@scope/jsii-calc-lib": "^1.65.0",
55
+ "@jsii/dotnet-runtime": "^1.65.1",
56
+ "@jsii/java-runtime": "^1.65.1",
57
+ "@jsii/go-runtime": "^1.65.1",
58
+ "@scope/jsii-calc-lib": "^1.65.1",
59
59
  "@types/clone": "^2.1.1",
60
60
  "@types/diff": "^5.0.2",
61
61
  "@types/commonmark": "^0.27.5",
62
62
  "@types/fs-extra": "^9.0.13",
63
63
  "@types/semver": "^7.3.10",
64
64
  "diff": "^5.1.0",
65
- "jsii": "^1.65.0",
66
- "jsii-build-tools": "^1.65.0",
65
+ "jsii": "^1.65.1",
66
+ "jsii-build-tools": "^1.65.1",
67
67
  "jsii-calc": "^3.20.120",
68
68
  "pyright": "^1.1.266"
69
69
  },