The Angular repository at https://github.com/angular/angular is the monorepo containing the source code for the Angular web framework, including the core framework packages, compiler, CLI tooling, developer tools, and supporting infrastructure. This repository builds all published Angular packages (@angular/core, @angular/common, @angular/router, etc.) that application developers install via npm.
This page provides a high-level orientation to the repository structure, build systems, and major architectural components. For detailed information about specific subsystems, see:
Angular is structured as a monorepo managed by pnpm workspaces, containing multiple publishable packages, developer tools, documentation sites, and integration tests.
Sources: package.json1-9 pnpm-lock.yaml1-11
| Directory | Purpose | Key Contents |
|---|---|---|
packages/ | Publishable Angular packages | core/, common/, compiler/, forms/, router/, platform-browser/, zone.js/ |
adev/ | Angular.dev documentation site | Documentation content, tutorials, interactive examples |
devtools/ | Angular DevTools browser extension | Chrome/Firefox debugging extension |
integration/ | Integration test suites | End-to-end tests for package combinations |
tools/ | Build and development tooling | Bazel rules, schematics, symbol extraction |
goldens/ | Public API validation | Golden files tracking exported symbols and API surface |
.github/workflows/ | CI/CD pipeline definitions | GitHub Actions for testing, building, deployment |
Sources: package.json1-224 .github/workflows/ci.yml1-230
The framework packages form a layered dependency graph where higher-level packages depend on lower-level ones:
Sources: package.json54-159 pnpm-lock.yaml17-334
The repository uses pnpm workspaces with workspace:* protocol for cross-package dependencies:
This ensures all packages use the local versions during development while allowing independent versioning for published packages.
Sources: package.json58-78 adev/package.json7-22 modules/package.json3-11
Angular uses a hybrid build system combining Bazel for orchestration with pnpm for dependency management:
Package Manager Configuration:
packageManager field)packages/ directoriesBazel Configuration:
Sources: package.json9-13 package.json19-51 .github/workflows/ci.yml45-56
| Command | Purpose | Implementation |
|---|---|---|
pnpm build | Build all packages for distribution | package.json22 → scripts/build/build-packages-dist.mts |
pnpm test | Run unit tests via Bazel | package.json23 → bazelisk test |
pnpm test:ci | Run CI test suite | package.json24 → Excludes integration/adev/devtools |
pnpm lint | Run linting checks | package.json27 → tslint + format checks |
pnpm public-api:check | Validate public API surface | package.json29 → goldens/public-api/manage.js |
Sources: package.json19-51
The repository uses GitHub Actions for continuous integration and deployment:
Key CI Jobs:
pnpm test:ciSources: .github/workflows/ci.yml1-230 .github/workflows/pr.yml1-188
The repository uses multiple test frameworks for different package types:
| Test Framework | Usage | Configuration |
|---|---|---|
| Karma + Jasmine | Browser unit tests for framework packages | package.json126-129 |
| Cypress | E2E tests for DevTools | package.json185 .github/workflows/ci.yml57-64 |
| Protractor | Legacy integration tests | package.json135 |
| Jest | Zone.js tests | Run via pnpm in packages/zone.js/ |
Sources: package.json123-131 .github/workflows/ci.yml38-64
While the CLI itself is in a separate repository (angular/angular-cli), this repository includes:
packages/compiler-cli/): AOT compiler used by CLIpackages/core/schematics/): Code generation and migration toolspackages/language-service/): IDE integrationSources: package.json62 package.json69 adev/src/content/tools/cli/build.md1-45
The adev/ directory contains the Angular.dev documentation site:
Sources: adev/package.json1-86 adev/src/content/guide/BUILD.bazel1-36
Current Version: 21.2.0-next.0 (package.json3)
Release Artifacts:
Version Management:
[0-9]+.[0-9]+.x pattern (.github/workflows/ci.yml7)Sources: package.json3 CHANGELOG.md1-500
Angular maintains strict API compatibility using golden files:
The goldens/public-api/ directory contains .d.ts files representing the approved public API surface for each package. Changes to these files require explicit approval, preventing accidental breaking changes.
Commands:
pnpm public-api:check: Validate current API against golden files (package.json29)pnpm public-api:update: Update golden files with current API (package.json30)Sources: package.json29-30 goldens/ directory
The Angular repository is a comprehensive monorepo that:
@angular/*adev/ directoryFor detailed information about specific subsystems, refer to the numbered pages in the table of contents.
Sources: package.json1-224 .github/workflows/ci.yml1-230 pnpm-lock.yaml1-100
Refresh this wiki
This wiki was recently refreshed. Please wait 5 days to refresh again.