Globetrotter docsversion 0.3.0 · 2026-12-04

Upgrade a project

On this page
  1. With a bundle (the way for everyone who was handed one)
  2. For people changing Globetrotter itself
  3. What each says
  4. When a migration is waiting
  5. Do not

A project installs Globetrotter from tarballs in vendor/globetrotter/ until the packages are on a registry. A plain npm install can answer "up to date" and keep the old code when the version did not change.

With a bundle (the way for everyone who was handed one)

From the folder that holds the newer globetrotter-<version>/:

node globetrotter-<version>/install.mjs upgrade ../my-project

(or upgrade . from inside the project). It replaces the tarballs in vendor/globetrotter/, points package.json at them (in frontend/ too), installs, runs sync, sync --check and doctor. Then restart globetrotter dev. Install Globetrotter has the same in context.

For people changing Globetrotter itself

Every package in the repository says 0.2.0; scripts/pack-into.mjs gives each pack a version that is new every time. From the Globetrotter repository:

node scripts/pack-into.mjs ../my-project

It packs the seven packages as 0.2.<commits>-dev.<sha> (.dirty.<time> after it when the working tree has changes), replaces the tarballs in my-project/vendor/globetrotter/, and points package.json (and frontend/package.json) at them. It installs nothing and writes nothing in the repository. Add --dry to see the version only.

In the project:

npm install ./vendor/globetrotter/*.tgz
(cd frontend && npm install ../vendor/globetrotter/globetrotter-core-*.tgz ../vendor/globetrotter/globetrotter-widgets-m3-*.tgz)   # when the pages live in frontend/
npx globetrotter --version
npx globetrotter sync
npx globetrotter sync --check
npx globetrotter doctor

Then restart globetrotter dev: the studio it staged under .globetrotter/studio is refreshed when it starts.

What each says

  • globetrotter --version (or -v): the version and the commit it was packed from. In a source checkout, the working tree's commit.
  • globetrotter doctor: one line for each rule of "in sync", with what to run when it fails. Exit 1 when one fails; --json for a program.
    1. design = generated pages
    2. generated types = bindings (tsc --noEmit in the pages' folder)
    3. service = generated backend = your code
    4. service = pages (contract-drift)
    5. migrations written = applied, in the local environment
    6. the project's Globetrotter = its vendored tarballs = the CLI you run
  • sync --check runs rule 1 to 4 too, and tsc --noEmit in the pages' folder (--no-tsc skips it).
  • The studio shows a quiet notice when the project installs another version than the studio is, and a banner when the backend is behind its migrations.

When a migration is waiting

globetrotter dev (local environment) applies a migration that only adds (CREATE TABLE, CREATE INDEX, ADD COLUMN) and says so in one line. A migration that does more (DROP, a rebuild, ALTER COLUMN, UPDATE, DELETE) is never applied by itself: dev prints what is waiting and the exact command, and the studio's banner shows the same with a Copy button. The banner's Apply button appears only for the additive local case.

Do not

  • Do not run npm install and trust "up to date": check npx globetrotter --version.
  • Do not link the project to the repository's source (file:../Designer-/packages/*): two copies of React, and a project nobody else can clone.