Jlab extensions that target both jlab3 and jlab4

update:

the initial idea of writing

    JLAB4 = new SemVer(app.version).compare('4.0.0') >= 0;

does not work for two reasons:

  • superficially, release candidates would come with app.version like e.g. 4.0.0rc0, which is not semver-friendly, we would need to feed it with 4.0.0-rc0 instead (hyphen is mandatory), as per
    Semantic Versioning 2.0.0 | Semantic Versioning
  • more serious, in the context of nb7 the app object seems to refer to the notebook app instance, and so here we get 7.0.0rc0 instead as app.version

so this approach is wrong, need to find something better…