Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): 1.85.0 #4180

Merged
merged 33 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3ced1e5
chore(comments): correct spelling (#4142)
TimothyJones Jun 13, 2023
70c1462
chore(runtime): correct return types for completeCallback and process…
TimothyJones Jun 13, 2023
9d09144
chore(merge-back): 1.84.0 (#4147)
RomainMuller Jun 14, 2023
9ee0321
chore: upgrade lerna to 7.0.x and migrate config (#4148)
RomainMuller Jun 14, 2023
754e78d
chore: npm-check-updates && yarn upgrade (#4149)
aws-cdk-automation Jun 15, 2023
466b3fd
chore: simplify branch protection configuration (#4135)
RomainMuller Jun 15, 2023
5315dd5
chore(deps): Bump Microsoft.NET.Test.Sdk from 17.6.1 to 17.6.2 in /pa…
dependabot[bot] Jun 15, 2023
dc27a34
chore(deps): Bump golang.org/x/tools from 0.9.3 to 0.10.0 in /package…
dependabot[bot] Jun 19, 2023
14b5ed2
chore(deps): Bump golang.org/x/tools from 0.9.3 to 0.10.0 in /package…
dependabot[bot] Jun 19, 2023
7b6caa9
chore(deps-dev): Update mkdocs-material requirement from ~=9.1.15 to …
dependabot[bot] Jun 22, 2023
ad2c4ba
chore(deps-dev): Bump mypy from 1.3.0 to 1.4.0 in /packages/jsii-pacm…
dependabot[bot] Jun 22, 2023
26724cd
chore: fix confusing comment about FD number 4 that does not exist (#…
RomainMuller Jun 26, 2023
533ecdf
chore(deps-dev): Bump mypy from 1.4.0 to 1.4.1 in /packages/jsii-pacm…
dependabot[bot] Jul 3, 2023
23d129b
chore(deps): Bump semver from 7.5.1 to 7.5.2 (#4156)
dependabot[bot] Jul 3, 2023
1bdda65
chore(deps): Bump mypy from 1.3.0 to 1.4.1 in /packages/@jsii/python-…
dependabot[bot] Jul 3, 2023
36acd0d
chore(deps): Update pytest requirement from ~=7.3 to ~=7.4 in /packag…
dependabot[bot] Jul 3, 2023
6882e1f
chore(deps-dev): Update mkdocs-material requirement from ~=9.1.16 to …
dependabot[bot] Jul 3, 2023
08e9eb8
chore(deps): Bump Microsoft.NET.Test.Sdk from 17.6.2 to 17.6.3 in /pa…
dependabot[bot] Jul 3, 2023
45ddc2d
chore(deps-dev): Update mkdocs-material requirement from ~=9.1.17 to …
dependabot[bot] Jul 3, 2023
6b7eb02
fix: export transliterateAssembly and fix bug with transliterate cli …
mrgrain Jul 3, 2023
28b192a
fix(go-runtime): use fatih/color instead of ANSI Escape Code (#4109)
wafuwafu13 Jul 3, 2023
6c4309e
chore: fix pr labeler workflow does not trigger auto-approval (#4167)
mrgrain Jul 3, 2023
4df19a3
chore: update ancient issue time (#4116)
peterwoodworth Jul 3, 2023
1b7c40c
chore(superchain): maven version, docs: CONTRIBUTING.md (#4162)
ysuzuki19 Jul 4, 2023
a6b9378
chore(github-actions): added stale discussion workflow (#4163)
khushail Jul 5, 2023
8f8b245
chore(docs): documentation enhancements (#4174)
RomainMuller Jul 10, 2023
a23e405
chore(deps): Bump golang.org/x/tools from 0.10.0 to 0.11.0 in /packag…
dependabot[bot] Jul 11, 2023
536ba3b
chore(deps): Bump XunitXml.TestLogger from 3.0.78 to 3.1.11 in /packa…
dependabot[bot] Jul 11, 2023
c87b684
chore(deps): Bump golang.org/x/tools from 0.10.0 to 0.11.0 in /packag…
dependabot[bot] Jul 11, 2023
f0a29b7
chore(deps): Bump xunit.runner.visualstudio from 2.4.5 to 2.5.0 in /p…
dependabot[bot] Jul 11, 2023
f78ba7e
chore(deps): Bump xunit from 2.4.2 to 2.5.0 in /packages/@jsii/dotnet…
dependabot[bot] Jul 13, 2023
2b66bcf
chore: use node 16 in upgrade workflows (#4177)
iliapolo Jul 13, 2023
b867a5a
chore(release): 1.85.0
Jul 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ updates:
labels:
- dependencies
- language/dotnet
- auto-approve

- package-ecosystem: nuget
directory: '/packages/@jsii/dotnet-runtime-test/test'
Expand All @@ -16,6 +17,7 @@ updates:
labels:
- dependencies
- language/dotnet
- auto-approve

- package-ecosystem: pip
directory: '/packages/@jsii/python-runtime'
Expand All @@ -24,6 +26,7 @@ updates:
labels:
- dependencies
- language/python
- auto-approve

- package-ecosystem: pip
directory: '/gh-pages'
Expand All @@ -32,6 +35,7 @@ updates:
labels:
- dependencies
- language/python
- auto-approve

- package-ecosystem: pip
directory: '/packages/jsii-pacmak/test/generated-code'
Expand All @@ -40,6 +44,7 @@ updates:
labels:
- dependencies
- language/python
- auto-approve

- package-ecosystem: pip
directory: '/packages/jsii-pacmak/lib/targets/python'
Expand All @@ -48,6 +53,7 @@ updates:
labels:
- dependencies
- language/python
- auto-approve
ignore:
- dependency-name: "setuptools"

Expand All @@ -58,6 +64,7 @@ updates:
labels:
- dependencies
- language/go
- auto-approve

- package-ecosystem: gomod
directory: '/packages/@jsii/go-runtime-test/project'
Expand All @@ -66,6 +73,7 @@ updates:
labels:
- dependencies
- language/go
- auto-approve
ignore:
- dependency-name: github.com/aws/jsii-runtime-go
- dependency-name: github.com/aws/jsii-runtime-go/*
Expand All @@ -77,3 +85,4 @@ updates:
interval: daily
labels:
- dependencies
- auto-approve
2 changes: 1 addition & 1 deletion .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# Issue timing
days-before-stale: 2
days-before-close: 5
days-before-ancient: 730
days-before-ancient: 36500

# If you don't want to mark a issue as being ancient based on a
# threshold of "upvotes", you can set this here. An "upvote" is
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Docker Images

on:
merge_group: {}
pull_request:
branches: [main, release]
push:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: GitHub Pages

on:
merge_group: {}
pull_request:
branches: [main]
push:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/handle-stale-discussions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: HandleStaleDiscussions
on:
schedule:
- cron: '0 */4 * * *'
discussion_comment:
types: [created]

jobs:
handle-stale-discussions:
name: Handle stale discussions
runs-on: ubuntu-latest
permissions:
discussions: write
steps:
- name: Stale discussions action
uses: aws-github-ops/handle-stale-discussions@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Main

on:
merge_group: {}
pull_request:
branches: [main, release]
push:
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/pr-labeler.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/pull-request-lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: pull-request-lint
on:
merge_group: {}
pull_request_target:
types:
- labeled
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: yarn
node-version: 14
node-version: 16

- name: Install Tools
run: |-
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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.85.0](https://github.com/aws/jsii/compare/v1.84.0...v1.85.0) (2023-07-17)


### Bug Fixes

* export transliterateAssembly and fix bug with transliterate cli (backport) ([#4166](https://github.com/aws/jsii/issues/4166)) ([6b7eb02](https://github.com/aws/jsii/commit/6b7eb02f3a822941185e8c74be71d677285c741e))
* **go-runtime:** use fatih/color instead of ANSI Escape Code ([#4109](https://github.com/aws/jsii/issues/4109)) ([28b192a](https://github.com/aws/jsii/commit/28b192aa1a3ecdd3b3ce6ee49a5efd32db01e695))

## [1.84.0](https://github.com/aws/jsii/compare/v1.83.0...v1.84.0) (2023-06-13)


Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The image can be built for local usage, too:

```console
$ IMAGE=superchain
$ docker build -t ${IMAGE} ./superchain
$ docker build -t ${IMAGE} -f superchain/Dockerfile .
```

In order to get an interactive shell within a Docker container using the
Expand Down
21 changes: 20 additions & 1 deletion gh-pages/content/overview/features.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Features

## Use-Cases & Limitations

The _jsii_ toolchain allows developers to author class libraries once in TypeScript, while allowing their customers to
consume them in various [other languages](#target-languages). This is used for libraries such as the AWS CDK (
[`aws-cdk-lib`](https://npmjs.com/package/aws-cdk-lib)), and is intended for use in similar contexts: client-side,
design-time SDKs that do not require long-running processes and is not in the path to serve time-sensitive requests.

Due to limitations of its [runtime architecture](./runtime-architecture.md), _jsii libraries_ for languages other than
Javascript/TypeScript are best suited for inclusion in short-running processes, outside of performance-sensitive or
memory-constrained contexts.

While `async` APIs are supported by the _jsii_ type system, support for these should be treated as highly experimental.
In particular, support in the various [target languages](#target-languages) varies greatly, and users may encounter a
variety of bugs or surprising behaviors. The current JavaScript-based cross-language interoperability kernel is also
known to block execution of background micro-tasks when it's waiting for commands from the host process.

The runtime libraries used by _jsii libraries_ are not currently designed for thread safety, and using _jsii libraries_
in multi-thread contexts is unsupported at the moment.

## TypeScript Support

The `jsii` compiler leverages the original [TypeScript] compiler API to compile **TypeScript** source files and produce
Expand All @@ -11,7 +30,7 @@ To determine the version of **TypeScript** that is in use by the installed relea

```console
# jsii --version
1.15.0 (build 585166b), typescript 3.9.7
5.1.6 (build d8f400c), typescript 5.1.6
```

You can then refer to the [TypeScript] documentation to determine which language features are available in that specific
Expand Down
14 changes: 11 additions & 3 deletions gh-pages/content/specification/3-kernel-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,18 @@ such values.

#### Asynchronous method invocation

!!! bug "Largely un-tested"
Asynchronous operations are only partially supported in the various target languages, and is currently not widely
used. As such, support is not as "battle-tested" as the rest of the jsii interoperability features, and customers
may run into usability issues, unexpected bugs, or surprising behaviors when using async.

In particular, outstanding `Promise`s may not be able to make progress as expected due to specific implementation
details of the `@jsii/runtime` event loop, which can result in deadlock situations.

The `invoke` call can only be used to invoke _synchronous_ methods. In order to invoke _asynchronous_ methods, the
`begin` and `end` calls must be used instead. Once the _host_ app has entered an asynchronous workflow (after it makes
the first `begin` call), and until it has completed all asynchronous operations (after all `begin` class are matched
with an `end` call), no _synchronous_ operation (including synchronous callbacks) may be initiated.
`begin` and `end` calls must be used instead. Once the _host_ app has entered a synchronous workflow (after it makes
an `invoke` call), and until it has completed that synchronous operation (after all callbacks have been handled and the
`InvokeResponse` has been received), no _asynchronous_ operation may be initiated by the host app.

```ts
interface BeginRequest {
Expand Down
2 changes: 1 addition & 1 deletion gh-pages/content/user-guides/lib-author/.pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ nav:
- index.md
- quick-start
- typescript-restrictions.md
- configuration
- hints.md
- configuration
- toolchain
28 changes: 26 additions & 2 deletions gh-pages/content/user-guides/lib-author/hints.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Type system hints
# Special TSDoc tags

The `jsii` compiler interprets some documentation tags as hints that influence
the type system represented in the `.jsii` assembly files.
Expand All @@ -13,7 +13,7 @@ another capital letter (which normally would make them be treated as
[struct]: ../../specification/2-type-system.md#structs
[interface]: ../../specification/2-type-system.md#behavioral-interfaces

```ts
```ts hl_lines="2"
/**
* @struct
*/
Expand All @@ -25,3 +25,27 @@ export interface IPRange {
!!! important
The `@struct` hint can only be used on interface declarations. Attempting to
use them on any other declaration will result in a compilation error.

## Excluding a declaration from multi-language support

The `@jsii ignore` tag causes the documented declaration to be ignored by the
`jsii` compiler. This has the effect of making the declaration invisible to
languages other than **TypeScript** and **Javascript**. Developers using this
tag should consider the implications on the usability of their library in other
languages.

```ts hl_lines="9"
export interface Props {
public readonly name: string;

/**
* TypeScript/Javascript customers may pass additional properties with this
* struct, however this will not be possible in other languages, as jsii does
* not support index signatures.
*
* @jsii ignore
*/
public readonly [key: string]: unknown;
}

```
64 changes: 57 additions & 7 deletions gh-pages/content/user-guides/lib-author/typescript-restrictions.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,36 @@ export class Child extends Base {
}
```

## Parameterized Types (aka: Generics)
## Index Signatures

Parameterized types are not consistently supported in all supported target languages. **Go** does not currently support
generics, and the differences in generic semantics between **TypeScript**, **C#** and **Java** make it difficult to
correctly represent such types in all those languages. As a consequence, `jsii` does not support declaring parameterized
types.
**TypeScript** allows declaring _additional properties_ through the use of index signatures. These are however not
supported by the _jsii type system_ and are rejected by the compiler.

Only certain *built-in* parameterized types can be used in `jsii` modules:
!!! info
Version `1.x` of the compiler _silently ignores_ index signatures instead of reporting a compilation error. Users
with offending APIs migrating from `jsii@1.x` to `jsii@5.0` or newer need to either remove those declarations, or
explicitly ignore them using the [`@jsii ignore` tag](./hints.md#excluding-a-declaration-from-multi-language-support).

```ts hl_lines="4-5"
export interface WithIndexSignature {
public readonly name: string;

// 💥 Index signatures are not supported
public [key: string]: unknown;
}
```

## TypeScript Mapped Types

!!! info
These are also referred to as "Generics", "Parameterized Types", "Utility Types", ...

Parameterized types are not consistently supported in all supported target languages. **Go** support for generics is
relatively limited (for good reasons) compared to TypeScript and most Object-Oriented languages, and the differences in
generic semantics between **TypeScript**, **C#** and **Java** make it difficult to correctly represent such types in all
those languages. As a consequence, `jsii` does not support declaring parameterized types.

Certain *built-in* TypeScript types can however be used in `jsii` modules:

- `Array<T>`, which is equivalent to `T[]`
- `Record<string, T>`, which is equivalent to `{ [key: string]: T }`
Expand All @@ -187,7 +209,35 @@ export interface IAsyncFooMaker {
}
```

# Soft-Reserved Words
!!! danger "`#!ts Pick<T, Keys>` and `#!ts Omit<T, Keys>`"
Users are often tempted to use `#!ts Pick<T, Keys>` and `#!ts Omit<T, Keys>` when creating higher level abstractions
of types exposed by their dependencies, and they want to expose all configuration options from the upstream
implementation except for some specific properties which are determined fully by the new abstraction.

`#!ts Pick<T, Keys>` and `#!ts Omit<T, Keys>` are not supported as they would result in open-ended implementation
requirements to exist in languages such as **Java** and **C#** where such things are not possible.

Users with this particular use-case should investigate generating code in order to reproduce the upstream type
without the filtered out fields. For example, this can be done with [`projen`](http://npmjs.com/package/projen)
using [`jsii-struct-builder`](https://github.com/mrgrain/jsii-struct-builder).

## Type Aliases

TypeScript supports type aliasing using the `#!ts export type Name = ...` syntax. While this is not considered a
compilation error by the `jsii` compiler, those types are implicitly de-sugared by the compiler for all language targets
except for **TypeScript**.

```ts hl_lines="1-2 5-6"
// 👻 Only visible in TypeScript
export type FooOrBar = Foo | Bar;

export interface Props {
// ⚠️ Effectively `readonly fooOrBar: Foo | Bar;` in non-TypeScript
readonly fooOrBar: FooOrBar;
}
```

## Soft-Reserved Words

In order to guarantee a consistent developer experience across all supported languages, `jsii` emits warnings whenever
a declaration is named after any target language's *reserved words*, as those will need renaming in target languages:
Expand Down
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.3
mkdocs-awesome-pages-plugin~=2.9.1
mkdocs-material~=9.1.15
mkdocs-material~=9.1.18
mkdocs-git-revision-date-plugin~=0.3.2
11 changes: 7 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"lerna": "3.13.1",
"npmClient": "yarn",
"useWorkspaces": true,
"rejectCycles": true,
"packages": [
"packages/*"
"packages/*",
"packages/@jsii/*",
"packages/@scope/*",
"tools/*"
],
"command": {
"bootstrap": {
"rejectCycles": true
}
},
"version": "1.84.0"
"version": "1.85.0",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
Loading
Loading