Closed ghost closed 5 years ago
@ayumihamsaki simply put, because no one has bothered to update them. Feel free to submit PRs as desired, testing thoroughly for backwards compatibility.
@LukeTowers Will try my best and will periodically create PR's and link them to this issue, will take time due to backwards compatibility and conflicts, if other people could also try and HELP that would be great. I think there are well over 100 out of date JS files on a quick search through the master of this github.
If you want to make a plan for this let me know otherwise will just update things slowly ...
These paths:
https://github.com/octobercms/october/tree/master/modules/backend/assets/js
https://github.com/octobercms/october/tree/master/modules/backend/assets/vendor
https://github.com/octobercms/october/tree/master/modules/cms/assets/js
https://github.com/octobercms/october/tree/master/modules/cms/assets/vendor/jsdiff
https://github.com/octobercms/october/tree/master/modules/system/assets/js
https://github.com/octobercms/october/tree/master/modules/system/assets/vendor
https://github.com/octobercms/october/tree/master/modules/system/assets/ui/js
https://github.com/octobercms/october/tree/master/modules/system/assets/ui/vendor
https://github.com/octobercms/october/tree/master/modules/backend/formwidgets/codeeditor/assets
https://github.com/octobercms/october/tree/master/modules/backend/formwidgets/codeeditor/assets/js
...and any other Javascript file inside a vendor or assets folder.
@w20k is this something you're interested in helping with?
If @ayumihamsaki have time to make all those updates, I would help with testing or help with updates ;)
A was thinking to start making UI tests. Smoke Test Suite - to check default functionality, UI layout and more, with all RainLab plugins installed. But, yeah, It will take time :)
Issue: Sweet Alert last updated 2015, by Daftpunk. There is no Version Number on anything found in this folder: https://github.com/octobercms/october/tree/master/modules/backend/assets/vendor/sweet-alert
The Newest Version was last dated 2017, so it must be out of date. Plus there is now a polyfill for the new features so the polyfill would need to be added to the October Core Loader as well I think. Plus the like for like files are not there so will need to be compiled.
XRegExp is flagging up in my system as version 1.5.0 and the latest version is 4.2.0 cant find location however?
Select2:
4.0.3 -> 4.0.5
https://github.com/octobercms/october/tree/master/modules/system/assets/ui/vendor/select2
SyntaxHighlighter still using the (2013 version) 3.0.83
Modern Version is v4 at v4.0.1
Problem is now using npm and sass.
@ayumihamsaki are you able to split all these upgrades up into separate pull requests (based on which items are dependent on each other, so if depA has no other interactions in October then it can be by itself, but if depB and depC interact with each other then they should be together in a PR).
Yes will do that, no problem
I'm ready @ayumihamsaki š
Need to update all these jquery scripts:
https://github.com/octobercms/october/tree/master/modules/backend/assets/js/vendor
@ayumihamsaki found a small bug with moment-timezone.js. We need to use moment-timezone with Zone data but the merged version doesn't contain those values. Could you make a PR to fix it or I'll do it? š
@w20k better if you create the extra PR you know exactly what extra things are needed.
Do jQuery Cookie next as there are some security issues that may need to be patched:
location: https://github.com/octobercms/october/blob/master/modules/backend/assets/js/vendor/jquery.cookie.js
update: https://github.com/js-cookie/js-cookie/releases
v1.4.1 to v2.2.0
js-cookie respects the RFC 6265 proposed standard, which was proposed in April 2011 and specifies how all modern browsers currently interpret cookie handling.
js-cookie v2 is not backwards compatible with jquery-cookie or js-cookie v1.
Below is the list of everything that was changed, along with the new equivalent feature (if applicable).
New versions available:
Thanks will create some PR's for them
Will add the info here: https://github.com/octobercms/october/wiki/Javascript-Packages-in-October
Note: moment.js
if I remember correctly there was an issue with the ar
lang pack and we switched it over to ar-ly.js
as per issue: https://github.com/octobercms/october/issues/3808
Also moments we use TimeZone as well as per: https://github.com/octobercms/october/pull/3960
@ayumihamsaki could you review https://github.com/octobercms/october/pull/3616 or submit a new one updating Dropzone?
@LukeTowers No problem I will work on that tomorrow, please can you close that pr and I will create a new one for you.
I will also link the new pr I create from that one.
Need to update:
https://github.com/octobercms/october/tree/master/modules/backend/assets/vendor/sweet-alert https://github.com/t4t5/sweetalert/releases https://sweetalert.js.org/guides/#installation
https://github.com/octobercms/october/tree/master/modules/backend/assets/vendor/jcrop https://github.com/tapmodo/Jcrop/releases
I think will next do the jcrop, not sure on the sweetalert looks very different now ?
@ayumihamsaki would be awesome if we could merge it somehow (sweet alert). Probably needs a few fixes from our side.
@w20k If you could invest it and let me know will create a pr. I had a quick look and looks very different the complied versions.
@ayumihamsaki will do, after a few more major updates ;)
@LukeTowers @w20k I was thinking is it possible to add a label to this repo and mark up issues that fix or modify any external vendor files. For example a github issue complains about a javascript vendor file with a bug and creates a fix by editing that js file. It then makes it harder to update the javascript vendor files, because we need to search through all the issues on this repo to find any issues and pr's that have modified that vendor file. I think adding a few extra labels may help organize things a bit better.
@ayumihamsaki I would say ignore sweet alert. It works fine as it is right now as a tool used by the core. I don't believe anyone interacts with it directly so I don't see a reason to update it.
Custom Build Code for Modernizr for October CMS Backend:
https://github.com/octobercms/october/wiki/Modernizr-Custom-Build-Code
FYI: @ayumihamsaki will be doing a major Testing/Merging on weekends!
JS Library Name | URI Location | Update Location | Version Number | Last Update Date |
---|---|---|---|---|
jQuery | See Github PR: https://github.com/octobercms/october/pull/4461 | https://github.com/jquery/jquery/releases | 3.4.1 | May 1, 2019 |
jQuery October CMS Doc's | See Github PR: https://github.com/octobercms/docs/pull/390 | |||
jQuery Migrate | See Github PR: https://github.com/octobercms/october/pull/4461 | https://github.com/jquery/jquery-migrate/releases | 3.1.0 | June 8, 2019 |
When updating the jQuery, you need to update the doc's version number as well, see here: https://octobercms.com/docs/markup/filter-theme#combiner-aliases
Reference to the jQuery library (v3.4.0) used in the back-end. (JavaScript)
Please note the developer
branch may have newer updates than the master
branch when checking the current version numbers of the vendor files.
Please see here for any jQuery Migrate warnings and code updates: https://github.com/jquery/jquery-migrate/blob/master/warnings.md
snippets
folder called php-inline.js
and can be found here:https://github.com/octobercms/october/blob/master/modules/backend/formwidgets/codeeditor/assets/vendor/ace/snippets/php-inline.js
This file was copied into the newbuild.
Emmet.js
a build version can be found here:https://cloud9ide.github.io/emmet-core/emmet.js
https://github.com/ajaxorg/ace-builds/
https://www.jsdelivr.com/package/npm/ace-builds
We do not use require.js
so we use this build version:
src-noconflict
uses ace.require instead of require.Note: moment.js
if I remember correctly there was an issue with the ar
lang pack and we switched it over to ar-ly.js
as per issue: https://github.com/octobercms/october/issues/3808
Also moments we use TimeZone as well as per: https://github.com/octobercms/october/pull/3960
From V2.2.8 onwards they changed the structure of Raphaƫl and Eve as the following:
We have decided to stay with V2.2.7 due to the build being unreadable because of webpack to run some Compatibility with October CMS. See here: https://github.com/octobercms/october/pull/4263
We are using the custom URI for builds:
Can't find a direct github Release list for dropzone.js instead the following web pages have the download files:
V0.9.15 onwards requires jquery.color.js
to make things easier I have combined jquery.color.js
and jcrop
into a single file. The CSS min file is the non-minified version for testing.
:focus-visible
Installed Version Number | Github Release Page |
---|---|
V5.0.0 | https://github.com/WICG/focus-visible/releases |
Based on the proposed CSS :focus-visible
pseudo-selector, this prototype adds a focus-visible
class to the focused element, in situations in which the :focus-visible
pseudo-selector should match.
Polyfill Location: https://github.com/octobercms/october/blob/master/modules/system/assets/ui/vendor/focus-visible/focus-visible.js
Github Repo: https://github.com/WICG/focus-visible
Installed Version Number | Github Release Page |
---|---|
V1.1.0 | https://github.com/cvan/keyboardevent-key-polyfill/releases |
Most major browsers now support event.key
, however Edge has a bug issue here: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11509049/ and IE11 doesn't support event.key
. This polyfill fixes the Edge bug and also allows Browsers that do not support evcent.key
to work properly.
Polyfill Location: https://github.com/octobercms/october/blob/master/modules/system/assets/ui/vendor/keyboardevent-key-polyfill/index.js
Github Repo: https://github.com/cvan/keyboardevent-key-polyfill
Doing some research I have come to a small conclusion of the following results:
Vanilla Javascript event.keyCode
is deprecated, see here: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keycode
jQuery event.keyCode
is deprecated, see here: https://github.com/jquery/jquery/issues/2667
Vanilla Javascript event.charCode
is deprecated, see here: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/charCode
jQuery event.charCode
is deprecated, see here: https://github.com/jquery/jquery/issues/2667
Vanilla Javascript event.which
is deprecated, see here: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/which
jQuery event.which
is deprecated, see here: https://github.com/jquery/api.jquery.com/issues/821
Therefore you should switch to using: KeyboardEvent.key
Browser Support: https://caniuse.com/#feat=keyboardevent-key
W3c Spec: https://www.w3.org/TR/uievents/#dom-keyboardevent-key
Not worth updating jQuery.flot
, see below.
@ayumihamsaki do we really need to upgrade it? If we're not using any of the new features and there's no issues with the current version I don't see any reason to upgrade it.
@LukeTowers It's up to you, please read their changelog and see all the bug fixes they made, it seems a lot of bug fixes, but yah it would be a pain to update, https://github.com/flot/flot/blob/master/CHANGELOG.md
@ayumihamsaki Meh, not worth it in my opinion unless someone reports an issue where they actually need it upgraded for some reason, which I can't really see happening.
Done a fresh PR to try and update the Ace Editor - the last time we tried to test an update we found issues with the themes.
This PR is highly needed to fix many bugs and allow me to finish off several other PR's.
Hopefully this time it will play nice in testing.
This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see action on it, please respond and we will get the ball rolling.
Added jquery cookie
JS Library Name | URI Location | Update Location | Version Number | Last Update Date |
---|---|---|---|---|
jQuery | See Github PR: https://github.com/octobercms/october/pull/4461 | https://github.com/jquery/jquery/releases | 3.4.1 | May 1, 2019 |
jQuery October CMS Doc's | See Github PR: https://github.com/octobercms/docs/pull/390 | |||
jQuery Migrate | See Github PR: https://github.com/octobercms/october/pull/4461 | https://github.com/jquery/jquery-migrate/releases | 3.1.0 | June 8, 2019 |
When updating the jQuery, you need to update the doc's version number as well, see here: https://octobercms.com/docs/markup/filter-theme#combiner-aliases
Reference to the jQuery library (v3.4.0) used in the back-end. (JavaScript)
Please note the developer
branch may have newer updates than the master
branch when checking the current version numbers of the vendor files.
Please see here for any jQuery Migrate warnings and code updates: https://github.com/jquery/jquery-migrate/blob/master/warnings.md
snippets
folder called php-inline.js
and can be found here:https://github.com/octobercms/october/blob/master/modules/backend/formwidgets/codeeditor/assets/vendor/ace/snippets/php-inline.js
This file was copied into the newbuild.
Emmet.js
a build version can be found here:https://cloud9ide.github.io/emmet-core/emmet.js
https://github.com/ajaxorg/ace-builds/
https://www.jsdelivr.com/package/npm/ace-builds
We do not use require.js
so we use this build version:
src-noconflict
uses ace.require instead of require.Note: moment.js
if I remember correctly there was an issue with the ar
lang pack and we switched it over to ar-ly.js
as per issue: https://github.com/octobercms/october/issues/3808
Also moments we use TimeZone as well as per: https://github.com/octobercms/october/pull/3960
From V2.2.8 onwards they changed the structure of Raphaƫl and Eve as the following:
We have decided to stay with V2.2.7 due to the build being unreadable because of webpack to run some Compatibility with October CMS. See here: https://github.com/octobercms/october/pull/4263
We are using the custom URI for builds:
Can't find a direct github Release list for dropzone.js instead the following web pages have the download files:
V0.9.15 onwards requires jquery.color.js
to make things easier I have combined jquery.color.js
and jcrop
into a single file. The CSS min file is the non-minified version for testing.
:focus-visible
Installed Version Number | Github Release Page |
---|---|
V5.0.0 | https://github.com/WICG/focus-visible/releases |
Based on the proposed CSS :focus-visible
pseudo-selector, this prototype adds a focus-visible
class to the focused element, in situations in which the :focus-visible
pseudo-selector should match.
Polyfill Location: https://github.com/octobercms/october/blob/master/modules/system/assets/ui/vendor/focus-visible/focus-visible.js
Github Repo: https://github.com/WICG/focus-visible
Installed Version Number | Github Release Page |
---|---|
V1.1.0 | https://github.com/cvan/keyboardevent-key-polyfill/releases |
Most major browsers now support event.key
, however Edge has a bug issue here: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11509049/ and IE11 doesn't support event.key
. This polyfill fixes the Edge bug and also allows Browsers that do not support evcent.key
to work properly.
Polyfill Location: https://github.com/octobercms/october/blob/master/modules/system/assets/ui/vendor/keyboardevent-key-polyfill/index.js
Github Repo: https://github.com/cvan/keyboardevent-key-polyfill
Doing some research I have come to a small conclusion of the following results:
Vanilla Javascript event.keyCode
is deprecated, see here: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keycode
jQuery event.keyCode
is deprecated, see here: https://github.com/jquery/jquery/issues/2667
Vanilla Javascript event.charCode
is deprecated, see here: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/charCode
jQuery event.charCode
is deprecated, see here: https://github.com/jquery/jquery/issues/2667
Vanilla Javascript event.which
is deprecated, see here: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/which
jQuery event.which
is deprecated, see here: https://github.com/jquery/api.jquery.com/issues/821
Therefore you should switch to using: KeyboardEvent.key
Browser Support: https://caniuse.com/#feat=keyboardevent-key
W3c Spec: https://www.w3.org/TR/uievents/#dom-keyboardevent-key
Update Modernizr from V3.6.0 to 3.8.0
This is a question, but why are so many packages in October so out of date and there seems to be so many of them in this state. The more I check the more worrying it makes me feel.
I am referring to all the Javascript packages mostly, although the CSS is very old as well.
With regards to the Javascript packages most are using jQuery V1 still and alot say their dated from as far back as 2006. Surely they must be very buggy and have lots of secury holes in them?
As for the CSS it contains lots of floats and no CSS Flexbox or CSS grids.
I just wondered is there a plan to update everything? Or is it being swept under the carpet as it seems like quite a big issue.
Honestly, it really does seem every Javascript package is years out of date. This is why lots of them are using Eval and causing that issue.