spiegel-keyman/web/docs/engine/reference/core/versionInfo.md
Marc Durdin f1361a94f0 feat(web): add keyman.versionInfo API
KeymanWeb has long had `keyman.build` and `keyman.version`. Neither of
these properties expose the full version string, and consumers are
forced to manipulate them to get a partial version string.

This change deprecates both these properties, and introduces a new
`keyman.versionInfo` property, which returns an object with all the
version information, most importantly `full`.

Update documentation and add a unit test for this, following the unit
test pattern established throughout Keyman of a unit test filename
matching the implementation class. The `KeymanEngineBase` class is a
little difficult to instantiate so this unit test module currently has
a minimal instantiation which provides enough to fulfill the one
included test.

Test-bot: skip
2026-08-12 11:07:31 +02:00

1.7 KiB

title
versionInfo

Summary

Returns an object describing the current KeymanWeb version.

Syntax

keyman.versionInfo

Type

object

Access

Read only

Return Value

An object with the following properties:

  • full: string : "major.minor.patch[-tier][-environment]". tier will be included for alpha and beta. environment will be included for local or test builds, and for test builds may include an additional test context such as a pull request number.

  • major: number : major component of the version string

  • minor: number : minor component of the version string

  • patch: number : patch component of the version string

  • version: string : "major.minor.patch" string

  • tier: string : The tier, "stable", "beta", or "alpha"

  • environment: string : One of "stable", "beta", "alpha", "local", or "test". For release builds, the same as tier; for development builds, "local", and for test builds "test". Test context is only included in the full property.

Example return value

{
  full: "18.0.249-alpha-local",
  major: 18,
  minor: 0,
  patch: 249,
  version: "18.0.249",
  tier: "alpha",
  environment: "local"
}

Description

This property should be used instead of the deprecated [keyman.build] or [keyman.version] properties. In most cases, you should use the full property as the version to display to users. The major property can be used for version gating.

History

  • 19.0: introduced versionInfo property, deprecated build and version.

See also