jsii-reflect 1.76.0 → 1.78.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/type-ref.js CHANGED
@@ -24,7 +24,9 @@ class TypeReference {
24
24
  return `Map<string => ${this.mapOfType.toString()}>`;
25
25
  }
26
26
  if (this.unionOfTypes) {
27
- return this.unionOfTypes.map((x) => x.toString()).join(' | ');
27
+ const union = this.unionOfTypes.map((x) => x.toString());
28
+ union.sort();
29
+ return union.join(' | ');
28
30
  }
29
31
  throw new Error('Invalid type reference');
30
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsii-reflect",
3
- "version": "1.76.0",
3
+ "version": "1.78.0",
4
4
  "description": "strongly-typed reflection library and tools for jsii",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -34,18 +34,18 @@
34
34
  "package": "package-js"
35
35
  },
36
36
  "dependencies": {
37
- "@jsii/check-node": "1.76.0",
38
- "@jsii/spec": "^1.76.0",
37
+ "@jsii/check-node": "1.78.0",
38
+ "@jsii/spec": "^1.78.0",
39
39
  "chalk": "^4",
40
40
  "fs-extra": "^10.1.0",
41
- "oo-ascii-tree": "^1.76.0",
41
+ "oo-ascii-tree": "^1.78.0",
42
42
  "yargs": "^16.2.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@scope/jsii-calc-lib": "^1.76.0",
45
+ "@scope/jsii-calc-lib": "^1.78.0",
46
46
  "@types/fs-extra": "^9.0.13",
47
- "jsii": "^1.76.0",
48
- "jsii-build-tools": "^1.76.0",
47
+ "jsii": "^1.78.0",
48
+ "jsii-build-tools": "^1.78.0",
49
49
  "jsii-calc": "^3.20.120"
50
50
  }
51
51
  }
@@ -647,7 +647,7 @@ exports[`jsii-tree --all 1`] = `
647
647
  │ │ │ ├── static
648
648
  │ │ │ ├─┬ parameters
649
649
  │ │ │ │ └─┬ param
650
- │ │ │ │ └── type: jsii-calc.union.IResolvable | jsii-calc.union.Resolvable | @scope/jsii-calc-lib.IFriendly
650
+ │ │ │ │ └── type: @scope/jsii-calc-lib.IFriendly | jsii-calc.union.IResolvable | jsii-calc.union.Resolvable
651
651
  │ │ │ └── returns: void
652
652
  │ │ ├─┬ class Resolvable (stable)
653
653
  │ │ │ ├── interfaces: IResolvable
@@ -767,11 +767,11 @@ exports[`jsii-tree --all 1`] = `
767
767
  │ │ ├─┬ stringProperty property (stable)
768
768
  │ │ │ └── type: string
769
769
  │ │ ├─┬ unionArrayProperty property (stable)
770
- │ │ │ └── type: Array<number | @scope/jsii-calc-lib.NumericValue>
770
+ │ │ │ └── type: Array<@scope/jsii-calc-lib.NumericValue | number>
771
771
  │ │ ├─┬ unionMapProperty property (stable)
772
- │ │ │ └── type: Map<string => string | number | @scope/jsii-calc-lib.Number>
772
+ │ │ │ └── type: Map<string => @scope/jsii-calc-lib.Number | number | string>
773
773
  │ │ ├─┬ unionProperty property (stable)
774
- │ │ │ └── type: string | number | @scope/jsii-calc-lib.Number | jsii-calc.Multiply
774
+ │ │ │ └── type: @scope/jsii-calc-lib.Number | jsii-calc.Multiply | number | string
775
775
  │ │ ├─┬ unknownArrayProperty property (stable)
776
776
  │ │ │ └── type: Array<any>
777
777
  │ │ ├─┬ unknownMapProperty property (stable)
@@ -1054,9 +1054,9 @@ exports[`jsii-tree --all 1`] = `
1054
1054
  │ │ ├─┬ <initializer>(unionProperty) initializer (stable)
1055
1055
  │ │ │ └─┬ parameters
1056
1056
  │ │ │ └─┬ unionProperty
1057
- │ │ │ └── type: Array<Map<string => jsii-calc.StructA | jsii-calc.StructB> | Array<jsii-calc.StructA | jsii-calc.StructB>>
1057
+ │ │ │ └── type: Array<Array<jsii-calc.StructA | jsii-calc.StructB> | Map<string => jsii-calc.StructA | jsii-calc.StructB>>
1058
1058
  │ │ └─┬ unionProperty property (stable)
1059
- │ │ └── type: Array<Map<string => jsii-calc.StructA | jsii-calc.StructB> | Array<jsii-calc.StructA | jsii-calc.StructB>>
1059
+ │ │ └── type: Array<Array<jsii-calc.StructA | jsii-calc.StructB> | Map<string => jsii-calc.StructA | jsii-calc.StructB>>
1060
1060
  │ ├─┬ class ClassWithPrivateConstructorAndAutomaticProperties (stable)
1061
1061
  │ │ ├── interfaces: IInterfaceWithProperties
1062
1062
  │ │ └─┬ members
@@ -3372,7 +3372,7 @@ exports[`jsii-tree --all 1`] = `
3372
3372
  │ │ ├─┬ secondLevel property (stable)
3373
3373
  │ │ │ ├── abstract
3374
3374
  │ │ │ ├── immutable
3375
- │ │ │ └── type: number | jsii-calc.SecondLevelStruct
3375
+ │ │ │ └── type: jsii-calc.SecondLevelStruct | number
3376
3376
  │ │ └─┬ optional property (stable)
