Skip to content

Commit 21e485a

Browse files
authored
feat(jsii-spec): Model parameter optionality (#432)
Method `Parameters`, `Properties` and method return types now carry an `optional` flag that indicates whether they are optional or required, and the `TypeReference#optional` field was removed. BREAKING CHANGE: JSII assemblies generated by older versions of the tool will fail loading with this new version, and vice-versa. Re-compile your projects in order to fix this. Fixes #296 Fixes #414
1 parent fe942b3 commit 21e485a

File tree

360 files changed

+5703
-5794
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

360 files changed

+5703
-5794
lines changed

package-lock.json

Lines changed: 1401 additions & 1393 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"lerna": "^3.13.1",
66
"nodeunit": "^0.11.3",
77
"nyc": "^13.3.0",
8-
"tslint": "^5.13.0",
9-
"typescript": "^3.3.3333"
8+
"tslint": "^5.15.0",
9+
"typescript": "^3.4.2"
1010
}
1111
}

packages/codemaker/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/codemaker/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"@types/node": "^8.10.43",
1717
"@types/nodeunit": "^0.0.30",
1818
"nodeunit": "^0.11.3",
19-
"typescript": "^3.3.3333"
19+
"typescript": "^3.4.2"
2020
},
2121
"dependencies": {
22-
"camelcase": "^5.2.0",
22+
"camelcase": "^5.3.1",
2323
"decamelize": "^1.2.0",
2424
"fs-extra": "^7.0.1"
2525
},

packages/jsii-calc-base-of-base/test/assembly.jsii

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"type": "git",
1717
"url": "https://github.com/awslabs/jsii.git"
1818
},
19-
"schema": "jsii/1.0",
19+
"schema": "jsii/0.10.0",
2020
"targets": {
2121
"dotnet": {
2222
"namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace",
@@ -35,15 +35,14 @@
3535
"python": {
3636
"distName": "scope.jsii-calc-base-of-base",
3737
"module": "scope.jsii_calc_base_of_base"
38-
}
38+
},
39+
"sphinx": {}
3940
},
4041
"types": {
4142
"@scope/jsii-calc-base-of-base.Very": {
4243
"assembly": "@scope/jsii-calc-base-of-base",
4344
"fqn": "@scope/jsii-calc-base-of-base.Very",
44-
"initializer": {
45-
"initializer": true
46-
},
45+
"initializer": {},
4746
"kind": "class",
4847
"locationInModule": {
4948
"filename": "lib/index.ts",
@@ -57,7 +56,9 @@
5756
},
5857
"name": "hey",
5958
"returns": {
60-
"primitive": "number"
59+
"type": {
60+
"primitive": "number"
61+
}
6162
}
6263
}
6364
],
@@ -90,5 +91,5 @@
9091
}
9192
},
9293
"version": "0.9.0",
93-
"fingerprint": "tvV+QeaiensaQM3kSC1xTy0VR+VsxkqujFF65n0AnCA="
94+
"fingerprint": "1O+di7RZanglLmeCs57JLdO5m98kRnkL4uLPnDbm/z4="
9495
}

packages/jsii-calc-base/test/assembly.jsii

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
},
1010
"dependencies": {
1111
"@scope/jsii-calc-base-of-base": {
12-
"peer": true,
1312
"targets": {
1413
"dotnet": {
1514
"namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace",
@@ -28,7 +27,8 @@
2827
"python": {
2928
"distName": "scope.jsii-calc-base-of-base",
3029
"module": "scope.jsii_calc_base_of_base"
31-
}
30+
},
31+
"sphinx": {}
3232
},
3333
"version": "0.9.0"
3434
}
@@ -42,7 +42,7 @@
4242
"type": "git",
4343
"url": "https://github.com/awslabs/jsii.git"
4444
},
45-
"schema": "jsii/1.0",
45+
"schema": "jsii/0.10.0",
4646
"targets": {
4747
"dotnet": {
4848
"namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace",
@@ -61,7 +61,8 @@
6161
"python": {
6262
"distName": "scope.jsii-calc-base",
6363
"module": "scope.jsii_calc_base"
64-
}
64+
},
65+
"sphinx": {}
6566
},
6667
"types": {
6768
"@scope/jsii-calc-base.Base": {
@@ -71,9 +72,7 @@
7172
"summary": "A base class."
7273
},
7374
"fqn": "@scope/jsii-calc-base.Base",
74-
"initializer": {
75-
"initializer": true
76-
},
75+
"initializer": {},
7776
"kind": "class",
7877
"locationInModule": {
7978
"filename": "lib/index.ts",
@@ -90,7 +89,9 @@
9089
},
9190
"name": "typeName",
9291
"returns": {
93-
"primitive": "any"
92+
"type": {
93+
"primitive": "any"
94+
}
9495
}
9596
}
9697
],
@@ -101,9 +102,7 @@
101102
"datatype": true,
102103
"fqn": "@scope/jsii-calc-base.BaseProps",
103104
"interfaces": [
104-
{
105-
"fqn": "@scope/jsii-calc-base-of-base.VeryBaseProps"
106-
}
105+
"@scope/jsii-calc-base-of-base.VeryBaseProps"
107106
],
108107
"kind": "interface",
109108
"locationInModule": {
@@ -128,5 +127,5 @@
128127
}
129128
},
130129
"version": "0.9.0",
131-
"fingerprint": "kY67AXY3VfrjDTcaGA947JNHQsShp1+YEr9p0JkgKW4="
130+
"fingerprint": "iWT7GmFaVPERM/zg8WXtKv7ydudD28ixjJDVfms7DJ4="
132131
}

packages/jsii-calc-bundled/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
"name": "Amazon Web Services",
88
"url": "https://aws.amazon.com"
99
},
10-
"scripts": {
11-
"build": "true"
12-
},
1310
"license": "Apache-2.0",
1411
"repository": {
1512
"type": "git",

0 commit comments

Comments
 (0)