Skip to content

Commit 293ac17

Browse files
authored
2 parents abf4039 + dbc71c1 commit 293ac17

File tree

150 files changed

+5497
-1677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+5497
-1677
lines changed

.github/dependabot.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ updates:
5858
labels:
5959
- dependencies
6060
- language/go
61-
ignore:
62-
- dependency-name: github.com/aws/jsii-runtime-go
63-
- dependency-name: github.com/aws/jsii-runtime-go/*
64-
- dependency-name: github.com/aws/jsii/jsii-calc/go/*
6561

6662
- package-ecosystem: gomod
6763
directory: '/packages/@jsii/go-runtime/jsii-runtime-go'
@@ -70,6 +66,14 @@ updates:
7066
labels:
7167
- dependencies
7268
- language/go
69+
70+
- package-ecosystem: gomod
71+
directory: '/packages/@jsii/go-runtime-test/project'
72+
schedule:
73+
interval: daily
74+
labels:
75+
- dependencies
76+
- language/go
7377
ignore:
7478
- dependency-name: github.com/aws/jsii-runtime-go
7579
- dependency-name: github.com/aws/jsii-runtime-go/*

.github/workflows/docker-images.yml

+14-7
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ jobs:
8282
${{ runner.os }}-buildx-${{ hashFiles('superchain/*') }}-
8383
${{ runner.os }}-buildx-
8484
85+
# 1 pull per second from ECR Public
86+
- name: Jitter the start time to avoid ECR Public throttling
87+
id: sleep-start
88+
if: steps.should-run.outputs.result == 'true'
89+
run: |-
90+
sleep $((RANDOM % 60))
91+
8592
- name: Determine build time
8693
id: build-time
8794
if: steps.should-run.outputs.result == 'true'
@@ -104,13 +111,6 @@ jobs:
104111
-f superchain/Dockerfile \
105112
.
106113
107-
# Replace the cache so it does not grow forever
108-
- name: Update layer cache
109-
if: always() && steps.should-run.outputs.result == 'true'
110-
run: |-
111-
rm -rf /tmp/.buildx-cache
112-
mv /tmp/.buildx-cache-out /tmp/.buildx-cache
113-
114114
# Testing sequentially, because in parallel it's too slow due to IO contention
115115
- name: Test Image (AMD64)
116116
if: steps.should-run.outputs.result == 'true'
@@ -209,3 +209,10 @@ jobs:
209209
-f superchain/Dockerfile \
210210
.
211211
fi
212+
213+
# Replace the cache so it does not grow forever (should always be last!)
214+
- name: Update layer cache
215+
if: always() && steps.should-run.outputs.result == 'true'
216+
run: |-
217+
rm -rf /tmp/.buildx-cache
218+
mv /tmp/.buildx-cache-out /tmp/.buildx-cache

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ jobs:
388388
uses: actions/setup-node@v3
389389
with:
390390
cache: yarn
391-
node-version: '14'
391+
node-version: '18'
392392
- name: Install Dependencies
393393
run: yarn install --frozen-lockfile
394394
- name: Run Benchmark

.mergify/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pull_request_rules:
3030
label:
3131
add: [contribution/core]
3232
conditions:
33-
- author~=^(eladb|RomainMuller|garnaat|nija-at|skinny85|rix0rrr|NGL321|Jerry-AWS|SomayaB|MrArnoldPalmer|NetaNir|iliapolo|njlynch|madeline-k|BenChaimberg|comcalvi|kaizen3031593|Chriscbr|corymhall|otaviomacedo|yuth|TheRealAmazonKendra|vinayak-kukreja)$
33+
- author~=^(RomainMuller|rix0rrr|Jerry-AWS|MrArnoldPalmer|iliapolo|madeline-k|comcalvi|kaizencc|corymhall|otaviomacedo|yuth|TheRealAmazonKendra|vinayak-kukreja|mrgrain|ryparker|Naumel)$
3434
- -label~="contribution/core"
3535
- name: Tell them we're good now
3636
actions:

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
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.62.0](https://github.com/aws/jsii/compare/v1.61.0...v1.62.0) (2022-07-12)
6+
7+
8+
### Features
9+
10+
* **@jsii/spec:** add loadAssemblyFromBuffer function ([#3634](https://github.com/aws/jsii/issues/3634)) ([4f3a0d1](https://github.com/aws/jsii/commit/4f3a0d16a769a678a4ce4bde9a6bbbd715a48ab2))
11+
* **@jsii/spec:** add a utility library to be consumed by jsii modules ([#3570](https://github.com/aws/jsii/issues/3570)) ([635404a](https://github.com/aws/jsii/commit/635404a561a52033f2c93ce238c861a7518a47f4))
12+
* **rosetta:** tablets can be compressed ([#3652](https://github.com/aws/jsii/issues/3652)) ([359e74f](https://github.com/aws/jsii/commit/359e74f3c05a682ef1e55297e27f9e2d538b0694))
13+
* use new read/load assembly functions everywhere ([#3600](https://github.com/aws/jsii/issues/3600)) ([623c0c1](https://github.com/aws/jsii/commit/623c0c14fbe4c4a50c208c5415e689e45f9f54c4)), closes [#3570](https://github.com/aws/jsii/issues/3570) [#3570](https://github.com/aws/jsii/issues/3570)
14+
15+
16+
### Bug Fixes
17+
18+
* **benchmark:** compilation fails due to missing dependencies ([#3610](https://github.com/aws/jsii/issues/3610)) ([28db6e3](https://github.com/aws/jsii/commit/28db6e3c7696da919b8cf3a3a99e22dd53fcedd9))
19+
* jitter Docker build startup ([#3646](https://github.com/aws/jsii/issues/3646)) ([5857ea8](https://github.com/aws/jsii/commit/5857ea8207c47c7002e365b09b5852c36a7c68a3))
20+
* **jsii:** fail compilation when two or more enum members have same val ([#3412](https://github.com/aws/jsii/issues/3412)) ([f64dace](https://github.com/aws/jsii/commit/f64dace793f1db1bf5057f29017820d225887a1f)), closes [#2782](https://github.com/aws/jsii/issues/2782)
21+
* Status icon for Go language that it is generally available. ([#3607](https://github.com/aws/jsii/issues/3607)) ([1762310](https://github.com/aws/jsii/commit/1762310ee59539d1dd604b639aae979ace5818af))
22+
523
## [1.61.0](https://github.com/aws/jsii/compare/v1.60.1...v1.61.0) (2022-06-16)
624

725

eslint-config.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
env:
3+
es2020: true
34
jest: true
45
node: true
56

@@ -10,9 +11,9 @@ plugins:
1011

1112
parser: '@typescript-eslint/parser'
1213
parserOptions:
13-
ecmaVersion: 2018
14+
ecmaVersion: 2020
1415
impliedStrict: true
15-
sourceType: module
16+
sourceType: script
1617
project: ./**/tsconfig.json
1718

