From cd08c5574e145b60ad18016f075b04606c4f3a01 Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Mon, 22 Nov 2021 00:17:29 +0530 Subject: [PATCH] chore(release): 1.46.0 (#3195) See [CHANGELOG](https://github.com/aws/jsii/blob/bump/1.46.0/CHANGELOG.md) --- CHANGELOG.md | 8 ++++++++ lerna.json | 2 +- packages/jsii-rosetta/lib/commands/extract.ts | 1 + .../jsii-rosetta/test/commands/extract.test.ts | 14 ++++++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e48e50cbf8..45a4f4f9d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.46.0](https://github.com/aws/jsii/compare/v1.45.0...v1.46.0) (2021-11-21) + + +### Bug Fixes + +* **rosetta:** `extract` ignores `--compile` option ([#3193](https://github.com/aws/jsii/issues/3193)) ([639c510](https://github.com/aws/jsii/commit/639c510ba6d07b26bf35d0c8d3c9cdcced6d916a)) +* **rosetta:** enum resolution breaks for properties ([#3190](https://github.com/aws/jsii/issues/3190)) ([3b49066](https://github.com/aws/jsii/commit/3b49066e4dd960385709dbdce1d9c1fbfb2f20cf)) + ## [1.45.0](https://github.com/aws/jsii/compare/v1.44.1...v1.45.0) (2021-11-18) diff --git a/lerna.json b/lerna.json index ab3198019d..cd5f11c975 100644 --- a/lerna.json +++ b/lerna.json @@ -10,5 +10,5 @@ "rejectCycles": true } }, - "version": "1.45.0" + "version": "1.46.0" } diff --git a/packages/jsii-rosetta/lib/commands/extract.ts b/packages/jsii-rosetta/lib/commands/extract.ts index 57234b9361..e2a4f90b1a 100644 --- a/packages/jsii-rosetta/lib/commands/extract.ts +++ b/packages/jsii-rosetta/lib/commands/extract.ts @@ -47,6 +47,7 @@ export async function extractSnippets( } const translatorOptions: RosettaTranslatorOptions = { + includeCompilerDiagnostics: options.includeCompilerDiagnostics, assemblies: assemblies.map((a) => a.assembly), }; diff --git a/packages/jsii-rosetta/test/commands/extract.test.ts b/packages/jsii-rosetta/test/commands/extract.test.ts index 3de081d7ed..dc8eb3cc14 100644 --- a/packages/jsii-rosetta/test/commands/extract.test.ts +++ b/packages/jsii-rosetta/test/commands/extract.test.ts @@ -96,6 +96,20 @@ describe('with cache file', () => { (TARGET_LANGUAGES.java as any).version = oldJavaVersion; } }); + + test('compiler diagnostics property is passed on', async () => { + const translationFunction = jest.fn().mockResolvedValue({ diagnostics: [], translatedSnippets: [] }); + + await extract.extractSnippets([assembly.moduleDirectory], { + outputFile: path.join(assembly.moduleDirectory, 'dummy.tabl.json'), + validateAssemblies: false, + includeCompilerDiagnostics: true, + translatorFactory: (o) => { + expect(o.includeCompilerDiagnostics).toEqual(true); + return new MockTranslator(o, translationFunction); + }, + }); + }); }); test('do not ignore example strings', async () => {