Skip to content

Commit

Permalink
Add section to migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyomair committed Feb 3, 2025
1 parent adc565f commit 06f2162
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions docs/docs/7-migration-guide/migration-from-v7-to-v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,58 @@ It is recommended to use the `AutocompleteField` or the `SelectField` components
+ <AutocompleteField name="color" label="Color" options={options} fullWidth />;
```

### Remove `@comet/blocks-admin`

The `@comet/blocks-admin` package has been merged into the `@comet/cms-admin` package.
To upgrade, perform the following steps:

1. Remove the package:

```diff title="admin/package.json"
- "@comet/blocks-admin": "^7.x.x",
```

:::note Codemod available

```sh
npx @comet/upgrade v8/remove-blocks-packages.ts
```

:::

2. Update all your imports from `@comet/blocks-admin` to `@comet/cms-admin`

:::note Codemod available

```sh
npx @comet/upgrade v8/merge-blocks-admin-into-cms-admin.ts
```

:::

3. Update imports that have been renamed

- `createCompositeSetting` -> `createCompositeBlockField`
- `createCompositeSettings` -> `createCompositeBlockFields`
- `IPreviewContext` -> `BlockPreviewContext`
- `PreviewStateInterface` -> `BlockPreviewStateInterface`

:::note Codemod available

```sh
npx @comet/upgrade v8/merge-blocks-admin-into-cms-admin.ts
```

:::

4. Remove usages of removed exports `CannotPasteBlockDialog`, `ClipboardContent`, `useBlockClipboard`, `Collapsible`, `CollapsibleSwitchButtonHeader`, `usePromise`, `DispatchSetStateAction`, `SetStateAction`, and `SetStateFn`

:::tip

Use `Dispatch<SetStateAction<T>>` from `react` instead of `DispatchSetStateAction`.

:::

## ESLint

### ESLint upgrade from v8 to v9 with ESM
Expand Down

0 comments on commit 06f2162

Please sign in to comment.