Front-end migration
Migrating your Valtimo front-end implementation can be done both through a script and manually. Find instructions for both scenario's below.
Migration script
Preparation
Before running the migration script, make sure your front-end implementation is running on the latest version of Valtimo 12. Check out to a clean Git branch specifically made for upgrading your implementation.
Next, determine whether you want to upgrade based on a version number, or based on a package URL. This will be your VALTIMO_VERSION environment url. Valid examples for both cases:
Version number:
VALTIMO_VERSION="13.0.0"Package URL:
VALTIMO_VERSION="https://valtimo-snapshots.s3.eu-central-1.amazonaws.com/npm/snapshots/13.0.0"
Running migration script
In the root directory of your front-end implementation, run the following command:
curl -L https://github.com/valtimo-platform/valtimo-frontend-libraries/archive/refs/tags/13.0.0.zip \
-o valtimo-migration.zip && \
unzip -q valtimo-migration.zip 'valtimo-frontend-libraries-13.0.0/migration/*' && \
mv valtimo-frontend-libraries-13.0.0/migration ./migration && \
rm -rf valtimo-frontend-libraries-13.0.0 valtimo-migration.zip && \
VALTIMO_DEPS_SOURCE="https://raw.githubusercontent.com/valtimo-platform/valtimo-frontend-libraries/refs/tags/13.0.0/package.json" \
VALTIMO_VERSION="13.0.0" \
node migration/12-13/migrate.cjsDo not forget to replace VALTIMO_VERSION="XXX" with the value you determined earlier.
Migration script prompt
When first running the migration script, you will be presented with a prompt. Please read this carefully and follow its instructions precisely. After typing `Y` to continue, the migration script should automatically run and complete.
Angular migrations will present you with a couple of options. By default, enable them by pressing the space bar, and then press enter to continue.
The following prompts should be disabled, by pressing the space bar:

The following prompt should be enabled, by pressing the space bar:

