Skip to content

Commit 6d8b475

Browse files
committed
docs: document how to support a new Angular version
1 parent 4820980 commit 6d8b475

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

docs/README_contributors.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,24 @@ The `getRemoteUrl` function in `src/engine/engine.prepare-options-helpers.ts` ca
281281

282282
**Current baseline:** Tests are pinned to gh-pages v6.3.0 behavior and error messages.
283283

284+
## Supporting a new Angular version
285+
286+
When a new major Angular version ships, add support with a **minimal, non-breaking bump** — extend the upper bound and keep the existing majors. Only drop an old version when keeping it actually costs logic or workarounds. Bloated tests alone aren't enough: a broken build for late-upgrading (e.g. enterprise) projects costs more goodwill than the version costs us.
287+
288+
Checklist (example: adding Angular 22):
289+
290+
1. **Confirm the engine still works.** Check the `angular.json` that `@angular/cli@vNN` generates (the `application` schematic) and confirm the `outputPath` handling in `src/deploy/actions.ts` still covers it. No logic change should be needed unless the build output shape changed.
291+
2. **`src/package.json`** – extend the upper bounds only:
292+
- `@angular-devkit/architect`: `<0.2200.0``<0.2300.0` (the devkit minor is `0.NN00.0`)
293+
- `@angular-devkit/core` & `@angular-devkit/schematics`: `<22.0.0``<23.0.0`
294+
- peer `@angular/cli`: `<22.0.0``<23.0.0`
295+
- leave `devDependencies` pinned at the floor (Angular 18) so the build keeps verifying against the minimum supported version
296+
- bump `version` (minor for additive support), and `engines.node` only if the floor actually moved (keep a wide `>=` bound)
297+
3. **`README.md`** – update the "supports Angular X to Y" line.
298+
4. **`.github/workflows/main.yml`** – add a `Test Angular NN` step (copy the previous one).
299+
5. **Test fixture** – add `src/test-fixtures/angular-NN.json` (the real `ng new` output) plus a matching block and cross-version assertions in `angular-versions.spec.ts`.
300+
6. **Verify:** `cd src && npm run build && npm test`. CI then runs a real `ng new``ng add``ng deploy` against every supported version.
301+
284302
## Keeping track of all the forks
285303

286304
[ngx-deploy-starter](https://github.com/angular-schule/ngx-deploy-starter/) and

0 commit comments

Comments
 (0)