From 455bcdc0f2a045ee3c342a5c77eddfebaeb51bfd Mon Sep 17 00:00:00 2001 From: Daniel Lautzenheiser Date: Wed, 19 Apr 2023 16:35:12 -0400 Subject: [PATCH] chore: clean up events --- packages/core/src/backend.ts | 11 ----------- packages/core/src/lib/registry.ts | 2 +- packages/docs/content/docs/beta-features.mdx | 4 ++-- packages/docs/content/docs/migration-guide-v2.mdx | 1 + 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/packages/core/src/backend.ts b/packages/core/src/backend.ts index 2259b2f9..72a0abec 100644 --- a/packages/core/src/backend.ts +++ b/packages/core/src/backend.ts @@ -895,8 +895,6 @@ export class Backend { diff --git a/packages/docs/content/docs/beta-features.mdx b/packages/docs/content/docs/beta-features.mdx index da7e5d77..8ac198e0 100644 --- a/packages/docs/content/docs/beta-features.mdx +++ b/packages/docs/content/docs/beta-features.mdx @@ -87,12 +87,12 @@ Example usage: ```javascript CMS.registerEventListener({ - name: 'prePublish', + name: 'postSave', handler: ({ author, entry }) => console.info(JSON.stringify({ author, data: entry.data })), }); ``` -Supported events are `prePublish`, `postPublish`, `preSave` and `postSave`. The `preSave` hook can be used to modify the entry data like so: +Supported events are `preSave` and `postSave`. The `preSave` hook can be used to modify the entry data like so: ```javascript CMS.registerEventListener({ diff --git a/packages/docs/content/docs/migration-guide-v2.mdx b/packages/docs/content/docs/migration-guide-v2.mdx index 5d382a66..adbe5319 100644 --- a/packages/docs/content/docs/migration-guide-v2.mdx +++ b/packages/docs/content/docs/migration-guide-v2.mdx @@ -270,6 +270,7 @@ Also the `clearMediaControl` and `removeMediaControl` widget control props have - `isHidden` renamed to `hidden` - `mediaPaths` is now object of id mapped to an object containing the `path` and optional `alt` - `useMediaInsert` hook now requires a collection to be passed in. Its callback function now receives an object containing the `path` and optional `alt` instead of a string. +- `prePublish` and `postPublish` events have been dropped. ## Other Changes