github payloadcms/payload v3.0.0-beta.54

latest releases: v3.0.0-beta.56, v2.23.1, payload/2.23.1...
pre-release3 days ago

v3.0.0-beta.54 (2024-06-25)

Features

  • replace bloated deep-equal dependency and minimize usage of qs (#6912) (2920a5d)
  • various type improvements (#6385) (ccbaee4)
  • richtext-lexical: properly define client-only and server-only exports (#6890) (8f977b9)
  • richtext-lexical: simplify creation of features (#6885) (d66b348)

Bug Fixes

  • ui: standardizes named field exports (#6907) (776e3f7)
  • payload, ui: sends cropped image pixel values to server instead of percent values (#6903) (e782d99)
  • prevent dependency version checker finding node_modules outside the project (#6892) (7333706)
  • update select options when the options prop changes (#6878) (8773e3a)
  • adjusts json field defaultValue joi validation (#6873) (6ba619f)
  • allow req mutation inside upload handlers (#6855) (62b1332)

BREAKING CHANGES

  • various type improvements (#6385) (ccbaee4)

    • Type narrowing for relationTo props on filterOptions, relationship
      fields and upload fields
    • Type narrowing for arguments of lexical relationship, link and upload
      features
  • ui: standardizes named field exports (#6907) (776e3f7)

Standardizes all named field exports. This improves semantics when using these components by appending Field onto the end of their names. Some components were already doing this, i.e. ArrayField and BlocksField. Now, all field components share this same convention. And since bundled components were already aliasing most exports in this way, this change will largely go unnoticed because most apps were already importing the correctly named components. What is ultimately means is that there was a mismatch between the unbundled vs bundled exports. This PR resolves that conflict. But this also introduces a potentially breaking change for your app. If your app is using components that import from the unbundled @payloadcms/ui package, those import paths likely changed:

Old:

import { Text } from '@payloadcms/ui/fields/Text'

New:

import { TextField } from '@payloadcms/ui/fields/Text'

If you were importing direcetly from the bundled version, you're
imports likely have not changed. For example:

This still works (the import path is top-level, pointing to the
bundled code):

import { TextField } from '@payloadcms/ui'
  • richtext-lexical: properly define client-only and server-only exports (#6890) (8f977b9)

A bunch of exports have been moved around. There are now two of them: @payloadcms/richtext-lexical and @payloadcms/richtext-lexical/client. The root export is server-only. If any imports don't resolve anymore after this version, simply change the import to one of those, depending on if you are on the server or the client

  • richtext-lexical: simplify creation of features (#6885) (d66b348)

    • ServerFeature: ClientComponent has been renamed to ClientFeature
    • ServerFeature: The nested serverFeatureProps has been renamed to
      sanitizedServerFeatureProps
    • ServerFeature: The FeatureProviderProviderServer type now expects 3
      generics instead of 2. We have split the props generic into sanitized &
      unsanitized props
    • ClientFeature: The FeatureProviderProviderClient type now expects 2
      generics instead of 1. We have split the props generic into sanitized &
      unsanitized props
    • ClientFeature: The nested clientFeatureProps has been renamed to
      sanitizedClientFeatureProps

Contributors

Don't miss a new payload release

NewReleases is sending notifications on new releases.