skills/websdk-1019-upgrade/SKILL.md
Step-by-step guide for migrating a Cumulocity Web SDK project from 1018 to 1019 (Angular 16). Covers the mandatory switch from c8ycli to ng-cli, project scaffolding, source file migration, package.json alignment, cumulocity.config.ts setup, tsconfig review, and common pitfalls.
npx skillsauth add cumulocity-iot/cumulocity-skills websdk-1019-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 16 support is introduced from Web SDK version 1019.0.0.
Important: Version 1019.0.0 marks the end of active development for
c8ycli. The Web SDK now uses@angular/cli(ng-cli) as its build toolchain. Migration tong-cliis required.
Use this skill when the project:
c8ycli and @c8y/cli.1018.x.ng-cli.Install Angular CLI 16 globally and scaffold a new project using the same name as your existing application:
npm install -g @angular/cli@16
ng new <your-app-name>
Follow the prompts. Choose your preferred stylesheet format and routing options.
@c8y/websdkInside the newly scaffolded project, add the Cumulocity Web SDK integration:
ng add @c8y/websdk
When prompted, select the correct project type:
This command installs the required @c8y/* packages at 1019.x and generates a cumulocity.config.ts file.
Copy your existing source code into the new project:
src/modules/, src/plugins/, src/services/, etc.)*.spec.ts)Keep the new project's src/main.ts, src/index.html, and angular.json as generated — do not overwrite them with the old files.
package.jsonOpen both the old and new package.json files side by side and:
ng add @c8y/websdk.leaflet, lodash-es, jszip).description, version, author, etc.) from the old project, but exclude the "c8y" property block — that configuration moves to cumulocity.config.ts (see Step 5).c8ycli invocation with ng and rename "server" to "serve":{
"scripts": {
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint"
}
}
cumulocity.config.tsTransfer all properties from the old "c8y.application" block in package.json into the runTime object of the generated cumulocity.config.ts. Write it as JavaScript/TypeScript (not JSON):
import type { ApplicationOptions } from '@c8y/devkit/dist/options';
export const runTime: ApplicationOptions = {
name: 'My App',
contextPath: 'my-app',
key: 'my-app-key',
// ... other former package.json "c8y.application" fields
};
export const buildTime: ApplicationOptions = {
// build-only options (e.g. federation sharing config)
};
Important: Import
ApplicationOptionsusingimport typeto avoid pulling the entire@c8y/devkitpackage into your runtime bundle.
Check federation/module-federation sharing settings. If the defaults provided by ng add @c8y/websdk are insufficient, add or adjust entries in buildTime.
tsconfig FilesReview tsconfig.json and tsconfig.app.json (and tsconfig.spec.json for tests). Angular 16's defaults enable stricter options that may cause compilation errors in existing code. Disable the ones that don't apply to your project:
{
"compilerOptions": {
"noPropertyAccessFromIndexSignature": false,
"noImplicitReturns": false
}
}
Adjust rather than blanket-disabling — only turn off rules that the existing codebase legitimately cannot satisfy.
npm install
Check for peer dependency warnings and resolve them:
npm ls --depth=0
Update any third-party libraries (e.g. ngx-bootstrap, @angular/material, @ngrx/*) to versions that declare Angular 16 as a peer dependency.
Because this migration spans Angular 14 → 15 → 16, review the full Angular update guide for any additional breaking changes:
https://update.angular.io/?v=15.0-16.0
Key Angular 16 changes to be aware of:
entryComponents arrays are removed (they were deprecated in Angular 15). Delete every entryComponents: [...] entry from all @NgModule decorators.@angular/router now exports RouterLink as a standalone directive.Run the application and fix compilation errors iteratively:
npm start
# or
npx ng serve <your-app-name>
| Pitfall | Fix |
|---|---|
| Subject type errors | Type subjects that emit no value as Subject<void>, e.g. new Subject<void>(). |
| entryComponents not removed | Delete all entryComponents: [...] arrays from every @NgModule. They are unsupported in Angular 16. |
| ApplicationOptions import causes bundle bloat | Use import type { ApplicationOptions } from '@c8y/devkit/dist/options' (type-only import). |
| c8ycli commands not found | Replace all c8ycli usages in scripts and CI pipelines with ng. Rename "server" script to "serve". |
| Old "c8y" block still in package.json | Move all those properties to cumulocity.config.ts runTime/buildTime and remove the "c8y" block entirely. |
| Peer dependency mismatches | Upgrade third-party Angular libraries (e.g. ngx-bootstrap, Material) to Angular 16-compatible versions. |
| Concern | Before (1018) | After (1019) |
|---|---|---|
| Build tool | c8ycli | @angular/cli (ng) |
| Angular version | 15.2.7 | 16.x |
| TypeScript | 4.9.5 | 5.0.x (Angular 16 default) |
| App config | package.json "c8y" block | cumulocity.config.ts |
| entryComponents | Allowed (deprecated) | Removed — must be deleted |
| Start command | c8ycli server | ng serve |
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.