After running the migration script
After finishing the migration script, try to build or start your application. There's a chance that there will be issues. These issues can be easily fixed by manually going over angular.json and app.module.ts and resolving any formatting or structural issues.
Manual migration
Every front-end implementation is unique. If the aforementioned script wholly or partially fails, try migrating manually by following the steps below.
Angular 17 to 18
Run
npm installRun the Angular upgrade command
./node_modules/.bin/ng update @angular/core@18 @angular/cli@18 --forceCommit the Angular upgrade with
git add .git commit -m "Upgrade Angular from 17 to 18"
Angular 18 to 19
Run the Angular upgrade command
./node_modules/.bin/ng update @angular/core@19 @angular/cli@19 --forceCommit the Angular upgrade with
git add .git commit -m "Upgrade Angular from 18 to 19"
BPMN Dependency Migration
Update the following dependencies in
package.json(move them fromdevDependenciestodependenciesif necessary):
{
"@webcomponents/custom-elements": "1.6.0",
"core-js": "3.36.0",
"dmn-js": "12.3.0",
"dropzone": "6.0.0-beta.2",
"rxjs": "7.8.1",
"swagger-ui": "5.4.2",
"tslib": "2.6.2",
"zone.js": "0.14.4",
"@bpmn-io/dmn-migrate": "0.4.3",
"@bpmn-io/properties-panel": "3.25.0",
"bpmn-js": "18.0.0",
"bpmn-js-properties-panel": "5.26.0",
"camunda-bpmn-js-behaviors": "1.7.0",
"camunda-bpmn-moddle": "7.0.1",
"diagram-js": "15.2.1",
"@ngx-translate/core": "16.0.4",
"@ngx-translate/http-loader": "16.0.1"
}In angular.json, replace the old BPMN CSS path if present:
Replace
node_modules/bpmn-js-properties-panel/dist/assets/bpmn-js-properties-panel.csswithnode_modules/@bpmn-io/properties-panel/dist/assets/properties-panel.css
Commit the changes with
git add .git commit -m "Migrate BPMN dependencies"
SSE Module Migration
Add the
@valtimo/ssedependency topackage.json:Use the same version or URL pattern as
@valtimo/access-controlIf the
@valtimo/access-controlversion is a URL likehttps://host/path/valtimo-access-control-<version>.tgzthen use the corresponding SSE package:
https://host/path/valtimo-sse-<version>.tgz
Run
npm installto install the new dependency.Update
app.module.ts:Add the import:
import { SseModule } from '@valtimo/sse';Add
SseModuleto theimportsarray in the@NgModuledecorator.
In the
src/environmentsdirectory:Open each
.tsfile and remove any line containingenableTaskPanel: trueorenableTaskPanel: false
Commit the changes with
git add .git commit -m "Migrate to @valtimo/sse module"
Replace @valtimo/config with @valtimo/shared
@valtimo/config with @valtimo/sharedRecursively update all files in the project:
Replace all imports of
@valtimo/configwith@valtimo/sharedin files ending with.js,.ts,.htmlIn
package.json:For each of
dependencies,devDependencies,peerDependencies, andoptionalDependencies:If
@valtimo/configexists, move its version to@valtimo/sharedThen remove the
@valtimo/configentry
In
angular.json:Replace all occurrences of
@valtimo/configwith@valtimo/shared
Commit the changes with
git add .git commit -m "Replace @valtimo/config with @valtimo/shared"
Sync Valtimo Dependencies Manually (Based on Version 13)
Go to the following URL to access the
package.jsonused for version 13:https://github.com/valtimo-platform/valtimo-frontend-libraries/blob/next-major/package.json
Open your local
package.json.For each
dependencyanddevDependency:If the package name starts with
@valtimo/:If you are using a snapshot build:
Get the base URL from an existing snapshot dependency, such as
@valtimo/access-controlExample:
If
@valtimo/access-controluseshttps://host/path/valtimo-access-control-13.0.0-SNAPSHOT.tgz,
then for
@valtimo/shared, usehttps://host/path/valtimo-shared-13.0.0-SNAPSHOT.tgz
If you are using a fixed version, use that version number (e.g.,
13.0.0) for all@valtimo/*dependencies
For any non-
@valtimo/dependency that also exists in the major 13package.json:Copy the version from this
package.jsoninto your localpackage.json
Save the updated
package.json.Run
npm install.Commit the changes with:
git add .git commit -m "Sync Valtimo dependencies based on next-major branch"
Remove ngx-toastr CSS from angular.json
ngx-toastr CSS from angular.jsonOpen
angular.json.In each file, find and replace the following:
Replace
title: 'Dossiers'withtitle: 'Cases'Replace
link: ['/dossier-management']withlink: ['/case-management']
Save the updated files.
Commit the changes with
git add .git commit -m "Replace dossier menu routes in environment files"
Replace Dossier* Symbols and @valtimo/dossier* Imports
Dossier* Symbols and @valtimo/dossier* ImportsSearch all
.tsfiles under thesrc/directory.For every import from
@valtimo/*that includes a symbol starting withDossier:Replace each such symbol by renaming
Dossier*toCase*, (e.g.,DossierModule→CaseModule)
Update import paths:
Replace
from '@valtimo/dossier'withfrom '@valtimo/case'Replace
from '@valtimo/dossier-management'withfrom '@valtimo/case-management'
Update
package.json:In both
dependenciesanddevDependencies, replace:@valtimo/dossier→@valtimo/case@valtimo/dossier-management→@valtimo/case-management
If the version string is a URL (e.g., to a
.tgzfile), update the filename accordingly:valtimo-dossier-...tgz→valtimo-case-...tgzvaltimo-dossier-management-...tgz→valtimo-case-management-...tgz
Save all modified files.
Run
npm install.Commit the changes with
git add .git commit -m "Replace Dossier* symbols and @valtimo/dossier* imports"
Clean Up Deprecated Environment Properties and Routes
In each
.tsfile inside thesrc/environmentsdirectory:Remove the
customDefinitionTablesproperty.Example pattern to remove:
customDefinitionTables: { leningen: [ ... ] }Replace the following block:
definitions: { dossiers: [] }with
definitions: { cases: [] }From any route configuration arrays (usually under a
menuorroutesarray), remove route objects where the path is:'process-link''process-links''form-flow'
Ensure there are no trailing commas after removing any object from arrays or properties.
Run
npm install.Commit the changes with
git add .git commit -m "Remove deprecated env properties and routes"
Ensure skipLibCheck and moduleResolution in tsconfig.json
skipLibCheck and moduleResolution in tsconfig.jsonOpen the root
tsconfig.jsonfile.Under
compilerOptions, make sure the following options are set:"skipLibCheck": trueAdd this if it doesn't exist or is not set to
true.
"moduleResolution": "bundler"Set or replace this value to ensure it is
"bundler".
Save the file.
Make sure the updated section in
tsconfig.jsonlooks like this:{ "compilerOptions": { "skipLibCheck": true, "moduleResolution": "bundler" } }Commit the changes with
git add .git commit -m "Set skipLibCheck and moduleResolution in tsconfig.json"
Update Router errorHandler in AppRoutingModule
errorHandler in AppRoutingModuleOpen
src/app/app-routing.module.ts.If the file contains the legacy
this.router.errorHandler = () => { this.router.navigate(['']); };, remove that line.Remove the following if present:
The
Routerimport (i.e.,, Router)The
constructor(private router: Router) { ... }block, if it only sets theerrorHandler
Update the
RouterModule.forRoot(routes)call to use the newerrorHandleroption:From:
RouterModule.forRoot(routes)To:
RouterModule.forRoot(routes, { errorHandler: error => { window.location.href = '/'; } })
Save the file.
Commit the changes with
git add .git commit -m "Update router errorHandler to new format"
Clean Up AppModule Imports and Declarations
AppModule Imports and DeclarationsOpen
src/app/app.module.ts.Remove the import statement for the following modules from
@valtimo/componentsif present:CardModuleListModuleButtonModulePageModuleTitleModuleVCardModule
Remove all occurrences of these modules from arrays like
imports,declarations, etc.Remove any usage of
CaseDetailTabContactMomentsComponent:From arrays such as
declarations,entryComponents, etc.From object properties like:
contactmomenten: CaseDetailTabContactMomentsComponent
Remove the import and usage of
HttpClientModule:Delete its import statement
Remove it from
importsor other NgModule arrays
Save the file.
Commit the changes with
git add .git commit -m "Clean up AppModule: remove unused modules and component"
Migrate proxy.conf.json Files
proxy.conf.json FilesRecursively search for all
proxy.conf.jsonfiles in the project (excludingnode_modulesanddistfolders).In each
proxy.conf.jsonfile, apply the following changes:If a proxy path ends with
/*(e.g.,"/some/path/*"), change it to end with/**, unless it already ends with/**.Example:
Change
"/api/*"to"/api/**"For the path
"/api/*":Set
"changeOrigin": false
For the path
"/management/*":Change the path key to
"/api/management/**"
Save the modified
proxy.conf.jsonfiles.Commit the changes with
git add .git commit -m "Migrate proxy.conf.json to new path format and options"
Last updated