angular/angular
Tooling
The framework has a deep stack of internal tools. Most contributors only see pnpm, bazelisk, and ng-dev, but the others come up when working in the more specialized corners of the repo.
ng-dev
The umbrella CLI for repository operations. Source lives in the sister repository angular/dev-infra and is published to this repo via the @angular/ng-dev dependency. Configuration lives in .ng-dev/:
| File | Purpose |
|---|---|
.ng-dev/config.mjs |
Top-level config, references all other modules. |
.ng-dev/commit-message.mjs |
Allowed commit types and scopes. |
.ng-dev/format.mjs |
Files to format and the formatter (prettier). |
.ng-dev/pull-request.mjs |
PR validation rules (target labels, commit count, etc.). |
.ng-dev/release.mjs |
Release branch / publish configuration. |
.ng-dev/github.mjs |
GitHub repo info for the bot. |
.ng-dev/caretaker.mjs |
Caretaker-specific dashboards and queries. |
Common subcommands:
pnpm ng-dev format changed [shaOrRef]— format files changed since a ref.pnpm ng-dev format files <files…>— format specific files.pnpm ng-dev commit-message validate-file <file>— validate a commit message.pnpm ng-dev caretaker check— generate a caretaker dashboard.pnpm ng-dev release publish— publish a release (run by the release pipeline only).pnpm ng-dev pr merge <number>— merge a PR (used by the bot).pnpm ng-dev misc build-and-link <path>— build andpnpm linkpackages into a target project.
Bazel
bazelisk is the launcher; the actual Bazel version comes from .bazelversion. Build configuration:
MODULE.bazel— Bzlmod module definitions and dependencies.MODULE.bazel.lock— locked dependency graph.tools/defaults.bzl— default flags applied to the standard Angular Bazel macros (ng_module,ng_web_test_suite, etc.).- Per-package
BUILD.bazelfiles describe the test, library, and bundle targets.
Common workflows:
pnpm bazel build //packages/core:core # Build a specific target.
pnpm bazel test //packages/core/test:test # Run a single test target.
pnpm bazel test //packages/... # All targets under a path.
pnpm bazel query //... # Inspect the build graph.
pnpm bazel clean --expunge # Hard reset.ibazel is the iterative watcher used by pnpm adev and pnpm devtools:devserver. It re-runs the watched target whenever its sources change.
Remote build execution and remote caching require Google authentication; community contributors run with the local cache only. CI uses a shared remote cache for speed.
goldens/
Golden snapshots are version-controlled fixtures that fail CI on unintended drift.
goldens/public-api/*.api.md— public API surface per package. Update withpnpm public-api:update. The mechanism is implemented ingoldens/public-api/manage.js.goldens/size-tracking/*.json— exported symbol lists from production bundles, generated bytools/symbol-extractor. Update withpnpm symbol-extractor:update.goldens/circular-deps/— known circular import edges. Update via the circular-deps script.
Reviewers expect goldens to be updated in the same commit as the code that changes them.
tools/
Selected tools used during framework development:
tools/manual_api_docs/— hand-authored API doc fragments that sit alongside generated reference pages.tools/symbol-extractor/— extracts top-level exported symbols from a built bundle for size-tracking.tools/testing/— shared test utilities used across packages.tools/bazel/— custom Bazel rules and macros (ng_benchmark, etc.).tools/legacy-saucelabs/— Saucelabs config for legacy browser CI lanes.tools/tslint/— custom tslint rules used by the repo.
scripts/
Smaller imperative scripts that don't fit into Bazel:
scripts/build/build-packages-dist.mts— orchestratespnpm buildacross all packages.scripts/ci/— snapshot publishing and package archiving.scripts/diff-release-package.mts— compares a built tarball to the latest npm publish.scripts/benchmarks/index.mts— local benchmark runner (used bypnpm benchmarks).scripts/compare-main-to-patch.js— diff betweenmainand a patch branch (caretaker tool).
Migrations (ng update)
When the framework removes or changes APIs, automated migrations live under each package's schematics/migrations/:
packages/core/schematics/migrations/— control flow migration, signal inputs, signal outputs, signal queries, etc.packages/router/schematics/migrations/— provideRouter migrations.- Other packages have their own subdirectories.
Each migration is a ng-update schematic shipped in the package and run when end-users execute ng update @angular/<package>. Adding a new migration involves:
- Writing the schematic under
<package>/schematics/migrations/<name>/. - Registering it in the package's
migrations.json. - Adding tests (
<name>/index_spec.ts).
The migrations are also runnable manually via ng-dev's migration tooling for repository-wide tests.
CI workflows
Workflow definitions live in .github/workflows/:
| Workflow | Purpose |
|---|---|
ci.yml |
Main test matrix run on PRs and merges. |
pr.yml |
PR-only checks (label validation, commit message lint). |
adev-preview-build.yml / adev-preview-deploy.yml |
Build a preview of angular.dev for the PR and deploy it. |
cross-repo-adev-docs.yml |
Trigger downstream rebuilds when docs-shared content changes. |
dev-infra.yml |
Updates the dev-infra dependency. |
benchmark-compare.yml |
Run benchmarks vs base for performance-tagged PRs. |
perf.yml |
Long-running performance tracking. |
merge-ready-status.yml |
Surface "ready to merge" state in PR checks. |
assistant-to-the-branch-manager.yml |
Branch manager helper bot. |
scorecard.yml |
OSSF scorecard run. |
google-internal-tests.yml |
Triggers internal Google CI on PRs. |
CI is one of the heavier matrices in the JavaScript ecosystem; the optimization investment is documented in contributing-docs/branches-and-versioning.md.
Pre-commit hooks
husky is configured to run on commit. Hooks:
commit-msg— validates the conventional commit format viang-dev commit-message validate-file.- (Other hooks may be enabled via
pnpm prepare; check the directory for current state.)
To install / refresh hooks: pnpm prepare. To bypass (rarely): git commit --no-verify.
Tsec / trusted types
tsec is Google's TypeScript security analyzer. The framework runs it to enforce that DOM-injection sinks (innerHTML, outerHTML, document.write, etc.) are not introduced inside Ivy. Exemptions are explicitly listed in packages/tsec-exemption.json.
pnpm test-tsecBuilt by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.