skills/websdk-1021-upgrade/SKILL.md
Step-by-step guide for migrating a Cumulocity Web SDK project from 1020 to 1021 (Angular 18). Covers @c8y dependency updates, Angular 18 ng update, ngx-bootstrap and CDK upgrades, and the removal of brandingEntry in favour of angular.json styles arrays.
npx skillsauth add cumulocity-iot/cumulocity-skills websdk-1021-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 18 support is introduced from Web SDK version 1021.0.0.
Use this skill when the project:
@c8y/*) at version 1020.x.@angular/cli (ng).@c8y DependenciesIn package.json, update every @c8y/* package to the target 1021.x.x release:
{
"@c8y/cli": "1021.0.0",
"@c8y/client": "1021.0.0",
"@c8y/ngx-components": "1021.0.0",
"@c8y/options": "1021.0.0",
"@c8y/style": "1021.0.0",
"@c8y/websdk": "1021.0.0"
}
Replace 1021.0.0 with the exact patch version you are targeting.
ng update for Angular 18Use the Angular update schematics to migrate Angular core and CLI in one step:
ng update @angular/core@18 @angular/cli@18
This applies any automated migration schematics provided by the Angular team. Review the diff and commit it as a dedicated step for a clean history.
Refer to the Angular 18 update guide for the full list of breaking changes.
Angular 18 has specific version requirements. Verify compatibility against the Angular actively supported versions table and update accordingly. Key ranges for Angular 18:
| Dependency | Supported range |
|---|---|
| Node.js | ^18.13.0 \|\| ^20.9.0 |
| TypeScript | >=5.0.0 <5.5.0 |
| RxJS | ^6.5.3 \|\| ^7.4.0 |
Update package.json and your .nvmrc / .node-version file as needed.
ngx-bootstrapUpgrade ngx-bootstrap to the Angular 18-compatible version:
npm install [email protected]
# or with yarn
yarn add [email protected]
Review the ngx-bootstrap changelog for any breaking API changes.
@angular/cdk (and Material)npm install @angular/cdk@18
# or with yarn
yarn add @angular/cdk@18
If @angular/material is also used, update it to the same major version:
npm install @angular/material@18
brandingEntry from cumulocity.config.tsbrandingEntry is no longer supported as a way to inject global styles. Global styles must now be declared in the styles array of angular.json, following the Angular workspace styles configuration.
brandingEntryAdd the default @c8y/style stylesheet to the styles array in angular.json:
{
"projects": {
"<your-app-name>": {
"architect": {
"build": {
"options": {
"styles": [
"node_modules/@c8y/style/main.less"
]
}
}
}
}
}
}
brandingEntry in cumulocity.config.tsReplace brandingEntry with a direct reference to the same file in angular.json's styles array:
cumulocity.config.ts — before:
export const runTime: ApplicationOptions = {
name: 'My App',
brandingEntry: 'src/branding/index-my-brand.less',
// ...
};
cumulocity.config.ts — after (remove brandingEntry):
export const runTime: ApplicationOptions = {
name: 'My App',
// brandingEntry removed
// ...
};
angular.json — add the branding file to styles:
{
"options": {
"styles": [
"src/branding/index-my-brand.less"
]
}
}
If multiple build configurations (e.g.
production,development) override thestylesarray, add the entry to each relevant configuration.
brandingEntry occurrencesgrep -rn "brandingEntry" .
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 before proceeding.
npm start
Fix any remaining compilation errors. Common issues after an Angular 18 upgrade:
inject() in constructors: Angular 18 further promotes the inject() function API over constructor injection in some contexts. Existing constructor injection continues to work.@defer): Now stable in Angular 18. Existing *ngIf-based lazy patterns continue to work.| Concern | Before (1020) | After (1021) |
|---|---|---|
| Angular version | 17.x | 18.x |
| Node.js | ^16.13 | ^18.10 | ^18.13 | ^20.9 |
| TypeScript | ~5.0 | >=5.0 <5.5 |
| ngx-bootstrap | 12.0.0 | 18.0.0 |
| @angular/cdk | 17.x | 18.x |
| Global styles config | brandingEntry in cumulocity.config.ts | styles array in angular.json |
| brandingEntry | Supported | Removed — must be deleted |
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.