Skip to content

Commit fa849c2

Browse files
authored
bump handlebars dependency from 4.3.1 to 4.5.0 (#557)
Resolves a build warning due to incompatible versions of slf4j. Change in HandlebarsTemplateEngine is due to a change in handlebars where they no longer shade commons text in their jar. Exclude the nashhorn-core dependency from handlebars since it is not license compliant. It is only needed for javascript support in templates which we do not use.
1 parent 7521565 commit fa849c2

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
aws-lambda-core = 'com.amazonaws:aws-lambda-java-core:1.2.3'
44
aws-lambda-events = 'com.amazonaws:aws-lambda-java-events:3.11.5'
55
google-findbugs-jsr305 = 'com.google.code.findbugs:jsr305:3.0.2'
6-
handlebars = 'com.github.jknack:handlebars:4.3.1'
6+
handlebars = 'com.github.jknack:handlebars:4.5.0'
77
jspecify = 'org.jspecify:jspecify:1.0.0'
88
jwt = 'com.nimbusds:nimbus-jose-jwt:9.47'
99
mutiny = 'io.smallrye.reactive:mutiny:2.7.0'

sdk-api-gen-common/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ description = "Restate SDK API Gen Common"
99
dependencies {
1010
compileOnly(libs.jspecify)
1111

12-
api(libs.handlebars)
12+
api(libs.handlebars) {
13+
// exclude nashorn-core, since it is not license compliant and is only
14+
// needed for javascript in templates which we don't use.
15+
exclude(group = "org.openjdk.nashorn", module = "nashorn-core")
16+
}
1317
api(project(":sdk-common"))
1418

1519
// We need it to silence the slf4j warning (coming from handlebars)

sdk-api-gen-common/src/main/java/dev/restate/sdk/gen/template/HandlebarsTemplateEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import com.github.jknack.handlebars.Template;
1414
import com.github.jknack.handlebars.context.FieldValueResolver;
1515
import com.github.jknack.handlebars.helper.StringHelpers;
16-
import com.github.jknack.handlebars.internal.text.StringEscapeUtils;
1716
import com.github.jknack.handlebars.io.TemplateLoader;
1817
import dev.restate.common.function.ThrowingFunction;
1918
import dev.restate.sdk.endpoint.definition.ServiceType;
@@ -26,6 +25,7 @@
2625
import java.util.Map;
2726
import java.util.Set;
2827
import java.util.stream.Collectors;
28+
import org.apache.commons.text.StringEscapeUtils;
2929

3030
public class HandlebarsTemplateEngine {
3131

0 commit comments

Comments
 (0)