feat(plugin-seo)!: remove support for payload <2.7.0 (#4765)

This commit is contained in:
Alessio Gravili
2024-01-10 17:29:29 +01:00
committed by Alessio Gravili
parent 640ff152cc
commit 06c8f5de32
5 changed files with 12 additions and 14 deletions

View File

@@ -2,6 +2,10 @@
A plugin for [Payload](https://github.com/payloadcms/payload) to manage SEO metadata from within your admin panel.
If you're using version 2.0.0 or higher of this plugin, you'll need to be using version 2.7.0 or higher of Payload.
If you're still on an older payload version, please use version 1.0.15.
- [Source code](https://github.com/payloadcms/payload/tree/main/packages/plugin-seo)
- [Documentation](https://payloadcms.com/docs/plugins/seo)
- [Documentation source](https://github.com/payloadcms/payload/tree/main/docs/plugins/seo.mdx)

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/plugin-seo",
"version": "1.0.15",
"version": "2.0.0",
"homepage:": "https://payloadcms.com",
"repository": "git@github.com:payloadcms/plugin-seo.git",
"description": "SEO plugin for Payload",
@@ -26,13 +26,13 @@
"author": "dev@payloadcms.com",
"license": "MIT",
"peerDependencies": {
"payload": "^0.18.5 || ^1.0.0 || ^2.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
"payload": "^2.7.0",
"react": "^18.0.0"
},
"devDependencies": {
"@payloadcms/eslint-config": "workspace:*",
"@types/express": "^4.17.9",
"@types/react": "18.0.21",
"@types/express": "4.17.17",
"@types/react": "18.2.15",
"payload": "workspace:*",
"react": "^18.0.0"
},

View File

@@ -1,7 +1,5 @@
'use client'
// TODO: fix this import to work in dev mode within the monorepo in a way that is backwards compatible with 1.x
// import Textarea from 'payload/dist/admin/components/forms/field-types/Textarea/Input'
import type { FieldType, Options } from '@payloadcms/ui'
import type { TextareaField } from 'payload/types'
@@ -125,7 +123,7 @@ export const MetaDescription: React.FC<MetaDescriptionProps> = (props) => {
width: '100%',
}}
>
<LengthIndicator maxLength={maxLength} minLength={minLength} text={value as string} />
<LengthIndicator maxLength={maxLength} minLength={minLength} text={value} />
</div>
</div>
)

View File

@@ -1,9 +1,7 @@
'use client'
import type { FieldType, Options } from 'payload/dist/admin/components/forms/useField/types'
// TODO: fix this import to work in dev mode within the monorepo in a way that is backwards compatible with 1.x
// import UploadInput from 'payload/dist/admin/components/forms/field-types/Upload/Input'
import type { Props as UploadInputProps } from 'payload/components/fields/Upload'
import type { FieldType, Options } from 'payload/dist/admin/components/forms/useField/types'
import { UploadInput, useAllFormFields, useField } from 'payload/components/forms'
import { useConfig, useDocumentInfo, useLocale } from 'payload/components/utilities'

View File

@@ -1,7 +1,5 @@
'use client'
// TODO: fix this import to work in dev mode within the monorepo in a way that is backwards compatible with 1.x
// import TextInput from 'payload/dist/admin/components/forms/field-types/Text/Input'
import type {
FieldType as FieldType,
Options,
@@ -130,7 +128,7 @@ export const MetaTitle: React.FC<MetaTitleProps> = (props) => {
width: '100%',
}}
>
<LengthIndicator maxLength={maxLength} minLength={minLength} text={value as string} />
<LengthIndicator maxLength={maxLength} minLength={minLength} text={value} />
</div>
</div>
)