You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `transactionIDPromise` property on `PayloadRequest` has been removed. It was deprecated and unused — `transactionID` (which already supports `Promise<number | string>`) is the correct property to use for both resolved values and pending transactions.
327
327
328
+
### `defaults` config export removed from `payload` ([#17103](https://github.com/payloadcms/payload/pull/17103))
329
+
330
+
The `defaults` object exported from `payload` has been removed. It was deprecated because it was a single shared object — mutating it (or any config that used it as a base) leaked changes into every other consumer of the defaults.
331
+
332
+
```diff
333
+
- import { defaults } from 'payload'
334
+
-
335
+
- const config = {
336
+
- ...defaults,
337
+
- // your overrides
338
+
- }
339
+
```
340
+
341
+
You no longer need to apply defaults yourself. `buildConfig` already fills in every default value during config initialization, so pass only the properties you want to override:
342
+
343
+
```ts
344
+
import { buildConfig } from'payload'
345
+
346
+
exportdefaultbuildConfig({
347
+
// only your overrides — defaults are applied automatically
348
+
})
349
+
```
350
+
351
+
If you depended on reading a specific default value at runtime, read it from the sanitized config returned by `buildConfig` (or `payload.config`) instead of from the static `defaults` object.
352
+
328
353
### Plugin Import/Export: `toCSV` and `fromCSV` removed
329
354
330
355
The `toCSV` and `fromCSV` field options in `custom['plugin-import-export']` have been removed. Use `hooks.beforeExport` and `hooks.beforeImport` instead — they work for both CSV and JSON formats.
0 commit comments