# System map — chaijs/chai

> Canonical page: https://codevetter.com/unpack/chai/system-map

# System map — chaijs/chai

Scanned commit d86de2a9519bdd0d89aa64c9fbcc0e880513b153 (2026-09-29). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The runtime consists of a shared Assertion class, built-in registrations, three public interfaces, and utility functions. Module evaluation installs the core assertions, while consumers explicitly activate plugins or the should prototype accessor. State is held in assertion objects and module-level configuration and registries. Distribution is a generated ESM bundle with separate global-registration modules.
- package.json declares ESM, Node >=18, main ./index.js, and a publish file list containing index.js and register-*.js. — [package.json#L3-L15](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/package.json#L3-L15) [package.json#L33-L35](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/package.json#L33-L35) [package.json#L53-L55](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/package.json#L53-L55)
- lib/chai.js imports core/assertions.js for registration side effects and exports Assertion, AssertionError, config, util, expect, assert, should, and Should. — [lib/chai.js#L7-L14](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai.js#L7-L14) [lib/chai.js#L68-L84](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai.js#L68-L84)
- Assertion owns per-chain __flags, initializes target/message/stack/comparator state, and returns a proxified instance. — [lib/chai/assertion.js#L12-L14](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/assertion.js#L12-L14) [lib/chai/assertion.js#L51-L59](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/assertion.js#L51-L59)
- The utility facade delegates deep equality to deep-eql, nested lookup to pathval, error matching to check-error, and value inspection to loupe. — [lib/chai/utils/index.js#L7-L8](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/utils/index.js#L7-L8) [lib/chai/utils/index.js#L38-L42](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/utils/index.js#L38-L42) [lib/chai/utils/index.js#L81-L82](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/utils/index.js#L81-L82) [lib/chai/utils/inspect.js#L4-L5](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/utils/inspect.js#L4-L5)
- The inspected state owners are in-memory: config is an exported object, use retains a used-plugin array, and events is a module-level EventTarget. — [lib/chai/config.js#L1-L14](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/config.js#L1-L14) [lib/chai.js#L33-L34](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai.js#L33-L34) [lib/chai.js#L60-L65](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai.js#L60-L65) [lib/chai/utils/events.js#L7-L8](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/lib/chai/utils/events.js#L7-L8)
- build bundles lib/chai.js into index.js as ES2021 ESM with names preserved; prebuild runs clean, whose command deletes index.js and coverage/. — [package.json#L34-L46](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/package.json#L34-L46)
- Lint combines ESLint and Prettier checks over lib; lint:types separately invokes strict, no-emit JavaScript checking through TypeScript. — [package.json#L42-L45](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/package.json#L42-L45) [eslint.config.js#L7-L25](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/eslint.config.js#L7-L25) [tsconfig.json#L2-L18](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/tsconfig.json#L2-L18) [.prettierrc.json#L1-L10](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/.prettierrc.json#L1-L10)
- Release creation triggers a build/test job followed by a dependent npm publishing job that enables OIDC, applies github.ref_name as the version, and requests public publication with provenance. — [.github/workflows/npm-publish.yml#L6-L8](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/.github/workflows/npm-publish.yml#L6-L8) [.github/workflows/npm-publish.yml#L19-L31](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/.github/workflows/npm-publish.yml#L19-L31) [.github/workflows/npm-publish.yml#L36-L48](https://github.com/chaijs/chai/blob/d86de2a9519bdd0d89aa64c9fbcc0e880513b153/.github/workflows/npm-publish.yml#L36-L48)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
