From dc5ff2b276f0041f8d533fcb3332defc56ed7d3a Mon Sep 17 00:00:00 2001 From: Malte Brunnlieb Date: Sat, 28 Mar 2020 00:33:15 +0100 Subject: [PATCH 1/5] #1121 Set next development version --- cobigen/cobigen-tsplugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cobigen/cobigen-tsplugin/pom.xml b/cobigen/cobigen-tsplugin/pom.xml index 7437ba75f8..04578c3170 100644 --- a/cobigen/cobigen-tsplugin/pom.xml +++ b/cobigen/cobigen-tsplugin/pom.xml @@ -2,7 +2,7 @@ 4.0.0 tsplugin CobiGen - TypeScript Plug-in - 2.4.2 + 2.5.0-SNAPSHOT jar CobiGen - TypeScript Plug-in From d388eb7eddd0fddf5a80563c847837e8b2852c5b Mon Sep 17 00:00:00 2001 From: jan-vcapgemini <59438728+jan-vcapgemini@users.noreply.github.com> Date: Wed, 29 Apr 2020 19:51:21 +0200 Subject: [PATCH 2/5] fix tsmerge null merging issue (#1150) * #1126 added testNullAndUndefinedTypes unit test * set nestserver to new 1.1.5 version --- cobigen/cobigen-tsplugin/pom.xml | 2 +- .../tsplugin/merger/TypeScriptMergerTest.java | 13 +++++++++++++ .../resources/testdata/unittest/files/nullBase.ts | 4 ++++ .../resources/testdata/unittest/files/nullPatch.ts | 6 ++++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 cobigen/cobigen-tsplugin/src/test/resources/testdata/unittest/files/nullBase.ts create mode 100644 cobigen/cobigen-tsplugin/src/test/resources/testdata/unittest/files/nullPatch.ts diff --git a/cobigen/cobigen-tsplugin/pom.xml b/cobigen/cobigen-tsplugin/pom.xml index 04578c3170..51988e8584 100644 --- a/cobigen/cobigen-tsplugin/pom.xml +++ b/cobigen/cobigen-tsplugin/pom.xml @@ -15,7 +15,7 @@ ${project.artifactId} nestserver - 1.1.2 + 1.1.5 https\://registry.npmjs.org/@devonfw/cobigen-nestserver/-/cobigen-nestserver-${server.version}.tgz https\://registry.npmjs.org/@devonfw/cobigen-nestserver-linux/-/cobigen-nestserver-linux-${server.version}.tgz https\://registry.npmjs.org/@devonfw/cobigen-nestserver-macos/-/cobigen-nestserver-macos-${server.version}.tgz diff --git a/cobigen/cobigen-tsplugin/src/test/java/com/devonfw/cobigen/tsplugin/merger/TypeScriptMergerTest.java b/cobigen/cobigen-tsplugin/src/test/java/com/devonfw/cobigen/tsplugin/merger/TypeScriptMergerTest.java index 2d4bf74364..496f6a320e 100644 --- a/cobigen/cobigen-tsplugin/src/test/java/com/devonfw/cobigen/tsplugin/merger/TypeScriptMergerTest.java +++ b/cobigen/cobigen-tsplugin/src/test/java/com/devonfw/cobigen/tsplugin/merger/TypeScriptMergerTest.java @@ -186,4 +186,17 @@ private String readTSFile(String fileName) { return returnString; } + /** + * Tests if TypeScript can handle null- and undefined-aware types + * + * @test fails + */ + @Test + public void testNullAndUndefinedTypes() { + TypeScriptMerger tsMerger = new TypeScriptMerger("tsmerge", false); + File baseFile = new File(testFileRootPath + "nullBase.ts"); + String mergedContents = tsMerger.merge(baseFile, readTSFile("nullPatch.ts"), "UTF-8"); + assertEquals(false, mergedContents.contains("Not able to merge") || mergedContents.isEmpty()); + } + } diff --git a/cobigen/cobigen-tsplugin/src/test/resources/testdata/unittest/files/nullBase.ts b/cobigen/cobigen-tsplugin/src/test/resources/testdata/unittest/files/nullBase.ts new file mode 100644 index 0000000000..e754a673e3 --- /dev/null +++ b/cobigen/cobigen-tsplugin/src/test/resources/testdata/unittest/files/nullBase.ts @@ -0,0 +1,4 @@ +export class SomeDataList { + somedataSearchCriteria: SomeDataSearchCriteria = { + }; +} \ No newline at end of file diff --git a/cobigen/cobigen-tsplugin/src/test/resources/testdata/unittest/files/nullPatch.ts b/cobigen/cobigen-tsplugin/src/test/resources/testdata/unittest/files/nullPatch.ts new file mode 100644 index 0000000000..a545a619eb --- /dev/null +++ b/cobigen/cobigen-tsplugin/src/test/resources/testdata/unittest/files/nullPatch.ts @@ -0,0 +1,6 @@ +export class SomeDataList { + somedataSearchCriteria: SomeDataSearchCriteria = { + AnyString: null, + AnotherString: undefined, + }; +} \ No newline at end of file From b136aabd11437b1494e391aca930977ac76195fb Mon Sep 17 00:00:00 2001 From: Malte Brunnlieb Date: Thu, 30 Apr 2020 09:52:15 +0200 Subject: [PATCH 3/5] #1154 set release snapshot version --- cobigen/cobigen-tsplugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cobigen/cobigen-tsplugin/pom.xml b/cobigen/cobigen-tsplugin/pom.xml index 51988e8584..1b9b5e8370 100644 --- a/cobigen/cobigen-tsplugin/pom.xml +++ b/cobigen/cobigen-tsplugin/pom.xml @@ -2,7 +2,7 @@ 4.0.0 tsplugin CobiGen - TypeScript Plug-in - 2.5.0-SNAPSHOT + 2.4.3-SNAPSHOT jar CobiGen - TypeScript Plug-in From b0417f32bf163c342ff47c80b097aeb35e4cdf75 Mon Sep 17 00:00:00 2001 From: Malte Brunnlieb Date: Thu, 30 Apr 2020 09:53:01 +0200 Subject: [PATCH 4/5] #1154 update wiki docs --- documentation/master-cobigen.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/master-cobigen.asciidoc b/documentation/master-cobigen.asciidoc index d2d0f1c406..a57d7dfb6a 100644 --- a/documentation/master-cobigen.asciidoc +++ b/documentation/master-cobigen.asciidoc @@ -14,7 +14,7 @@ This document contains the documentation of the CobiGen core module as well as a * CobiGen v6.0.0 * CobiGen - Java Plug-in v2.2.0 * CobiGen - XML Plug-in v4.2.0 -* CobiGen - TypeScript Plug-in v2.4.2 +* CobiGen - TypeScript Plug-in v2.4.3 * CobiGen - Property Plug-in v2.1.0 * CobiGen - Text Merger v2.1.0 * CobiGen - JSON Plug-in v2.1.0 From 18db89f88df0f02024360dda8fa8c113795bdfad Mon Sep 17 00:00:00 2001 From: Malte Brunnlieb Date: Thu, 30 Apr 2020 09:53:05 +0200 Subject: [PATCH 5/5] #1154 Set release version --- cobigen/cobigen-tsplugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cobigen/cobigen-tsplugin/pom.xml b/cobigen/cobigen-tsplugin/pom.xml index 1b9b5e8370..ce974c6c28 100644 --- a/cobigen/cobigen-tsplugin/pom.xml +++ b/cobigen/cobigen-tsplugin/pom.xml @@ -2,7 +2,7 @@ 4.0.0 tsplugin CobiGen - TypeScript Plug-in - 2.4.3-SNAPSHOT + 2.4.3 jar CobiGen - TypeScript Plug-in