Skip to content

Commit

Permalink
Improve migration guide (#1419)
Browse files Browse the repository at this point in the history
- Add section about new Admin dashboard components
- Add section to add `DependenciesModule`
  • Loading branch information
johnnyomair authored Nov 21, 2023
1 parent 2e3eb5c commit f6a6c4f
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions docs/docs/migration/migration-from-v4-to-v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`:
Expand Down

0 comments on commit f6a6c4f

Please sign in to comment.