1819
extends:
@@ -151,7 +152,9 @@ rules:
151152

152153
'import/no-extraneous-dependencies':
153154
- error
154-
- devDependencies: ['**/test/**'] # Only allow importing devDependencies from tests
155+
- devDependencies: # Only allow importing devDependencies from tests
156+
- '**/test/**'
157+
- '**/*.test.ts'
155158
optionalDependencies: false # Disallow importing optional dependencies (those shouldn't be used here)
156159
peerDependencies: false # Disallow importing peer dependencies (those shouldn't be used here)
157160

gh-pages/content/overview/features.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The following target languages are currently offered by `jsii-pacmak`, or are cu
3333
| Language | Status |
3434
| ---------- | ---------------------------------------------- |
3535
| C# | :octicons-check-circle-24: Generally Available |
36-
| Go | :octicons-tools-24: Generally Available |
36+
| Go | :octicons-check-circle-24: Generally Available |
3737
| Java | :octicons-check-circle-24: Generally Available |
3838
| JavaScript | :octicons-check-circle-24: Generally Available |
3939
| Kotlin | :octicons-tools-24: Development |

gh-pages/content/user-guides/language-support/callbacks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public final class Main extends FooClass {
116116
}
117117
```
118118

119-
The schematized exchange between the _jsii runtime library_ and the _jsii kernem_ is the following:
119+
The schematized exchange between the _jsii runtime library_ and the _jsii kernel_ is the following:
120120

121121
<!-- Original in `callbacks.monopic`, authored using Monodraw (https://monodraw.helftone.com) -->
122122

gh-pages/content/user-guides/lib-author/configuration/index.md

+4
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ are set in the `jsii.tsc` section of the `package.json` file, but use the same n
193193
`declarationMap`), or to optimize the emitted code size (by disabling source maps entirely).
194194
+ if any of these options is specified, the source map configuration will exactly match what is being provided here
195195
+ If none are specified, the default settings will be used: `#!ts { inlineSourceMap: true, inlineSources: true }`
196+
- `types` allows limiting which visible type libraries get loaded in the global scope by the typescript compiler. By
197+
default, all visible `@types/*` packages will be loaded, which can be undesirable (in particular in monorepos, where
198+
some type libraries are not compatible with the TypeScript compiler version that `jsii` uses). The value specified
199+
here will be forwarded as-is to the TypeScript compiler.
196200

