v3.0.0-beta.131 (2024-11-15)
🚀 Features
- sanitise access endpoint (#7335) (26ffbca)
- bumps
date-fns
to4.1.0
(#9221) (6845878) - re-order DefaultCellComponentProps generics (#9207) (77c99c2)
- db-mongodb: update mongoose to 8.8.1 (#9115) (7c6f419)
- db-mongodb: support query options in db update operations (#9191) (2d2d020)
- richtext-lexical: add tooltips to toolbar dropdown items (#9218) (7294880)
- richtext-lexical, ui: add icon if link opens in new tab (#9211) (82e72fa)
- storage-uploadthing: upgrade to v7 (#8346) (4690cd8)
⚡ Performance
- removes undefined props from rsc requests (#9195) (2d7626c)
- removes i18n.supportedLanguages from client config (#9209) (5482e7e)
🐛 Bug Fixes
- improve collection / global slugs type-safety in various places (#8311) (810c29b)
- duplicate list preferences stored (#9185) (a5cae07)
- wires up abort controller logic for list columns (#9180) (129fadf)
- ui: jumping hasmany uploads when form is submitting or in readonly mode (#9198) (315b4e5)
- ui: fixes layout shift when form is submitted (#9184) (e6d0443)
⚠️ BREAKING CHANGES
-
improve collection / global slugs type-safety in various places (#8311) (810c29b)
Improves type-safety of collection / global slugs by using
CollectionSlug
/UploadCollectionSlug
andGlobalSlug
types instead ofstring
in these places:
AddsUploadCollectionSlug
andTypedUploadCollection
utility typesThis also changes how we suggest to add an upload collection to a cloud-storage adapter:
Before:azureStorage({ collections: { [Media.slug]: true, }, })
After:
azureStorage({ collections: { media: true, }, })
-
re-order DefaultCellComponentProps generics (#9207) (77c99c2)
Changes the order of the
DefaultCellComponentProps
generic type,
allowing us to infer the type of cellData when a ClientField type is
passed as the first generic argument. You can override the cellData type
by passing the second generic.Previously:
type DefaultCellComponentProps<TCellData = any, TField extends ClientField = ClientField>
New:
type DefaultCellComponentProps<TField extends ClientField = ClientField, TCellData = undefined>
You can override the cellData type by passing in the second argument
to the generic. ie if you know the shape of your data differs than the
inferred type then you can do something like:DefaultCellComponentProps<RelationshipFieldClient, { myShape: string, here: string }>
-
db-mongodb: update mongoose to 8.8.1 (#9115) (7c6f419)
All projects with existing data having versions enabled, or relationship or upload fields will want to create the predefined migration that converts all strings to ObjectIDs where needed. This can be created using
payload migrate:create --file @payloadcms/mongodb/relationships-v2-v3
.
For projects making use of the exposed Models from mongoose, review the
upgrade guides from v6 to
v7 and v7 to
v8 and make
adjustments as needed. -
storage-uploadthing: upgrade to v7 (#8346) (4690cd8)
Upgrade uploadthing to v7
The
options
that can be passed to the plugin now mirror the
UTApiOptions
of v7.The most notable change is to pass
token
with
process.env.UPLOADTHING_TOKEN
instead ofapiKey
with
process.env.UPLOADTHING_SECRET
.options: { - apiKey: process.env.UPLOADTHING_SECRET, + token: process.env.UPLOADTHING_TOKEN, acl: 'public-read', },