Skip to content

Releases: payloadcms/payload

v3.0.0-beta.12

23 Apr 15:29
Compare
Choose a tag to compare
v3.0.0-beta.12 Pre-release
Pre-release

v3.0.0-beta.12

Features

Fixes

  • fix(db-postgres): validateExistingBlockIsIdentical for localized fields with the same name by @r1tsuu in #5840
  • fix: ensure body limit is respected by @JarrodMFlesch in #5807
  • fix(next): adds client-side field validations to login and forgot-password views by @PatrikKozak in #5871
  • fix(next): issue with password and confirm password fields not being type of password by @paulpopus in #5870
  • fix(next): check for matching passwords when creating the first user by @paulpopus in #5869
  • fix: postgres query hasMany in by @DanRibbens in #5884
  • fix(create-payload-app): uses baseUrl for payload config path in tsconfig by @JessChowdhury in #5888
  • fix(next): admin access control by @jacobsfletch in #5887
  • fix: accepts empty cell data by @kendelljoseph in #5876
  • fix(next): pass a corrent content-type header in getFile route by @r1tsuu in #5799
  • fix(next): do not require handlers, attempt to read filesystem or throw by @JarrodMFlesch in #5896
  • fix: adds type error validations for email and password in login operation by @PatrikKozak in #5899
  • fix(db-mongodb): ignore end session errors by @DanRibbens in #5905
  • fix(payload): Passes correct path to import modules on Windows started with file:// by @r1tsuu in #5919
  • fix: v3 update many with drafts by @DanRibbens in #5900
  • fix(db-postgres): v3 #5938 extra version suffix table names by @DanRibbens in #5940
  • fix(db-postgres): v3 nested groups in nested blocks by @DanRibbens in #5941
  • fix(plugin-cloud-storage)!: Pass filename to utility function getting file prefix by @SimonVreman in #5934
  • fix: add CORS headers to API Response by @jacobsfletch in #5906
  • fix(db-postgres): row table names were not being built properly by @PatrikKozak in #5960
  • fix: resave media using cloud storage plugin by @denolfe in #5959

⚠ BREAKING CHANGES

Providing an email configuration is now optional. If using nodemailer before, you will need to install a new package @payloadcms/email-nodemailer and use it in your config.

Email Configuration Before:

  • Providing any email configuration was completely optional and would configure nodemailer and ethereal.email with a test account by default.
// via payload.init
payload.init({
  email: {
    transport: someNodemailerTransport
    fromName: 'hello',
    fromAddress: 'hello@example.com',
  },
})
// or via email in payload.config.ts
export default buildConfig({
  email: {
    transport: someNodemailerTransport
    fromName: 'hello',
    fromAddress: 'hello@example.com',
  },
})

Email Configuration After:

  • All existing nodemailer functionality was abstracted into the @payloadcms/email-nodemailer package
  • No longer configured with ethereal.email by default.
  • Ability to pass email into the init function has been removed.
  • Warning will be given on startup if email not configured. Any sendEmail call will simply log the To address and subject.
// Using new nodemailer adapter package

import { nodemailerAdapter } from '@payloadcms/email-nodemailer'

export default buildConfig({
  email: nodemailerAdapter() // This will be the old ethereal.email functionality
})

// or pass in transport

export default buildConfig({
  email: nodemailerAdapter({
    defaultFromAddress: 'info@payloadcms.com',
    defaultFromName: 'Payload',
    transport: await nodemailer.createTransport({
      host: process.env.SMTP_HOST,
      port: 587,
      auth: {
        user: process.env.SMTP_USER,
        pass: process.env.SMTP_PASS,
      },
    })
  })
})
// Create custom email adapter

// myAdapter.ts
import type { EmailAdapter, SendMailOptions } from 'payload/types'

export const myAdapter: EmailAdapter = ({ payload }) => ({
  defaultFromAddress: defaults.defaultFromAddress,
  defaultFromName: defaults.defaultFromName,
  sendEmail: async (message) => {
    // Perform any logic here
    console.log(`To: '${message.to}', Subject: '${message.subject}'`)
    return Promise.resolve()
  },
})

// payload.config.ts
export default buildConfig({
  email: myAdapter()
})

v2.13.0

19 Apr 15:39
Compare
Choose a tag to compare

2.13.0 (2024-04-19)

