Release 1.19.0: Simplifications for extensions

Monday, January 18, 2021


On this page

    The 1.19.0 release focuses on simplications for developing Comunica extension. It contains no significant fixes or changes for end-users.

    Components.js 4

    Comunica's modules are wired together using the Components.js dependency injection framework. As of recently, Components.js has been updated to major release version 4, which features several simplifications for developers.

    While this release is backwards-compatible, we do recommend developers of Comunica modifications to make the following tweaks.

    Reduce clutter in package.json

    All Comunica modules would typically contain the following entries in their package.json files:

    {
      ...
      "lsd:module": "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-abstract-bindings-hash",
      "lsd:components": "components/components.jsonld",
      "lsd:contexts": {
        "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-abstract-bindings-hash/^1.0.0/components/context.jsonld": "components/context.jsonld"
      },
      "lsd:importPaths": {
        "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-abstract-bindings-hash/^1.0.0/components/": "components/"
      },
      ...
    }
    

    This can now be simpified to:

    {
      ...
      "lsd:module": true
      ...
    }
    

    Update Components.js context version

    If you define your own JSON-LD contexts, it is recommended to update to the latest version of the Components.js version

    -   "https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^3.0.0/components/context.jsonld",
    +   "https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld",
    

    While this change is optional, you will see a startup warning mentioning the use of a deprecated context URL.

    Next steps

    In the future, we plan further simplifications to Comunica modifications. Concretely, we intend to enable to automatic generation of module and component files based on TypeScript source code.