This document describes how we manage Angular version compatibility, branching, npm publishing, and contributor workflow for ngrx-toolkit.
We support multiple Angular versions in parallel using versioned branches and matching npm major versions:
| Git Branch | Angular Version Support | npm Version | npm Tag | Purpose |
|---|---|---|---|---|
main |
Angular 20+ | 20.x |
latest |
Active development |
v19 |
Angular 15–19 | 19.x |
angular19 |
Maintenance only |
v20 |
Angular 20 | 20.x |
(optional) | Frozen once main moves to v21 |
v21 |
Angular 21 (future) | 21.x |
latest |
Active once Angular 21 is current |
src/
core/ ← shared logic for all versions
angular/
v20/ ← Angular 20+ only features
v21/ ← Angular 21+ only features (future)
core/holds reusable code shared across all versionsangular/vXX/contains version-specific logic, only exported in compatible branches
Control what is exported in each branch:
export * from './src/core';
export * from './src/angular/v20/http-resource-feature';export * from './src/core';
// Do not export v20 or v21 featuresgit checkout v19
npm version 19.x.y
npm publish --tag angular19
git push origin v19 --tagsgit checkout main
npm version 20.x.y
npm publish
git push origin main --tagsgit checkout main
git checkout -b v20 # Freeze Angular 20
git push origin v20
# Upgrade Angular in main, then:
npm version 21.0.0
npm publish # This becomes new `latest`- If a feature becomes redundant (e.g.
signalFromObservablenow built into Angular):- Keep it in
v19 - In
main:- Option 1: Re-export from Angular
- Option 2: Mark as
@deprecated - Option 3: Remove entirely
- Keep it in
- No need to move old features to a
legacy/folder - just delete them per branch. Git history preserves them.
Use a GitHub Actions matrix to test:
v19with Angular 19mainwith Angular 20- (future)
mainwith Angular 21
Each job should:
- Verify
peerDependencies - Run build, lint, test
- All new development goes into
main - If a feature is backportable to Angular 19:
- Cherry-pick into
v19 - Avoid Angular 20+ APIs in
v19(likehttpResource,linkedSignal)
- Cherry-pick into
- Clearly document breaking changes in changelog
- Update
public-api.tscarefully in each branch
# Angular 20+ projects
npm install ngrx-toolkit
# Angular 15–19 projects
npm install ngrx-toolkit@angular19- Each Angular version gets its own major npm version and branch
mainalways tracks the latest Angular- Features are removed from branches where they're no longer needed
- Avoid unnecessary abstraction: Git + clean exports are all you need
For questions or proposals, please open a discussion or issue. Happy contributing! 🚀