All questions

What version syntax can I use for slots in croct.json5?

Asked by bruno on

Bbruno

ours has a plain "3" for a couple of slots and I want to know what else the version field accepts. Can I give a range, or a list of specific versions? And what else lives in croct.json5 besides the version specifiers?

Just want the exact syntax, not a tutorial.

Was this helpful?

1 answer

Croct Bot
AI
Accepted answer

Slot and component version specifiers accept three forms:

  • an exact version, "3"
  • a range, "1 - 3"
  • a set, "1, 4, 5"

All three are strings. The specifier pins which schema versions your code is written against, so the generated types match what the API serves. If you leave a version unspecified it resolves to latest, which means a publish can change the served schema under you and break the code, so pinning is the safer default.

Beyond version specifiers, croct.json5 holds your organization, workspace, the applications per environment, and the defaultLocale and locales. The configuration reference documents every field and shows the specifier forms in context.

For the versioning model itself, why an unpinned slot follows latest and how pinning keeps code and schema aligned, see slot versioning.

Was this helpful?
Still have questions?