Skip to content

Commit

Permalink
chore(release): 1.51.0 (#3322)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jan 6, 2022
2 parents d1830a4 + 4eb182f commit a3e942c
Show file tree
Hide file tree
Showing 63 changed files with 829 additions and 632 deletions.
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ updates:
labels:
- dependencies
- language/python
ignore:
- dependency-name: "setuptools"

- package-ecosystem: gomod
directory: '/packages/@jsii/go-runtime'
Expand Down
43 changes: 5 additions & 38 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Approve PRs with "pr/auto-approve". mergify takes care of the actual merge.
# Approve PRs with "auto-approve". mergify takes care of the actual merge.

name: auto-approve
on:
Expand All @@ -12,44 +12,11 @@ on:

jobs:
auto-approve:
if: contains(github.event.pull_request.labels.*.name, 'pr/auto-approve') || github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'

if: contains(github.event.pull_request.labels.*.name, 'auto-approve')
permissions:
pull-requests: write
runs-on: ubuntu-latest

steps:
# Check whether the PR needs an automated approval or not. We will only add an automated
# approval if the PR currently has no reviews on it. Dismissed reviews are ignored in the
# context of this check. This way, the automated workflow will not do anything if a manual
# review has already been done for the PR (implicit opt-out).
- uses: actions/github-script@v5.0.0
id: needs-approving
with:
script: |-
const { issue: { number: pull_number }, repo: { owner, repo } } = context;
const reviews = (await github.rest.pulls.listReviews({ owner, repo, pull_number })).data
.filter((review) => review.state !== 'DISMISSED');
return reviews.length === 0;
# If this is NOT a dependabot PR, just approve it.
- uses: actions/github-script@v5.0.0
if: steps.needs-approving.outputs.result == 'true' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
with:
script: |-
const { issue: { number: pull_number }, repo: { owner, repo } } = context;
github.rest.pulls.createReview({
owner, repo, pull_number,
event: 'APPROVE',
});
# If this IS a dependabot PR, approve it and ask dependabot to squash-and-merge it when CI passes.
- uses: actions/github-script@v5.0.0
if: steps.needs-approving.outputs.result == 'true' && (github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]')
with:
script: |-
const { issue: { number: pull_number }, repo: { owner, repo } } = context;
github.rest.pulls.createReview({
owner, repo, pull_number,
body: '@dependabot squash and merge',
event: 'APPROVE',
});
- uses: hmarr/auto-approve-action@v2.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
java-version: '8'
distribution: 'zulu'
- name: Set up Node 12
uses: actions/setup-node@v2.5.0
uses: actions/setup-node@v2.5.1
with:
cache: yarn
node-version: '12'
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
java-version: '8'
distribution: 'zulu'
- name: Set up Node 12
uses: actions/setup-node@v2.5.0
uses: actions/setup-node@v2.5.1
with:
cache: yarn
node-version: '12'
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: Set up Node ${{ matrix.node }}
uses: actions/setup-node@v2.5.0
uses: actions/setup-node@v2.5.1
with:
cache: yarn
node-version: ${{ matrix.node }}
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Apply various labels on PRs

name: pr-labeler
on:
pull_request:
types: [ opened ]

jobs:
auto-approve:
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'dependabot-preview[bot]'
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
steps:
- run: gh pr edit ${{ github.event.pull_request.number }} --add-label "auto-approve" -R ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v2.4.0

- name: Set up Node
uses: actions/setup-node@v2.5.0
uses: actions/setup-node@v2.5.1
with:
cache: yarn
node-version: 12
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
title: 'chore: npm-check-updates && yarn upgrade'
body: |-
Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date.
labels: contribution/core,dependencies,pr/auto-approve
labels: contribution/core,dependencies,auto-approve
team-reviewers: aws-cdk-team
# Privileged token so automated PR validation happens
token: ${{ secrets.AUTO_APPROVE_GITHUB_TOKEN }}
Expand Down
6 changes: 0 additions & 6 deletions .mergify/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ pull_request_rules:
label:
add: [pr/ready-to-merge]
conditions:
- author!=dependabot[bot]
- author!=dependabot-preview[bot]
- -title~=(WIP|wip)
- label!=pr/blocked
- label!=pr/do-not-merge
Expand Down Expand Up @@ -89,8 +87,6 @@ pull_request_rules:
comment:
message: Merging (with squash)...
conditions:
- author!=dependabot[bot]
- author!=dependabot-preview[bot]
- -title~=(WIP|wip)
- label!=pr/blocked
- label!=pr/do-not-merge
Expand Down Expand Up @@ -140,8 +136,6 @@ pull_request_rules:
comment:
message: Merging (no-squash)...
conditions:
- author!=dependabot[bot]
- author!=dependabot-preview[bot]
- -title~=(WIP|wip)
- label!=pr/blocked
- label!=pr/do-not-merge
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

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.51.0](https://github.com/aws/jsii/compare/v1.50.0...v1.51.0) (2022-01-06)


### Features

* **pacmak:** go yaml struct tags ([#3299](https://github.com/aws/jsii/issues/3299)) ([63132cf](https://github.com/aws/jsii/commit/63132cf30ad62ba59d2a8cdfaba60b92819352cd)), closes [#3293](https://github.com/aws/jsii/issues/3293)


### Bug Fixes

* **jsii:** cannot use submodule types from assemblies before 1.39.0 ([#3306](https://github.com/aws/jsii/issues/3306)) ([949d5f0](https://github.com/aws/jsii/commit/949d5f00df6a44c4fbacc06dc9f4f239c68c583e)), closes [#3233](https://github.com/aws/jsii/issues/3233)
* **rosetta:** Python translation for `implements` is wrong ([#3280](https://github.com/aws/jsii/issues/3280)) ([a833a1d](https://github.com/aws/jsii/commit/a833a1d2f1335e9447fd5702b9e4f9c6166abe67)), closes [aws/aws-cdk#17928](https://github.com/aws/aws-cdk/issues/17928)

## [1.50.0](https://github.com/aws/jsii/compare/v1.49.0...v1.50.0) (2021-12-24)


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.50.0"
"version": "1.51.0"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
},
"devDependencies": {
"@jest/types": "^27.4.2",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"@typescript-eslint/eslint-plugin": "^5.8.1",
"@typescript-eslint/parser": "^5.8.1",
"all-contributors-cli": "^6.20.0",
"eslint": "^8.5.0",
"eslint-config-prettier": "^8.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/check-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"devDependencies": {
"@types/chalk": "^2.2.0",
"@types/jest": "^27.0.3",
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"jest": "^27.4.5"
}
}
2 changes: 1 addition & 1 deletion packages/@jsii/dotnet-runtime-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"devDependencies": {
"@jsii/dotnet-runtime": "^0.0.0",
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"jsii-calc": "^3.20.120",
"jsii-pacmak": "^0.0.0",
"typescript": "~3.9.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/dotnet-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"devDependencies": {
"@jsii/runtime": "^0.0.0",
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"@types/semver": "^7.3.9",
"jsii-build-tools": "^0.0.0",
"semver": "^7.3.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/go-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"devDependencies": {
"@types/fs-extra": "^9.0.13",
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"codemaker": "^0.0.0",
"eslint": "^8.5.0",
"fs-extra": "^9.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/integ-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@types/dotenv": "^8.2.0",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.0.3",
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"@types/tar": "^6.1.1",
"eslint": "^8.5.0",
"prettier": "^2.5.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/java-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"devDependencies": {
"@jsii/runtime": "^0.0.0",
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"jsii-build-tools": "^0.0.0",
"typescript": "~3.9.10"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/kernel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@scope/jsii-calc-lib": "^0.0.0",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.0.3",
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"@types/tar": "^6.1.1",
"eslint": "^8.5.0",
"jest": "^27.4.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@scope/jsii-calc-base": "^0.0.0",
"@scope/jsii-calc-lib": "^0.0.0",
"@types/jest": "^27.0.3",
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"eslint": "^8.5.0",
"jest": "^27.4.5",
"jsii-build-tools": "^0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/spec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"devDependencies": {
"@types/jest": "^27.0.3",
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"eslint": "^8.5.0",
"jest": "^27.4.5",
"jsii-build-tools": "^0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@scope/jsii-calc-base-of-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"test:update": "npm run build && UPDATE_DIFF=1 npm run test"
},
"devDependencies": {
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"jsii": "^0.0.0",
"jsii-build-tools": "^0.0.0",
"jsii-rosetta": "^0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@scope/jsii-calc-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@scope/jsii-calc-base-of-base": "^2.1.1"
},
"devDependencies": {
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"jsii": "^0.0.0",
"jsii-build-tools": "^0.0.0",
"jsii-rosetta": "^0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@scope/jsii-calc-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@scope/jsii-calc-base-of-base": "^2.1.1"
},
"devDependencies": {
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"jsii": "^0.0.0",
"jsii-build-tools": "^0.0.0",
"jsii-rosetta": "^0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/codemaker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"devDependencies": {
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.0.3",
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"eslint": "^8.5.0",
"jest": "^27.4.5",
"prettier": "^2.5.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-calc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@scope/jsii-calc-lib": "^0.0.0"
},
"devDependencies": {
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"eslint": "^8.5.0",
"jsii": "^0.0.0",
"jsii-build-tools": "^0.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/jsii-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"devDependencies": {
"@types/inquirer": "^8.1.3",
"@types/jest": "^27.0.3",
"@types/node": "^12.20.38",
"@types/yargs": "^17.0.7",
"@types/node": "^12.20.39",
"@types/yargs": "^17.0.8",
"eslint": "^8.5.0",
"jest": "^27.4.5",
"jest-expect-message": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-diff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"devDependencies": {
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.0.3",
"@types/node": "^12.20.38",
"@types/node": "^12.20.39",
"@types/tar-fs": "^2.0.1",
"eslint": "^8.5.0",
"jest": "^27.4.5",
Expand Down
5 changes: 4 additions & 1 deletion packages/jsii-pacmak/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export async function pacmak({
updateNpmIgnoreFiles = false,
validateAssemblies = false,
}: PacmakOptions): Promise<void> {
const rosetta = new Rosetta({ unknownSnippets: rosettaUnknownSnippets });
const rosetta = new Rosetta({
unknownSnippets: rosettaUnknownSnippets,
prefixDisclaimer: true,
});
if (rosettaTablet) {
await rosetta.loadTabletFromFile(rosettaTablet);
}
Expand Down
16 changes: 1 addition & 15 deletions packages/jsii-pacmak/lib/targets/dotnet/dotnetdocgenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ import { CodeMaker } from 'codemaker';
import {
Rosetta,
TargetLanguage,
Translation,
enforcesStrictMode,
markDownToXmlDoc,
ApiLocation,
} from 'jsii-rosetta';
import * as xmlbuilder from 'xmlbuilder';

import { INCOMPLETE_DISCLAIMER_NONCOMPILING } from '..';
import { renderSummary } from '../_utils';
import { DotNetNameUtils } from './nameutils';

Expand Down Expand Up @@ -168,7 +166,7 @@ export class DotNetDocGenerator {
TargetLanguage.CSHARP,
enforcesStrictMode(this.assembly),
);
return this.prefixDisclaimer(translated);
return translated.source;
}

private convertSamplesInMarkdown(markdown: string, api: ApiLocation): string {
Expand All @@ -177,20 +175,8 @@ export class DotNetDocGenerator {
markdown,
TargetLanguage.CSHARP,
enforcesStrictMode(this.assembly),
(trans) => ({
language: trans.language,
source: this.prefixDisclaimer(trans),
}),
);
}

private prefixDisclaimer(translated: Translation) {
if (!translated.didCompile && INCOMPLETE_DISCLAIMER_NONCOMPILING) {
return `// ${INCOMPLETE_DISCLAIMER_NONCOMPILING}\n${translated.source}`;
}
return translated.source;
}

private emitXmlDoc(
tag: string,
content: string,
Expand Down
Loading

0 comments on commit a3e942c

Please sign in to comment.