Skip to content

Commit

Permalink
feat(jsii-spec): Model parameter optionality (#432)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
RomainMuller authored Apr 10, 2019
1 parent fe942b3 commit 21e485a
Show file tree
Hide file tree
Showing 360 changed files with 5,703 additions and 5,794 deletions.
2,794 changes: 1,401 additions & 1,393 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"lerna": "^3.13.1",
"nodeunit": "^0.11.3",
"nyc": "^13.3.0",
"tslint": "^5.13.0",
"typescript": "^3.3.3333"
"tslint": "^5.15.0",
"typescript": "^3.4.2"
}
}
14 changes: 7 additions & 7 deletions packages/codemaker/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/codemaker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"@types/node": "^8.10.43",
"@types/nodeunit": "^0.0.30",
"nodeunit": "^0.11.3",
"typescript": "^3.3.3333"
"typescript": "^3.4.2"
},
"dependencies": {
"camelcase": "^5.2.0",
"camelcase": "^5.3.1",
"decamelize": "^1.2.0",
"fs-extra": "^7.0.1"
},
Expand Down
15 changes: 8 additions & 7 deletions packages/jsii-calc-base-of-base/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"type": "git",
"url": "https://github.com/awslabs/jsii.git"
},
"schema": "jsii/1.0",
"schema": "jsii/0.10.0",
"targets": {
"dotnet": {
"namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace",
Expand All @@ -35,15 +35,14 @@
"python": {
"distName": "scope.jsii-calc-base-of-base",
"module": "scope.jsii_calc_base_of_base"
}
},
"sphinx": {}
},
"types": {
"@scope/jsii-calc-base-of-base.Very": {
"assembly": "@scope/jsii-calc-base-of-base",
"fqn": "@scope/jsii-calc-base-of-base.Very",
"initializer": {
"initializer": true
},
"initializer": {},
"kind": "class",
"locationInModule": {
"filename": "lib/index.ts",
Expand All @@ -57,7 +56,9 @@
},
"name": "hey",
"returns": {
"primitive": "number"
"type": {
"primitive": "number"
}
}
}
],
Expand Down Expand Up @@ -90,5 +91,5 @@
}
},
"version": "0.9.0",
"fingerprint": "tvV+QeaiensaQM3kSC1xTy0VR+VsxkqujFF65n0AnCA="
"fingerprint": "1O+di7RZanglLmeCs57JLdO5m98kRnkL4uLPnDbm/z4="
}
23 changes: 11 additions & 12 deletions packages/jsii-calc-base/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
},
"dependencies": {
"@scope/jsii-calc-base-of-base": {
"peer": true,
"targets": {
"dotnet": {
"namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace",
Expand All @@ -28,7 +27,8 @@
"python": {
"distName": "scope.jsii-calc-base-of-base",
"module": "scope.jsii_calc_base_of_base"
}
},
"sphinx": {}
},
"version": "0.9.0"
}
Expand All @@ -42,7 +42,7 @@
"type": "git",
"url": "https://github.com/awslabs/jsii.git"
},
"schema": "jsii/1.0",
"schema": "jsii/0.10.0",
"targets": {
"dotnet": {
"namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace",
Expand All @@ -61,7 +61,8 @@
"python": {
"distName": "scope.jsii-calc-base",
"module": "scope.jsii_calc_base"
}
},
"sphinx": {}
},
"types": {
"@scope/jsii-calc-base.Base": {
Expand All @@ -71,9 +72,7 @@
"summary": "A base class."
},
"fqn": "@scope/jsii-calc-base.Base",
"initializer": {
"initializer": true
},
"initializer": {},
"kind": "class",
"locationInModule": {
"filename": "lib/index.ts",
Expand All @@ -90,7 +89,9 @@
},
"name": "typeName",
"returns": {
"primitive": "any"
"type": {
"primitive": "any"
}
}
}
],
Expand All @@ -101,9 +102,7 @@
"datatype": true,
"fqn": "@scope/jsii-calc-base.BaseProps",
"interfaces": [
{
"fqn": "@scope/jsii-calc-base-of-base.VeryBaseProps"
}
"@scope/jsii-calc-base-of-base.VeryBaseProps"
],
"kind": "interface",
"locationInModule": {
Expand All @@ -128,5 +127,5 @@
}
},
"version": "0.9.0",
"fingerprint": "kY67AXY3VfrjDTcaGA947JNHQsShp1+YEr9p0JkgKW4="
"fingerprint": "iWT7GmFaVPERM/zg8WXtKv7ydudD28ixjJDVfms7DJ4="
}
3 changes: 0 additions & 3 deletions packages/jsii-calc-bundled/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
"name": "Amazon Web Services",
"url": "https://aws.amazon.com"
},
"scripts": {
"build": "true"
},
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit 21e485a

Please sign in to comment.