skills/websdk-1020-upgrade/SKILL.md
Step-by-step guide for migrating a Cumulocity Web SDK project from 1019 to 1020 (Angular 17). Covers @c8y dependency updates, zone.js import fix, angular.json buildTarget rename, Angular 17 ng update, ngx-bootstrap and CDK upgrades, loginOptions removal from main.ts, and adding the @c8y/options devDependency.
npx skillsauth add cumulocity-iot/cumulocity-skills websdk-1020-upgradeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Angular 17 support is introduced from Web SDK version 1020.0.0.
Use this skill when the project:
@c8y/*) at version 1019.x.@angular/cli (migrated from c8ycli in the 1019 step).@c8y DependenciesIn package.json, update every @c8y/* package to the target 1020.x.x release:
{
"@c8y/cli": "1020.0.0",
"@c8y/client": "1020.0.0",
"@c8y/ngx-components": "1020.0.0",
"@c8y/style": "1020.0.0",
"@c8y/websdk": "1020.0.0"
}
Replace 1020.0.0 with the exact patch version you are targeting.
zone.js Import in src/polyfills.tsThe zone.js/dist/zone sub-path entry was removed. Replace the old import:
Before:
import 'zone.js/dist/zone';
After:
import 'zone.js';
Find all occurrences across the project to be safe:
grep -rn "zone.js/dist/zone" src/
browserTarget with buildTarget in angular.jsonAngular 17 renamed the browserTarget option to buildTarget in builder configurations. Update every occurrence in angular.json:
# Preview matches
grep -n "browserTarget" angular.json
# Replace all occurrences (macOS sed)
sed -i '' 's/"browserTarget"/"buildTarget"/g' angular.json
Verify the file afterwards to confirm no stray browserTarget keys remain.
ng update for Angular 17Use the Angular update schematics to migrate Angular core, CLI, and related packages in one step:
ng update @angular/core@17 @angular/cli@17
This runs any automated migration schematics provided by the Angular team (e.g. control flow syntax opt-in, standalone API changes). Review the diff and commit it separately for a clean history.
Refer to the Angular 17 update guide for a full list of breaking changes.
ngx-bootstrapUpgrade ngx-bootstrap to the Angular 17-compatible version:
npm install [email protected]
# or with yarn
yarn add [email protected]
Check the ngx-bootstrap changelog for any breaking API changes between your current version and 12.0.0.
@angular/cdkUpdate the Angular CDK to match Angular 17:
npm install @angular/cdk@17
# or with yarn
yarn add @angular/cdk@17
If @angular/material is also used, update it to the same major version:
npm install @angular/material@17
loginOptions from src/main.tsThe loginOptions function is now called internally as part of loadOptions and no longer needs to be invoked manually in the application bootstrap.
Before:
import { loginOptions, loadOptions } from '@c8y/ngx-components';
loadOptions().then(() => {
loginOptions();
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
});
After:
import { loadOptions } from '@c8y/ngx-components';
loadOptions().then(() => {
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
});
Remove both the loginOptions import and any call to loginOptions().
@c8y/options as a devDependencynpm install --save-dev @c8y/[email protected]
# or with yarn
yarn add --dev @c8y/[email protected]
Confirm the entry appears under devDependencies in package.json:
{
"devDependencies": {
"@c8y/options": "1020.0.0"
}
}
Clean-install all dependencies and check for peer dependency issues:
rm -rf node_modules
npm install
npm ls --depth=0
Resolve any peer dependency warnings, particularly for third-party Angular libraries that may need a version bump to support Angular 17.
npm start
Fix any remaining compilation errors. Common issues after an Angular 17 upgrade:
@if, @for, @switch as the new built-in control flow. Existing *ngIf / *ngFor templates continue to work but can be migrated optionally via ng generate @angular/core:control-flow.ExperimentalDecorators: TypeScript 5.x may emit warnings about legacy decorators; ensure experimentalDecorators: true is set in tsconfig.json.| Concern | Before (1019) | After (1020) |
|---|---|---|
| Angular version | 16.x | 17.x |
| zone.js import | zone.js/dist/zone | zone.js |
| Builder option key | browserTarget | buildTarget |
| ngx-bootstrap | <12 | 12.0.0 |
| @angular/cdk | 16.x | 17.x |
| loginOptions in main.ts | Called manually | Removed — handled by loadOptions |
| @c8y/options | Not required | Add as devDependency |
tools
Scaffold a new Cumulocity application using the @c8y/websdk Angular schematic without human interaction. Covers Angular CLI installation, app generation, schematic setup, AI tools configuration, dev server, and build commands. Triggers: new app, scaffold, create application, ng add websdk, setup cumulocity app, new cumulocity project.
tools
Step-by-step guide to migrate a Cumulocity Web SDK application to a target version. Detects breaking changes with the ui-breaking-changes-cli, scaffolds a reference app at the target version with the new-app skill, compares key configuration files (app.ts, bootstrap.ts, angular.json, etc.), and finishes with a code-quality-analysis review. Triggers: migrate app, upgrade version, breaking changes, sdk upgrade, migrate cumulocity, upgrade websdk.
development
Complete guide to internationalizing a Cumulocity Web SDK application. Covers all approaches to annotating and translating text (gettext, translate pipe, translate directive, TranslateService), extracting strings, creating and updating .po files, overriding existing translations, and adding brand-new languages. Triggers: i18n, internationalization, add language, translate, translation, localization, l10n, new language, po file, gettext, TranslateService, language switcher.
development
Analyze Angular / Cumulocity Web SDK code for anti-patterns, bugs, and quality issues. Use when reviewing components, services, or modules for code quality, maintainability, performance, and correctness. Covers TypeScript best practices, Angular idioms, C8Y SDK usage patterns, and project-specific conventions. Triggers: code review, anti-pattern, quality check, refactor suggestion, style guide, bug analysis.