Tempusxr Français
Menu
  1. Docs
  2. Contribute

Release the SDK

The SDK goes out in two ways: the site (the files at /v1/ and a versioned folder, plus the docs and the examples), and npm (seven @tempusxr packages). The site deploys by itself when main is pushed. npm is a manual step because it needs a person with 2FA.

Before you release

pnpm lint && pnpm typecheck && pnpm format:check && pnpm check:licenses
pnpm test                 # builds, then unit tests
pnpm test:e2e             # browser tests
pnpm size                 # the gzip budgets

Then try the new work on a real phone and note the result in docs/device-matrix.md. The roadmap boxes are ticked by the developer after that test.

The version

Every published package has the same version. Change version in the seven package.json files (sdk-core, scene, sdk-capture, sdk-three, sdk-aframe, sdk-tracker-image, sdk-tracker-world). A beta looks like 0.1.0-beta.1 and is published with the tag beta; 1.0.0 goes out as latest. A version number can never be reused on npm.

Add an entry to docs/whats-new.en.md and docs/whats-new.fr.md.

Build, check, publish

pnpm release:build        # minified build without source maps, and the six CDN files in release/
pnpm release:check        # packs every package and checks the files, license, version and dependencies
npm login                 # as a member of the tempusxr organisation, with 2FA on
pnpm release:publish      # dry run: shows what would go out
pnpm release:publish --yes

The packages are published in the right order. After a minute or two:

npm view @tempusxr/sdk-three@beta version

A new package can take a few minutes to show on npm. Then test an install from an empty folder.

The site and the CDN

pnpm site:build writes site/ with the docs, the examples, /v1/, /v{version}/ and /starter/. Vercel publishes main. /v1/ is cached for an hour; /v{version}/ is cached for a year and must never change, so a fix is always a new version.

If something goes wrong