[data-reveal]{opacity:1!important;transform:none!important}
AntelopeJS DMS
DocumentationSupported releases

Supported releases

How a module declares the loader releases it runs on, and what the CLI does with that range.

A frontend module names the @antelopejs/dms-frontend releases it runs on in its own package.json, under engines, the way a package names the Node.js versions it supports:

package.json json
{
  "name": "@acme/dms-billing-frontend-vue",
  "engines": {
    "@antelopejs/dms-frontend": ">=0.6.0 <0.7.0"
  }
}

What the CLI checks

prepare, dev, build and verify-source read engines["@antelopejs/dms-frontend"] from each module's own package.json before they generate the workspace. Because the range comes from the module's files, the check runs with or without a backend. The command stops when the running release falls outside a module's range, or when a module declares a range that is not valid semver. The message names each such module, its range and the running release. The command fails here instead of later, in the build, the type check or a render, on an API the release no longer has or does not have yet:

text
$ ajs dms verify-source
ajs dms verify-source  2 modules
ℹ Verifying against @antelopejs/dms 0.10.0 (installed in this project)
✖ These frontend modules do not run on @antelopejs/dms-frontend 0.10.0
  @acme/dms-billing-frontend-vue (./frontend-vue) supports >=0.6.0 <0.7.0
  → Install a @antelopejs/dms-frontend release in their ranges, or upgrade the modules

A range that is not valid semver shows as declares an unreadable range: "<value>" in place of supports <range>.

  • dev, build and verify-source exit 1. prepare warns and exits 0, as it does for any setup it cannot complete, unless --strict is given.
  • A prerelease is checked as the release it leads to. For example, 0.4.0-next.1 is outside <0.4.0.
  • A module that declares no range still loads. A warning names it once per workspace.
  • start checks nothing. It runs what build produced.

Choosing the range

A range capped below the next breaking release keeps a module off a release it has not been checked against. While this package is below 1.0, the next breaking release is the next minor release. A range left open to <1.0.0 admits the release that removes an API the module calls. The range of each DMS release is in the engines of its frontend module (see Compatibility).

A module also raises the floor of its range when it starts to use a file or API that only later releases read, such as a dms.server.ts. An older loader never reads that file.

Why an engine and not a peer dependency

The generated workspace installs every module as a workspace package. pnpm installs the peer dependencies of a workspace package, optional ones included, so a peer dependency on the loader would pull a copy of it into every workspace. Package managers ignore an engine they do not know.