Skip to content

Commit

Permalink
chore(release): 1.72.0 (#3873)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Dec 5, 2022
2 parents f1f58ae + 2788224 commit 4b8828b
Show file tree
Hide file tree
Showing 75 changed files with 6,944 additions and 3,234 deletions.
18 changes: 18 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,24 @@
"contributions": [
"bug"
]
},
{
"login": "jpantzlaff",
"name": "John Pantzlaff",
"avatar_url": "https://avatars.githubusercontent.com/u/33850400?v=4",
"profile": "https://github.com/jpantzlaff",
"contributions": [
"code"
]
},
{
"login": "TomBonnerAtDerivitec",
"name": "Tom Bonner",
"avatar_url": "https://avatars.githubusercontent.com/u/83637254?v=4",
"profile": "https://github.com/TomBonnerAtDerivitec",
"contributions": [
"bug"
]
}
],
"repoType": "github",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ jobs:
- '14' # EOL 2023-04-30
- '16' # EOL 2023-09-11
- '18' # EOL 2025-04-30
- '19' # EOL 2023-06-01
os: [ubuntu-latest]
python: ['3.7']
# Add specific combinations to be tested against "node 14" (to restrict cardinality)
Expand Down
4 changes: 4 additions & 0 deletions .mergify/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ queue_rules:
- status-success~=^Test \(.* node 14 .*$
- status-success~=^Test \(.* node 16 .*$
- status-success~=^Test \(.* node 18 .*$
- status-success~=^Test \(.* node 19 .*$
# One test for each supported dotnet version
- status-success~=^Test \(.* dotnet 3\.1\.x .*$
- status-success~=^Test \(.* dotnet 6\.0\.x .*$
Expand Down Expand Up @@ -63,6 +64,7 @@ pull_request_rules:
- status-success~=^Test \(.* node 14 .*$
- status-success~=^Test \(.* node 16 .*$
- status-success~=^Test \(.* node 18 .*$
- status-success~=^Test \(.* node 19 .*$
# One test for each supported dotnet version
- status-success~=^Test \(.* dotnet 3\.1\.x .*$
- status-success~=^Test \(.* dotnet 6\.0\.x .*$
Expand Down Expand Up @@ -115,6 +117,7 @@ pull_request_rules:
- status-success~=^Test \(.* node 14 .*$
- status-success~=^Test \(.* node 16 .*$
- status-success~=^Test \(.* node 18 .*$
- status-success~=^Test \(.* node 19 .*$
# One test for each supported dotnet version
- status-success~=^Test \(.* dotnet 3\.1\.x .*$
- status-success~=^Test \(.* dotnet 6\.0\.x .*$
Expand Down Expand Up @@ -167,6 +170,7 @@ pull_request_rules:
- status-success~=^Test \(.* node 14 .*$
- status-success~=^Test \(.* node 16 .*$
- status-success~=^Test \(.* node 18 .*$
- status-success~=^Test \(.* node 19 .*$
# One test for each supported dotnet version
- status-success~=^Test \(.* dotnet 3\.1\.x .*$
- status-success~=^Test \(.* dotnet 6\.0\.x .*$
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

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.72.0](https://github.com/aws/jsii/compare/v1.71.0...v1.72.0) (2022-12-05)


### Features

* **check-node:** allow silencing @jsii/check-node warnings ([#3841](https://github.com/aws/jsii/issues/3841)) ([880dbcc](https://github.com/aws/jsii/commit/880dbccc883005d10f00a1536561e0fe84b5fda6)), closes [#3817](https://github.com/aws/jsii/issues/3817) [#3171](https://github.com/aws/jsii/issues/3171)
* **python:** streaming bin script output ([#3794](https://github.com/aws/jsii/issues/3794)) ([7a41349](https://github.com/aws/jsii/commit/7a41349b6abf230c6798fe8f0019fa5eb7584020)), closes [#3782](https://github.com/aws/jsii/issues/3782)


### Bug Fixes

* **dotnet:** broken error name deserialization ([#3855](https://github.com/aws/jsii/issues/3855)) ([be008d4](https://github.com/aws/jsii/commit/be008d4de8ac65d2dc3c59dedd3993c1850073fb))
* **python:** dereference values returned from Kernel.ainvoke ([#3847](https://github.com/aws/jsii/issues/3847)) ([5643c50](https://github.com/aws/jsii/commit/5643c5057ab5f40f3d76a960fee926720dc1287d))
* **python:** parameter names shadow imported modules ([#3848](https://github.com/aws/jsii/issues/3848)) ([8bac012](https://github.com/aws/jsii/commit/8bac0126832ebce2a5391c86ba9702b12f248b01))
* revert "chore(deps): Bump aws-actions/stale-issue-cleanup from 5 to 6" ([#3850](https://github.com/aws/jsii/issues/3850)) ([6700f1a](https://github.com/aws/jsii/commit/6700f1aa84c1635e739ccf970dfa18b5ca289b83)), closes [aws/jsii#3844](https://github.com/aws/jsii/issues/3844)

## [1.71.0](https://github.com/aws/jsii/compare/v1.70.0...v1.71.0) (2022-11-09)


Expand Down
310 changes: 157 additions & 153 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.35%) | golang (79.34%) | Dotnet | Python |
| number | test | java (98.36%) | golang (79.51%) | 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 @@ -128,3 +128,4 @@ This section details the current state of each language binding with respect to
| 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") | 🟢 | 🟢 |||
| 122 | [exceptionMessage]("Verifies that custom exception names are correctly forwarded") | 🟢 | 🟢 |||
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.4.2
mkdocs-awesome-pages-plugin~=2.8.0
mkdocs-material~=8.5.8
mkdocs-material~=8.5.10
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.71.0"
"version": "1.72.0"
}
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
},
"devDependencies": {
"@jest/types": "^28.1.3",
"@types/jest": "^29.2.1",
"@types/jest": "^29.2.3",
"@types/node": "^14.18.33",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"all-contributors-cli": "^6.24.0",
"eslint": "^8.26.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-node": "^0.3.6",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.2.2",
"jest": "^29.3.1",
"jest-circus": "^28.1.3",
"jest-config": "^28.1.3",
"jest-expect-message": "^1.1.3",
"lerna": "^6.0.1",
"prettier": "^2.7.1",
"lerna": "^6.1.0",
"prettier": "^2.8.0",
"standard-version": "^9.5.0",
"ts-node": "^10.9.1",
"typescript": "~4.7.4"
Expand Down
8 changes: 4 additions & 4 deletions packages/@jsii/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
<ItemGroup>
<!-- Central configuration of dependency versions for all DotNet packages -->

<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<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.3.1" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.4.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.2" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Update="NSubstitute" Version="4.4.0" />
<PackageReference Update="xunit" Version="2.4.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Update="XunitXml.TestLogger" Version="3.0.70" />

<PackageReference Update="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Update="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion packages/@jsii/benchmarks/bin/benchmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { benchmarks } from '../lib';
import { Benchmark } from '../lib/benchmark';

/**
* Format of benchmark output used by continous benchmarking action.
* Format of benchmark output used by continuous benchmarking action.
* See [documentation](https://github.com/benchmark-action/github-action-benchmark/blob/master/README.md) for details
*/
interface ResultsJson {
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/benchmarks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"fs-extra": "^10.1.0",
"jsii": "^0.0.0",
"npm": "^8.19.2",
"npm": "^8.19.3",
"tar": "^6.1.12",
"typescript": "~3.9.10",
"yargs": "^16.2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/check-node/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class NodeRelease {
new NodeRelease(18, { endOfLife: new Date('2025-04-30') }),

// Future (planned releases)
new NodeRelease(19, { endOfLife: new Date('2023-06-01'), untested: true }),
new NodeRelease(19, { endOfLife: new Date('2023-06-01') }),
new NodeRelease(20, { endOfLife: new Date('2026-04-30'), untested: true }),
];

Expand Down
59 changes: 43 additions & 16 deletions packages/@jsii/check-node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ import { NodeRelease } from './constants';
* Checks the current process' node runtime version against the release support
* matrix, and issues a warning to STDERR if the current version is not fully
* supported (i.e: it is deprecated, end-of-life, or untested).
*
* @param envPrefix will be prepended to environment variable names that can be
* used to silence version check warnings.
*/
export function checkNode(): void {
export function checkNode(envPrefix = 'JSII'): void {
const { nodeRelease, knownBroken } = NodeRelease.forThisRuntime();

const defaultCallToAction =
'Should you encounter odd runtime issues, please try using one of the supported release before filing a bug report.';

if (nodeRelease?.endOfLife) {
const qualifier = nodeRelease.endOfLifeDate
? ` on ${nodeRelease.endOfLifeDate.toISOString().slice(0, 10)}`
Expand All @@ -22,28 +28,42 @@ export function checkNode(): void {
`Please upgrade to a supported node version as soon as possible.`,
);
} else if (knownBroken) {
veryVisibleMessage(
bgRed.white.bold,
`Node ${version} is unsupported and has known compatibility issues with this software.`,
);
const silenceVariable = `${envPrefix}_SILENCE_WARNING_KNOWN_BROKEN_NODE_VERSION`;
if (!process.env[silenceVariable])
veryVisibleMessage(
bgRed.white.bold,
`Node ${version} is unsupported and has known compatibility issues with this software.`,
defaultCallToAction,
silenceVariable,
);
} else if (!nodeRelease || nodeRelease.untested) {
veryVisibleMessage(
bgYellow.black,
`This software has not been tested with node ${version}.`,
);
const silenceVariable = `${envPrefix}_SILENCE_WARNING_UNTESTED_NODE_VERSION`;
if (!process.env[silenceVariable]) {
veryVisibleMessage(
bgYellow.black,
`This software has not been tested with node ${version}.`,
defaultCallToAction,
silenceVariable,
);
}
} else if (nodeRelease?.deprecated) {
const deadline = nodeRelease.endOfLifeDate!.toISOString().slice(0, 10);
veryVisibleMessage(
bgYellowBright.black,
`Node ${nodeRelease.majorVersion} is approaching end-of-life and will no longer be supported in new releases after ${deadline}.`,
`Please upgrade to a supported node version as soon as possible.`,
);
const silenceVariable = `${envPrefix}_SILENCE_WARNING_DEPRECATED_NODE_VERSION`;
if (!process.env[silenceVariable]) {
const deadline = nodeRelease.endOfLifeDate!.toISOString().slice(0, 10);
veryVisibleMessage(
bgYellowBright.black,
`Node ${nodeRelease.majorVersion} is approaching end-of-life and will no longer be supported in new releases after ${deadline}.`,
`Please upgrade to a supported node version as soon as possible.`,
silenceVariable,
);
}
}

function veryVisibleMessage(
chalk: Chalk,
message: string,
callToAction = 'You may to encounter runtime issues, and should switch to a supported release.',
callToAction: string,
silenceVariable?: string,
): void {
const lines = [
message,
Expand All @@ -64,6 +84,13 @@ export function checkNode(): void {
release.deprecated ? ' [DEPRECATED]' : ''
}`,
),
// Add blurb on how this message can be silenced (if it can be silenced).
...(silenceVariable
? [
'',
`This warning can be silenced by setting the ${silenceVariable} environment variable.`,
]
: []),
];
const len = Math.max(...lines.map((l) => l.length));
const border = chalk('!'.repeat(len + 8));
Expand Down
Empty file modified packages/@jsii/dotnet-runtime-test/build.sh
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Amazon.JSII.Runtime.Deputy;
using Amazon.JSII.Tests.CalculatorNamespace;
using Amazon.JSII.Tests.CalculatorNamespace.Cdk16625;
using Amazon.JSII.Tests.CalculatorNamespace.Cdk22369;
using CompositeOperation = Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation;
using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace;
using Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace;
Expand Down Expand Up @@ -378,13 +379,22 @@ public void Exceptions()
calc.Add(3);
Assert.Equal(23d, calc.Value);

Assert.Throws<JsiiError>(() => calc.Add(10));
Assert.Throws<Exception>(() => calc.Add(10));

calc.MaxValue = 40;
calc.Add(10);
Assert.Equal(33d, calc.Value);
}

[Fact(DisplayName = Prefix + nameof(ExceptionMessage))]
public void ExceptionMessage()
{
var e = Assert.Throws<Exception>(() =>
new AcceptsPath(new AcceptsPathProps { SourcePath = "A Bad Path" })
);
Assert.Equal("Cannot find asset", e.Message);
}

[Fact(DisplayName = Prefix + nameof(UnionProperties))]
public void UnionProperties()
{
Expand Down Expand Up @@ -491,7 +501,7 @@ public void AsyncOverrides_OverrideThrows()
{
AsyncVirtualMethodsChild obj = new AsyncVirtualMethodsChild();

JsiiError exception = Assert.Throws<JsiiError>(() => obj.CallMe());
var exception = Assert.Throws<Exception>(() => obj.CallMe());
Assert.Contains("Thrown by native code", exception.Message);
}

Expand Down Expand Up @@ -558,7 +568,7 @@ public void PropertyOverrides_Get_Throws()
{
SyncVirtualMethodsChild_Throws so = new SyncVirtualMethodsChild_Throws();

JsiiError exception = Assert.Throws<JsiiError>(() => so.RetrieveValueOfTheProperty());
var exception = Assert.Throws<Exception>(() => so.RetrieveValueOfTheProperty());
Assert.Contains("Oh no, this is bad", exception.Message);
}

Expand All @@ -576,7 +586,7 @@ public void PropertyOverrides_Set_Throws()
{
SyncVirtualMethodsChild_Throws so = new SyncVirtualMethodsChild_Throws();

JsiiError exception = Assert.Throws<JsiiError>(() => so.ModifyValueOfTheProperty("Hii"));
var exception = Assert.Throws<Exception>(() => so.ModifyValueOfTheProperty("Hii"));
Assert.Contains("Exception from overloaded setter", exception.Message);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public XUnitLogger(ITestOutputHelper output, string categoryName)
_categoryName = categoryName ?? throw new ArgumentNullException(nameof(categoryName));
}

void ILogger.Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
void ILogger.Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception, string> formatter)
{
var str = state?.ToString() ?? "";
// Only log lines starting with > or < (kernel traces)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public sealed class ClientTests
public abstract class ClientTestBase
{
private readonly IFileSystem _fileSystem;

internal readonly IRuntime _runtime;
private readonly IReferenceMap _referenceMap;
private readonly IFrameworkToJsiiConverter _frameworkToJsiiConverter;
Expand Down Expand Up @@ -498,7 +498,7 @@ public void SendsAndReceives()
CompleteRequest request = new CompleteRequest
(
callbackId: "myCallbackId",
error: "myError",
error: new NamedError("myError", null),
result: "myResult"
);
client.Complete(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Amazon.JSII.Runtime
internal static class CallbackExtensions
{
public static object? InvokeCallback(this Callback callback, IReferenceMap referenceMap,
IFrameworkToJsiiConverter converter, out string? error)
IFrameworkToJsiiConverter converter, out Exception? error)
{
try
{
Expand All @@ -36,13 +36,13 @@ out object? result
catch (TargetInvocationException e)
{
// An exception was thrown by the method being invoked
error = e.InnerException?.ToString();
error = e.InnerException;
return null;
}
catch (Exception e)
{
// An exception was thrown while preparing the request or processing the result
error = e.ToString();
error = e;
return null;
}
}
Expand Down
Loading

0 comments on commit 4b8828b

Please sign in to comment.