Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

Managing (JS) code dependencies

From version 11 ResourceSpace is officially managing its JS dependencies using pnpm.

Installation

To install follow the pnpm's instructions (depending on your setup). Verify it's OK and then install the latest version of Node.

pnpm -v
pnpm env use --global lts

We'll use Node during the post-installation stage to run our build:dependencies script.

ResourceSpace development

Developers must use pnpm to install the all the required dependencies by running the folowing command from the ResourceSpace root directory.

pnpm install

This will read the pnpm-lock.yaml file from the current directory, resolve the dependencies and install them into the 'node_modules' directory. The lock file ensures that the same versions of packages are installed in all environments, it prevents conflicts that may arise from installing different versions of the same package resulting in a deterministic release for front-end assets.

Please note that installing dependencies this way will also provide the source maps for a lot of the libraries we have which can help you navigate easier library code in the browser should you need to debug it. Source map files are not usually versioned.

Upgrading dependencies

If you wish to update the front-end dependencies used by ResourceSpace to their latest available versions and update the lock file use the update command.

Releases

From a sysadmin user perspective nothing will change for you. We have a custom pnpm script (build:dependencies) which will include everything needed by the front-end (e.g. copy all the relevant JS and CSS).