Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve migration guide #1419

Merged
merged 3 commits into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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