-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Upgrade JQuery to 3.5.1 through webjars, for easier Maven version bumps #1972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
import io.cucumber.plugin.event.TestCaseStarted; | ||
import io.cucumber.plugin.event.TestRunFinished; | ||
import io.cucumber.plugin.event.TestSourceParsed; | ||
import org.webjars.WebJarAssetLocator; | ||
|
||
import java.io.Closeable; | ||
import java.io.File; | ||
|
@@ -38,7 +39,6 @@ public final class TimelineFormatter implements ConcurrentEventListener { | |
"/io/cucumber/core/plugin/timeline/index.html", | ||
"/io/cucumber/core/plugin/timeline/formatter.js", | ||
"/io/cucumber/core/plugin/timeline/report.css", | ||
"/io/cucumber/core/plugin/timeline/jquery-3.4.1.min.js", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I'm not mistaken, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. chosen.jquery is indeed a jquery plugin, but there's no update for it. It's at its latest release (which was a securityfix) released in June 2018. Nowadays the project marks itself as deprecated awaiting decisions on their future direction. |
||
"/io/cucumber/core/plugin/timeline/vis.min.css", | ||
"/io/cucumber/core/plugin/timeline/vis.min.js", | ||
"/io/cucumber/core/plugin/timeline/vis.override.css", | ||
|
@@ -146,6 +146,12 @@ private void copyReportFiles() { | |
copyFile(textAssetStream, new File(outputDir, fileName)); | ||
closeQuietly(textAssetStream); | ||
} | ||
// Add JQuery separately, as it's versioned through webjars | ||
String jqueryFilename = "jquery.min.js"; | ||
String queryPath = new WebJarAssetLocator().getFullPath("jquery", jqueryFilename); | ||
InputStream jqueryStream = getClass().getResourceAsStream("/" + queryPath); | ||
copyFile(jqueryStream, new File(outputDir, jqueryFilename)); | ||
closeQuietly(jqueryStream); | ||
} | ||
|
||
private static void copyFile(final InputStream source, final File dest) throws CucumberException { | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might conflict with other applications that use this as a production dependency.
You'll have to shade both.