3377
3377
  │ │ ├── abstract
3378
3378
  │ │ ├── immutable
@@ -3382,11 +3382,11 @@ exports[`jsii-tree --all 1`] = `
3382
3382
  │ │ ├─┬ bar property (stable)
3383
3383
  │ │ │ ├── abstract
3384
3384
  │ │ │ ├── immutable
3385
- │ │ │ └── type: string | number | jsii-calc.AllTypes
3385
+ │ │ │ └── type: jsii-calc.AllTypes | number | string
3386
3386
  │ │ └─┬ foo property (stable)
3387
3387
  │ │ ├── abstract
3388
3388
  │ │ ├── immutable
3389
- │ │ └── type: Optional<string | number>
3389
+ │ │ └── type: Optional<number | string>
3390
3390
  │ ├─┬ enum AllTypesEnum (stable)
3391
3391
  │ │ ├── MY_ENUM_VALUE (stable)
3392
3392
  │ │ ├── YOUR_ENUM_VALUE (stable)
@@ -824,7 +824,7 @@ exports[`showAll 1`] = `
824
824
  │ │ │ ├── static
825
825
  │ │ │ ├─┬ parameters
826
826
  │ │ │ │ └─┬ param
827
- │ │ │ │ └── type: jsii-calc.union.IResolvable | jsii-calc.union.Resolvable | @scope/jsii-calc-lib.IFriendly
827
+ │ │ │ │ └── type: @scope/jsii-calc-lib.IFriendly | jsii-calc.union.IResolvable | jsii-calc.union.Resolvable
828
828
  │ │ │ └── returns: void
829
829
  │ │ ├─┬ class Resolvable
830
830
  │ │ │ ├── interfaces: IResolvable
@@ -944,11 +944,11 @@ exports[`showAll 1`] = `
944
944
  │ │ ├─┬ stringProperty property
945
945
  │ │ │ └── type: string
946
946
  │ │ ├─┬ unionArrayProperty property
947
- │ │ │ └── type: Array<number | @scope/jsii-calc-lib.NumericValue>
947
+ │ │ │ └── type: Array<@scope/jsii-calc-lib.NumericValue | number>
948
948
  │ │ ├─┬ unionMapProperty property
949
- │ │ │ └── type: Map<string => string | number | @scope/jsii-calc-lib.Number>
949
+ │ │ │ └── type: Map<string => @scope/jsii-calc-lib.Number | number | string>
950
950
  │ │ ├─┬ unionProperty property
951
- │ │ │ └── type: string | number | @scope/jsii-calc-lib.Number | jsii-calc.Multiply
951
+ │ │ │ └── type: @scope/jsii-calc-lib.Number | jsii-calc.Multiply | number | string
952
952
  │ │ ├─┬ unknownArrayProperty property
953
953
  │ │ │ └── type: Array<any>
954
954
  │ │ ├─┬ unknownMapProperty property
@@ -1231,9 +1231,9 @@ exports[`showAll 1`] = `
1231
1231
  │ │ ├─┬ <initializer>(unionProperty) initializer
1232
1232
  │ │ │ └─┬ parameters
1233
1233
  │ │ │ └─┬ unionProperty
1234
- │ │ │ └── type: Array<Map<string => jsii-calc.StructA | jsii-calc.StructB> | Array<jsii-calc.StructA | jsii-calc.StructB>>
1234
+ │ │ │ └── type: Array<Array<jsii-calc.StructA | jsii-calc.StructB> | Map<string => jsii-calc.StructA | jsii-calc.StructB>>
1235
1235
  │ │ └─┬ unionProperty property
1236
- │ │ └── type: Array<Map<string => jsii-calc.StructA | jsii-calc.StructB> | Array<jsii-calc.StructA | jsii-calc.StructB>>
1236
+ │ │ └── type: Array<Array<jsii-calc.StructA | jsii-calc.StructB> | Map<string => jsii-calc.StructA | jsii-calc.StructB>>
1237
1237
  │ ├─┬ class ClassWithPrivateConstructorAndAutomaticProperties
1238
1238
  │ │ ├── interfaces: IInterfaceWithProperties
1239
1239
  │ │ └─┬ members
@@ -3549,7 +3549,7 @@ exports[`showAll 1`] = `
3549
3549
  │ │ ├─┬ secondLevel property
3550
3550
  │ │ │ ├── abstract
3551
3551
  │ │ │ ├── immutable
3552
- │ │ │ └── type: number | jsii-calc.SecondLevelStruct
3552
+ │ │ │ └── type: jsii-calc.SecondLevelStruct | number
3553
3553
  │ │ └─┬ optional property
3554
3554
  │ │ ├── abstract
3555
3555
  │ │ ├── immutable
@@ -3559,11 +3559,11 @@ exports[`showAll 1`] = `
3559
3559
  │ │ ├─┬ bar property
3560
3560
  │ │ │ ├── abstract
3561
3561
  │ │ │ ├── immutable
3562
- │ │ │ └── type: string | number | jsii-calc.AllTypes
3562
+ │ │ │ └── type: jsii-calc.AllTypes | number | string
3563
3563
  │ │ └─┬ foo property
3564
3564
  │ │ ├── abstract
3565
3565
  │ │ ├── immutable
3566
- │ │ └── type: Optional<string | number>
3566
+ │ │ └── type: Optional<number | string>
3567
3567
  │ ├─┬ enum AllTypesEnum
3568
3568
  │ │ ├── MY_ENUM_VALUE
3569
3569
  │ │ ├── YOUR_ENUM_VALUE