Skip to content

Commit b360d6a

Browse files
authored
Merge pull request #3 from phuongnq/security/cs-1110-update-dependencies-4x
Upgrade handlebarsjs to 4.7.8
2 parents cd0bceb + 16a3ef6 commit b360d6a

8 files changed

Lines changed: 927 additions & 156 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ jacoco.exec
2525

2626
out
2727
tmp
28-
tmp/spotless
28+
tmp/spotless
29+
30+
0

handlebars-maven-plugin/src/main/java/com/github/jknack/handlebars/maven/PrecompilePlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public class PrecompilePlugin extends HandlebarsPlugin {
7676
private String output;
7777

7878
/** The handlebars js file. */
79-
@Parameter(defaultValue = "/handlebars-v4.7.7.js")
79+
@Parameter(defaultValue = "/handlebars-v4.7.8.js")
8080
private String handlebarsJsFile;
8181

8282
/**

handlebars-maven-plugin/src/test/java/com/github/jknack/handlebars/maven/Issue234.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void withAmdOutput() throws Exception {
3030
plugin.addTemplate("c");
3131
plugin.setAmd(true);
3232
plugin.setProject(newProject());
33-
plugin.setHandlebarsJsFile("/handlebars-v4.7.7.js");
33+
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
3434

3535
plugin.execute();
3636

handlebars-maven-plugin/src/test/java/com/github/jknack/handlebars/maven/PrecompilePluginTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void i18nJs() throws Exception {
3131
plugin.setSuffix(".html");
3232
plugin.setOutput("target/helpers-i18njs.js");
3333
plugin.setProject(newProject());
34-
plugin.setHandlebarsJsFile("/handlebars-v4.7.7.js");
34+
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
3535

3636
plugin.execute();
3737

@@ -57,7 +57,7 @@ public void chooseSpecificFiles() throws Exception {
5757
plugin.addTemplate("a");
5858
plugin.addTemplate("c");
5959
plugin.setProject(newProject());
60-
plugin.setHandlebarsJsFile("/handlebars-v4.7.7.js");
60+
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
6161

6262
plugin.execute();
6363

@@ -71,7 +71,7 @@ public void outputDirMustBeCreated() throws Exception {
7171
plugin.setSuffix(".html");
7272
plugin.setOutput("target/newdir/helpers.js");
7373
plugin.setProject(newProject());
74-
plugin.setHandlebarsJsFile("/handlebars-v4.7.7.js");
74+
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
7575

7676
plugin.execute();
7777
}
@@ -83,7 +83,7 @@ public void missingHelperMustBeSilent() throws Exception {
8383
plugin.setSuffix(".html");
8484
plugin.setOutput("target/missing-helpers.js");
8585
plugin.setProject(newProject());
86-
plugin.setHandlebarsJsFile("/handlebars-v4.7.7.js");
86+
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
8787

8888
plugin.execute();
8989
}
@@ -95,7 +95,7 @@ public void noFileMustBeCreatedIfNoTemplatesWereFound() throws Exception {
9595
plugin.setSuffix(".html");
9696
plugin.setOutput("target/no-helpers.js");
9797
plugin.setProject(newProject());
98-
plugin.setHandlebarsJsFile("/handlebars-v4.7.7.js");
98+
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
9999

100100
plugin.execute();
101101

@@ -146,7 +146,7 @@ public void mustFailOnUnExpectedException() throws Exception {
146146
plugin.setSuffix(".html");
147147
plugin.setOutput("target/no-helpers.js");
148148
plugin.setProject(project);
149-
plugin.setHandlebarsJsFile("/handlebars-v4.7.7.js");
149+
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
150150

151151
plugin.execute();
152152
});
@@ -159,7 +159,7 @@ public void fileWithRuntimeMustBeLargerThanNormalFiles() throws Exception {
159159
withoutRT.setSuffix(".html");
160160
withoutRT.setOutput("target/without-rt-helpers.js");
161161
withoutRT.setProject(newProject());
162-
withoutRT.setHandlebarsJsFile("/handlebars-v4.7.7.js");
162+
withoutRT.setHandlebarsJsFile("/handlebars-v4.7.8.js");
163163

164164
withoutRT.execute();
165165

@@ -169,7 +169,7 @@ public void fileWithRuntimeMustBeLargerThanNormalFiles() throws Exception {
169169
withRT.setOutput("target/with-rt-helpers.js");
170170
withRT.setRuntime("src/test/resources/handlebars.runtime.js");
171171
withRT.setProject(newProject());
172-
withRT.setHandlebarsJsFile("/handlebars-v4.7.7.js");
172+
withRT.setHandlebarsJsFile("/handlebars-v4.7.8.js");
173173

174174
withRT.execute();
175175

@@ -186,7 +186,7 @@ public void normalFileShouleBeLargerThanMinimizedFiles() throws Exception {
186186
withoutRT.setSuffix(".html");
187187
withoutRT.setOutput("target/helpers-normal.js");
188188
withoutRT.setProject(newProject());
189-
withoutRT.setHandlebarsJsFile("/handlebars-v4.7.7.js");
189+
withoutRT.setHandlebarsJsFile("/handlebars-v4.7.8.js");
190190

191191
withoutRT.execute();
192192

@@ -196,7 +196,7 @@ public void normalFileShouleBeLargerThanMinimizedFiles() throws Exception {
196196
withRT.setOutput("target/helpers.min.js");
197197
withRT.setMinimize(true);
198198
withRT.setProject(newProject());
199-
withRT.setHandlebarsJsFile("/handlebars-v4.7.7.js");
199+
withRT.setHandlebarsJsFile("/handlebars-v4.7.8.js");
200200
withRT.execute();
201201

202202
assertTrue(
@@ -212,7 +212,7 @@ public void partials() throws Exception {
212212
plugin.setSuffix(".html");
213213
plugin.setOutput("target/helpers.js");
214214
plugin.setProject(newProject());
215-
plugin.setHandlebarsJsFile("/handlebars-v4.7.7.js");
215+
plugin.setHandlebarsJsFile("/handlebars-v4.7.8.js");
216216

217217
plugin.execute();
218218

handlebars-springmvc/src/main/java/com/github/jknack/handlebars/springmvc/HandlebarsViewResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,10 @@ public void setFormatters(final Formatter... formatters) {
335335
* <p>Using handlebars.js 1.x:
336336
*
337337
* <pre>
338-
* Handlebars handlebars = new Handlebars().handlebarsJsFile("handlebars-v4.7.7.js");
338+
* Handlebars handlebars = new Handlebars().handlebarsJsFile("handlebars-v4.7.8.js");
339339
* </pre>
340340
*
341-
* Default handlebars.js is <code>handlebars-v4.7.7.js</code>.
341+
* Default handlebars.js is <code>handlebars-v4.7.8.js</code>.
342342
*
343343
* @param location A classpath location of the handlebar.js file.
344344
*/

handlebars/src/main/java/com/github/jknack/handlebars/Handlebars.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ private static <E extends Throwable> void sneakyThrow0(final Throwable x) throws
326326
private String endDelimiter = DELIM_END;
327327

328328
/** Location of the handlebars.js file. */
329-
private String handlebarsJsFile = "/handlebars-v4.7.7.js";
329+
private String handlebarsJsFile = "/handlebars-v4.7.8.js";
330330

331331
/** List of formatters. */
332332
private List<Formatter> formatters = new ArrayList<>();

0 commit comments

Comments
 (0)