Features

  • allow configuration for setting headers on external file fetch (ec1ad0b)
  • db-*: custom db table and enum names (#5045) (9bbacc4)
  • json field schemas (#5726) (2c402cc)
  • plugin-seo: add Chinese translation (#5429) (fcb29bb)
  • richtext-lexical: add HorizontalRuleFeature (d8e9084)
  • richtext-lexical: improve floating handle y-positioning by positioning it in the center for smaller elements. (0055a8e)

Bug Fixes

  • adds type error validations for email and password in login operation (#4852) (1f00360)
  • avoids getting and setting doc preferences when creating new (#5757) (e3c3dda)
  • block field type missing dbName (#5695) (e7608f5)
  • db-mongodb: failing contains query with special chars (#5774) (5fa99fb)
  • db-mongodb: ignore end session errors (#5904) (cb8d562)
  • db-mongodb: version fields indexSortableFields (#5863) (fe0028c)
  • db-postgres: hasMany relationship query contains operator (#4212) (608d6d0)
  • db-postgres: issue querying by localised relationship not respecting locale as constraint (#5666) (44599cb)
  • db-postgres: query hasMany fields with in (#5881) (6185f8a)
  • db-postgres: relationship query pagination (#5802) (65690a6)
  • db-postgres: validateExistingBlockIsIdentical localized (#5839) (4c4f924)
  • duplicate document multiple times in quick succession (#5642) (373787d)
  • missing date locales (#5656) (c1c8600)
  • number ids were not sanitized to number in rest api (51f84a4)
  • passes parent id instead of incoming id to saveVersion (#5831) (25c9a14)
  • plugin-seo: uses correct key for ukrainian translation (#5873) (e47e544)
  • properly handle drafts in bulk update (#5872) (ad38f76)
  • req.collection being lost when querying a global inside a collection (#5727) (cbd03ed)
  • richtext-lexical: catch errors that may occur during HTML generation (#5754) (9b44296)
  • richtext-lexical: do not allow omitting editor prop for sub-richtext fields within lexical defined in the payload config (#5766) (6186493)
  • richtext-lexical: incorrect floating handle y-position calculation next to certain kinds of HTML elements like HR (de5d6cc)
  • richtext-lexical: limit unnecessary floating handle positioning updates (a00439e)
  • richtext-lexical: pass through config for schema generation. Makes it more robust (#5700) (cf135fd)
  • richtext-lexical: use correct nodeType on HorizontalRule feature HTML converter (#5805) (3b1d331)
  • updates type name of CustomPublishButtonProps to CustomPublishButtonType (#5644) (7df7bf4)
  • updates var (9530d28)
  • use isolateObjectProperty function in createLocalReq (#5748) (c0ba6cc)
  • uses find instead of fieldIndex for custom ID check (509ec67)

⚠ BREAKING CHANGES

  • richtext-lexical: do not allow omitting editor prop for sub-richtext fields within lexical defined in the payload config (#5766)

Release v2.12.1

03 Apr 18:38
Compare
Choose a tag to compare

2.12.1 (2024-04-03)

Bug Fixes

v2.12.0

03 Apr 18:36
Compare
Choose a tag to compare

2.12.0 (2024-04-03)

Features

  • plugin-seo: adds Norwegian translation (#5621) (589b492)
  • richtext-*: add ability to provide custom Field and Error components (#5574) (02d2c51)

Bug Fixes

  • db-postgres: error on delete having joins (#5459) (9169230)
  • image resize tiff files (#5415) (8184e00)
  • number field with hasMany accept defaultValue array (#5618) (a3ae416)
  • regression of filterOptions using different transaction (#5169) (3ceb6ef)
  • richtext-lexical: Blocks: generated output schema is not fully correct (#5259) (e7f6bfb)
  • richtext-lexical: checklist html converter incorrectly outputting children (#5570) (2e5400f)
  • richtext-lexical: disable instanceof HTMLImageElement check as it causes issues when used on the server (2164dcc)
  • richtext-lexical: Link: add open-in-new-tab to html converter (23df60d)
  • richtext-lexical: properly center add- and drag-block handles (#5568) (48dc116)
  • sets beforeValidateHook req type to required (#5608) (e10d5df)

v2.11.2

13 Mar 12:59
Compare
Choose a tag to compare

2.11.2 (2024-02-23)

Features

  • db-postgres: configurable custom schema to use (#5047) (e8f2ca4)

Bug Fixes

  • Add Context Provider in EditMany Component (#5005) (70e57fe)
  • db-mongodb: unique sparse for not required fields (#5114) (815bdfa)
  • db-postgres: set _parentID for array nested localized fields (#5117) (ceca5c4)
  • disabling API Key does not remove the key (#5145) (7a7f0ed)
  • handle thrown errors in config-level afterError hook (#5147) (32ed95e)
  • only replace the drawer content with full edit component if it exists (#5144) (0a07f60)
  • transaction error from access endpoint (#5156) (ad42d54)

Release v2.11.1

16 Feb 20:01
Compare
Choose a tag to compare

2.11.1 (2024-02-16)

Features

  • db-postgres: adds idType to use uuid or serial id columns (#3864) (d6c2578)
  • db-postgres: reconnect after disconnection from database (#5086) (bf942fd)
  • plugin-search: add req to beforeSync args for transactions (#5068) (98b87e2)
  • richtext-lexical: add justify aligment to AlignFeature (#4035) (#4868) (6d6823c)
  • richtext-lexical: AddBlock handle for all nodes, even if they aren't empty paragraphs (#5063) (00fc034)
  • richtext-lexical: Update lexical from 0.12.6 to 0.13.1, port over all useful changes from playground (#5066) (0d18822)

Bug Fixes

  • db-mongodb: find versions pagination (#5091) (5d4022f)
  • db-postgres: query using blockType (#5044) (35c2a08)
  • filterOptions errors cause transaction to abort (#5079) (5f3d016)
  • plugin-form-builder: hooks do not respect transactions (#5069) (82e9d31)
  • remove collection findByID caching (#5034) (1ac943e)
  • richtext-lexical: do not remove adjacent paragraph node when inserting certain nodes in empty editor (#5061) (6323965)
  • uploads: account for serverURL when retrieving external file (#5102) (25cee8b)

⚠ BREAKING CHANGES: @payloadcms/richtext-lexical

  • richtext-lexical: Update lexical from 0.12.6 to 0.13.1, port over all useful changes from playground (#5066)
  • You HAVE to make sure that any versions of the lexical packages (IF you have any installed) match the lexical version which richtext-lexical uses: v0.13.1. If you do not do this, you may be plagued by React useContext / "cannot find active editor state" errors
  • Updates to lexical's API, e.g. the removal of INTERNAL_isPointSelection, could be breaking depending on your code. Please consult the lexical changelog.

Release v2.11.0

12 Feb 14:27
Compare
Choose a tag to compare

2.11.0 (2024-02-09)

Features

  • exposes collapsible provider with more functionality (#5043) (df39602)

Release v2.10.1

09 Feb 14:08
Compare
Choose a tag to compare

2.10.1 (2024-02-09)

Bug Fixes

  • clearable cells handle null values (#5038) (f6d7da7)
  • db-mongodb: handle null values with exists (#5037) (cdc4cb9)
  • db-postgres: handle nested docs with drafts (#5012) (da184d4)
  • ensures docs with the same id are shown in relationship field select (#4859) (e1813fb)
  • query relationships by explicit id field (#5022) (a0a58e7)
  • richtext-lexical: make editor reactive to initialValue changes (#5010) (2315781)

Release v2.10.0

06 Feb 20:42
Compare
Choose a tag to compare

2.10.0 (2024-02-06)

Features

  • add more options to addFieldStatePromise so that it can be used for field flattening (#4799) (8725d41)
  • extend transactions to cover after and beforeOperation hooks (#4960) (1e8a6b7)
  • previousValue and previousSiblingDoc args added to beforeChange field hooks (#4958) (5d934ba)
  • re-use existing logger instance passed to payload.init (#3124) (471d211)
  • richtext-lexical: Blocks: generate type definitions for blocks fields (#4529) (90d7ee3)
  • use deletion success message from server if provided (#4966) (e3c8105)

Bug Fixes

  • db-postgres: filtering relationships with drafts enabled (#4998) (c3a3942)
  • db-postgres: handle schema changes with supabase (#4968) (5d3659d)
  • db-postgres: indexes not created for non unique field names (#4967) (64f705c)
  • db-postgres: indexes not creating for relationships, arrays, hasmany and blocks (#4976) (47106d5)
  • db-postgres: localized field sort count (#4997) (f3876c2)
  • ensures docPermissions fallback to collection permissions on create (#4969) (afa2b94)
  • migrations: safely create migration file when no name passed (#4995) (0740d50)
  • plugin-seo: tabbedUI with email field causes duplicate field (#4944) (db22cbd)

Release v2.9.0

26 Jan 18:59
Compare
Choose a tag to compare

2.9.0 (2024-01-26)

Features

  • forceAcceptWarning migration arg added to accept prompts (#4874) (eba53ba)

Bug Fixes

  • afterLogin hook write conflicts (#4904) (3eb681e)
  • db-postgres: migrate down error (#4861) (dfba522)
  • db-postgres: query unset relation (#4862) (8ce15c8)
  • migrate down missing filter for latest batch (#4860) (b99d24f)
  • plugin-cloud-storage: slow get file performance large collections (#4927) (f73d503)
  • remove No Options dropdown from hasMany fields (#4899) (e5a7907)
  • upload input drawer does not show draft versions (#4903) (6930c4e)