From f6a6c4f06647b69ddf9de9d9e30b0059d65d7f38 Mon Sep 17 00:00:00 2001 From: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com> Date: Tue, 21 Nov 2023 16:14:05 +0100 Subject: [PATCH] Improve migration guide (#1419) - Add section about new Admin dashboard components - Add section to add `DependenciesModule` --- .../docs/migration/migration-from-v4-to-v5.md | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/docs/docs/migration/migration-from-v4-to-v5.md b/docs/docs/migration/migration-from-v4-to-v5.md index c54f64e4b3..7de7de9d80 100644 --- a/docs/docs/migration/migration-from-v4-to-v5.md +++ b/docs/docs/migration/migration-from-v4-to-v5.md @@ -7,6 +7,34 @@ sidebar_position: 1 ## API +### DependenciesModule + +Add the `DependenciesModule` to `AppModule`: + +```diff +import { + ... ++ DependenciesModule, +} from "@comet/cms-api"; + +... + +@Module({}) +export class AppModule { + static forRoot(config: Config): DynamicModule { + return { + module: AppModule, + imports: [ + ConfigModule.forRoot(config), + DbModule, + ... ++ DependenciesModule, + ], + }; + } +} +``` + ### blocks-meta.json The key (type) of OneOfBlocks is now included in the `blocks-meta.json`. @@ -56,8 +84,8 @@ indexData(): BlockIndexData { ### FilesService.upload() -The method signature changed. -The second argument is now an options object. +The method signature changed. +The second argument is now an options object. You may have to adjust this in your fixtures. ```diff @@ -145,6 +173,11 @@ replaceDependenciesInOutput: (output, replacements) => { }; ``` +### Dashboard + +New components `DashboardHeader`, `LatestBuildsDashboardWidget`, and `LatestContentUpdatesDashboardWidget` have been added to replace existing components defined in application code. +See [this PR](https://github.com/vivid-planet/comet-starter/pull/40) for an example on how to migrate. + ### BlockPreview The `BlockPreview` component was removed. Instead, use `BlockPreviewContent`: