Versions
Each time the widget is improved, a new version is released. A version number has three parts, such as 0.5.3. The widget is published to a content delivery network (CDN), a service that serves files quickly from servers around the world, under https://widget.aidenvoice.com/<version>/. It is also published to npm, a store for developer packages, as @aiden-voice/widget.
Version addresses
Section titled “Version addresses”The address you put in your page decides which version of the widget you get:
- Exact versions, such as
/v0.5.3/. Each one serves that single release, and it never changes. Early test releases, such as/v1.3.0-rc.1/, work the same way. - Minor aliases, written
/vX.Y/, such as/v0.5/. An alias is a shortcut that always points to the newest stable release in that line. For example,/v1.3/follows the newest1.3.x. - Major aliases, written
/vX/, such as/v0/. Each one points to the newest stable release in that major line. For example,/v1/follows the newest1.x.x. /next/serves the newest test release.
An alias moves to each new stable release in its line, so you get improvements without editing your page. Browsers may keep a copy of an alias for up to five minutes, so a new release can take a few minutes to reach visitors who loaded the widget recently.
The root, https://widget.aidenvoice.com/, shows a small page that describes this layout.
Which address to embed
Section titled “Which address to embed”The code in Install the widget uses the /v0/ address:
<script src="https://widget.aidenvoice.com/v0/widget.iife.js"></script>An address only exists once a matching stable release has shipped. Today’s newest stable release is in the 0.x line, so /v0/ exists and /v1/ does not. /v1/ will exist the day 1.0.0 ships. The newest stable release today is 0.10.8.
Only use an address you know exists. If it does not exist, the browser gets a “not found” answer, the widget never loads, and the chat button never appears. Do not use /v1/ before a 1.0.0 release.
Which style should you choose?
/v0/follows new releases on its own. Choose it if you want improvements without editing your page. It follows every0.xrelease, and a0.xminor version, for example the step from0.5to0.6, can contain breaking changes. If your site needs to stay stable, pin an exact version instead.- An exact version, such as
/v0.5.3/. Choose it if you want nothing to change unless you decide so.
Versions on npm
Section titled “Versions on npm”- The npm package
@aiden-voice/widgetuses the same version numbers. Stable releases are published under thelatesttag, so a plain install gets the newest stable release. - Test releases are published under the
nexttag. To try one, runpnpm add @aiden-voice/widget@nextornpm install @aiden-voice/widget@next. - A release that is not the newest of its kind is published under the
maintenancetag instead. An example is a fix for an older line, published after a newer stable release. This way an out-of-order release never changes whatlatestornextpoint to.
Related pages
Section titled “Related pages”- Install the widget for the code snippet and the npm install
