Skip to content

Commit 408706e

Browse files
authored
Add support for angular 18.1 with increased typescript and ngPackagr versions (#19228)
1 parent 362d3b5 commit 408706e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ private void addNpmPackageGeneration(SemVer ngVersion) {
294294

295295
// Set the typescript version compatible to the Angular version
296296
// based on https://angular.io/guide/versions#actively-supported-versions
297-
if (ngVersion.atLeast("18.0.0")) {
297+
if (ngVersion.atLeast("18.1.0")) {
298+
additionalProperties.put("tsVersion", ">=5.4.0 <5.6.0");
299+
} else if (ngVersion.atLeast("18.0.0")) {
298300
additionalProperties.put("tsVersion", ">=5.4.0 <5.5.0");
299301
} else if (ngVersion.atLeast("17.0.0")) {
300302
additionalProperties.put("tsVersion", ">=4.9.3 <5.3.0");
@@ -342,7 +344,11 @@ private void addNpmPackageGeneration(SemVer ngVersion) {
342344
supportingFiles.add(new SupportingFile("ng-package.mustache", getIndexDirectory(), "ng-package.json"));
343345

344346
// Specific ng-packagr configuration
345-
if (ngVersion.atLeast("18.0.0")) {
347+
if (ngVersion.atLeast("18.1.0")) {
348+
additionalProperties.put("ngPackagrVersion", "18.1.0");
349+
// tsTickle is not required and there is no available version compatible with
350+
// versions of TypeScript compatible with Angular 18.
351+
} else if (ngVersion.atLeast("18.0.0")) {
346352
additionalProperties.put("ngPackagrVersion", "18.0.0");
347353
// tsTickle is not required and there is no available version compatible with
348354
// versions of TypeScript compatible with Angular 18.

0 commit comments

Comments
 (0)