CodeVetter · Repo Unpack · System map
mobxjs/mobx
The repository distributes libraries and developer tools through five npm workspaces. The core runtime owns an in-memory dependency graph, while React integration and source-analysis tools have separate package boundaries. Shared Rollup configuration produces consumer-specific bundles, and a separate Docusaurus package builds documentation.
- The private mobx-root manifest defines five workspaces and delegates build and build:test through npm workspace scripts.
- The core entrypoint is src/mobx.ts; its documented module boundaries separate public APIs, reactive algorithms, observable types, and utilities.
- MobX exports different artifacts for Node, native React environments, and ES imports, with TypeScript declarations and explicit source/dist subpath exports.
- MobXGlobals owns tracking contexts, batch depth, pending reactions, and pending unobservations; compatible instances share it through globalThis.__mobxGlobals.
- ObservableObjectAdministration stores per-property ObservableValue or ComputedValue instances in a Map and attaches to application objects through the hidden $mobx property.
- mobx-react depends on mobx-react-lite, re-exports its hooks and Observer component, and adds observer dispatch for class components; both packages declare React 18/19 peers.
- createRollupConfig always constructs development and production CJS configurations; TARGET=test skips other formats, while publish adds environment-specific ESM alongside general ESM, .mjs, and UMD outputs.
- Documentation uses Docusaurus build/start hooks and GitHub Pages publishing; package releases use Changesets in a workflow restricted to mobxjs/mobx with write permissions.