Skip to content

Commit b22f628

Browse files
authored
chore(release): 1.79.0 (#4027)
See [CHANGELOG](https://github.com/aws/jsii/blob/bump/1.79.0/CHANGELOG.md)
2 parents ad5544b + 88c03aa commit b22f628

File tree

26 files changed

+976
-711
lines changed

26 files changed

+976
-711
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,6 +1558,15 @@
15581558
"contributions": [
15591559
"code"
15601560
]
1561+
},
1562+
{
1563+
"login": "a-h",
1564+
"name": "Adrian Hesketh",
1565+
"avatar_url": "https://avatars.githubusercontent.com/u/1029947?v=4",
1566+
"profile": "http://adrianhesketh.com/",
1567+
"contributions": [
1568+
"code"
1569+
]
15611570
}
15621571
],
15631572
"repoType": "github",

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
dotnet-version: '6.0.x'
3535
- name: Set up Go 1.18
36-
uses: actions/setup-go@v3
36+
uses: actions/setup-go@v4
3737
with:
3838
go-version: '1.18'
3939
- name: Set up Java 8
@@ -116,7 +116,7 @@ jobs:
116116
with:
117117
dotnet-version: '6.0.x'
118118
- name: Set up Go 1.18
119-
uses: actions/setup-go@v3
119+
uses: actions/setup-go@v4
120120
with:
121121
go-version: '1.18'
122122
- name: Set up Java 8
@@ -312,7 +312,7 @@ jobs:
312312
with:
313313
dotnet-version: ${{ matrix.dotnet }}
314314
- name: Set up Go ${{ matrix.go }}
315-
uses: actions/setup-go@v3
315+
uses: actions/setup-go@v4
316316
with:
317317
go-version: ${{ matrix.go }}
318318
- name: Set up Java ${{ matrix.java }}
@@ -432,7 +432,7 @@ jobs:
432432
with:
433433
dotnet-version: '6.0.x'
434434
- name: Set up Go 1.18
435-
uses: actions/setup-go@v3
435+
uses: actions/setup-go@v4
436436
with:
437437
go-version: '1.18'
438438
- name: Set up Java 8

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
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.
44

