-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Comparing changes
Open a pull request
base repository: payloadcms/payload
base: v3.84.1
head repository: payloadcms/payload
compare: v3.85.0
- 19 commits
- 194 files changed
- 8 contributors
Commits on Apr 29, 2026
-
fix(richtext-lexical): drag/drop image into rich text fails when a fi…
…eld name matches the collection slug (#16409) ## Summary Backport of #16397 to 3.x. When a top-level rich text field has the same `name` as the collection's `slug`, dragging or pasting an image into the editor opens a blank bulk upload drawer. The lexical field and the document layout both mount a `BulkUploadProvider`; when the field path equals the collection slug they compute the same drawer slug and render two drawers for it, one with empty state (blank), which is what the user sees. The fix is a 1-line change: namespace the lexical field's nested `BulkUploadProvider` with a `lexical-` prefix so its drawer slug can never collide with the document-level provider. ```diff - <BulkUploadProvider drawerSlugPrefix={path}> + <BulkUploadProvider drawerSlugPrefix={`lexical-${path}`}> ``` The rest of the diff is a new e2e test. ## Test plan Added `test/lexical/collections/LexicalSlugFieldNameCollision/e2e.spec.ts`, which asserts that dropping a file into a rich text editor opens exactly one bulk upload drawer when the field name equals the collection slug. Verified that the test fails without the production change (`Expected: 1, Received: 2`) and passes with it. Co-authored-by: German Jablonski <GermanJablo@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for d6f7b47 - Browse repository at this point
Copy the full SHA d6f7b47View commit details
Commits on May 4, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 3cd4a64 - Browse repository at this point
Copy the full SHA 3cd4a64View commit details -
Configuration menu - View commit details
-
Copy full SHA for 695df3c - Browse repository at this point
Copy the full SHA 695df3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0facc44 - Browse repository at this point
Copy the full SHA 0facc44View commit details -
Configuration menu - View commit details
-
Copy full SHA for caf9150 - Browse repository at this point
Copy the full SHA caf9150View commit details
Commits on May 5, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 931a349 - Browse repository at this point
Copy the full SHA 931a349View commit details
Commits on May 6, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 64b2860 - Browse repository at this point
Copy the full SHA 64b2860View commit details
Commits on May 7, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 8d14915 - Browse repository at this point
Copy the full SHA 8d14915View commit details -
Configuration menu - View commit details
-
Copy full SHA for c31f4ef - Browse repository at this point
Copy the full SHA c31f4efView commit details -
templates: bumps next.js to 16.2.6 (#16538)
This bumps the Next.js version in our templates and monorepo to 16.2.6. It also bumps the minimum supported Next.js 16 version to 16.2.6, to discourage people from using a Next.js version with known CVEs.
Configuration menu - View commit details
-
Copy full SHA for 9b36063 - Browse repository at this point
Copy the full SHA 9b36063View commit details
Commits on May 8, 2026
-
fix: bump uuid package to 13.0.2 (#16545)
Fixes #16459 Bumps the uuid package from 11.1.0 to 13.0.2 to fix [GHSA-w5hq-g745-h8pq](GHSA-w5hq-g745-h8pq). Can't bump to v14, as v14 drops support for node 18.
Configuration menu - View commit details
-
Copy full SHA for 274af06 - Browse repository at this point
Copy the full SHA 274af06View commit details -
docs: adds relevant videos to docs sections (#16516)
- modular dashboard - ecommerce plugin - hooks - import-export plugin - mcp plugin - multi-tenant plugin - production deployment (vercel, cloudflare)
Configuration menu - View commit details
-
Copy full SHA for d17298f - Browse repository at this point
Copy the full SHA d17298fView commit details
Commits on May 11, 2026
-
feat(plugin-import-export): out of beta and added support for collect…
…ion-level and field-level hooks (#16556) ### Plugin out of beta The import export plugin is now marked as stable and will be moved out of beta. For v4 we will be removing the deprecated APIs but for v3 they will remain supported. ### Why Field-level hooks are essential because: 1. **Co-location** — the transform behavior lives next to the field definition, not in a separate collection config 2. **Reusability** — a shared field config carries its hooks to every collection that uses it, zero duplication 3. **Deeply nested fields** — transforming `group.tabs.namedTab.array[0].field` in a collection-level hook requires manually navigating the full document structure; field-level hooks handle this transparently This PR keeps both levels: field-level hooks for per-field transforms, collection-level hooks for batch-wide operations (masking, logging, filtering). ## Field-level hooks Defined per-field via `custom['plugin-import-export'].hooks`: ```ts import type { FieldBeforeExportHook } from '@payloadcms/plugin-import-export' const authorField = { name: 'author', type: 'relationship', relationTo: 'users', custom: { 'plugin-import-export': { hooks: { // Runs before the field value is written to the export file beforeExport: (({ value, columnName, row, format }) => { if (format === 'csv' && value && typeof value === 'object' && 'id' in value) { row[`${columnName}_id`] = value.id row[`${columnName}_email`] = value.email return undefined // let row mutation take effect } return value }) satisfies FieldBeforeExportHook, // Runs before the field value is written to the database beforeImport: ({ value, columnName, data, format }) => { if (format === 'csv') { return data[`${columnName}_id`] ?? undefined } return value }, }, }, }, } ``` ## Collection-level hooks Defined in the plugin config: ```ts importExportPlugin({ collections: [ { slug: 'users', export: { hooks: { before: ({ data, format }) => { // Mask sensitive fields from the entire batch return data.map(({ passwordHash, ssn, ...safe }) => safe) }, after: ({ batchNumber, totalBatches, req }) => { req.payload.logger.info(`Export batch ${batchNumber}/${totalBatches} written`) }, }, }, }, ], }) ``` #### Execution order field-level `hooks.beforeExport` / `hooks.beforeImport` run first (per-field, per-document), then collection-level `hooks.before` / `hooks.after` run on the already-transformed batch. #### Migration from toCSV / fromCSV toCSV and fromCSV remain fully functional but are deprecated — removed in v4.0. Migration is a 1:1 rename plus the new format parameter: ```ts // Before (deprecated) custom: { 'plugin-import-export': { toCSV: ({ value, row }) => { ... }, fromCSV: ({ value, data }) => { ... }, }, } // After custom: { 'plugin-import-export': { hooks: { beforeExport: ({ value, row, format }) => { ... }, beforeImport: ({ value, data, format }) => { ... }, }, }, } ``` ## What changed ### New types `FieldBeforeExportHook` — field-level export hook type (same args as ToCSVFunction + format) `FieldBeforeImportHook` — field-level import hook type (same args as FromCSVFunction + format) `ToCSVFunction` / `FromCSVFunction` — now deprecated aliases #### JSON format support (new) - Field-level hooks now fire for JSON exports/imports, not just CSV - New applyFieldExportHooks / applyFieldImportHooks utilities traverse nested JSON documents and apply field hooks at each position - Preview handlers also apply field hooks for both CSV and JSON ## Bug fixes - [x] Fixed parentPath key computation in getExportFieldFunctions / getImportFieldFunctions — named tabs inside groups now produce correct underscore-separated keys (pre-existing bug) - [x] Fixed slice(-0) bug in import batchProcessor.ts — ImportAfterHook was receiving all accumulated errors instead of per-batch errors when a batch had zero failures - [x] Removed unused fs import from hooks.int.spec.ts ## Renamed internals - toCSVFunctions → exportFieldHooks throughout all source files - fromCSVFunctions → importFieldHooks throughout all source files - Error messages updated from "toCSVFunction" to "field export hook" ## Checklist - [x] Documentation updated with new API, migration guide, execution order - [x] Test collection PostsWithFieldHooks with field-level hooks - [x] 12 new integration tests (CSV export, JSON export, format parameter, deeply nested fields, CSV import, JSON import, backward compatibility with toCSV, backward compatibility with fromCSV, execution order, reusable field config, priority, default behaviour)
Configuration menu - View commit details
-
Copy full SHA for cf9252d - Browse repository at this point
Copy the full SHA cf9252dView commit details
Commits on May 18, 2026
-
chore(deps): bump nodemailer minimum version to 8.0.5 (#16664)
Supersedes #16501. Related: #16651. Bumps `nodemailer` to `^8.0.5` and `@types/nodemailer` to `^8.0.0` throughout the monorepo. The `nodemailer@7.0.12` package has known advisories that are fixed in >= 8.0.5. - GHSA-vvjj-xcjg-gr5g - GHSA-c7w3-x93f-qmm8 Note: `nodemailer` v8 widened the `Mail.Options['from']` type to also accept an array. This is considered a breaking change in Payload's `SendEmailOptions` type, if a project code relies on the previous shape. For backwards compatibility, we pin `SendEmailOptions['from']` back to v7's `string | Address` shape, then normalize this at runtime, so email adapters and consumer code stay source-compatible. --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1214892618463672 --------- Co-authored-by: Andrea Barani <andrea.barani@vubai.com>
Configuration menu - View commit details
-
Copy full SHA for efa4afe - Browse repository at this point
Copy the full SHA efa4afeView commit details
Commits on May 19, 2026
-
fix(db-mongodb): bump mongoose to 8.22.1 for GHSA-wpg9-53fq-2r8h (#16688
) Identical to #16672, back-ported for 3.x.
Configuration menu - View commit details
-
Copy full SHA for 4baba91 - Browse repository at this point
Copy the full SHA 4baba91View commit details
Commits on May 20, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 055c508 - Browse repository at this point
Copy the full SHA 055c508View commit details
Commits on May 21, 2026
-
ci: use postgres 15 for content api tests (#16706)
Content API Tests are currently failing because this job boots the latest Figma-hosted Content API image against `postgres:13`. The latest image includes https://github.com/figma/figma/pull/776922, which added PG15-only `UNIQUE NULLS NOT DISTINCT` index syntax, so Content API migrations fail before Payload tests run. cc @asalani-figma Failed job example: - Content API Tests on #16702: https://github.com/payloadcms/payload/actions/runs/26216770563/job/77142295149?pr=16702 This updates only the ephemeral database used by the Content API service in Payload CI. That database belongs to Figma-hosted Content API, not Payload or the database adapter, so matching Content API's Postgres requirement is the intended fix here. --------- Co-authored-by: German Jablonski <GermanJablo@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 99d4930 - Browse repository at this point
Copy the full SHA 99d4930View commit details -
docs: fix links in admin faq (#16711)
fixes broken links in admin overview FAQ section - `[/customizing-location]` (wrong) - `[/admin-panel-location]`(right)
Configuration menu - View commit details
-
Copy full SHA for 7e4f7af - Browse repository at this point
Copy the full SHA 7e4f7afView commit details
Commits on May 26, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 957a92e - Browse repository at this point
Copy the full SHA 957a92eView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.84.1...v3.85.0