For detailed architecture docs, package dependency hierarchies, CLDR data pipelines, and design decisions, consult knowledge-base/. Key docs:
001-repo-layout-and-toolchain.md— Directory structure, Bazel, TypeScript/Rust toolchains, CI/CD002-ts-package-dependency-hierarchy.md— 5-layer TypeScript package dependency graph003-rust-crate-dependency-hierarchy.md— Rust crates, WASM, cross-language connections004-009— Per-package design decisions and ECMA-402 conformance details007a-007k— Individual polyfill CLDR data pipelinesmigrations/— Migration plans (e.g., gazelle migration)
- NEVER run
bazel cleanorbazel clean --expunge - Destroys build cache, 10+ minute rebuild penalty
- Use specific targets instead:
bazel build //path/to:target
This repository uses Bazel as its build system. Never use npm, yarn, or pnpm for building or testing.
bazel test //... # All tests
bazel test //packages/intl-localematcher:unit_test # Specific package
bazel build //packages/intl-localematcher:dist # Build package
bazel test <target> --test_output=all # Verbose output
bazel query 'kind(test, //packages/...)' # Query test targetsAlways use bazel run -c opt for Rust benchmarks. Debug mode is ~10x slower.
bazel run -c opt //crates/icu_messageformat_parser:comparison_bench- Cross-check with the LDML spec and ICU4J source
- Each polyfill follows ECMA-402 strictly
- Data is tree-shakeable — locale data is separately importable
- See
knowledge-base/007*.mdfor per-polyfill CLDR pipeline details
Conventional Commits — enforced by commitlint.
<type>(<scope>): <subject>
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
Scope: Full package name from package.json (e.g., @formatjs/cli, @formatjs/intl-localematcher)
Breaking changes: Append ! after scope or add BREAKING CHANGE: footer.
- Packages:
packages/(33 npm packages) - Rust crates:
crates/(3 crates: CLI, parser, skeleton parser) - Custom Bazel macros:
tools/(ts_compile, vitest, oxc_transpiler, etc.) - Conformance tests:
bazel test //packages/cli/integration-tests:conformance_test - Rust CLI tests:
bazel test //crates/formatjs_cli:formatjs_cli_test(176 tests) - Rust CLI conformance: 60/60 passing (packages/cli/integration-tests/conformance-tests/)