Release: Mojito JS Delivery v2.3.0

15 June 2020 by Robert Kingston

The focus of this release was a series of optimisations that allowed us to cut minified container weights by a huge 0.29KB for Mojito JS Delivery. Despite the large savings, we’ve retained the same behaviour in the library as before.

Here’s a comprehensive summary of the changes you’ll find:

New features

Code quality & optimisations

Check out the release over on GitHub.

YAML private key

Anything specified under private for a test’s config.yml will not be published in your container. E.g.:


state: staging
sampleRate: 0
id: w1
name: w1 some test
private:
  previewUrl: https://mojito.mx/
recipes:
  '0':
    name: Control
  '1':
    name: Treatment
trigger: trigger.js

This will translate to the following JS (notice how “private” is missing from the test object below?):


Mojito.addTest({
  "state": "staging",
  "sampleRate": 0,
  "id": "w1",
  "name": "w1 some test",
  "recipes": {
    "0": {
      "name": "Control"
    },
    "1": {
      "name": "Treatment"
    }
  },
  "trigger": function trigger(test) {
    Mojito.utils.domReady(test.activate);
  }
});

We expect this private key will be home to:

While none of this has been planned, we look forward to fleshing this out with our clients and the community.

Next release

For the next release, we’ll look to further improve build/publish times and perhaps even introduce our new MD5 decisionAdapter as the default decisionAdapter. If there’s anything you’d like to see in the library, let us know by opening an issue.