Skip to content
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

Replace Prototype.js with native JavaScript #314

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

basil
Copy link
Member

@basil basil commented Jun 29, 2023

See this blog post for details. Prototype will eventually be removed from Jenkins core. To prepare for this transition, this plugin must be migrated away from Prototype. Accordingly, this PR removes any usages of Prototype in favor of native JavaScript.

To test this PR, I enabled the user experimental flag to remove Prototype and put breakpoints on each changed line. I then added two SSH servers in the Configure page, one with exec enabled and one without. I stepped through all the changed lines of JavaScript in a Freestyle project configuration page, including switching servers from one with exec enabled to one without, and I verified all the changed lines executed successfully with no console log errors.

Fixes #306

@basil basil requested a review from a team June 29, 2023 20:18
@basil basil marked this pull request as ready for review June 29, 2023 20:18
@basil
Copy link
Member Author

basil commented Jun 29, 2023

CC @jenkinsci/core-security-review

Copy link

@Wadeck Wadeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing dangerous from security PoV 👍

@basil basil requested a review from gmcdonald June 30, 2023 15:40
@gmcdonald
Copy link
Contributor

testing locally

@gmcdonald
Copy link
Contributor

all looks good thank you

@gmcdonald gmcdonald merged commit 4526acf into jenkinsci:main Jun 30, 2023
@basil basil deleted the remove-prototype branch June 30, 2023 16:19
@basil
Copy link
Member Author

basil commented Jul 3, 2023

Thank you @gmcdonald. Could this please be released?

@gmcdonald
Copy link
Contributor

Yep will do over the next couple of days

@gmcdonald gmcdonald added the dependencies A PR that updates dependencies - used by Release Drafter label Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies A PR that updates dependencies - used by Release Drafter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove usages of Prototype JavaScript framework
3 participants