From 161a459dcd09438bfa901ff3a4cf1edbf175f3ca Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Mon, 8 Jul 2019 12:31:56 +0200 Subject: [PATCH] feat: use classes for structs in Python (#3232) Update jsii to 0.14.0 to achieve the following: - Structs are now modeled as regular classes instead of TypedDicts, making their use more straightforward and snake_casing the attribute names. - Fix an issue where passing a variadic function taking structs would ignore its variadicness. - Generate ReST-style docstrings instead of Google-style docstrings for maximum IDE compatibility - Rectify the casing of the "MiB" suffix at the end of ECS constructs (used to be converted to `_mi_b`, now converted to `_mib`). camelCased dicts can still be passed, but instantiating classes with snake_cased constructor arguments is preferred. BREAKING CHANGES: * **Python**: `memory_limit_mi_b` and others are now named `memory_limit_mib`. --- package-lock.json | 32 ++++++++-------- package.json | 2 +- packages/decdk/package-lock.json | 32 ++++++++-------- packages/decdk/package.json | 6 +-- tools/awslint/package-lock.json | 24 ++++++------ tools/awslint/package.json | 4 +- tools/cdk-build-tools/package-lock.json | 50 +++++++++++++++++-------- tools/cdk-build-tools/package.json | 4 +- 8 files changed, 86 insertions(+), 68 deletions(-) diff --git a/package-lock.json b/package-lock.json index c40ebee8092d9..eaee55dc7c5ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6534,13 +6534,13 @@ "dev": true }, "jsii-diff": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/jsii-diff/-/jsii-diff-0.13.3.tgz", - "integrity": "sha512-hlFZlw3tM0mMl/X5BuD0+WwpXBpvs9LHdIQkdHB0npnA24DMvhD8MMuqcUETn85ST7rI7jnZO4fljtGfmm+H8Q==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jsii-diff/-/jsii-diff-0.14.0.tgz", + "integrity": "sha512-77ydGOUs5oJoJxdgJZrWLdT2ly0+8AuD1OY/X3m3jqloa5YOCrAp7P36ZXJ6Ya0meoqie5N+Pq7kclPXEJBt7w==", "dev": true, "requires": { - "jsii-reflect": "^0.13.3", - "jsii-spec": "^0.13.3", + "jsii-reflect": "^0.14.0", + "jsii-spec": "^0.14.0", "log4js": "^4.3.1", "typescript": "^3.5.2", "yargs": "^13.2.4" @@ -6666,15 +6666,15 @@ } }, "jsii-reflect": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-0.13.3.tgz", - "integrity": "sha512-it07jY9MNZivPK7l2yyAb9U4VyoxyWy+OBV/j+h5SL6/r3YwB3RDL09rh7eLggNKA8LKwrPsrCUbVKcdDOnjQA==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-0.14.0.tgz", + "integrity": "sha512-lnOsTYe9uWi5V/Sxg8Mpr/Nd6plArulhyreqla2/mOJtKZCxsWmGG5A99lOOBduGg1Pjc+KZbmYL+JvYbHQ7Cg==", "dev": true, "requires": { "colors": "^1.3.3", "fs-extra": "^8.0.1", - "jsii-spec": "^0.13.3", - "oo-ascii-tree": "^0.13.3", + "jsii-spec": "^0.14.0", + "oo-ascii-tree": "^0.14.0", "yargs": "^13.2.4" }, "dependencies": { @@ -6798,9 +6798,9 @@ } }, "jsii-spec": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.13.3.tgz", - "integrity": "sha512-l0aXyzYIDUY8HZJmxE8kdTrsjLqcttReqibWnVfxWyaWy+2bgytafvgMLcmy3uzLSB9YaIleyCuc5a+8qZOG/A==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.14.0.tgz", + "integrity": "sha512-hXSAtc4dhy9O0m41Eg6dufuvbDpVk7Kfb8Tu5xINwZe/8iXwCWS3XrnrkjzBrk82RgnPF6x+NQ9+i4lnqscJ4w==", "dev": true, "requires": { "jsonschema": "^1.2.4" @@ -8121,9 +8121,9 @@ } }, "oo-ascii-tree": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-0.13.3.tgz", - "integrity": "sha512-waYxRnCeGqINM8hf/VV7Fqlv6kWrO4enUct5ZaB075LGhvFC7mA9l/4mUEqZUCGqyRu4cCQyIm9Bq3WJbBiFEQ==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-0.14.0.tgz", + "integrity": "sha512-GkVJc1rZMapZyX/AMHciiQaLd2xMKbnCpfDD73mkqg9FJSGB6543fCRboLesnoGTpUENkpntghbmGsMRqoW4kQ==", "dev": true }, "opener": { diff --git a/package.json b/package.json index 8199fad715d99..42620d9d8e7ac 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@types/nodeunit": "^0.0.30", "conventional-changelog-cli": "^2.0.21", "jest": "^24.8.0", - "jsii-diff": "0.13.3", + "jsii-diff": "^0.14.0", "lerna": "^3.15.0", "nodeunit": "^0.11.3", "nyc": "^14.1.1", diff --git a/packages/decdk/package-lock.json b/packages/decdk/package-lock.json index 656d3055d93ee..05886c8fab9d5 100644 --- a/packages/decdk/package-lock.json +++ b/packages/decdk/package-lock.json @@ -1,6 +1,6 @@ { "name": "decdk", - "version": "0.36.1", + "version": "0.37.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3437,16 +3437,16 @@ "dev": true }, "jsii": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/jsii/-/jsii-0.13.3.tgz", - "integrity": "sha512-eGPURWfmR1w0T0QD9eggWAJ48QZA3Gxbe2yCzAJIswkWMX1lPYG6v7V5XPwMDCrQVmS0rL8HSLbI8OWEb6tTdg==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jsii/-/jsii-0.14.0.tgz", + "integrity": "sha512-hs6LobQPIOrcaTCZ4KkhT2lTE6uaLAyXPWD1sySj7ekWs6W64DplrzK5Fg5K1y0MoegodKzt4IcX7ST6kBEFhw==", "dev": true, "requires": { "case": "^1.6.1", "colors": "^1.3.3", "deep-equal": "^1.0.1", "fs-extra": "^8.0.1", - "jsii-spec": "^0.13.3", + "jsii-spec": "^0.14.0", "log4js": "^4.3.1", "semver": "^6.1.1", "sort-json": "^2.0.0", @@ -3464,21 +3464,21 @@ } }, "jsii-reflect": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-0.13.3.tgz", - "integrity": "sha512-it07jY9MNZivPK7l2yyAb9U4VyoxyWy+OBV/j+h5SL6/r3YwB3RDL09rh7eLggNKA8LKwrPsrCUbVKcdDOnjQA==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-0.14.0.tgz", + "integrity": "sha512-lnOsTYe9uWi5V/Sxg8Mpr/Nd6plArulhyreqla2/mOJtKZCxsWmGG5A99lOOBduGg1Pjc+KZbmYL+JvYbHQ7Cg==", "requires": { "colors": "^1.3.3", "fs-extra": "^8.0.1", - "jsii-spec": "^0.13.3", - "oo-ascii-tree": "^0.13.3", + "jsii-spec": "^0.14.0", + "oo-ascii-tree": "^0.14.0", "yargs": "^13.2.4" } }, "jsii-spec": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.13.3.tgz", - "integrity": "sha512-l0aXyzYIDUY8HZJmxE8kdTrsjLqcttReqibWnVfxWyaWy+2bgytafvgMLcmy3uzLSB9YaIleyCuc5a+8qZOG/A==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.14.0.tgz", + "integrity": "sha512-hXSAtc4dhy9O0m41Eg6dufuvbDpVk7Kfb8Tu5xINwZe/8iXwCWS3XrnrkjzBrk82RgnPF6x+NQ9+i4lnqscJ4w==", "requires": { "jsonschema": "^1.2.4" } @@ -4013,9 +4013,9 @@ } }, "oo-ascii-tree": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-0.13.3.tgz", - "integrity": "sha512-waYxRnCeGqINM8hf/VV7Fqlv6kWrO4enUct5ZaB075LGhvFC7mA9l/4mUEqZUCGqyRu4cCQyIm9Bq3WJbBiFEQ==" + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-0.14.0.tgz", + "integrity": "sha512-GkVJc1rZMapZyX/AMHciiQaLd2xMKbnCpfDD73mkqg9FJSGB6543fCRboLesnoGTpUENkpntghbmGsMRqoW4kQ==" }, "optimist": { "version": "0.6.1", diff --git a/packages/decdk/package.json b/packages/decdk/package.json index 11df3c1a64383..3a95d34954afd 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -141,7 +141,7 @@ "@aws-cdk/cx-api": "^0.37.0", "@aws-cdk/region-info": "^0.37.0", "fs-extra": "^8.0.1", - "jsii-reflect": "^0.13.3", + "jsii-reflect": "^0.14.0", "jsonschema": "^1.2.4", "yaml": "1.6.0", "yargs": "^13.2.4" @@ -152,7 +152,7 @@ "@types/yaml": "1.0.2", "@types/yargs": "^13.0.0", "jest": "^24.8.0", - "jsii": "^0.13.3" + "jsii": "^0.14.0" }, "keywords": [ "aws", @@ -162,4 +162,4 @@ "engines": { "node": ">= 8.10.0" } -} \ No newline at end of file +} diff --git a/tools/awslint/package-lock.json b/tools/awslint/package-lock.json index df3cabc2ca9a5..d5e4169bbfbbb 100644 --- a/tools/awslint/package-lock.json +++ b/tools/awslint/package-lock.json @@ -1,6 +1,6 @@ { "name": "awslint", - "version": "0.36.1", + "version": "0.37.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -346,21 +346,21 @@ } }, "jsii-reflect": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-0.13.3.tgz", - "integrity": "sha512-it07jY9MNZivPK7l2yyAb9U4VyoxyWy+OBV/j+h5SL6/r3YwB3RDL09rh7eLggNKA8LKwrPsrCUbVKcdDOnjQA==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-0.14.0.tgz", + "integrity": "sha512-lnOsTYe9uWi5V/Sxg8Mpr/Nd6plArulhyreqla2/mOJtKZCxsWmGG5A99lOOBduGg1Pjc+KZbmYL+JvYbHQ7Cg==", "requires": { "colors": "^1.3.3", "fs-extra": "^8.0.1", - "jsii-spec": "^0.13.3", - "oo-ascii-tree": "^0.13.3", + "jsii-spec": "^0.14.0", + "oo-ascii-tree": "^0.14.0", "yargs": "^13.2.4" } }, "jsii-spec": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.13.3.tgz", - "integrity": "sha512-l0aXyzYIDUY8HZJmxE8kdTrsjLqcttReqibWnVfxWyaWy+2bgytafvgMLcmy3uzLSB9YaIleyCuc5a+8qZOG/A==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.14.0.tgz", + "integrity": "sha512-hXSAtc4dhy9O0m41Eg6dufuvbDpVk7Kfb8Tu5xINwZe/8iXwCWS3XrnrkjzBrk82RgnPF6x+NQ9+i4lnqscJ4w==", "requires": { "jsonschema": "^1.2.4" } @@ -464,9 +464,9 @@ } }, "oo-ascii-tree": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-0.13.3.tgz", - "integrity": "sha512-waYxRnCeGqINM8hf/VV7Fqlv6kWrO4enUct5ZaB075LGhvFC7mA9l/4mUEqZUCGqyRu4cCQyIm9Bq3WJbBiFEQ==" + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-0.14.0.tgz", + "integrity": "sha512-GkVJc1rZMapZyX/AMHciiQaLd2xMKbnCpfDD73mkqg9FJSGB6543fCRboLesnoGTpUENkpntghbmGsMRqoW4kQ==" }, "os-locale": { "version": "3.1.0", diff --git a/tools/awslint/package.json b/tools/awslint/package.json index b180643954403..62147c472bd1c 100644 --- a/tools/awslint/package.json +++ b/tools/awslint/package.json @@ -19,8 +19,8 @@ "camelcase": "^5.3.1", "colors": "^1.3.3", "fs-extra": "^8.0.1", - "jsii-reflect": "^0.13.3", - "jsii-spec": "^0.13.3", + "jsii-reflect": "^0.14.0", + "jsii-spec": "^0.14.0", "yargs": "^13.2.4" }, "devDependencies": { diff --git a/tools/cdk-build-tools/package-lock.json b/tools/cdk-build-tools/package-lock.json index 908018e6a9b89..c599c896cb7d1 100644 --- a/tools/cdk-build-tools/package-lock.json +++ b/tools/cdk-build-tools/package-lock.json @@ -1,6 +1,6 @@ { "name": "cdk-build-tools", - "version": "0.36.1", + "version": "0.37.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -989,9 +989,9 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codemaker": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/codemaker/-/codemaker-0.13.3.tgz", - "integrity": "sha512-bd3CNFVK8h+s7Th35ehn29j5XhI2XrPnJTgVhw5W+9uq1yDXIenGbJRYUcTQLHsDQyn9RfNfIX/aO2ctxIWfVA==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/codemaker/-/codemaker-0.14.0.tgz", + "integrity": "sha512-JNeABIthDEeKk0khdnMw2aRdc7w0MFfmbB0b7HKw/4IHlw6MtNskyyEXPYqbhLEhmlMlOnVcVJH+S4AQgE8eVA==", "requires": { "camelcase": "^5.3.1", "decamelize": "^1.2.0", @@ -3183,15 +3183,15 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, "jsii": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/jsii/-/jsii-0.13.3.tgz", - "integrity": "sha512-eGPURWfmR1w0T0QD9eggWAJ48QZA3Gxbe2yCzAJIswkWMX1lPYG6v7V5XPwMDCrQVmS0rL8HSLbI8OWEb6tTdg==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jsii/-/jsii-0.14.0.tgz", + "integrity": "sha512-hs6LobQPIOrcaTCZ4KkhT2lTE6uaLAyXPWD1sySj7ekWs6W64DplrzK5Fg5K1y0MoegodKzt4IcX7ST6kBEFhw==", "requires": { "case": "^1.6.1", "colors": "^1.3.3", "deep-equal": "^1.0.1", "fs-extra": "^8.0.1", - "jsii-spec": "^0.13.3", + "jsii-spec": "^0.14.0", "log4js": "^4.3.1", "semver": "^6.1.1", "sort-json": "^2.0.0", @@ -3208,16 +3208,17 @@ } }, "jsii-pacmak": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-0.13.3.tgz", - "integrity": "sha512-W0GrV9eFOElF++LV9KiBHwxFmnxLZpFTs7Bt85H21WP3n16hFNTHPBsgVJ4IEGqAoZR0Ysr5VO5souyXvhXzkg==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-0.14.0.tgz", + "integrity": "sha512-1+2axMuGmns3VT5BXTOdbKkuHT34OvNOW95Vt4f/U0OqV29CMBvJaj65NPQR+8iRa8tQvOtDeL1OYEj7fAyIfg==", "requires": { "clone": "^2.1.2", - "codemaker": "^0.13.3", + "codemaker": "^0.14.0", "commonmark": "^0.29.0", "escape-string-regexp": "^2.0.0", "fs-extra": "^8.0.1", - "jsii-spec": "^0.13.3", + "jsii-reflect": "^0.14.0", + "jsii-spec": "^0.14.0", "spdx-license-list": "^6.0.0", "xmlbuilder": "^13.0.2", "yargs": "^13.2.4" @@ -3230,10 +3231,22 @@ } } }, + "jsii-reflect": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-0.14.0.tgz", + "integrity": "sha512-lnOsTYe9uWi5V/Sxg8Mpr/Nd6plArulhyreqla2/mOJtKZCxsWmGG5A99lOOBduGg1Pjc+KZbmYL+JvYbHQ7Cg==", + "requires": { + "colors": "^1.3.3", + "fs-extra": "^8.0.1", + "jsii-spec": "^0.14.0", + "oo-ascii-tree": "^0.14.0", + "yargs": "^13.2.4" + } + }, "jsii-spec": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.13.3.tgz", - "integrity": "sha512-l0aXyzYIDUY8HZJmxE8kdTrsjLqcttReqibWnVfxWyaWy+2bgytafvgMLcmy3uzLSB9YaIleyCuc5a+8qZOG/A==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.14.0.tgz", + "integrity": "sha512-hXSAtc4dhy9O0m41Eg6dufuvbDpVk7Kfb8Tu5xINwZe/8iXwCWS3XrnrkjzBrk82RgnPF6x+NQ9+i4lnqscJ4w==", "requires": { "jsonschema": "^1.2.4" } @@ -3834,6 +3847,11 @@ "wrappy": "1" } }, + "oo-ascii-tree": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-0.14.0.tgz", + "integrity": "sha512-GkVJc1rZMapZyX/AMHciiQaLd2xMKbnCpfDD73mkqg9FJSGB6543fCRboLesnoGTpUENkpntghbmGsMRqoW4kQ==" + }, "opener": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index fee6255e18f38..f0e7c56397812 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -40,8 +40,8 @@ "colors": "^1.3.3", "fs-extra": "^8.0.1", "jest": "^24.8.0", - "jsii": "^0.13.3", - "jsii-pacmak": "^0.13.3", + "jsii": "^0.14.0", + "jsii-pacmak": "^0.14.0", "nodeunit": "^0.11.3", "nyc": "^14.1.1", "ts-jest": "^24.0.2",