[Bug 33625] New: Enforce formatting on vue js files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Bug ID: 33625 Summary: Enforce formatting on vue js files Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: ERM Assignee: jonathan.druart+koha@gmail.com Reporter: jonathan.druart+koha@gmail.com CC: jonathan.druart+koha@gmail.com, jonathan.field@ptfs-europe.com, martin.renvoize@ptfs-europe.com, matt.blenkinsop@ptfs-europe.com, pedro.amorim@ptfs-europe.com We have a pre-commit git hook, a QA test and an unit test (in xt/vue_tidy.t) to make sure .vue files will always be correctly formatted, but we don't have anything for the .js and .ts files that were pretty at the beginning but are no longer. It should be: t/cypress/**/*.ts koha-tmpl/intranet-tmpl/prog/js/vue/*.js koha-tmpl/intranet-tmpl/prog/js/vue/**/*.js (maybe exclude dist?) With the following command: yarn run prettier --trailing-comma es5 --arrow-parens avoid --write FILES -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |32130, 32030 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32030 [Bug 32030] Electronic resource management (ERM) https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32130 [Bug 32130] Vue files must be kept tidy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- See https://gitlab.com/koha-community/qa-test-tools/-/issues/66 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Enforce formatting on vue |Enforce formatting on vue |js files |.js and .ts files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- https://gitlab.com/koha-community/koha-testing-docker/-/issues/374 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 150508 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150508&action=edit Bug 33625: Add test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 150509 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150509&action=edit Bug 33625: Pretty .js files for vue Test plan: = Koha = Apply the first patch, prove xt/vue_tidy.t and notice the failure Apply this patch, now it passes = QA test = Apply the change to the merge request linked with this qa-test-tools' issue: https://gitlab.com/koha-community/qa-test-tools/-/issues/62 inside your ktd container (at /kohadevbox/qa-test-tools/) Edit a .js within koha-tmpl/intranet-tmpl/prog/js/vue and a .ts file (cypress test) with something not pretty Commit and run the QA script => It's failing! Pretty the change, commit again, run the QA script => It's happy! = KTD - git hook = Go to the merge request linked with this ktd's issue: https://gitlab.com/koha-community/koha-testing-docker/-/issues/374 Copy the modified git hook to .git/hooks/ktd/pre-commit Edit a .js within koha-tmpl/intranet-tmpl/prog/js/vue and a .ts file (cypress test) with something not pretty Commit => Notice that the commit content is pretty! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150508|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 150513 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150513&action=edit Bug 33625: Add test Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150509|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 150514 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150514&action=edit Bug 33625: Pretty .js files for vue Test plan: = Koha = Apply the first patch, prove xt/vue_tidy.t and notice the failure Apply this patch, now it passes = QA test = Apply the change to the merge request linked with this qa-test-tools' issue: https://gitlab.com/koha-community/qa-test-tools/-/issues/62 inside your ktd container (at /kohadevbox/qa-test-tools/) Edit a .js within koha-tmpl/intranet-tmpl/prog/js/vue and a .ts file (cypress test) with something not pretty Commit and run the QA script => It's failing! Pretty the change, commit again, run the QA script => It's happy! = KTD - git hook = Go to the merge request linked with this ktd's issue: https://gitlab.com/koha-community/koha-testing-docker/-/issues/374 Copy the modified git hook to .git/hooks/ktd/pre-commit Edit a .js within koha-tmpl/intranet-tmpl/prog/js/vue and a .ts file (cypress test) with something not pretty Commit => Notice that the commit content is pretty! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Straight to QA.. all working and a good improvement as per other bugs of a similar nature. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 23.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 151331 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151331&action=edit Bug 33625: Adjust test to deal with cypress tests Cypress test files were ignored. This patch also deals with files in git index only. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 151332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151332&action=edit Bug 33625: Tidy remaining cypress test files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Follow-ups pushed. Thanks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|ERM |Architecture, internals, | |and plumbing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33625 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED --- Comment #12 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Enhancement - not backporting to 22.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org