Skip to content

Commit b2273bf

Browse files
committed
Simplify JSON parsing
1 parent d6bb5aa commit b2273bf

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<dependencies>
5050
<dependency>
5151
<groupId>io.jenkins.tools.bom</groupId>
52-
<artifactId>bom-2.414.x</artifactId>
52+
<artifactId>bom-2.426.x</artifactId>
5353
<version>2982.vdce2153031a_0</version>
5454
<scope>import</scope>
5555
<type>pom</type>

plugin/src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/handle-prototype.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
function handlePrototype(url) {
22
buildFormTree(document.forms.config);
3-
// TODO JSON.stringify fails in some circumstances: https://gist.github.com/jglick/70ec4b15c1f628fdf2e9 due to Array.prototype.toJSON
4-
// TODO simplify when Prototype.js is removed
5-
const json = Object.toJSON ? Object.toJSON(JSON.parse(document.forms.config.elements.json.value).prototype) : JSON.stringify(JSON.parse(document.forms.config.elements.json.value).prototype);
3+
const json = JSON.stringify(JSON.parse(document.forms.config.elements.json.value).prototype);
64
if (!json) {
75
return; // just a separator
86
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<properties>
4242
<changelist>999999-SNAPSHOT</changelist>
4343
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
44-
<jenkins.version>2.414.3</jenkins.version>
44+
<jenkins.version>2.426.3</jenkins.version>
4545
<groovy.version>2.4.21</groovy.version> <!-- TODO: Add org.codehaus.groovy:groovy and org.codehaus.groovy:groovy:sources to Jenkins core BOM so this can be deleted? (currently it only specifies groovy-all) -->
4646
</properties>
4747
<modules>

0 commit comments

Comments
 (0)