Skip to content

Commit

Permalink
Merge pull request #1963 from aws/bump/1.12.0
Browse files Browse the repository at this point in the history
chore(release): 1.12.0
  • Loading branch information
RomainMuller authored Aug 27, 2020
2 parents 1e9b8e1 + 92b306d commit 5ddc9f2
Show file tree
Hide file tree
Showing 123 changed files with 17,791 additions and 5,109 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,8 @@ updates:
labels:
- dependencies
- language/python

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'dependabot-preview[bot]'
runs-on: ubuntu-latest
steps:
- uses: hmarr/auto-approve-action@7782c7e2bdf62b4d79bdcded8332808fd2f179cd
- uses: hmarr/auto-approve-action@v2.0.0
with:
github-token: "${{ secrets.AUTO_APPROVE_GITHUB_TOKEN }}"
57 changes: 45 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -374,21 +374,54 @@ jobs:
run: |-
npm install --no-save ${{ runner.temp }}/js/*.tgz
npm install --no-save ${{ runner.temp }}/private/*.tgz --only=prod
- name: Integration Test
# Setting environment variables for next jobs
echo "::set-env name=JSII::${{ github.workspace }}/node_modules/.bin/jsii"
echo "::set-env name=CDK_BUILD_JSII::${{ github.workspace }}/node_modules/.bin/jsii"
echo "::set-env name=PACMAK::${{ github.workspace }}/node_modules/.bin/jsii-pacmak"
echo "::set-env name=CDK_PACKAGE_JSII_PACMAK::${{ github.workspace }}/node_modules/.bin/jsii-pacmak"
echo "::set-env name=ROSETTA::${{ github.workspace }}/node_modules/.bin/jsii-rosetta"
echo "::set-env name=CDK_PACKAGE_JSII_ROSETTA::${{ github.workspace }}/node_modules/.bin/jsii-rosetta"
- name: Integration Test (build)
run: |-
npx lerna run build --stream 2>&1 > ${{ runner.temp }}/build.log
working-directory: aws-cdk

# In the interest of speed, only process monocdk-experiment / aws-cdk-lib from now on
- name: Integration Test (jsii-rosetta)
run: |-
npx lerna run build
./pack.sh
env:
CDK_BUILD_JSII: ${{ github.workspace }}/node_modules/.bin/jsii
CDK_PACKAGE_JSII_PACMAK: ${{ github.workspace }}/node_modules/.bin/jsii-pacmak
CDK_PACKAGE_JSII_ROSETTA: ${{ github.workspace }}/node_modules/.bin/jsii-rosetta
# Alternative environment variables:
JSII: ${{ github.workspace }}/node_modules/.bin/jsii
PACMAK: ${{ github.workspace }}/node_modules/.bin/jsii-pacmak
ROSETTA: ${{ github.workspace }}/node_modules/.bin/jsii-rosetta
npx lerna exec --scope=monocdk-experiment --scope=aws-cdk-lib --stream -- \
${ROSETTA} \
--compile \
--output ./dist/samples.tabl.json \
--directory . \
--verbose \
2>&1 > ${{ runner.temp }}/rosetta.log
working-directory: aws-cdk
- name: Integration Test (jsii-pacmak)
run: |-
npx lerna exec --scope=monocdk-experiment --scope=aws-cdk-lib --stream -- \
${PACMAK} \
--rosetta-tablet ./dist/samples.tabl.json \
--verbose \
2>&1 > ${{ runner.temp }}/pacmak.log
working-directory: aws-cdk

- name: Upload Logs
# Upload logs whether successful or failed (not using always because we don't care about cancellations)
if: success() || failure()
uses: actions/upload-artifact@v2
with:
name: integ-test-logs
path: ${{ runner.temp }}/*.log

- name: Upload Result
uses: actions/upload-artifact@v2
with:
name: integ-test-result
path: ${{ github.workspace }}/aws-cdk/dist/
path: |-
${{ github.workspace }}/aws-cdk/dist/
${{ github.workspace }}/aws-cdk/**/dist/
6 changes: 4 additions & 2 deletions .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ jobs:
run: |-
# Upgrade dependencies at repository root
ncu --upgrade --filter=@types/node,@types/fs-extra --semverLevel=major
ncu --upgrade --reject=@types/node,@types/fs-extra
ncu --upgrade --filter=typescript --semverLevel=minor
ncu --upgrade --reject=@types/node,@types/fs-extra,typescript
# Upgrade all the packages
lerna exec --parallel ncu -- --upgrade --filter=@types/node,@types/fs-extra --semverLevel=major
lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/fs-extra,${{ steps.list-packages.outputs.list }}'
lerna exec --parallel ncu -- --upgrade --filter=typescript --semverLevel=minor
lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/fs-extra,typescript,${{ steps.list-packages.outputs.list }}'
# This will create a brand new `yarn.lock` file (this is more efficient than `yarn install && yarn upgrade`)
- name: Run "yarn install --force"
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

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.12.0](https://github.com/aws/jsii/compare/v1.11.0...v1.12.0) (2020-08-27)


### Features

* **golang:** introduce Golang code generation ([#1551](https://github.com/aws/jsii/issues/1551)) ([2833db4](https://github.com/aws/jsii/commit/2833db48e7f32191aebd81d5eebf97d111406589)), closes [#83](https://github.com/aws/jsii/issues/83)
* **java:** use covariant types for collection elements ([#1884](https://github.com/aws/jsii/issues/1884)) ([be2c7e2](https://github.com/aws/jsii/commit/be2c7e2aceecc1a6cb9f8a97cee90ea35b80f5f5)), closes [#1517](https://github.com/aws/jsii/issues/1517)
* **jsii:** standardized error messages ([#1931](https://github.com/aws/jsii/issues/1931)) ([b146286](https://github.com/aws/jsii/commit/b146286fe66f78a1851228159b48d9bd2c2b6f3b))


### Bug Fixes

* **java:** module "<module name>" not found error ([#1906](https://github.com/aws/jsii/issues/1906)) ([d0b9ffd](https://github.com/aws/jsii/commit/d0b9ffd8797ff5547a89d43134c40b4744d5e852)), closes [#1904](https://github.com/aws/jsii/issues/1904)
* **jsii:** class members named after the class result in illegal C# ([#1903](https://github.com/aws/jsii/issues/1903)) ([bc71154](https://github.com/aws/jsii/commit/bc711541c17019eba3af16ec7efadc6a25287514)), closes [#1931](https://github.com/aws/jsii/issues/1931) [#1880](https://github.com/aws/jsii/issues/1880)
* **kernel:** calling super.property unexpectedly returns `undefined` ([#1932](https://github.com/aws/jsii/issues/1932)) ([3b48778](https://github.com/aws/jsii/commit/3b48778a6554bf009eb461651bc32b8341d3416f))
* **python:** generate type-checking code ([#1881](https://github.com/aws/jsii/issues/1881)) ([e6d1bc1](https://github.com/aws/jsii/commit/e6d1bc161ed426261f39c5ccadfa80a4020e4ffc)), closes [awslabs/cdk8s#194](https://github.com/awslabs/cdk8s/issues/194)

## [1.11.0](https://github.com/aws/jsii/compare/v1.10.0...v1.11.0) (2020-08-18)


Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ All packages within this repository have the following scripts:
- `watch` - watches for file changes and builds them progressively, usually
running `tsc --watch`.
- `test` - executes all unit tests for the current package.
- `test:update` - executes all unit tests and overwrites snapshot expectations (those `.snap` files).
- `package` - emits publishable artifacts to `dist`.
- `lint` - run linter against source
- `lint:fix` - lint and auto-correct formatting issues when possible
Expand Down
22 changes: 22 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,28 @@ the standard [`nuget push`][nuget-push] command.
[nuget-push]: https://docs.microsoft.com/fr-fr/nuget/nuget-org/publish-a-package
[.NET documentation]: https://docs.microsoft.com/en-us/dotnet/core/tools/csproj#packageiconurl
#### Configuring `GoLang` - **Experimental**
The `go` target is currently unstable and not suitable for production use. To
enable go package generation, add the `go` key with an empty object to the jsii
targets configuration.
This will add generated go package code to your specified `outDir` for testing
and experimentation.
```js
{
"jsii": {
"targets": {
"go": {},
// ...
},
// ...
},
// ...
}
```
### `tsc`
In order to the generated `javascript` can be properly loaded by the `jsii`
Expand Down
59 changes: 59 additions & 0 deletions docs/typescript-restrictions.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,65 @@ users in languages with conflicts.

[`jsii/lib/reserved-words.ts`]: ../packages/jsii/lib/reserved-words.ts

## Type Members

### Naming

Methods and properties declared on *classes* cannot be named after the class (
meaning they cannot share the same PascalCased representation), as this results
in illegal **C#** code:

> :memo: Due to existing usage (in such cases, an `_` is appended at the end of
> the **type** name, effectively breaking existing .NET code if such a member
> is introduced post-release), this restriction is only enforced when `jsii` is
> invoked with the `--strict` parameter.
>
> It will be upgraded to *always* be an error in a future release.
```ts
export class Name {
// ⛔️ Illegal property name
public name: string;
}

export class Name {
// ⛔️ Illegal method name
public name(): void { /* ... */ }
}
```

### Overriding

The visibility of a type member cannot be changed when it is overridden, even if
the change increases the visibility of said member, as this would result in
illegal **C#** code:

```ts
export class Base {
protected method(): void { /* ... */ }
}

export class Child {
// ⛔️ Illegal change of visibility when overriding a member
public method(): void { /* ... */ }
}
```

Additionally, **C#** does not allow changing the type signature of members while
overriding them, even if the updated type signature is a strict specialization
of the original one, and this is consequently also forbidden in `jsii`:

```ts
export class Base {
public method(): any { /* ... */ }
}

export class Child {
// ⛔️ Illegal change of signature when overriding a member
public method(): string { /* ... */ }
}
```

## Behavioral Interfaces & Structs

`jsii` considers **TypeScript** interfaces in two distinct categories: *Structs*
Expand Down
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.11.0"
"version": "1.12.0"
}
Binary file modified logo/social-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
"test:update": "lerna run test:update --concurrency=1 --stream"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^3.9.0",
"@typescript-eslint/parser": "^3.9.0",
"@typescript-eslint/eslint-plugin": "^3.10.0",
"@typescript-eslint/parser": "^3.10.1",
"eslint": "^7.7.0",
"eslint-config-prettier": "^6.11.0",
"eslint-import-resolver-node": "^0.3.4",
"eslint-import-resolver-typescript": "^2.2.1",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-prettier": "^3.1.4",
"lerna": "^3.22.1",
"prettier": "^2.0.5",
"prettier": "^2.1.0",
"standard-version": "^9.0.0",
"typescript": "~3.9.7"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReference Update="Microsoft.CodeQuality.Analyzers" Version="3.3.0" />
<PackageReference Update="Microsoft.NetCore.Analyzers" Version="3.3.0" />

<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.7.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Update="NSubstitute" Version="4.2.2" />
<PackageReference Update="xunit" Version="2.4.1" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.3" />
Expand Down
Loading

0 comments on commit 5ddc9f2

Please sign in to comment.