Managing Versions of External JavaScript Libraries
This page describes the requirements for managing packages with external libraries.
Requirements:
- R1) Make it possible for users to use always the newest version
- R2) Make it possible to pin a version number, although a newer default version is configured by OpenACS
- R3) It should be possible to copy the database of the production instance to a staging instance without affecting the version number of the external library on the staging instance. The version number on the staging instance might be different to the production site.
When a version is pinned, the site administrator has to change the version number manually, when an upgrade is desired.
OpenACS policy:
The "newest" version is the default version as configured into a package. When upgrading the package, the "newest" version might change.
How to pin a version number:
- Pin version number via configuration file: This works exactly like setting other package parameters via configuration files. Check out the instructions on the site-wide admin page of the package.
- Pin version number via package parameter: The easiest way is to add the parameter via the site-wide admin page. It is always possible to modify the parameter this way or to remove the package parameter (i.e., switch to R1).
Site policies:
Always get the newest tested version tested upstream (use default versions, R1)
-
do not pin the version number via package parameter or via configuration file
Set a different version on the production site than on staging/testing instances:
-
Pin the version number via configuration file on the production instance (R2, R3)
-
On the testing instances, you can use the default version, or fix the version number via configuration file or global package parameter.
Use always the same fixed version number on production and staging/testing instances
-
pin via global package parameter (R2)
Packages following these principles in the oacs-5-10 branch
These principles are implemented for the following packages:
- bootstrap-icons
- fa-icons
- highcharts
- openacs-bootstrap5-theme
- richtext-ckeditor4
- cookie-consent
- openacs-bootstrap3-theme
- richtext-tinymce