197201
Refer to the [TypeScript compiler options reference][ts-options] for more information about those options.
198202

gh-pages/requirements-dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
mkdocs~=1.3.0
22
mkdocs-awesome-pages-plugin~=2.7.0
3-
mkdocs-material~=8.3.4
3+
mkdocs-material~=8.3.8
44
mkdocs-git-revision-date-plugin~=0.3.2

jest.config.ts renamed to jest.config.mjs

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Config } from '@jest/types';
1+
import jest from '@jest/types';
22
import { defaults } from 'jest-config';
33
import { cpus } from 'os';
44
import { env } from 'process';
@@ -10,8 +10,10 @@ import { env } from 'process';
1010
* be overridden (for example, the coverage threshold), then a new
1111
* `jest.config.ts` file should be created that imports from this one and
1212
* modifies just what needs to be modified, typically using `overriddenConfig`.
13+
*
14+
* @type {jest.Config.InitialOptions}
1315
*/
14-
const config: Config.InitialOptions = {
16+
const config = {
1517
...defaults,
1618

1719
collectCoverage: true,
@@ -41,32 +43,31 @@ const config: Config.InitialOptions = {
4143
* operation works deeply on objects, but overrides that are not objects (e.g:
4244
* arrays, strings, ...) simply replace the original value.
4345
*
44-
* @param overrides values to be used for overriding the orignal configuration.
46+
* @param {jest.Config.InitialOptions} overrides values to be used for overriding the orignal configuration.
47+
*
48+
* @return {jest.Config.InitialOptions}
4549
*/
46-
export function overriddenConfig(overrides: Config.InitialOptions) {
50+
export function overriddenConfig(overrides) {
4751
return merge(config, overrides);
4852

49-
function merge<T>(original: T, override: T): T {
53+
function merge(original, override) {
5054
if (typeof original === 'object') {
5155
// Arrays are objects, too!
5256
if (Array.isArray(override)) {
5357
return override;
5458
}
5559

56-
const result: any = {};
60+
const result = {};
5761
const allKeys = new Set([
5862
...Object.keys(original),
5963
...Object.keys(override),
6064
]);
6165

6266
// TypeScript appears to choke if we do the "as any" in the same
6367
// expression as the key access, so we delcare surrogate varibales...
64-
const originalAsAny = original as any;
65-
const overrideAsAny = override as any;
66-
6768
for (const key of Array.from(allKeys).sort()) {
68-
const originalValue: unknown = originalAsAny[key];
69-
const overrideValue: unknown = overrideAsAny[key];
69+
const originalValue = original[key];
70+
const overrideValue = override[key];
7071
if (originalValue == null) {
7172
result[key] = overrideValue;
7273
} else if (overrideValue == null) {

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"rejectCycles": true
1111
}
1212
},
13-
"version": "1.61.0"
13+
"version": "1.62.0"
1414
}

package.json

+19-15
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@
1616
},
1717
"devDependencies": {
1818
"@jest/types": "^28.1.1",
19-
"@types/jest": "^28.1.1",
19+
"@types/jest": "^28.1.4",
2020
"@types/node": "^14.18.21",
21-
"@typescript-eslint/eslint-plugin": "^5.28.0",
22-
"@typescript-eslint/parser": "^5.28.0",
21+
"@typescript-eslint/eslint-plugin": "^5.30.5",
22+
"@typescript-eslint/parser": "^5.30.5",
2323
"all-contributors-cli": "^6.20.0",
24-
"eslint": "^8.17.0",
24+
"eslint": "^8.19.0",
2525
"eslint-config-prettier": "^8.5.0",
2626
"eslint-import-resolver-node": "^0.3.6",
27-
"eslint-import-resolver-typescript": "^2.7.1",
27+
"eslint-import-resolver-typescript": "^3.2.4",
2828
"eslint-plugin-import": "^2.26.0",
29-
"eslint-plugin-prettier": "^4.0.0",
30-
"jest": "^28.1.1",
31-
"jest-circus": "^28.1.1",
32-
"jest-config": "^28.1.1",
29+
"eslint-plugin-prettier": "^4.2.1",
30+
"jest": "^28.1.2",
31+
"jest-circus": "^28.1.2",
32+
"jest-config": "^28.1.2",
3333
"jest-expect-message": "^1.0.2",
34-
"lerna": "^5.1.2",
35-
"prettier": "^2.7.0",
34+
"lerna": "^5.1.6",
35+
"prettier": "^2.7.1",
3636
"standard-version": "^9.5.0",
37-
"ts-node": "^10.8.1",
38-
"typescript": "~4.7.3"
37+
"ts-node": "^10.8.2",
38+
"typescript": "~4.7.4"
3939
},
4040
"repository": {
4141
"type": "git",
@@ -50,10 +50,14 @@
5050
],
5151
"nohoist": [
5252
"**/@fixtures/jsii-calc-bundled",
53-
"**/@fixtures/jsii-calc-bundled/**"
53+
"**/@fixtures/jsii-calc-bundled/**",
54+
"**/typescript"
5455
]
5556
},
5657
"resolutions": {
57-
"@types/prettier": "2.6.0"
58+
"minipass": "3.2.1"
59+
},
60+
"resolutions_info": {
61+
"minipass": "https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/60901"
5862
}
5963
}

packages/@jsii/benchmarks/bin/benchmark.ts

+22
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,28 @@ interface ResultsJson {
9696
Promise.resolve([]),
9797
);
9898

99+
// If we are running in GitHub Actions, emit a summary document.
100+
if (process.env.GITHUB_STEP_SUMMARY != null) {
101+
await fs.writeFile(
102+
process.env.GITHUB_STEP_SUMMARY,
103+
[
104+
'## Benchmark Results',
105+
'',
106+
'Suite | Avg | StdDev',
107+
'------|-----|-------',
108+
...resultsJson
109+
.sort((l, r) => l.name.localeCompare(r.name))
110+
.map(
111+
({ name, value, range }) =>
112+
`${name} | ${value.toFixed(1)} | ${Math.sqrt(range).toFixed(
113+
2,
114+
)}`,
115+
),
116+
].join('\n'),
117+
'utf-8',
118+
);
119+
}
120+
99121
if (argv.output) {
100122
await fs.writeJson(argv.output, resultsJson, { spaces: 2 });
101123
console.log(`results written to ${argv.output}`);

0 commit comments

Comments
 (0)