Skip to content

Managing Lexicons

Lexicons are provider-specific type packages that define resource constructors, property types, and intrinsic functions.

Install the lexicon package and add it to your chant.config.ts:

Terminal window
npm install --save-dev @intentius/chant-lexicon-<name>
import type { ChantConfig } from "@intentius/chant";
export default {
lexicons: ["<name>"],
lint: {
extends: ["@intentius/chant/lint/presets/strict"],
},
} satisfies ChantConfig;

Update the lexicon package version:

Terminal window
npm update @intentius/chant-lexicon-<name>

Each lexicon is versioned independently of core and of other lexicons. A spec upgrade PR for k8s bumps only @intentius/chant-lexicon-k8s; merging it triggers publish-on-merge for that package alone.

All lexicons declare @intentius/chant as a peer dependency with a ^ range pinned to the minimum compatible core version (e.g. "^0.13.1"). A lexicon minor or major bump does not require a core release, and a core minor release does not force lexicon versions to move.

When installing a lexicon, npm resolves the peer against whichever core version is already in the tree — as long as it satisfies the ^ lower bound.

See Lexicons Overview for the full architecture, including how lexicons provide type definitions, property mappings, and lint rules.