Skip to content

v3.0.0-beta.131

Pre-release
Pre-release
Compare
Choose a tag to compare
@denolfe denolfe released this 15 Nov 20:45
90686fa

v3.0.0-beta.131 (2024-11-15)

🚀 Features

  • sanitise access endpoint (#7335) (26ffbca)
  • bumps date-fns to 4.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

  • db-mongodb: update mongoose to 8.8.1 (#9115) (7c6f419)

    MongoDB projects need to run a migration after updating to this beta version, because all relationship IDs are now stored as ObjectID (as they should have always been saved) and we need to migrate your existing relationship data from string-based IDs to ObjectIDs.

    To create this migration, run:

    pnpm payload migrate:create --file @payloadcms/mongodb/relationships-v2-v3
    

    And then run your migrations using:

    pnpm payload migrate
    

    In addition, if your project is heavily relying on using the Mongoose models directly, you may want to review the upgrade guides from v6 to v7 and v7 to v8, making
    adjustments as needed.

  • bumps date-fns to 4.1.0 (#9221) (6845878)

  • improve collection / global slugs type-safety in various places (#8311) (810c29b)

    Improves type-safety of collection / global slugs by using CollectionSlug / UploadCollectionSlug and GlobalSlug types instead of string in these places:
    Adds UploadCollectionSlug and TypedUploadCollection utility types

    This 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 }>
  • 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 of apiKey with
    process.env.UPLOADTHING_SECRET.

    options: {
    - apiKey: process.env.UPLOADTHING_SECRET,
    + token: process.env.UPLOADTHING_TOKEN,
      acl: 'public-read',
    },