Skip to content

Commit

Permalink
chore(release): 1.68.0 (#3765)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Sep 22, 2022
2 parents 2c027f5 + 9b12bd0 commit b45f2f6
Show file tree
Hide file tree
Showing 66 changed files with 4,479 additions and 2,397 deletions.
40 changes: 39 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/66279577?v=4",
"profile": "https://github.com/comcalvi",
"contributions": [
"code"
"code",
"review"
]
},
{
Expand Down Expand Up @@ -1428,6 +1429,43 @@
"contributions": [
"bug"
]
},
{
"login": "DanielMSchmidt",
"name": "Daniel Schmidt",
"avatar_url": "https://avatars.githubusercontent.com/u/1337046?v=4",
"profile": "http://danielmschmidt.de/",
"contributions": [
"bug",
"code"
]
},
{
"login": "kaizencc",
"name": "Kaizen Conroy",
"avatar_url": "https://avatars.githubusercontent.com/u/36202692?v=4",
"profile": "https://github.com/kaizencc",
"contributions": [
"code"
]
},
{
"login": "Naumel",
"name": "Naumel",
"avatar_url": "https://avatars.githubusercontent.com/u/104374999?v=4",
"profile": "https://github.com/Naumel",
"contributions": [
"review"
]
},
{
"login": "cn-cit",
"name": "cn-cit",
"avatar_url": "https://avatars.githubusercontent.com/u/27255477?v=4",
"profile": "https://github.com/cn-cit",
"contributions": [
"bug"
]
}
],
"repoType": "github",
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.68.0](https://github.com/aws/jsii/compare/v1.67.0...v1.68.0) (2022-09-22)


### Features

* **kernel:** distinguish framework errors from userland errors in Java ([#3747](https://github.com/aws/jsii/issues/3747)) ([a4d39c6](https://github.com/aws/jsii/commit/a4d39c6fb619cd4d7c9103ec70a731ab6fb23374))


### Bug Fixes

* **jsii:** unable to return Promise<void> ([#3752](https://github.com/aws/jsii/issues/3752)) ([852b3dc](https://github.com/aws/jsii/commit/852b3dc5da113546bc090d99f9250104f526f5af)), closes [#51](https://github.com/aws/jsii/issues/51)
* **pacmak:** .NET bindings fail to compile with error CS8120 ([#3760](https://github.com/aws/jsii/issues/3760)) ([783ec7f](https://github.com/aws/jsii/commit/783ec7f1d40619677f34318ee247244b682cd92d)), closes [#3759](https://github.com/aws/jsii/issues/3759)
* **runtime:** type not found ([#3763](https://github.com/aws/jsii/issues/3763)) ([c7dfad3](https://github.com/aws/jsii/commit/c7dfad3ec905a5ee795be1d313d9c078ab3b4234)), closes [#3742](https://github.com/aws/jsii/issues/3742)

## [1.67.0](https://github.com/aws/jsii/compare/v1.66.0...v1.67.0) (2022-09-02)


Expand Down
382 changes: 195 additions & 187 deletions README.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion gh-pages/content/specification/6-compliance-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This section details the current state of each language binding with respect to our standard compliance suite.


| number | test | java (98.33%) | golang (79.17%) | Dotnet | Python |
| number | test | java (98.35%) | golang (79.34%) | Dotnet | Python |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------------------------------------------- | ------ | ------ |
| 1 | asyncOverrides_overrideCallsSuper | 🟢 | [🔴](https://github.com/aws/jsii/issues/2670) |||
| 2 | [arrayReturnedByMethodCanBeRead]("Array created in the kernel can be queried for its elements") | 🟢 | 🟢 |||
Expand Down Expand Up @@ -127,3 +127,4 @@ This section details the current state of each language binding with respect to
| 118 | [callbackParameterIsInterface]("Validates pure interfaces can be passed to callbacks") || 🟢 |||
| 119 | [classCanBeUsedWhenNotExpressedlyLoaded]("Validates that types not explicitly loaded by the user can safely be returned by JS code") | 🟢 | 🟢 |||
| 120 | [downcasting]("Ensures unsafe-cast features work as expected") || 🟢 |||
| 121 | [strippedDeprecatedMemberCanBeReceived]("Ensures --strip-deprecated does not cause odd runtime errors") | 🟢 | 🟢 |||
2 changes: 1 addition & 1 deletion gh-pages/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mkdocs~=1.3.1
mkdocs-awesome-pages-plugin~=2.8.0
mkdocs-material~=8.4.2
mkdocs-material~=8.5.2
mkdocs-git-revision-date-plugin~=0.3.2
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"rejectCycles": true
}
},
"version": "1.67.0"
"version": "1.68.0"
}
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
},
"devDependencies": {
"@jest/types": "^28.1.3",
"@types/jest": "^28.1.8",
"@types/node": "^14.18.26",
"@typescript-eslint/eslint-plugin": "^5.34.0",
"@typescript-eslint/parser": "^5.34.0",
"all-contributors-cli": "^6.20.0",
"eslint": "^8.22.0",
"@types/jest": "^29.0.3",
"@types/node": "^14.18.29",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"all-contributors-cli": "^6.20.4",
"eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-node": "^0.3.6",
"eslint-import-resolver-typescript": "^3.5.0",
"eslint-import-resolver-typescript": "^3.5.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^28.1.3",
"jest": "^29.0.3",
"jest-circus": "^28.1.3",
"jest-config": "^28.1.3",
"jest-expect-message": "^1.0.2",
"lerna": "^5.4.3",
"jest-expect-message": "^1.1.2",
"lerna": "^5.5.2",
"prettier": "^2.7.1",
"standard-version": "^9.5.0",
"ts-node": "^10.9.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/@jsii/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<PackageReference Update="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="5.0.0" />

<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.2.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.3.0" />
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" />
<PackageReference Update="Microsoft.CodeQuality.Analyzers" Version="3.3.2" />

<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.3.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Update="NSubstitute" Version="4.4.0" />
<PackageReference Update="xunit" Version="2.4.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.5" />
Expand Down
4 changes: 2 additions & 2 deletions packages/@jsii/benchmarks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"dependencies": {
"fs-extra": "^10.1.0",
"jsii": "^0.0.0",
"npm": "^8.18.0",
"npm": "^8.19.2",
"tar": "^6.1.11",
"typescript": "~3.9.10",
"yargs": "^16.2.0"
},
"devDependencies": {
"@types/glob": "^7.2.0",
"@types/glob": "^8.0.0",
"glob": "^8.0.3"
},
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using CompositeOperation = Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation;
using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace;
using Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace;
using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.DeprecationRemoval;
using Newtonsoft.Json.Linq;
using Xunit;
using Xunit.Abstractions;
Expand Down Expand Up @@ -1534,9 +1535,15 @@ public void ClassCanBeUsedWhenNotExpressedlyLoaded()
}

private sealed class Cdk16625Impl: Cdk16625 {
protected override double Unwrap(IRandomNumberGenerator rng) {
return rng.Next();
}
protected override double Unwrap(IRandomNumberGenerator rng) {
return rng.Next();
}
}

[Fact(DisplayName = Prefix + nameof(StrippedDeprecatedMemberCanBeReceived))]
public void StrippedDeprecatedMemberCanBeReceived()
{
Assert.NotNull(InterfaceFactory.Create());
}
}
}
7 changes: 7 additions & 0 deletions packages/@jsii/go-runtime-test/project/compliance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/submodule/child"
calclib "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib"
"github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/customsubmodulename"
"github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/deprecationremoval"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
)
Expand Down Expand Up @@ -1655,6 +1656,12 @@ func (suite *ComplianceSuite) TestDownCasting() {
require.Equal(realValue.Foo(), jsii.Number(1337))
}

func (suite *ComplianceSuite) TestStrippedDeprecatedMemberCanBeReceived() {
require := suite.Require()

require.NotNil(deprecationremoval.InterfaceFactory_Create())
}

// required to make `go test` recognize the suite.
func TestComplianceSuite(t *testing.T) {
suite.Run(t, new(ComplianceSuite))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import software.amazon.jsii.ComplianceSuiteHarness;
Expand All @@ -14,6 +15,7 @@
import software.amazon.jsii.tests.calculator.cdk16625.Cdk16625;
import software.amazon.jsii.tests.calculator.composition.CompositeOperation;
import software.amazon.jsii.tests.calculator.custom_submodule_name.NestingClass.NestedStruct;
import software.amazon.jsii.tests.calculator.lib.deprecation_removal.InterfaceFactory;
import software.amazon.jsii.tests.calculator.lib.EnumFromScopedModule;
import software.amazon.jsii.tests.calculator.lib.IFriendly;
import software.amazon.jsii.tests.calculator.lib.MyFirstStruct;
Expand All @@ -24,10 +26,6 @@

import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.Instant;
Expand Down Expand Up @@ -334,8 +332,11 @@ public void exceptions() {
calc3.add(3);
assertEquals(23, calc3.getValue());
boolean thrown = false;
try { calc3.add(10); }
catch (Exception e) { thrown = true; }
try {
calc3.add(10);
} catch (RuntimeException e) {
thrown = true;
}
assertTrue(thrown);
calc3.setMaxValue(40);
calc3.add(10);
Expand Down Expand Up @@ -449,7 +450,7 @@ public java.lang.Number overrideMe(java.lang.Number mult) {
boolean thrown = false;
try {
obj.callMe();
} catch (JsiiException e) {
} catch (RuntimeException e) {
assertTrue(e.getMessage().contains( "Thrown by native code"));
thrown = true;
}
Expand Down Expand Up @@ -518,7 +519,7 @@ public String getTheProperty() {
boolean thrown = false;
try {
so.retrieveValueOfTheProperty();
} catch (Exception e) {
} catch (RuntimeException e) {
assertTrue(e.getMessage().contains("Oh no, this is bad"));
thrown = true;
}
Expand All @@ -536,7 +537,7 @@ public void setTheProperty(String value) {
boolean thrown = false;
try {
so.modifyValueOfTheProperty("Hii");
} catch (Exception e) {
} catch (RuntimeException e) {
assertTrue(e.getMessage().contains("Exception from overloaded setter"));
thrown = true;
}
Expand Down Expand Up @@ -1787,13 +1788,17 @@ public void iso8601DoesNotDeserializeToDate() {
final String nowAsISO = df.format(new Date());

final IWallClock wallClock = new IWallClock() {
@NotNull
@Override
public String iso8601Now() {
return nowAsISO;
}
};

final Entropy entropy = new Entropy(wallClock) {
public String repeat(final String word) {
@NotNull
@Override
public String repeat(@NotNull final String word) {
return word;
}
};
Expand All @@ -1804,11 +1809,17 @@ public String repeat(final String word) {
@Test
public void classCanBeUsedWhenNotExpressedlyLoaded() {
final Cdk16625 subject = new Cdk16625() {
@NotNull
@Override
protected java.lang.Number unwrap(final IRandomNumberGenerator rng) {
return rng.next();
}
};
subject.test();
}

@Test
public void strippedDeprecatedMemberCanBeReceived() {
assertNotNull(InterfaceFactory.create());
}
}
2 changes: 1 addition & 1 deletion packages/@jsii/java-runtime/BundledRuntime.t.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ${resources.map(extractResource).map(indent(12)).join('\n')}
return entrypoint.toString();
} catch (final IOException ioe) {
throw new JsiiException("Unable to extract bundled @jsii/runtime library", ioe);
throw new JsiiError("Unable to extract bundled @jsii/runtime library", ioe);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void loadModule(final JsiiModule module) {
Files.delete(tarball.getParent());
}
} catch (IOException e) {
throw new JsiiException("Unable to extract resource " + module.getBundleResourceName(), e);
throw new JsiiError("Unable to extract resource " + module.getBundleResourceName(), e);
}
}

Expand Down Expand Up @@ -226,7 +226,7 @@ public List<Callback> pendingCallbacks() {

JsonNode callbacksResp = resp.get("callbacks");
if (callbacksResp == null || !callbacksResp.isArray()) {
throw new JsiiException("Expecting a 'callbacks' key with an array in response");
throw new JsiiError("Expecting a 'callbacks' key with an array in response");
}

ArrayNode callbacksArray = (ArrayNode) callbacksResp;
Expand Down
Loading

0 comments on commit b45f2f6

Please sign in to comment.