Actions

Difference between revisions of "Developer Area/Plugins/Third party"

From Mahara Wiki

< Developer Area‎ | Plugins
Line 131: Line 131:
  
 
Goal: to move libraries to be managed by NPM
 
Goal: to move libraries to be managed by NPM
 +
 +
==== NPM-managed JS libraries ====
 
{| class="wikitable sortable" style="vertical-align:middle;"
 
{| class="wikitable sortable" style="vertical-align:middle;"
 
|- style="font-weight:bold; text-align:center;"
 
|- style="font-weight:bold; text-align:center;"
Line 139: Line 141:
 
!'''Location<br />'''<code><small>(./htdocs/...)</small></code>
 
!'''Location<br />'''<code><small>(./htdocs/...)</small></code>
 
!'''License'''
 
!'''License'''
!'''URL/Notes'''
+
!'''Notes - For URL see component page on local'''
!'''NPM'''
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''yargs'''
 
| style="font-weight:bold;" |'''yargs'''
Line 148: Line 149:
 
|<small>.../lib/bootstrap/assets/javascripts/<br /></small>
 
|<small>.../lib/bootstrap/assets/javascripts/<br /></small>
 
|MIT
 
|MIT
|[https://github.com/twbs/release Releases]<nowiki> | </nowiki>[https://github.com/twbs/bootstrap GitHub]
+
|
[https://getbootstrap.com/docs/versions/ bootstrap versions]
 
|✅
 
|-
 
| style="font-weight:bold;" |'''Date time'''
 
'''picker'''
 
|4.17.47
 
|Major 6.17.16 🚧
 
|Active - v6
 
|<small>.../js/bootstrap-datetimepicker/</small>
 
|MIT
 
|[https://github.com/Eonasdan/tempus-dominus GitHub]<nowiki> | </nowiki>[https://getdatepicker.com/6/change-log.html Get Date Picker]
 
 
 
Latest release: rewrite (beta)
 
|❌
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''Chart.js'''
 
| style="font-weight:bold;" |'''Chart.js'''
Line 170: Line 157:
 
|<small>.../js/chartjs/</small>
 
|<small>.../js/chartjs/</small>
 
|MIT
 
|MIT
|[http://www.chartjs.org Chart JS]<nowiki> | </nowiki>[https://github.com/chartjs/Chart.js GitHub]
+
|[https://www.chartjs.org/docs/latest/migration/v4-migration.html Migration to v4]
[https://www.chartjs.org/docs/latest/migration/v4-migration.html Migration to v4]
 
|✅
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''Clipboard js'''
 
| style="font-weight:bold;" |'''Clipboard js'''
Line 180: Line 165:
 
|<small>.../js/clipboard/</small>
 
|<small>.../js/clipboard/</small>
 
|MIT
 
|MIT
|[https://clipboardjs.com/ Clipboard JS]<nowiki> | </nowiki>[https://github.com/zenorocha/clipboard.js GitHub]<br />version # is tagged
+
|version # is tagged
|✅
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''Dragon-drop'''
 
| style="font-weight:bold;" |'''Dragon-drop'''
Line 189: Line 173:
 
|<small>..../js/dragondrop/</small>
 
|<small>..../js/dragondrop/</small>
 
|MIT
 
|MIT
|[https://github.com/schne324/dragon-drop GitHub]
+
|
|✅
 
|-
 
| style="font-weight:bold;" |'''Datatables'''
 
|1.11.4
 
|Minor
 
|Active
 
|<small>.../js/DataTables/</small>
 
|MIT
 
|[https://datatables.net/ Data Tables]<nowiki> |</nowiki>[https://datatables.net/download/index Download]
 
[https://cdn.datatables.net/ Release notes CDN]
 
|❌ Need to use web builder
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''Dropzone'''
 
| style="font-weight:bold;" |'''Dropzone'''
Line 208: Line 181:
 
|<small>.../js/dropzone/</small>
 
|<small>.../js/dropzone/</small>
 
|MIT
 
|MIT
|[https://www.npmjs.com/package/dropzone NPM dropzone]
+
|
|✅
 
|-
 
| style="font-weight:bold;" |'''Gridstack'''
 
|4.4.1
 
|Major
 
|Active
 
|<small>.../js/gridstack/</small>
 
|MIT
 
|[https://github.com/gridstack/gridstack.js GitHub]<nowiki> | </nowiki>[https://gridstackjs.com Website]
 
|❌
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''jQuery'''
 
| style="font-weight:bold;" |'''jQuery'''
Line 226: Line 189:
 
|<small>.../js/jquery/</small>
 
|<small>.../js/jquery/</small>
 
|MIT
 
|MIT
|[http://jquery.com/ Website] [https://forum.jquery.com/ Forum]
+
|[https://forum.jquery.com/ Forum]
|✅
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''jQuery UI'''
 
| style="font-weight:bold;" |'''jQuery UI'''
Line 235: Line 197:
 
|<small>.../js/jquery/jquery-ui/</small>
 
|<small>.../js/jquery/jquery-ui/</small>
 
|MIT
 
|MIT
|[http://jqueryui.com/ jQuery UI]
+
|
|✅
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''JS Color'''
 
| style="font-weight:bold;" |'''JS Color'''
Line 244: Line 205:
 
|<small>.../js/jscolor/</small>
 
|<small>.../js/jscolor/</small>
 
|GPL 3
 
|GPL 3
|http://jscolor.com/
+
|
|✅
 
|-
 
| style="font-weight:bold;" |'''Json editor'''
 
|2.6.1
 
|Minor
 
|Active
 
|<small>.../js/jsoneditor/</small>
 
|MIT
 
|[https://github.com/json-editor/json-editor GitHub]<nowiki> |</nowiki>[https://github.com/json-editor/json-editor/blob/master/CHANGELOG.md Changelog]
 
|🚧
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''Marked'''
 
| style="font-weight:bold;" |'''Marked'''
Line 263: Line 214:
 
|<small>.../js/marked/</small>
 
|<small>.../js/marked/</small>
 
|MIT
 
|MIT
|[https://github.com/markedjs/marked GitHub]
+
|
|✅
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''Moment.js'''
 
| style="font-weight:bold;" |'''Moment.js'''
Line 273: Line 223:
 
|MIT
 
|MIT
 
|[http://momentjs.com/ Moment JS] 🆕 [https://moment.github.io/luxon/#/ Luxon GitHub]
 
|[http://momentjs.com/ Moment JS] 🆕 [https://moment.github.io/luxon/#/ Luxon GitHub]
|✅
 
|-
 
| style="font-weight:bold;" |'''PDFjs'''
 
|3.10.111
 
|Minor 🚧
 
|Active
 
|<small>.../artefact/file/blocktype/pdf/js/pdfjs/</small>
 
|Apache License 2
 
|[http://mozilla.github.io/pdf.js/getting_started/#download Getting started]<nowiki> | </nowiki>[https://github.com/mozilla/pdf.js GitHub]
 
The Firefox dist version seems to be the only working one
 
|❌
 
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''Popper'''
 
| style="font-weight:bold;" |'''Popper'''
Line 292: Line 230:
 
|<small>.../js/popper/</small>
 
|<small>.../js/popper/</small>
 
|MIT
 
|MIT
|https://popper.js.org/<br />[https://github.com/twbs/bootstrap/issues/31451 GitHub issue]<nowiki> | </nowiki>[https://dev.to/fezvrasta/smarter-tooltips-and&#x20;-popovers-with-popper-2-44bh tooltips]
+
|[https://github.com/twbs/bootstrap/issues/31451 GitHub issue]<nowiki> | </nowiki>[https://dev.to/fezvrasta/smarter-tooltips-and&#x20;-popovers-with-popper-2-44bh tooltips]
'''Floating UI'''  
+
'''Floating UI'''
|✅
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''Fontawesome'''
 
| style="font-weight:bold;" |'''Fontawesome'''
Line 302: Line 239:
 
|<small>.../theme/raw/sass/lib/font-awesome/</small>
 
|<small>.../theme/raw/sass/lib/font-awesome/</small>
 
|SIL OFL 1.1
 
|SIL OFL 1.1
|[http://fontawesome.io Font Awesome]<nowiki> | </nowiki>[https://github.com/FortAwesome/Font-Awesome GitHub]<nowiki> | </nowiki>[https://fontawesome.com/docs/web/setup/upgrade/ Upgrade steps]<nowiki> | </nowiki>[https://fontawesome.com/docs/changelog/ Changelog]
+
|[https://fontawesome.com/docs/web/setup/upgrade/ Upgrade steps]<nowiki> | </nowiki>[https://fontawesome.com/docs/changelog/ Changelog]
|✅
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''TinyMCE'''
 
| style="font-weight:bold;" |'''TinyMCE'''
Line 313: Line 249:
 
|[https://www.tiny.cloud/ Tiny Cloud]<nowiki> | </nowiki>[https://www.tiny.cloud/get-tiny/self-hosted Downloads]<nowiki> | </nowiki>[https://www.tiny.cloud/docs/changelog/ Changelog]<nowiki> |</nowiki>[https://www.tiny.cloud/blog/category/news-and-updates/ News]
 
|[https://www.tiny.cloud/ Tiny Cloud]<nowiki> | </nowiki>[https://www.tiny.cloud/get-tiny/self-hosted Downloads]<nowiki> | </nowiki>[https://www.tiny.cloud/docs/changelog/ Changelog]<nowiki> |</nowiki>[https://www.tiny.cloud/blog/category/news-and-updates/ News]
 
📲 Test on mobile
 
📲 Test on mobile
|✅
 
 
|-
 
|-
 
| style="font-weight:bold;" |'''Video.js'''
 
| style="font-weight:bold;" |'''Video.js'''
Line 321: Line 256:
 
|<small>.../artefact/file/blocktype/<br />internalmedia/videojs/</small>
 
|<small>.../artefact/file/blocktype/<br />internalmedia/videojs/</small>
 
|Apache License 2.0
 
|Apache License 2.0
|[http://videojs.com/ Video JS]<nowiki> | </nowiki>[https://github.com/videojs/video.js GitHub]
+
|[http://videojs.com/ Video JS]
|
+
|}
 +
 
 +
==== Manually managed JS libraries ====
 +
{| class="wikitable sortable" style="vertical-align:middle;"
 +
|- style="font-weight:bold; text-align:center;"
 +
!'''Name'''
 +
!'''Mahara <br />version'''
 +
!'''Update available (Major, Minor, Security, Patch)'''
 +
!'''Last release'''
 +
!'''Location<br />'''<code><small>(./htdocs/...)</small></code>
 +
!'''License'''
 +
!'''Notes - For URL see component page on local'''
 +
!'''NPM'''
 +
|-
 +
| style="font-weight:bold;" |'''Date time'''
 +
'''picker'''
 +
|4.17.47
 +
|Major 6.17.16 🚧
 +
|Active - v6
 +
|<small>.../js/bootstrap-datetimepicker/</small>
 +
|MIT
 +
|[https://getdatepicker.com/6/change-log.html Changelog]
 +
 
 +
Latest release: rewrite (beta)
 +
|❌
 +
|-
 +
| style="font-weight:bold;" |'''Datatables'''
 +
|1.11.4
 +
|Minor
 +
|Active
 +
|<small>.../js/DataTables/</small>
 +
|MIT
 +
|[https://datatables.net/download/index Download]
 +
[https://cdn.datatables.net/ Release notes CDN]
 +
|❌ Need to use web builder
 +
|-
 +
| style="font-weight:bold;" |'''Gridstack'''
 +
|4.4.1
 +
|Major
 +
|Active
 +
|<small>.../js/gridstack/</small>
 +
|MIT
 +
|
 +
|❌
 +
|-
 +
| style="font-weight:bold;" |'''Json editor'''
 +
|2.6.1
 +
|Minor
 +
|Active
 +
|<small>.../js/jsoneditor/</small>
 +
|MIT
 +
|[https://github.com/json-editor/json-editor/blob/master/CHANGELOG.md Changelog]
 +
|🚧
 +
|-
 +
| style="font-weight:bold;" |'''PDFjs'''
 +
|3.10.111
 +
|Minor 🚧
 +
|Active
 +
|<small>.../artefact/file/blocktype/pdf/js/pdfjs/</small>
 +
|Apache License 2
 +
|[http://mozilla.github.io/pdf.js/getting_started/#download Getting started]
 +
The Firefox dist version seems to be the only working one
 +
|
 
|}
 
|}
  

Revision as of 12:51, 9 October 2023

A list of the third-party plugins within Mahara.

Composer commands

For available versions, e.g. composer show phpro/grumphp-shim 1.14.* --all

For our composer dependencies: composer show --tree

For checking the dependencies of a library version, e.g. composer show elasticsearch/elasticsearch 7.17.* --tree

Check if there are any outdated libraries (according to the version syntax in composer.json) composer outdated

Checking the .Mahara files

To check the versions in the .Mahara files, a helpful way to update this list is to go:

 find ./htdocs -type f -iname "README.Mahara" -exec grep 'Version' -B1 {} \; -print

... on the current codebase.

Syncing the list in 'Country' dropdowns

To keep in sync is the country names we use for 'Country' dropdowns. To check what the current state of play is

perl -MLocale::Country -le 'print join("\n", sort map { country2code($_) . " => " . country2code($_, LOCALE_CODE_ALPHA_3) . ", // " . $_ } all_country_names())'

and check the results against htdocs/lib/country.php and htdocs/lang/en.utf8/mahara.php files

For any confusion you can also check against https://www.iso.org

Third-party libraries (PHP and JS)

Legend

  • Mahara version = the README.Mahara file for the library | SemVer Info - explaining the symbols in the Mahara version column
  • Latest version = the most recent available version
  • Security = is there a new security patch available?
  • Upgrades/updates = what upgrades are available for this plugin?
  • Support = Is there a community supporting this library?
    • Active: There is ongoing work being put into the library
    • Inactive: Maintained but not actively making releases
    • Archived: Not being maintained
    • Deprecated (officially): All maintainers have left, and site may not exist in extreme cases.
  • PHP8 = is the latest version of this plugin compatible with PHP8?
  • README location = where it can be found in Mahara
  • License = software license for the library
  • URL/Notes = extra information, e.g. resources, notes, and news
  • 🚧 Work in progress – data needs to be updated

PHP versions in support https://www.php.net/supported-versions.php⁣ – 14 LTS - Ends security support in 30 Apr 2023, go to 16 LTS soon

💡 A new idea is being proposed to better handle customisations on updating third party libraries lives here → https://reviews.mahara.org/c/mahara/+/13780

PHP libraries (excluding external)

https://eusonlito.github.io/php-changes-cheatsheet/deprecated.html

Libraries are managed by Composer. See composer.json

Run composer show to get a quick summary of library versions managed by Composer.

Run composer outdated to get a list of outdated libraries.

🟡 Libraries yet to be moved to Composer: SimpleSAMLPHP - currently lives in htdocs/auth/saml/extlib and the version is managed in Makefile by curl.

Name Mahara
version
Available
update (Major, Minor, Security, Patch)
Last release License URL/Notes Composer
ADODB 5.22.6 Up to date Active BSD 3-Clause
LGPL
Official site | GitHub | Twitter
Wish-list: extract $SESSION
CSS Tidy 2.1.0 Up to date Active LGPL GitHub
Elasticsearch PHP 7.17.2 Major, 8.10.0 Active Apache v2.0 LGPL v2.1 GitHub | Changelog

Move to OpenSearch

HTML Purifier 4.16.0 Up to date 2022 LGPL v2.1+ HTML Purifier | GitHub
PHPMailer 6.8.1 Up to date Active LGPL GitHub
ReCaptcha 1.2.4 Minor, 1.3.0 Active BSD-3 GitHub
simplesamlphp 2.0.4 Minor, 2.0.6 Active GPL 2.1 GitHub

Optional library - called in Makefile

htdocs/auth/saml/extlib/modules

JavaScript and jQuery libraries

🟡 Check that our Node version is still in support https://endoflife.date/nodejs node| https://nodejs.org/en/download/releases/ ➡ Update the .nvmrc file with the supported version.

Run npm list to get a quick list of the versions and libraries managed by NPM

Goal: to move libraries to be managed by NPM

NPM-managed JS libraries

Name Mahara
version
Update available (Major, Minor, Security, Patch) Last release Location
(./htdocs/...)
License Notes - For URL see component page on local
yargs 5.0.2 Minor, 5.3.2 Active .../lib/bootstrap/assets/javascripts/
MIT
Chart.js 3.9.1 Major, 4.4.0 Active .../js/chartjs/ MIT Migration to v4
Clipboard js 2.0.11 Up to date Active .../js/clipboard/ MIT version # is tagged
Dragon-drop 3.6.1 Up to date 2020 ..../js/dragondrop/ MIT
Dropzone 5.9.3 Patch, 5.9.3 2021 .../js/dropzone/ MIT
jQuery 3.7.1 Up to date Active .../js/jquery/ MIT Forum
jQuery UI 1.13.2 Up to date Active .../js/jquery/jquery-ui/ MIT
JS Color 2.5.1 Up to date Inactive,2022 .../js/jscolor/ GPL 3
Marked 4.3.0 Minor, 4.3.0

Major 9.1.0

Active .../js/marked/ MIT
Moment.js 2.29.4 Up to date Active .../js/momentjs/ MIT Moment JS 🆕 Luxon GitHub
Popper 2.11.8 Up to date Active .../js/popper/ MIT GitHub issue | tooltips

Floating UI

Fontawesome 6.4.2 Up to date Active .../theme/raw/sass/lib/font-awesome/ SIL OFL 1.1 Upgrade steps | Changelog
TinyMCE 5.10.7 Major, 6.7.0 Active .../js/tinymce/ LGPL 2.1 Tiny Cloud | Downloads | Changelog |News

📲 Test on mobile

Video.js 7.21.5 Major, 8.5.2 Active .../artefact/file/blocktype/
internalmedia/videojs/
Apache License 2.0 Video JS

Manually managed JS libraries

Name Mahara
version
Update available (Major, Minor, Security, Patch) Last release Location
(./htdocs/...)
License Notes - For URL see component page on local NPM
Date time

picker

4.17.47 Major 6.17.16 🚧 Active - v6 .../js/bootstrap-datetimepicker/ MIT Changelog

Latest release: rewrite (beta)

Datatables 1.11.4 Minor Active .../js/DataTables/ MIT Download

Release notes CDN

❌ Need to use web builder
Gridstack 4.4.1 Major Active .../js/gridstack/ MIT
Json editor 2.6.1 Minor Active .../js/jsoneditor/ MIT Changelog 🚧
PDFjs 3.10.111 Minor 🚧 Active .../artefact/file/blocktype/pdf/js/pdfjs/ Apache License 2 Getting started

The Firefox dist version seems to be the only working one

Forked/stale/deprecated libraries

Name Mahara
version
Latest
version
Status Location
(./htdocs/...)
License URL Next action
Dwoo 1.3.7 1.3.7 Archived, 2020 .../lib/dwoo/ LGPL Dead site?

GitHub

Javascript
templates
3.20.0 3.20.0 Archived, 2021 .../js/javascript-templates/ MIT GitHub
jQuery mobile 1.5.0-alpha.1 1.5.0-rc1 Deprecated .../js/jquery/jquery-mobile/ MIT Website
🚨 "transition(ed) ... under the jQuery project umbrella, jQuery UI"
Remove and test
jQuery UI plugin
touch-punch
0.2.3 0.2.3 Deprecated .../js/jquery/jquery-ui/
jquery-ui-touch-punch.min.js
MIT or GPL
Version 2
GitHub

🚨 external to JQuery UI

Use a fork?
jTLine 1.0 1.0 Inactive, 2018 .../js/jTLine/ MIT GitHub

Twitter

Ref

Masonry 4.2.2 4.2.2 Inactive, 2018 .../js/masonry/ MIT Masonry

GitHub

TinyMCE
Mathslate
1.1 1.1 Forked, 2015 .../js/tinymce/plugins/mathslate/ GPL 3 Our version is forked.
to work with Tinymce 5
Oauth PHP 175 175 Archived, 2010 .../webservice/libs/oauth-php/ MIT Code Replace with an oauth2 php library see what Moodle does (old comment)
zxcvbn 4.4.2 4.4.2 Inactive, 2017 .../js/zxcvbn/ MIT GitHub
Cookie consent 3.1.1 4.0 No open source updates .../js/cookieconsent/ MIT Download GitHub

Open source version is not updated. 🚨

Select2 4.0.13 4.0.13 Inactive, 2020 .../js/select2/ MIT Select2 | Releases

RC 4.1

Fonts

Name Mahara
version
Latest
version
Status README location
(./htdocs/...)
License URL/Notes
Aurulent Sans
(font)
2007.05.04 2007.05.04 n/a .../lib/fonts/ SIL OFL v1.10 Font Squirrel Aurulent Sans
Deja Vu Sans
(font)
2.37 2.37 n/a .../lib/fonts/ DejaVu Fonts Font Squirrel Deja Vu Sans
Open Sans
(font)
1.10 1.10 Unknown .../theme/raw/fonts/ Apache License Google Fonts Open Sans
Roboto Slab
(font)
1.100263 1.100263 Unknown .../theme/raw/fonts/ MIT Google Fonts Roboto
Charis SIL
(fonts)
6.001 6.001 Active .././lib/fonts/ SIL OFL About font | Download

Composer.json dependencies

Resources: https://git.mahara.org | /mahara/mahara/-/blob/ | mahara/external/composer.json

Run composer outdated to check for updates.