Angular 5 to Angular 6.1 Upgrade
Performs the Angular 5.x to Angular 6.1.x major-hop upgrade in a bounded, version-aware slice with CLI migration, RxJS planning, and validation.
SKILL.mdskills/angular/upgrades/hops/angular-5-to-6/SKILL.md
GitHubAngular 5 to Angular 6.1 Upgrade
Purpose
Use this skill to upgrade an Angular 5.x application to Angular 6.1.x in one bounded major hop.
This skill upgrades only from Angular 5 to Angular 6.1. It must not continue to Angular 7 or later. The next hop must be handled by a dedicated follow-up skill.
When to Use
Use this skill when:
- The project is currently on Angular 5.x.
- The target hop is Angular 6.1.x.
- The route planner selected
5 -> 6as the next step. - The repository has a buildable baseline and dependency files to inspect.
- The upgrade must remain controlled and reversible.
When Not to Use This Skill
Do not use this skill when:
- The project is AngularJS 1.x.
- The project is Angular 4.x or lower.
- The project is already Angular 6 or later.
- The requested change is Angular 6 to Angular 7.
- The project cannot produce a baseline build or install dependencies.
- The task is only RxJS modernization without Angular upgrade.
- The task is only
HttpClientmigration without Angular version upgrade.
For AngularJS, route to:
skills/angular/migration/angularjs-to-angular-modernization-orchestrator/SKILL.md
For the next hop, route to:
skills/angular/upgrades/hops/angular-6-to-7/SKILL.md
Inputs Expected
package.json- lock file:
package-lock.json,yarn.lock, orpnpm-lock.yaml - Angular package versions
- Angular CLI version
- TypeScript version
- RxJS version
- Zone.js version
- Node.js version
- use of
.angular-cli.json - use of
angular.json - use of
@angular/upgrade - use of Angular Material
- use of Angular animations
- use of
HttpModule - use of
Http - use of
HttpClientModule - use of
HttpClient - use of
DOCUMENT - use of
ReflectiveInjector - use of
Renderer - use of
preserveQueryParams - use of
ngOutletContext - use of
CollectionChangeRecord - use of custom RxJS operators
- current build/test/lint/e2e scripts
Compatibility by Version
| Area | Recommended strategy | Observations |
|---|---|---|
| Angular 5.x source | Upgrade to Angular 6.1.x only | Do not jump to a later major in this skill. |
| Angular CLI | Migrate to CLI 6 and angular.json if applicable |
Keep workspace conversion bounded. |
| TypeScript | Align to the repo-compatible Angular 6 range | Verify against project evidence before changing. |
| RxJS | Move toward RxJS 6, optionally bridging with rxjs-compat |
Do not treat rxjs-compat as final state. |
| Http | Migrate to HttpClient where feasible |
Preserve behavior around headers, params, and non-JSON responses. |
If a version cannot be confirmed from the project files, mark it as verify in project.
Procedure
- Inspect dependency versions and lockfile evidence.
- Detect Node.js and CLI workspace constraints.
- Scan the codebase for Angular 5-era deprecated or risky APIs.
- Classify each occurrence by impact and required change.
- Apply the bounded dependency upgrade to Angular 6.1.
- Convert only the code required by the hop.
- Run validation commands that exist in the repository.
- Stop after Angular 6.1. Do not begin the next hop.
Do
- Keep the hop bounded to Angular 5 -> Angular 6.1.
- Check CLI workspace migration, RxJS compatibility,
HttpModule/HttptoHttpClient,DOCUMENT,ReflectiveInjector,Renderer,preserveQueryParams,ngOutletContext, andCollectionChangeRecord. - Migrate
@angular/upgradeimports to@angular/upgrade/staticwhere applicable. - Keep
@angular/httponly if the repo still depends on it and a dedicated HTTP migration is not in scope. - Use
rxjs-compatonly as a temporary bridge when the repo is too large for a full manual RxJS migration. - Stop after validation and report the next hop.
Recommended Patterns
Upgrade Angular packages to Angular 6.1-compatible versions using the project-supported package manager and CLI workflow.
Migrate Angular CLI workspace config from .angular-cli.json to angular.json if the CLI update requires it.
Migrate HTTP access to HttpClient where feasible:
import { HttpClient } from '@angular/common/http';
constructor(private http: HttpClient) {}
Use rxjs-compat only as a temporary bridge when needed:
npm install rxjs-compat@^6.0.0
Preserve hybrid runtime if AngularJS is still part of the app.
Anti-Patterns
- Jumping from Angular 5 directly to Angular 21.
- Starting Angular 7 migration in the same change.
- Treating
rxjs-compatas permanent. - Migrating the entire application architecture in this hop.
- Removing AngularJS from hybrid apps during this hop.
- Rewriting all HTTP services without tests.
- Rewriting all RxJS streams manually in a massive diff.
- Introducing standalone components or signals.
- Replacing Angular Material blindly.
- Mixing upgrade work with visual redesign.
- Claiming success without validation.
Do Not
- Do not continue to Angular 7 or later.
- Do not change unrelated application architecture.
- Do not force later Angular patterns into this hop.
- Do not run commands that do not exist in
package.json. - Do not claim completion without validation evidence.
Review Checklist
- Angular 5.x source version was confirmed.
- Angular packages were aligned to Angular 6.1.x.
- CLI workspace migration was reviewed.
- TypeScript compatibility was checked.
- RxJS compatibility was checked.
- HTTP migration impact was checked.
- Deprecated APIs were classified and handled.
- Hybrid imports were updated where applicable.
- Validation commands were run or explicitly unavailable.
- The next hop was not started automatically.
Validation Minimum
Read package.json first. Only run scripts that exist.
Preferred order when available:
- build
- test
- lint
- e2e
For Angular CLI projects, use direct CLI commands only if they exist in the project.
If validation fails, report:
- command
- error summary
- likely cause
- safe next action
Risks
- CLI workspace migration can fail if the repo has custom workspace assumptions.
- RxJS 6 migration can introduce import and operator mismatches.
HttpClientmigration can alter response handling if done carelessly.- Hybrid apps can break if
@angular/upgrade/staticis not handled consistently.
Expected Output
When this skill is used, return:
- Source Angular version.
- Target Angular version.
- Angular CLI version and workspace config status.
- Applied dependency and code changes.
- Validation commands and results.
- Remaining risks.
- Next hop skill.
Exit Criteria
This skill is complete only when:
- Angular packages are aligned to Angular 6.1.x.
- The required compatibility code changes were applied.
- Validation ran or blockers were reported.
- The next hop remains unexecuted.