skills/websdk-1022-upgrade/SKILL.md
Step-by-step guide for migrating a Cumulocity Web SDK project from 1021 to 1022 (Angular 19). Covers Angular 19 ng update, standalone-by-default breaking change, @c8y dependency updates, ngx-bootstrap and CDK upgrades, main.ts/bootstrap.ts adjustments, dashboard route rootContext requirement, login app separation, and removed deprecated Angular widget modules.
npx skillsauth add cumulocity-iot/cumulocity-skills websdk-1022-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 19 support is introduced from Web SDK version 1022.0.0.
Use this skill when the project:
@c8y/*) at version 1021.x.@angular/cli (ng).ng update for Angular 19ng update @angular/core@19 @angular/cli@19
This applies automated migration schematics from the Angular team. Review and commit the diff separately.
Critical breaking change — standalone by default: Starting with Angular 19, all directives, components, and pipes are standalone by default (
standalone: trueis implied). Any declaration that is currently declared inside anNgModulemust explicitly opt out by settingstandalone: false.This applies to every
@Component,@Directive, and@Pipedeclared in anNgModule, including module federation plugins that use earlier versions of Angular but are loaded inside an application migrated to Angular 19.
standalone: false to all NgModule-declared declarations// Before
@Component({
selector: 'app-my-widget',
templateUrl: './my-widget.component.html',
})
export class MyWidgetComponent {}
// After
@Component({
selector: 'app-my-widget',
templateUrl: './my-widget.component.html',
standalone: false,
})
export class MyWidgetComponent {}
Apply the same change to every @Directive and @Pipe that is listed in an NgModule's declarations array.
The ng update schematics may handle some of these automatically. Always verify the output and run a type check afterwards:
# Find declarations that may still be missing standalone: false
grep -rn "@Component\|@Directive\|@Pipe" src/ --include="*.ts" | grep -v "standalone"
Refer to the Angular 19 update guide for the full list of breaking changes.
@c8y DependenciesIn package.json, update every @c8y/* package to the target 1022.x.x release:
{
"@c8y/cli": "1022.0.0",
"@c8y/client": "1022.0.0",
"@c8y/ngx-components": "1022.0.0",
"@c8y/options": "1022.0.0",
"@c8y/style": "1022.0.0",
"@c8y/websdk": "1022.0.0"
}
Replace 1022.0.0 with the exact patch version you are targeting.
ngx-bootstrapnpm install [email protected]
# or with yarn
yarn add [email protected]
@angular/cdk (and Material)npm install @angular/cdk@19
# or with yarn
yarn add @angular/cdk@19
If @angular/material is also used, update it to the same major version:
npm install @angular/material@19
Verify compatibility against the Angular actively supported versions table. Key ranges for Angular 19:
| Dependency | Supported range |
|---|---|
| Node.js | ^18.19.0 \|\| ^20.11.0 \|\| ^22.0.0 |
| TypeScript | >=5.5.0 <5.8.0 |
| RxJS | ^6.5.3 \|\| ^7.4.0 |
Update .nvmrc / .node-version and package.json accordingly.
main.ts and bootstrap.tsThe Web SDK 1022 introduces changes to how application bootstrapping works (driven by the login separation described in the breaking changes section). Align your src/main.ts and src/bootstrap.ts (if present) with the patterns provided in the latest Web SDK starter templates or your project's migration diff.
Key things to check:
loginOptions() calls that were not already removed in the 1020 migration.loadOptions() is still used as the outer wrapper before bootstrapModule() or bootstrapApplication().bootstrap.ts separate from main.ts, verify the import path and that it does not duplicate the options-loading logic.Covered in Step 1. Every @Component, @Directive, and @Pipe declared in an NgModule must have standalone: false added explicitly.
rootContext: ViewContext.Dashboard RequiredThe dashboard settings view has been refactored to use a secondary router outlet. As a result, every route that renders a context dashboard component must now include rootContext: ViewContext.Dashboard.
Before:
hookRoute({
path: 'home',
component: CockpitDashboardComponent,
});
After:
import { ViewContext } from '@c8y/ngx-components';
hookRoute({
path: 'home',
component: CockpitDashboardComponent,
rootContext: ViewContext.Dashboard,
});
Without this property, the dashboard settings panel (including the new Import/Export tab) will not be visible.
If you want to add custom tabs to the dashboard settings, use the new tabsOutlet pattern:
hookTab([
{
label: gettext('My Custom Tab'),
icon: 'settings',
priority: 5,
path: [{ outlets: { 'dashboard-details': 'my-tab' } }],
tabsOutlet: 'dashboardTabs',
},
]),
hookRoute([
{
path: 'my-tab',
loadComponent: () => import('./my-tab/my-tab.component').then(m => m.MyTabComponent),
outlet: 'dashboard-details',
context: ViewContext.Dashboard,
},
])
grep -rn "CockpitDashboardComponent\|ViewContext.Dashboard\|hookRoute" src/ --include="*.ts"
The Web SDK no longer ships built-in login functionality inside each application. A standalone login application now handles all authentication flows. Applications built on Web SDK 1022+ automatically redirect unauthenticated users to this login app.
Action required:
The following NgModule-based widget modules have been removed. They were previously deprecated when the underlying widgets were migrated to standalone components.
| Removed module | Replacement |
|---|---|
| CockpitLegacyWelcomeWidgetModule | Use the standalone component directly |
| CockpitWelcomeWidgetModule | Use the standalone component directly |
| DeviceControlMessageWidgetModule | Use the standalone component directly |
| HelpAndServiceModule | Use the standalone component directly |
| ImageWidgetModule | Use the standalone component directly |
| InfoGaugeWidgetModule | Use the standalone component directly |
| KpiWidgetModule | Use the standalone component directly |
| LinearGaugeModule | Use the standalone component directly |
| MarkdownWidgetModule | Use the standalone component directly |
| ThreeDRotationWidgetModule | Use the standalone component directly |
Action: Remove any imports of these modules from your NgModule imports arrays. Import the standalone component class directly where needed, or rely on the c8y plugin system to register them.
Find all usages to migrate:
grep -rn "CockpitLegacyWelcomeWidgetModule\|CockpitWelcomeWidgetModule\|DeviceControlMessageWidgetModule\|HelpAndServiceModule\|ImageWidgetModule\|InfoGaugeWidgetModule\|KpiWidgetModule\|LinearGaugeModule\|MarkdownWidgetModule\|ThreeDRotationWidgetModule" src/ --include="*.ts"
rm -rf node_modules
npm install
npm ls --depth=0
npm start
Fix any remaining compilation errors. After resolving the standalone: false additions, the most common remaining errors will be:
rootContext: ViewContext.Dashboard on dashboard routes.tsconfig.json strict settings.| Concern | Before (1021) | After (1022) |
|---|---|---|
| Angular version | 18.x | 19.x |
| Node.js | ^18.13 | ^20.9 | ^18.19 | ^20.11 | ^22.0 |
| TypeScript | >=5.0 <5.5 | >=5.5 <5.8 |
| ngx-bootstrap | 18.0.0 | 19.0.2 |
| @angular/cdk | 18.x | 19.x |
| Components in NgModule | standalone omitted = false | Must set standalone: false explicitly |
| Dashboard routes | No rootContext needed | rootContext: ViewContext.Dashboard required |
| Login | Built into each app | Separate login application (auto-redirect) |
| Deprecated widget modules | Still importable | Removed — delete from imports arrays |
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.