5+
## [1.79.0](https://github.com/aws/jsii/compare/v1.78.1...v1.79.0) (2023-03-23)
6+
7+
8+
### Features
9+
10+
* add configurable pack command ([#4021](https://github.com/aws/jsii/issues/4021)) ([6b2fd18](https://github.com/aws/jsii/commit/6b2fd186bd77416a9b341c5544a101f50793076d))
11+
* enable Go generics for jsii Go CDK code ([#4009](https://github.com/aws/jsii/issues/4009)) ([f653b31](https://github.com/aws/jsii/commit/f653b3173760679562648710b08907bfe2c7c748))
12+
* **runtimes:** support JSII_NODE setting ([#4024](https://github.com/aws/jsii/issues/4024)) ([f8f2f13](https://github.com/aws/jsii/commit/f8f2f13780f805cd41cb9945ad8febce9aec5900)), closes [#4009](https://github.com/aws/jsii/issues/4009)
13+
514
## [1.78.1](https://github.com/aws/jsii/compare/v1.78.0...v1.78.1) (2023-03-16)
615

716

README.md

Lines changed: 23 additions & 22 deletions
Large diffs are not rendered by default.

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"rejectCycles": true
1111
}
1212
},
13-
"version": "1.78.1"
13+
"version": "1.79.0"
1414
}

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@
1616
},
1717
"devDependencies": {
1818
"@jest/types": "^28.1.3",
19-
"@types/jest": "^29.4.0",
20-
"@types/node": "^14.18.37",
21-
"@typescript-eslint/eslint-plugin": "^5.54.0",
22-
"@typescript-eslint/parser": "^5.54.0",
19+
"@types/jest": "^29.5.0",
20+
"@types/node": "^14.18.40",
21+
"@typescript-eslint/eslint-plugin": "^5.56.0",
22+
"@typescript-eslint/parser": "^5.56.0",
2323
"all-contributors-cli": "^6.24.0",
24-
"eslint": "^8.35.0",
25-
"eslint-config-prettier": "^8.6.0",
24+
"eslint": "^8.36.0",
25+
"eslint-config-prettier": "^8.8.0",
2626
"eslint-import-resolver-node": "^0.3.7",
2727
"eslint-import-resolver-typescript": "^3.5.3",
2828
"eslint-plugin-import": "2.26.0",
2929
"eslint-plugin-prettier": "^4.2.1",
30-
"jest": "^29.4.3",
30+
"jest": "^29.5.0",
3131
"jest-circus": "^28.1.3",
3232
"jest-config": "^28.1.3",
3333
"jest-expect-message": "^1.1.3",
3434
"lerna": "^6.5.1",
35-
"prettier": "^2.8.4",
35+
"prettier": "^2.8.6",
3636
"standard-version": "^9.5.0",
3737
"ts-node": "^10.9.1",
3838
"typescript": "~4.7.4"

packages/@jsii/benchmarks/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"devDependencies": {
1616
"@types/glob": "^8.1.0",
17-
"glob": "^9.2.1"
17+
"glob": "^9.3.1"
1818
},
1919
"scripts": {
2020
"build": "yarn --silent tsc --build && npm run lint",

packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/NodeProcess.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ internal sealed class NodeProcess : INodeProcess
1919
readonly ILogger _logger;
2020

2121
private const string JsiiRuntime = "JSII_RUNTIME";
22+
private const string JsiiNode = "JSII_NODE";
2223
private const string JsiiDebug = "JSII_DEBUG";
2324
private const string JsiiAgent = "JSII_AGENT";
2425
private const string JsiiAgentVersionString = "DotNet/{0}/{1}/{2}";
@@ -34,10 +35,14 @@ public NodeProcess(IJsiiRuntimeProvider jsiiRuntimeProvider, ILoggerFactory logg
3435
if (string.IsNullOrWhiteSpace(runtimePath))
3536
runtimePath = jsiiRuntimeProvider.JsiiRuntimePath;
3637

38+
var node = Environment.GetEnvironmentVariable(JsiiNode);
39+
if (string.IsNullOrWhiteSpace(node))
40+
node = "node";
41+
3742
var utf8 = new UTF8Encoding(false /* no BOM */);
3843
var startInfo = new ProcessStartInfo
3944
{
40-
FileName = "node",
45+
FileName = node,
4146
Arguments = $"--max-old-space-size=4096 {runtimePath}",
4247
RedirectStandardInput = true,
4348
StandardInputEncoding = utf8,
@@ -61,7 +66,7 @@ public NodeProcess(IJsiiRuntimeProvider jsiiRuntimeProvider, ILoggerFactory logg
6166
_logger.LogDebug($"{startInfo.FileName} {startInfo.Arguments}");
6267

6368
// Registering shutdown hook to have JS process gracefully terminate.
64-
AppDomain.CurrentDomain.ProcessExit += (snd, evt) => { ((IDisposable) this).Dispose(); };
69+
AppDomain.CurrentDomain.ProcessExit += (snd, evt) => { ((IDisposable)this).Dispose(); };
6570

6671
_process = Process.Start(startInfo)!;
6772

packages/@jsii/go-runtime/jsii-runtime-go/helpers.go

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,64 @@ package jsii
22

33
import "time"
44

5-
// Bool obtains a pointer to the provided bool.
6-
func Bool(v bool) *bool { return &v }
5+
type basicType interface {
6+
bool | string | float64 | time.Time
7+
}
78

8-
// Bools obtains a pointer to a slice of pointers to all the provided booleans.
9-
func Bools(v ...bool) *[]*bool {
10-
slice := make([]*bool, len(v))
9+
// Ptr returns a pointer to the provided value.
10+
func Ptr[T basicType](v T) *T {
11+
return &v
12+
}
13+
14+
// PtrSlice returns a pointer to a slice of pointers to all of the provided values.
15+
func PtrSlice[T basicType](v ...T) *[]*T {
16+
slice := make([]*T, len(v))
1117
for i := 0; i < len(v); i++ {
12-
slice[i] = Bool(v[i])
18+
slice[i] = Ptr(v[i])
1319
}
1420
return &slice
1521
}
1622

17-
// Number obtains a pointer to the provided float64.
18-
func Number(v float64) *float64 { return &v }
23+
// Bool returns a pointer to the provided bool.
24+
func Bool(v bool) *bool { return Ptr(v) }
25+
26+
// Bools returns a pointer to a slice of pointers to all of the provided booleans.
27+
func Bools(v ...bool) *[]*bool {
28+
return PtrSlice(v...)
29+
}
30+
31+
type numberType interface {
32+
~float32 | ~float64 |
33+
~int | ~int8 | ~int16 | ~int32 | ~int64 |
34+
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
35+
}
1936

20-
// Numbers obtains a pointer to a slice of pointers to all the provided numbers.
21-
func Numbers(v ...float64) *[]*float64 {
37+
// Number returns a pointer to the provided float64.
38+
func Number[T numberType](v T) *float64 {
39+
return Ptr(float64(v))
40+
}
41+
42+
// Numbers returns a pointer to a slice of pointers to all of the provided numbers.
43+
func Numbers[T numberType](v ...T) *[]*float64 {
2244
slice := make([]*float64, len(v))
2345
for i := 0; i < len(v); i++ {
2446
slice[i] = Number(v[i])
2547
}
2648
return &slice
2749
}
2850

29-
// String obtains a pointer to the provided string.
30-
func String(v string) *string { return &v }
51+
// String returns a pointer to the provided string.
52+
func String(v string) *string { return Ptr(v) }
3153

32-
// Strings obtains a pointer to a slice of pointers to all the provided strings.
54+
// Strings returns a pointer to a slice of pointers to all of the provided strings.
3355
func Strings(v ...string) *[]*string {
34-
slice := make([]*string, len(v))
35-
for i := 0; i < len(v); i++ {
36-
slice[i] = String(v[i])
37-
}
38-
return &slice
56+
return PtrSlice(v...)
3957
}
4058

41-
// Time obtains a pointer to the provided time.Time.
42-
func Time(v time.Time) *time.Time { return &v }
59+
// Time returns a pointer to the provided time.Time.
60+
func Time(v time.Time) *time.Time { return Ptr(v) }
4361

44-
// Times obtains a pointer to a slice of pointers to all the provided time.Time.
62+
// Times returns a pointer to a slice of pointers to all of the provided time.Time values.
4563
func Times(v ...time.Time) *[]*time.Time {
46-
slice := make([]*time.Time, len(v))
47-
for i := 0; i < len(v); i++ {
48-
slice[i] = Time(v[i])
49-
}
50-
return &slice
64+
return PtrSlice(v...)
5165
}

packages/@jsii/go-runtime/jsii-runtime-go/helpers_test.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@ import (
77
"github.com/stretchr/testify/assert"
88
)
99

10+
func TestV(t *testing.T) {
11+
// Bool
12+
assert.Equal(t, true, *Ptr(true))
13+
assert.Equal(t, false, *Ptr(false))
14+
// Bools
15+
assert.Equal(t, []*bool{Bool(true), Bool(false), Bool(false), Bool(true)}, *PtrSlice(true, false, false, true))
16+
// Float64 is supported because it doesn't require conversion.
17+
assert.Equal(t, 123.45, *Ptr(123.45))
18+
assert.Equal(t, float64(123.45), *Ptr(float64(123.45)))
19+
// String
20+
assert.Equal(t, "Hello", *String("Hello"))
21+
// Strings
22+
assert.Equal(t, []*string{String("Hello"), String("World")}, *Strings("Hello", "World"))
23+
// Time
24+
now := time.Now()
25+
assert.Equal(t, now, *Time(now))
26+
// Times
27+
assert.Equal(t, []*time.Time{Time(now)}, *Times(now))
28+
}
29+
1030
func TestBool(t *testing.T) {
1131
assert.Equal(t, true, *Bool(true))
1232
assert.Equal(t, false, *Bool(false))
@@ -19,6 +39,21 @@ func TestBools(t *testing.T) {
1939
func TestNumber(t *testing.T) {
2040
assert.Equal(t, 123.45, *Number(123.45))
2141
assert.Equal(t, 1337.0, *Number(1337))
42+
// Floats.
43+
assert.Equal(t, float64(float32(123.45)), *Number(float32(123.45)))
44+
assert.Equal(t, float64(123.45), *Number(float64(123.45)))
45+
// Ints.
46+
assert.Equal(t, float64(1337), *Number(int(1337)))
47+
// Signed.
48+
assert.Equal(t, float64(127), *Number(int8(127)))
49+
assert.Equal(t, float64(1337), *Number(int16(1337)))
50+
assert.Equal(t, float64(1337), *Number(int32(1337)))
51+
assert.Equal(t, float64(1337), *Number(int64(1337)))
52+
// Unsigned.
53+
assert.Equal(t, float64(127), *Number(uint8(127)))
54+
assert.Equal(t, float64(1337), *Number(uint16(1337)))
55+
assert.Equal(t, float64(1337), *Number(uint32(1337)))
56+
assert.Equal(t, float64(1337), *Number(uint64(1337)))
2257
}
2358

2459
func TestNumbers(t *testing.T) {

0 commit comments

Comments
 (0)