v3.0.0-beta.96

Version v3.0.0-beta.96Major ReleasePre-release
Released:

August 29, 2024

Type:

Contains breaking changes

GitHub:View Release

Release Notes

v3.0.0-beta.96 (2024-08-29)

šŸš€ Features

  • auto-removes localized property from localized fields within other localized fields (#7933) (538b7ee)
  • significantly reduce payload install size by removing unnecessary monaco-editor dependency (#7939) (e375f6e)
  • reduce package size and amount of dependencies by upgrading json-schema-to-typescript (#7938) (dc12047)

šŸ› Bug Fixes

āš ļø BREAKING CHANGES

  • auto-removes localized property from localized fields within other localized fields (#7933) (538b7ee) Payload localization works on a field-by-field basis. As you can nest fields within other fields, you could potentially nest a localized field within a localized field—but this would be redundant and unnecessary. There would be no reason to define a localized field within a localized parent field, given that the entire data structure from the parent field onward would be localized. Up until this point, Payload would allow you to nest a localized field within another localized field, and this might have worked in MongoDB but it will throw errors in Postgres. Now, Payload will automatically remove the localized: true property from sub-fields within sanitizeFields if a parent field is localized. This could potentially be a breaking change if you have a configuration with MongoDB that nests localized fields within localized fields. #### Migrating You probably only need to migrate if you are using MongoDB, as there, you may not have noticed any problems. But in Postgres or SQLite, this would have caused issues so it's unlikely that you've made it too far without experiencing issues due to a nested localized fields config. In the event you would like to keep existing data in this fashion, we have added a compatibility.allowLocalizedWithinLocalized flag to the Payload config, which you can set to true, and Payload will then disable this new sanitization step. Set this compatibility flag to true only if you have an existing Payload MongoDB database from pre-3.0, and you have nested localized fields that you would like to maintain without migrating.

Contributors

  • James Mikrut (@jmikrut)
  • Elliot DeNolf (@denolfe)
  • Jarrod Flesch (@JarrodMFlesch)
  • Alessio Gravili (@AlessioGr)
  • Paul (@paulpopus)