Re: Prototype.js replacing JSON.stringify

2023-07-18 Thread Basil Crow
Many thanks to everyone who has contributed PRs to remove usages of Prototype. I did a more thorough search for usages of Prototype, this time scanning every .jelly and .js file in the Update Center. I updated the spreadsheet

Re: Prototype.js replacing JSON.stringify

2023-05-29 Thread Basil Crow
On Mon, May 29, 2023 at 3:40 PM 'Rahul Somasunderam' via Jenkins Developers wrote: > > Will that be a problem? It will be. See https://github.com/jenkinsci/stapler/pull/452. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe

Re: Prototype.js replacing JSON.stringify

2023-05-29 Thread 'Rahul Somasunderam' via Jenkins Developers
It's got a conditional that checks if `$` evaluates to jQuery first. That seems to be a similar check as the one for Object.toJSON. Will that be a problem? On Mon, May 29, 2023 at 3:37 PM Basil Crow wrote: > On Mon, May 29, 2023 at 3:33 PM 'Rahul Somasunderam' via Jenkins > Developers wrote: >

Re: Prototype.js replacing JSON.stringify

2023-05-29 Thread Basil Crow
On Mon, May 29, 2023 at 3:33 PM 'Rahul Somasunderam' via Jenkins Developers wrote: > I tested out uno-choice from the spreadsheet - it doesn't depend on prototype. > I think it's a false positive No. Active Choices calls Prototype's Ajax.Request. It is not a false positive. -- You received this

Re: Prototype.js replacing JSON.stringify

2023-05-29 Thread 'Rahul Somasunderam' via Jenkins Developers
I tested out uno-choice from the spreadsheet - it doesn't depend on prototype. I think it's a false positive because jQuery also has a `.each`, `.show`, and `.hide` method. Do we want a different color for false positives? On Thu, May 18, 2023 at 10:54 AM Basil Crow wrote: > 2.406 is on track to

Re: Prototype.js replacing JSON.stringify

2023-05-18 Thread Basil Crow
2.406 is on track to ship without any usages of Prototype. I have created a tracking spreadsheet to cover Prototype usages in plugins and filed issues for any affected plugin with more than 100 in

Re: Prototype.js replacing JSON.stringify

2023-05-11 Thread Basil Crow
I filed pull requests to remove Prototype.js from about 25 or so plugins. Please review, merge, and release these. Here are some more plugins I identified that are still using Prototype.js. Please file pull requests to remove Prototype.js from these plugins: matrix-auth 264461 blueocean 64506 git

Re: Prototype.js replacing JSON.stringify

2023-05-07 Thread Tim Jacomb
I think pull requests are now open for all of the core usage of prototype. and a PR for bom and ATH which removes prototype in https://github.com/jenkinsci/jenkins/pull/7781 Basil has opened a PR with a feature flag that you can use to disable prototype and do some more testing / developing of pr

Re: Prototype.js replacing JSON.stringify

2023-05-05 Thread Basil Crow
On Mon, Mar 13, 2023 at 3:27 PM 'Gavin Mogan' via Jenkins Developers wrote: > > I think the first steps would be to remove as many of those references from > core before detaching the plugin and making it optional Detaching Prototype to a plugin might work, but it is also likely to create proble

Re: Prototype.js replacing JSON.stringify

2023-04-02 Thread Basil Crow
On Sat, Mar 11, 2023 at 3:37 PM Ullrich Hafner wrote: > But this JS code is so deeply nested in Jenkins UI code that I have no clue > on how to fix that... You could open pull requests for one or more of the dozens of currently unassigned subtasks in JENKINS-70906. -- You received this message

Re: Prototype.js replacing JSON.stringify

2023-04-02 Thread Basil Crow
https://issues.jenkins.io/browse/JENKINS-70906 FTR -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this

Re: Prototype.js replacing JSON.stringify

2023-03-30 Thread Tim Jacomb
There's a draft PR open at https://github.com/jenkinsci/jenkins/pull/7781 It does almost all of core. There were one or two more complicated ones I left for later. This search shows the rest of the jenkinsci hosted plugins as well: https://github.com/search?q=org%3Ajenkinsci+Ajax.Request++NOT+rep

Re: Prototype.js replacing JSON.stringify

2023-03-14 Thread Tim Jacomb
I've made a start: https://github.com/jenkinsci/jenkins/pull/7727 This PR is also removing some prototype as well: https://github.com/jenkinsci/jenkins/pull/7718 On Mon, 13 Mar 2023 at 22:27, 'Gavin Mogan' via Jenkins Developers < jenkinsci-dev@googlegroups.com> wrote: > My knowledge of core is

Re: Prototype.js replacing JSON.stringify

2023-03-13 Thread 'Gavin Mogan' via Jenkins Developers
My knowledge of core is pretty out dated, but as far as I know, a lot of the behaviors are defined using YUI and Prototypejs I think the first steps would be to remove as many of those references from core before detaching the plugin and making it optional For example, the Ajax.Request would need

Re: Prototype.js replacing JSON.stringify

2023-03-11 Thread 'Rahul Somasunderam' via Jenkins Developers
Is it possible to turn it into its own plugin and treat it as an implicit dependency for plugins relying on older versions of Jenkins, but remove it later?On Mar 11, 2023, at 15:37, Ullrich Hafner wrote:I think I also have some problems with this ugly dependency. Seems that other JS libraries tha

Re: Prototype.js replacing JSON.stringify

2023-03-11 Thread Ullrich Hafner
I think I also have some problems with this ugly dependency. Seems that other JS libraries that rely on JSON stringify (datatables, echarts) break in some places as well :-( But this JS code is so deeply nested in Jenkins UI code that I have no clue on how to fix that... > Am 02.03.2023 um 2

Re: Prototype.js replacing JSON.stringify

2023-03-02 Thread 'Rahul Somasunderam' via Jenkins Developers
Thanks! On Thu, Mar 2, 2023 at 2:15 PM 'Gavin Mogan' via Jenkins Developers < jenkinsci-dev@googlegroups.com> wrote: > I vaguely remember some javascript code somewhere deleting > Object.prototype.toJSON() or something > > A quick search found > https://github.com/jenkinsci/jenkins/blob/e41aeaacf

Re: Prototype.js replacing JSON.stringify

2023-03-02 Thread 'Gavin Mogan' via Jenkins Developers
I vaguely remember some javascript code somewhere deleting Object.prototype.toJSON() or something A quick search found https://github.com/jenkinsci/jenkins/blob/e41aeaacf434b9ff93c8848f8eddbfcbb27ed462/war/src/main/js/util/jenkins.js#L20-L54 In theory that makes JSON.stringify work again, but woul

Re: Prototype.js replacing JSON.stringify

2023-03-02 Thread Ullrich Hafner
> > Hi! > I was looking at some javascript that was behaving differently on Jenkins > than it does on other apps. I boiled it down to the simplest reproducible > test case. > It turned out that serialization was behaving differently when calling > JSON.stringify. > > This is the sample code yo