diff --git a/.eslintrc.js b/.eslintrc.js index 1ed0874712..5d825c5141 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -57,6 +57,7 @@ module.exports = { { ignore: [ 'payload-config', + 'payload/generated-types', ], }, ], diff --git a/CHANGELOG.md b/CHANGELOG.md index fca8a67b59..06f92a99bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,224 +1,425 @@ +## [1.5.12-canary.0](https://github.com/payloadcms/payload/compare/v1.5.9...v1.5.12-canary.0) (2023-01-18) +### 🐛 Bug Fixes + +- bump pino and pino-pretty to accommodate yarn 2 ([773fb57](https://github.com/payloadcms/payload/commit/773fb57c71f89d5157847ee4907c1472874f9a61)) +- updated nl i18n typos ([cc7257e](https://github.com/payloadcms/payload/commit/cc7257efd529580b1eb7b6c01df9f7420838c345)) +- fixes [#1905](https://github.com/payloadcms/payload/issues/1905) +- fixes [#1885](https://github.com/payloadcms/payload/issues/1885) +- fixes [#1869](https://github.com/payloadcms/payload/issues/1869) + +### ✨ Features + +- Roadmap - [improved TypeScript experience](https://github.com/payloadcms/payload/discussions/1563) - begins work to SIGNIFICANTLY improve typing of Payload's Local API, removing the need for generics and inferring types automatically from your generated types +- Refactors the Local API to include only the bare minimum code necessary for running local API operations, which will allow us to deploy serverlessly +- allows versions to be deleted alongside of main document deletion ([a5c76d4](https://github.com/payloadcms/payload/commit/a5c76d4bd544190511e34820c1145ef26d85dc53)) +- requires ts-node to start a project for any config that uses ts or jsx ([f1c342e](https://github.com/payloadcms/payload/commit/f1c342e05eb84254c9d84a425b4f0da1249fcef3)) +- simplifies versions logic ([8cfa550](https://github.com/payloadcms/payload/commit/8cfa5509540225100237e6f569eb9eb1a7d5448e)) + +### 🚨 BREAKING CHANGES + +#### Payload now no longer transpiles your config for you + +This release removes the need to use `@swc/register` to automatically transpile Payload configs, which dramatically improves Payload initialization speeds and simplifies the core Payload logic significantly. More info in the PR [here](https://github.com/payloadcms/payload/pull/1847). + +If you are not using TypeScript, this will be a breaking change. There are many ways to mitigate this - but the best way is to just quickly scaffold a barebones TS implementation. You can still write JavaScript, and this PR does not require you to write TS, but handling transpilation with TypeScript will be an easy way forward and can set you up to opt-in to TS over time as well. + +For instructions regarding how to migrate to TS, [review the PR here](https://github.com/payloadcms/payload/pull/1847). + +#### ✋ Payload `init` is now always async, and `payload.initAsync` has been removed + +We are pulling off a bandaid here and enforcing that `payload.init` is now asynchronous across the board. This will help prevent issues in the future and allow us to do more advanced things within `init` down the road. But this will be a breaking change if your project uses `payload.init` right now. + +To migrate, you need to convert your code everywhere that you run `payload.init` to be asynchronous instead. For example, here is an example of a traditional `payload.init` call which needs to be migrated: + +```js +const express = require("express"); +const payload = require("payload"); + +const app = express(); + +payload.init({ + secret: "SECRET_KEY", + mongoURL: "mongodb://localhost/payload", + express: app, +}); + +app.listen(3000, async () => { + console.log( + "Express is now listening for incoming connections on port 3000." + ); +}); +``` + +Your `payload.init` call will need to be converted into the following: + +```js +const express = require("express"); +const payload = require("payload"); + +const app = express(); + +const start = async () => { + await payload.init({ + secret: "SECRET_KEY", + mongoURL: "mongodb://localhost/payload", + express: app, + }); + + app.listen(3000, async () => { + console.log( + "Express is now listening for incoming connections on port 3000." + ); + }); +}; + +start(); +``` + +Notice that all we've done is wrapped the `payload.init` and `app.listen` calls with a `start` function that is asynchronous. + +#### ✋ All Local API methods are no longer typed as generics, and instead will infer types for you automatically + +Before this release, the Local API methods were configured as generics. For example, here is an example of the `findByID` method prior to this release: + +```ts +const post = await payload.findByID({ + collection: "posts", + id: "id-of-post-here", +}); +``` + +Now, you don't need to pass your types and Payload will automatically infer them for you, as well as significantly improve typing throughout the local API. Here's an example: + +```ts +const post = await payload.findByID({ + collection: "posts", // this is now auto-typed + id: "id-of-post-here", +}); + +// `post` will be automatically typed as `Post` +``` + +To migrate, just remove the generic implementation! + +But there's one more thing to do before Payload can automatically type your Local API. You need to add a path to your `tsconfig.json` file that matches your exported types from Payload: + +```json +{ + "compilerOptions": { + // your compilerOptions here + "paths": { + // Tell TS where to find your generated types + // This is the default location below + "payload/generated-types": ["./src/payload-types.ts"] + } + } +} +``` + +Then go regenerate your types. We've extended the `payload generate:types` method a bit to be more complete. Upon regenerating types, you'll see a new `Config` export at the top of the file which contains a key - value pair of all your collection and global types, which Payload will automatically import. + +#### ✋ Versions may need to be migrated + +This release includes a substantial simplification / optimization of how Versions work within Payload. They are now significantly more performant and easier to understand behind-the-scenes. We've removed ~600 lines of code and have ensured that Payload can be compatible with all flavors of Mongo - including versions earlier than 4.0, Azure Cosmos MongoDB, AWS' DocumentDB and more. + +But, some of your draft-enabled documents may need to be migrated. + +Here is a way for you to determine if you need to migrate: + +1. Do you have drafts enabled on any collections? +1. If so, do you have any drafts that have **never been updated** at all? For example, a draft is created, and no further versions are ever created. The document only exists in your main collection, and there are no corresponding versions within the `_versions` collection. +1. Are you worried about losing these never-updated-drafts? + +If you think the above bullets apply to you, then you can run a simple migration script to ensure that your "never-updated-drafts" don't disappear from the Admin UI. Your data will never disappear from your database in any case, but applicable documents to the above bullets will simply not show in the List view anymore. + +To migrate, create this file within the root of your Payload project: + +**migrateVersions.js** + +```js +const payload = require("payload"); + +require("dotenv").config(); + +const { PAYLOAD_SECRET_KEY, MONGO_URL } = process.env; + +// This function ensures that there is at least one corresponding version for any document +// within each of your draft-enabled collections. + +const ensureAtLeastOneVersion = async () => { + // Initialize Payload + // IMPORTANT: make sure your ENV variables are filled properly here + // as the below variable names are just for reference. + await payload.initAsync({ + secret: PAYLOAD_SECRET_KEY, + mongoURL: MONGO_URL, + local: true, + }); + + // For each collection + await Promise.all( + payload.config.collections.map(async ({ slug, versions }) => { + // If drafts are enabled + if (versions?.drafts) { + const { docs } = await payload.find({ + collection: slug, + limit: 0, + }); + + await Promise.all( + docs.map(async (doc) => { + const VersionsModel = payload.versions[slug]; + + // Find at least one version for the doc + const versions = await VersionsModel.find( + { parent: doc.id }, + null, + { limit: 1 } + ).lean(); + + // If there are no corresponding versions, + // we need to create one + if (versions.length === 0) { + await VersionsModel.create({ + parent: doc.id, + version: doc, + autosave: Boolean(versions?.drafts?.autosave), + updatedAt: doc.updatedAt, + createdAt: doc.createdAt, + }); + + console.log( + `Created version corresponding with ${collection.slug} document ID ${doc.id}` + ); + } + }) + ); + } + }) + ); + + console.log("Done!"); + process.exit(0); +}; + +ensureAtLeastOneVersion(); +``` + +Make sure your environment variables match the script's values above and then run `node migrateVersions.js` in your terminal. + +This migration script will ensure that there is at least one corresponding version for each of your draft-enabled documents. It won't modify or delete any of your existing documents at all. + +### 👀 Example of a properly migrated project + +For an example of how everything works with this update, go ahead and run `npx create-payload-app`. We've updated `create-payload-app` to reflect all the necessary changes here and you can use a new project to compare / contrast what you have in your current project with what Payload needs now in this release. + +## [1.5.9](https://github.com/payloadcms/payload/compare/v1.5.8...v1.5.9) (2023-01-15) + +### Bug Fixes + +- [#1877](https://github.com/payloadcms/payload/issues/1877), [#1867](https://github.com/payloadcms/payload/issues/1867) - mimeTypes and imageSizes no longer cause error in admin ui ([b06ca70](https://github.com/payloadcms/payload/commit/b06ca700be36cc3a945f81e3fa23ebb53d06ca23)) + +## [1.5.8](https://github.com/payloadcms/payload/compare/v1.5.7...v1.5.8) (2023-01-12) + +### Features + +- throws descriptive error when collection or global slug not found ([b847d85](https://github.com/payloadcms/payload/commit/b847d85e60032b47a8eacc2c9426fdd373dff879)) ## [1.5.7](https://github.com/payloadcms/payload/compare/v1.5.6...v1.5.7) (2023-01-12) - ### Bug Fixes -* ensures find with draft=true does not improperly exclude draft ids ([69026c5](https://github.com/payloadcms/payload/commit/69026c577914ba029f2c45423d9f621b605a3ca0)) -* ensures querying with drafts works on both published and non-published posts ([f018fc0](https://github.com/payloadcms/payload/commit/f018fc04b02f70d0e6ea545d5eb36ea860206964)) +- ensures find with draft=true does not improperly exclude draft ids ([69026c5](https://github.com/payloadcms/payload/commit/69026c577914ba029f2c45423d9f621b605a3ca0)) +- ensures querying with drafts works on both published and non-published posts ([f018fc0](https://github.com/payloadcms/payload/commit/f018fc04b02f70d0e6ea545d5eb36ea860206964)) ## [1.5.6](https://github.com/payloadcms/payload/compare/v1.5.5...v1.5.6) (2023-01-11) - ### Bug Fixes -* ensures that find with draft=true returns ids with drafts ([3f30b2f](https://github.com/payloadcms/payload/commit/3f30b2f4894258d67e9a9a79e2213f9d5f69f856)) +- ensures that find with draft=true returns ids with drafts ([3f30b2f](https://github.com/payloadcms/payload/commit/3f30b2f4894258d67e9a9a79e2213f9d5f69f856)) ## [1.5.5](https://github.com/payloadcms/payload/compare/v1.5.4...v1.5.5) (2023-01-11) - ### Bug Fixes -* [#1808](https://github.com/payloadcms/payload/issues/1808), arrays and blocks now save localized nested field data upon reordering rows ([ee54c14](https://github.com/payloadcms/payload/commit/ee54c1481cdb8d6669864f20584fa6ef072c9097)) -* bug when clearing relationship field without hasMany: true ([#1829](https://github.com/payloadcms/payload/issues/1829)) ([ed7cfff](https://github.com/payloadcms/payload/commit/ed7cfff45c262206495580509a77adb72a646ddb)) -* ensures upload file data is available for conditions ([d40e136](https://github.com/payloadcms/payload/commit/d40e1369472f212b5f85bfc72fac01dc708aa507)) -* fix miss typo in Thai translation ([25e5ab7](https://github.com/payloadcms/payload/commit/25e5ab7ceebfb36960b6969db543a2b4ae7127d2)) -* formats date when useAsTitle ([086117d](https://github.com/payloadcms/payload/commit/086117d7039b2b68ab2789b57cac97e2735819cf)) -* prevents uploads drawer from crashing when no uploads are enabled ([84e1417](https://github.com/payloadcms/payload/commit/84e1417b711e0823753f0b9174c145e40b68e0be)) -* rte link element initial state [#1848](https://github.com/payloadcms/payload/issues/1848) ([1cde647](https://github.com/payloadcms/payload/commit/1cde647a2a86df21312229b8beec0a6b75df22c3)) -* updatesmargin for group field within a row ([1c3a257](https://github.com/payloadcms/payload/commit/1c3a257244e322c04164f6630772a40baf256da7)) -* upload field filterOptions ([9483ccb](https://github.com/payloadcms/payload/commit/9483ccb1208a91c1376ac4bd5186037f909aa45d)) -* wrong translation and punctuation spacing ([bf1242a](https://github.com/payloadcms/payload/commit/bf1242aafa3fa7e72e81af10284f4ddade28c4a0)) - +- [#1808](https://github.com/payloadcms/payload/issues/1808), arrays and blocks now save localized nested field data upon reordering rows ([ee54c14](https://github.com/payloadcms/payload/commit/ee54c1481cdb8d6669864f20584fa6ef072c9097)) +- bug when clearing relationship field without hasMany: true ([#1829](https://github.com/payloadcms/payload/issues/1829)) ([ed7cfff](https://github.com/payloadcms/payload/commit/ed7cfff45c262206495580509a77adb72a646ddb)) +- ensures upload file data is available for conditions ([d40e136](https://github.com/payloadcms/payload/commit/d40e1369472f212b5f85bfc72fac01dc708aa507)) +- fix miss typo in Thai translation ([25e5ab7](https://github.com/payloadcms/payload/commit/25e5ab7ceebfb36960b6969db543a2b4ae7127d2)) +- formats date when useAsTitle ([086117d](https://github.com/payloadcms/payload/commit/086117d7039b2b68ab2789b57cac97e2735819cf)) +- prevents uploads drawer from crashing when no uploads are enabled ([84e1417](https://github.com/payloadcms/payload/commit/84e1417b711e0823753f0b9174c145e40b68e0be)) +- rte link element initial state [#1848](https://github.com/payloadcms/payload/issues/1848) ([1cde647](https://github.com/payloadcms/payload/commit/1cde647a2a86df21312229b8beec0a6b75df22c3)) +- updatesmargin for group field within a row ([1c3a257](https://github.com/payloadcms/payload/commit/1c3a257244e322c04164f6630772a40baf256da7)) +- upload field filterOptions ([9483ccb](https://github.com/payloadcms/payload/commit/9483ccb1208a91c1376ac4bd5186037f909aa45d)) +- wrong translation and punctuation spacing ([bf1242a](https://github.com/payloadcms/payload/commit/bf1242aafa3fa7e72e81af10284f4ddade28c4a0)) ### Features -* adds translations for fallbackToDefaultLocale ([c247f31](https://github.com/payloadcms/payload/commit/c247f3130cf03d1dc12d456886b04db028161800)) -* ensures compatibility with azure cosmos and aws documentdb ([73af283](https://github.com/payloadcms/payload/commit/73af283e1c24befc2797e2bc9766a22d26e3c288)) +- adds translations for fallbackToDefaultLocale ([c247f31](https://github.com/payloadcms/payload/commit/c247f3130cf03d1dc12d456886b04db028161800)) +- ensures compatibility with azure cosmos and aws documentdb ([73af283](https://github.com/payloadcms/payload/commit/73af283e1c24befc2797e2bc9766a22d26e3c288)) ## [1.5.4](https://github.com/payloadcms/payload/compare/v1.5.3...v1.5.4) (2023-01-06) - ### Features -* allows init to accept a pre-built config ([84e00bf](https://github.com/payloadcms/payload/commit/84e00bf7b3dfc1c23367765eec60bec45b81617b)) +- allows init to accept a pre-built config ([84e00bf](https://github.com/payloadcms/payload/commit/84e00bf7b3dfc1c23367765eec60bec45b81617b)) ## [1.5.3](https://github.com/payloadcms/payload/compare/v1.5.2...v1.5.3) (2023-01-05) - ### Bug Fixes -* theme flicker on code editor ([6567454](https://github.com/payloadcms/payload/commit/6567454ae4e4808303da9b80d26633bc77e1445d)) +- theme flicker on code editor ([6567454](https://github.com/payloadcms/payload/commit/6567454ae4e4808303da9b80d26633bc77e1445d)) ## [1.5.2](https://github.com/payloadcms/payload/compare/v1.5.1...v1.5.2) (2023-01-04) - ### Bug Fixes -* ignores admin and components from swc ([7d27431](https://github.com/payloadcms/payload/commit/7d274313129c44618ebd8d1fd7a176694ee40476)) +- ignores admin and components from swc ([7d27431](https://github.com/payloadcms/payload/commit/7d274313129c44618ebd8d1fd7a176694ee40476)) ## [1.5.1](https://github.com/payloadcms/payload/compare/v1.5.0...v1.5.1) (2023-01-04) - ### Bug Fixes -* reverts components directory back to ts ([1bbf099](https://github.com/payloadcms/payload/commit/1bbf099fe052e767512e111f8f2b778c1b9c59d9)) +- reverts components directory back to ts ([1bbf099](https://github.com/payloadcms/payload/commit/1bbf099fe052e767512e111f8f2b778c1b9c59d9)) # [1.5.0](https://github.com/payloadcms/payload/compare/v1.4.2...v1.5.0) (2023-01-04) - ### Bug Fixes -* json field type ([73b8ba3](https://github.com/payloadcms/payload/commit/73b8ba3d4a86385cd0a80efcdc19e4972d16b0b7)) - +- json field type ([73b8ba3](https://github.com/payloadcms/payload/commit/73b8ba3d4a86385cd0a80efcdc19e4972d16b0b7)) ### Features -* adds initial json field ([28d9f90](https://github.com/payloadcms/payload/commit/28d9f9009cc479b0e5da5c5b4fb85eb29b055309)) -* fixes json editor errors and misc styling ([efe4f6d](https://github.com/payloadcms/payload/commit/efe4f6d861a99337cfd35592557d3e8f16ff924a)) -* swc register ([#1779](https://github.com/payloadcms/payload/issues/1779)) ([c11bcd1](https://github.com/payloadcms/payload/commit/c11bcd1416b19e48569218d9011d013ad77306ce)) -* updates code field editor ([4d6eba8](https://github.com/payloadcms/payload/commit/4d6eba8d21d19eac63df02d56d27b0a17006d042)) -* wires up i18n with monaco editor ([07b2cca](https://github.com/payloadcms/payload/commit/07b2ccad61a619478f6613fa65f4f630222639d4)) +- adds initial json field ([28d9f90](https://github.com/payloadcms/payload/commit/28d9f9009cc479b0e5da5c5b4fb85eb29b055309)) +- fixes json editor errors and misc styling ([efe4f6d](https://github.com/payloadcms/payload/commit/efe4f6d861a99337cfd35592557d3e8f16ff924a)) +- swc register ([#1779](https://github.com/payloadcms/payload/issues/1779)) ([c11bcd1](https://github.com/payloadcms/payload/commit/c11bcd1416b19e48569218d9011d013ad77306ce)) +- updates code field editor ([4d6eba8](https://github.com/payloadcms/payload/commit/4d6eba8d21d19eac63df02d56d27b0a17006d042)) +- wires up i18n with monaco editor ([07b2cca](https://github.com/payloadcms/payload/commit/07b2ccad61a619478f6613fa65f4f630222639d4)) ## [1.4.2](https://github.com/payloadcms/payload/compare/v1.4.1...v1.4.2) (2023-01-03) - ### Bug Fixes -* [#1775](https://github.com/payloadcms/payload/issues/1775) - siblingData for unnamed fields within array rows improperly formatted ([d6fcd19](https://github.com/payloadcms/payload/commit/d6fcd19bd1eaf2942c2eaa31f0de4770ca10ff06)) -* [#1786](https://github.com/payloadcms/payload/issues/1786), relationship with hasMany no longer sets empty array as default value ([ecfb363](https://github.com/payloadcms/payload/commit/ecfb36316961ef0eb9dd1ba1dc95ba98f95223f8)) -* error clearing date field ([883daf7](https://github.com/payloadcms/payload/commit/883daf7b469c03fae67c16292af6aded662c0bd0)) -* select field crash on missing value option ([ec9196e](https://github.com/payloadcms/payload/commit/ec9196e33ca01e6a15097943b4be6dee6ea5202f)) - +- [#1775](https://github.com/payloadcms/payload/issues/1775) - siblingData for unnamed fields within array rows improperly formatted ([d6fcd19](https://github.com/payloadcms/payload/commit/d6fcd19bd1eaf2942c2eaa31f0de4770ca10ff06)) +- [#1786](https://github.com/payloadcms/payload/issues/1786), relationship with hasMany no longer sets empty array as default value ([ecfb363](https://github.com/payloadcms/payload/commit/ecfb36316961ef0eb9dd1ba1dc95ba98f95223f8)) +- error clearing date field ([883daf7](https://github.com/payloadcms/payload/commit/883daf7b469c03fae67c16292af6aded662c0bd0)) +- select field crash on missing value option ([ec9196e](https://github.com/payloadcms/payload/commit/ec9196e33ca01e6a15097943b4be6dee6ea5202f)) ### Features -* add Ukrainian translation ([#1767](https://github.com/payloadcms/payload/issues/1767)) ([49fa5cb](https://github.com/payloadcms/payload/commit/49fa5cb23a0bb57348d8cd7ec0b7805d651fda2d)) -* preview now exposes most recent draft data ([54dadbe](https://github.com/payloadcms/payload/commit/54dadbeae5b195405a7cfb480fd38b2eeb684938)) +- add Ukrainian translation ([#1767](https://github.com/payloadcms/payload/issues/1767)) ([49fa5cb](https://github.com/payloadcms/payload/commit/49fa5cb23a0bb57348d8cd7ec0b7805d651fda2d)) +- preview now exposes most recent draft data ([54dadbe](https://github.com/payloadcms/payload/commit/54dadbeae5b195405a7cfb480fd38b2eeb684938)) ## [1.4.1](https://github.com/payloadcms/payload/compare/v1.4.0...v1.4.1) (2022-12-24) - ### Bug Fixes -* [#1761](https://github.com/payloadcms/payload/issues/1761), avoids rich text modifying form due to selection change ([9f4ce8d](https://github.com/payloadcms/payload/commit/9f4ce8d756742a6e1b2644ea49d0778774aae457)) +- [#1761](https://github.com/payloadcms/payload/issues/1761), avoids rich text modifying form due to selection change ([9f4ce8d](https://github.com/payloadcms/payload/commit/9f4ce8d756742a6e1b2644ea49d0778774aae457)) # [1.4.0](https://github.com/payloadcms/payload/compare/v1.3.4...v1.4.0) (2022-12-23) - ### Bug Fixes -* [#1611](https://github.com/payloadcms/payload/issues/1611), unable to query draft versions with draft=true ([44b31a9](https://github.com/payloadcms/payload/commit/44b31a9e585aad515557b749bf05253139a17bd9)) -* [#1656](https://github.com/payloadcms/payload/issues/1656) remove size data ([389ee26](https://github.com/payloadcms/payload/commit/389ee261d4ebae0b773bca375ed8a74685506aa0)) -* [#1698](https://github.com/payloadcms/payload/issues/1698) - globals and autosave not working ([915f1e2](https://github.com/payloadcms/payload/commit/915f1e2b3a0c9618d5699a0ee6f5e74c6f4038ee)) -* [#1738](https://github.com/payloadcms/payload/issues/1738) save image dimensions to svg uploads ([2de435f](https://github.com/payloadcms/payload/commit/2de435f43a2e75391a655e91a0cda251da776bcb)) -* [#1747](https://github.com/payloadcms/payload/issues/1747), rich text in arrays improperly updating initialValue when moving rows ([d417e50](https://github.com/payloadcms/payload/commit/d417e50d52fc0824fb5aaedd3e1208c3e1468bdd)) -* [#1748](https://github.com/payloadcms/payload/issues/1748), bails out of autosave if doc is published while autosaving ([95e9300](https://github.com/payloadcms/payload/commit/95e9300d109c9bfd377d5b5efbb68ddca306bbec)) -* [#1752](https://github.com/payloadcms/payload/issues/1752), removes label from row field type ([ff3ab18](https://github.com/payloadcms/payload/commit/ff3ab18d1690e50473be2d77897fb9de48361413)) -* [#551](https://github.com/payloadcms/payload/issues/551) - rich text nested list structure ([542ea8e](https://github.com/payloadcms/payload/commit/542ea8eb81a6e608c7368882da9692d656f1d36b)) -* allows cleared file to be reselected ([35abe81](https://github.com/payloadcms/payload/commit/35abe811c1534ba4f7e926edd3a2978ee67b181e)) -* get relationships in locale of i18n language setting ([#1648](https://github.com/payloadcms/payload/issues/1648)) ([60bb265](https://github.com/payloadcms/payload/commit/60bb2652f0aa63747513e771173362985123519c)) -* missing file after reselect in upload component ([6bc1758](https://github.com/payloadcms/payload/commit/6bc1758dc0cad3f52ce332e71134ee527e17fff0)) -* prevents special characters breaking relationship field search ([#1710](https://github.com/payloadcms/payload/issues/1710)) ([9af4c1d](https://github.com/payloadcms/payload/commit/9af4c1dde7f4a68dc629738dff4fc314626cabb8)) -* refreshes document drawer on save ([9567328](https://github.com/payloadcms/payload/commit/9567328d28709c5721b33e5bd61c9535568ffffd)) -* removes update and created at fields when duplicating, ensures updatedAt data is reactive ([bd4ed5b](https://github.com/payloadcms/payload/commit/bd4ed5b99b5026544c910592c3bff6040e2058bc)) -* safely clears sort [#1736](https://github.com/payloadcms/payload/issues/1736) ([341c163](https://github.com/payloadcms/payload/commit/341c163b36c330df76a6eb5146fccc80059eb9d7)) -* simplifies radio validation ([0dfed3b](https://github.com/payloadcms/payload/commit/0dfed3b30a15829f9454332a4cbd7d9ce1fddea3)) -* translated tab classnames ([238bada](https://github.com/payloadcms/payload/commit/238badabb4f38e691608219c54a541993d9f3010)) -* updates relationship label on drawer save and prevents stepnav update ([59de4f7](https://github.com/payloadcms/payload/commit/59de4f7e82dc4f08240b13d48054589b561688fa)) -* updates richtext toolbar position if inside a drawer ([468b0d2](https://github.com/payloadcms/payload/commit/468b0d2a55616993f10eac7d1709620d114ad7d6)) -* use the slug for authentication header API Key ([5b70ebd](https://github.com/payloadcms/payload/commit/5b70ebd119b557cff66e97e3554af730657b4071)) - +- [#1611](https://github.com/payloadcms/payload/issues/1611), unable to query draft versions with draft=true ([44b31a9](https://github.com/payloadcms/payload/commit/44b31a9e585aad515557b749bf05253139a17bd9)) +- [#1656](https://github.com/payloadcms/payload/issues/1656) remove size data ([389ee26](https://github.com/payloadcms/payload/commit/389ee261d4ebae0b773bca375ed8a74685506aa0)) +- [#1698](https://github.com/payloadcms/payload/issues/1698) - globals and autosave not working ([915f1e2](https://github.com/payloadcms/payload/commit/915f1e2b3a0c9618d5699a0ee6f5e74c6f4038ee)) +- [#1738](https://github.com/payloadcms/payload/issues/1738) save image dimensions to svg uploads ([2de435f](https://github.com/payloadcms/payload/commit/2de435f43a2e75391a655e91a0cda251da776bcb)) +- [#1747](https://github.com/payloadcms/payload/issues/1747), rich text in arrays improperly updating initialValue when moving rows ([d417e50](https://github.com/payloadcms/payload/commit/d417e50d52fc0824fb5aaedd3e1208c3e1468bdd)) +- [#1748](https://github.com/payloadcms/payload/issues/1748), bails out of autosave if doc is published while autosaving ([95e9300](https://github.com/payloadcms/payload/commit/95e9300d109c9bfd377d5b5efbb68ddca306bbec)) +- [#1752](https://github.com/payloadcms/payload/issues/1752), removes label from row field type ([ff3ab18](https://github.com/payloadcms/payload/commit/ff3ab18d1690e50473be2d77897fb9de48361413)) +- [#551](https://github.com/payloadcms/payload/issues/551) - rich text nested list structure ([542ea8e](https://github.com/payloadcms/payload/commit/542ea8eb81a6e608c7368882da9692d656f1d36b)) +- allows cleared file to be reselected ([35abe81](https://github.com/payloadcms/payload/commit/35abe811c1534ba4f7e926edd3a2978ee67b181e)) +- get relationships in locale of i18n language setting ([#1648](https://github.com/payloadcms/payload/issues/1648)) ([60bb265](https://github.com/payloadcms/payload/commit/60bb2652f0aa63747513e771173362985123519c)) +- missing file after reselect in upload component ([6bc1758](https://github.com/payloadcms/payload/commit/6bc1758dc0cad3f52ce332e71134ee527e17fff0)) +- prevents special characters breaking relationship field search ([#1710](https://github.com/payloadcms/payload/issues/1710)) ([9af4c1d](https://github.com/payloadcms/payload/commit/9af4c1dde7f4a68dc629738dff4fc314626cabb8)) +- refreshes document drawer on save ([9567328](https://github.com/payloadcms/payload/commit/9567328d28709c5721b33e5bd61c9535568ffffd)) +- removes update and created at fields when duplicating, ensures updatedAt data is reactive ([bd4ed5b](https://github.com/payloadcms/payload/commit/bd4ed5b99b5026544c910592c3bff6040e2058bc)) +- safely clears sort [#1736](https://github.com/payloadcms/payload/issues/1736) ([341c163](https://github.com/payloadcms/payload/commit/341c163b36c330df76a6eb5146fccc80059eb9d7)) +- simplifies radio validation ([0dfed3b](https://github.com/payloadcms/payload/commit/0dfed3b30a15829f9454332a4cbd7d9ce1fddea3)) +- translated tab classnames ([238bada](https://github.com/payloadcms/payload/commit/238badabb4f38e691608219c54a541993d9f3010)) +- updates relationship label on drawer save and prevents stepnav update ([59de4f7](https://github.com/payloadcms/payload/commit/59de4f7e82dc4f08240b13d48054589b561688fa)) +- updates richtext toolbar position if inside a drawer ([468b0d2](https://github.com/payloadcms/payload/commit/468b0d2a55616993f10eac7d1709620d114ad7d6)) +- use the slug for authentication header API Key ([5b70ebd](https://github.com/payloadcms/payload/commit/5b70ebd119b557cff66e97e3554af730657b4071)) ### Features -* add Czech translation ([#1705](https://github.com/payloadcms/payload/issues/1705)) ([0be4285](https://github.com/payloadcms/payload/commit/0be428530512c3babdfe39be259dd165bb66b5f4)) -* adds doc permissions to account view ([8d643fb](https://github.com/payloadcms/payload/commit/8d643fb29d3604b78f6cb46582720dde2a46affb)) -* **graphql:** upgrade to graphql 16 ([57f5f5e](https://github.com/payloadcms/payload/commit/57f5f5ec439b5aee1d46bff0bf31aac6148f16b2)) - +- add Czech translation ([#1705](https://github.com/payloadcms/payload/issues/1705)) ([0be4285](https://github.com/payloadcms/payload/commit/0be428530512c3babdfe39be259dd165bb66b5f4)) +- adds doc permissions to account view ([8d643fb](https://github.com/payloadcms/payload/commit/8d643fb29d3604b78f6cb46582720dde2a46affb)) +- **graphql:** upgrade to graphql 16 ([57f5f5e](https://github.com/payloadcms/payload/commit/57f5f5ec439b5aee1d46bff0bf31aac6148f16b2)) ### BREAKING CHANGES -* replaced the useAPIKey authentication header format to use the collection slug instead of the collection label. Previous: `${collection.labels.singular} API-Key ${apiKey}`, updated: `${collection.slug} API-Key ${apiKey}` +- replaced the useAPIKey authentication header format to use the collection slug instead of the collection label. Previous: `${collection.labels.singular} API-Key ${apiKey}`, updated: `${collection.slug} API-Key ${apiKey}` ## [1.3.4](https://github.com/payloadcms/payload/compare/v1.3.3...v1.3.4) (2022-12-16) - ### Bug Fixes -* async validate out of order ([e913fbe](https://github.com/payloadcms/payload/commit/e913fbe4ea4f9abf7eeb29db3b03e1afe4649d50)) -* autosave with nested localized fields ([4202fc2](https://github.com/payloadcms/payload/commit/4202fc29337763f8fd90ec4beaf0d34e39a916bc)) -* doc access should not run where query on collections without id ([016beb6](https://github.com/payloadcms/payload/commit/016beb6eec96857fe913888a1d9c4994dbd94e7e)) -* run docAccess also when checking global ([b8c0482](https://github.com/payloadcms/payload/commit/b8c0482cdae6d372f81823ee4541717131d9dac4)) +- async validate out of order ([e913fbe](https://github.com/payloadcms/payload/commit/e913fbe4ea4f9abf7eeb29db3b03e1afe4649d50)) +- autosave with nested localized fields ([4202fc2](https://github.com/payloadcms/payload/commit/4202fc29337763f8fd90ec4beaf0d34e39a916bc)) +- doc access should not run where query on collections without id ([016beb6](https://github.com/payloadcms/payload/commit/016beb6eec96857fe913888a1d9c4994dbd94e7e)) +- run docAccess also when checking global ([b8c0482](https://github.com/payloadcms/payload/commit/b8c0482cdae6d372f81823ee4541717131d9dac4)) ## [1.3.3](https://github.com/payloadcms/payload/compare/v1.3.2...v1.3.3) (2022-12-16) - ### Bug Fixes -* allow translation in group admin.description ([#1680](https://github.com/payloadcms/payload/issues/1680)) ([91e33ad](https://github.com/payloadcms/payload/commit/91e33ad1ee04750425112602fcfddcf329f934e8)) -* ensures select field avoids circular dependencies ([f715146](https://github.com/payloadcms/payload/commit/f715146aa35a6f3a8f5d7d4e066c71fb26027472)) +- allow translation in group admin.description ([#1680](https://github.com/payloadcms/payload/issues/1680)) ([91e33ad](https://github.com/payloadcms/payload/commit/91e33ad1ee04750425112602fcfddcf329f934e8)) +- ensures select field avoids circular dependencies ([f715146](https://github.com/payloadcms/payload/commit/f715146aa35a6f3a8f5d7d4e066c71fb26027472)) ## [1.3.2](https://github.com/payloadcms/payload/compare/v1.3.1...v1.3.2) (2022-12-15) - ### Bug Fixes -* safely handles rich text deselection ([420eef4](https://github.com/payloadcms/payload/commit/420eef4d91d6c5810b4e9dbda1e87e9f0e6d8dba)) +- safely handles rich text deselection ([420eef4](https://github.com/payloadcms/payload/commit/420eef4d91d6c5810b4e9dbda1e87e9f0e6d8dba)) ## [1.3.1](https://github.com/payloadcms/payload/compare/v1.3.0...v1.3.1) (2022-12-15) - ### Bug Fixes -* add i18n type to collection and globals admin.description ([#1675](https://github.com/payloadcms/payload/issues/1675)) ([049d560](https://github.com/payloadcms/payload/commit/049d560898fdf3fd9be40a4689eb1ef4170ef207)) -* adds draftsEnabled to baseSchema for tabs / arrays / groups & allows for null enum ([80da898](https://github.com/payloadcms/payload/commit/80da898de8cfe068a0ad685803d8523fd9a10dcd)) -* adds draftsEnabled to versionSchema in collections / globals ([f0db5e0](https://github.com/payloadcms/payload/commit/f0db5e0170807944cfbed8495c813b7c28b05bb3)) -* collapsible margin bottom adjustment ([#1673](https://github.com/payloadcms/payload/issues/1673)) ([64086e8](https://github.com/payloadcms/payload/commit/64086e8122e04965ca0ae8d254b99114208944bf)) -* escapes react-select events when drawer is open ([f290cda](https://github.com/payloadcms/payload/commit/f290cda333aecab104d7cd195bcc7fab2059134d)) -* label translation in about to delete dialog ([#1667](https://github.com/payloadcms/payload/issues/1667)) ([d9c45f6](https://github.com/payloadcms/payload/commit/d9c45f62b19162a34bc317e997d9912213a3012b)) -* list view date field display format ([#1661](https://github.com/payloadcms/payload/issues/1661)) ([934b443](https://github.com/payloadcms/payload/commit/934b443b5b3b0f610767786f940175b9db0b2da7)) -* removes case for select field that sets data to undefined if set to null ([b4f39d5](https://github.com/payloadcms/payload/commit/b4f39d5fd380190ee82a5bb967756d25e9c98e95)) -* Set 'Dashboard's link to config route ([#1652](https://github.com/payloadcms/payload/issues/1652)) ([940c1e8](https://github.com/payloadcms/payload/commit/940c1e84f5f091bf4b4ae0bd6628f077d9d0d6e9)) -* stringifies date in DateTime field for useAsTitle ([#1674](https://github.com/payloadcms/payload/issues/1674)) ([a1813ca](https://github.com/payloadcms/payload/commit/a1813ca4b32dfcd8ca3604f7f03b1ba316d740e2)) - +- add i18n type to collection and globals admin.description ([#1675](https://github.com/payloadcms/payload/issues/1675)) ([049d560](https://github.com/payloadcms/payload/commit/049d560898fdf3fd9be40a4689eb1ef4170ef207)) +- adds draftsEnabled to baseSchema for tabs / arrays / groups & allows for null enum ([80da898](https://github.com/payloadcms/payload/commit/80da898de8cfe068a0ad685803d8523fd9a10dcd)) +- adds draftsEnabled to versionSchema in collections / globals ([f0db5e0](https://github.com/payloadcms/payload/commit/f0db5e0170807944cfbed8495c813b7c28b05bb3)) +- collapsible margin bottom adjustment ([#1673](https://github.com/payloadcms/payload/issues/1673)) ([64086e8](https://github.com/payloadcms/payload/commit/64086e8122e04965ca0ae8d254b99114208944bf)) +- escapes react-select events when drawer is open ([f290cda](https://github.com/payloadcms/payload/commit/f290cda333aecab104d7cd195bcc7fab2059134d)) +- label translation in about to delete dialog ([#1667](https://github.com/payloadcms/payload/issues/1667)) ([d9c45f6](https://github.com/payloadcms/payload/commit/d9c45f62b19162a34bc317e997d9912213a3012b)) +- list view date field display format ([#1661](https://github.com/payloadcms/payload/issues/1661)) ([934b443](https://github.com/payloadcms/payload/commit/934b443b5b3b0f610767786f940175b9db0b2da7)) +- removes case for select field that sets data to undefined if set to null ([b4f39d5](https://github.com/payloadcms/payload/commit/b4f39d5fd380190ee82a5bb967756d25e9c98e95)) +- Set 'Dashboard's link to config route ([#1652](https://github.com/payloadcms/payload/issues/1652)) ([940c1e8](https://github.com/payloadcms/payload/commit/940c1e84f5f091bf4b4ae0bd6628f077d9d0d6e9)) +- stringifies date in DateTime field for useAsTitle ([#1674](https://github.com/payloadcms/payload/issues/1674)) ([a1813ca](https://github.com/payloadcms/payload/commit/a1813ca4b32dfcd8ca3604f7f03b1ba316d740e2)) ### Features -* inline relationships ([8d744c8](https://github.com/payloadcms/payload/commit/c6013c39043cc7bf9e8ff39551662c25e8d744c8)) -* custom button html element ([5592fb1](https://github.com/payloadcms/payload/commit/5592fb148dfa3058df577cfb7f5ed72ea25e1217)) -* further Tooltip improvements ([e101f92](https://github.com/payloadcms/payload/commit/e101f925cc71af4c3a1b5ce4ad552d9834d35bfd)) +- inline relationships ([8d744c8](https://github.com/payloadcms/payload/commit/c6013c39043cc7bf9e8ff39551662c25e8d744c8)) +- custom button html element ([5592fb1](https://github.com/payloadcms/payload/commit/5592fb148dfa3058df577cfb7f5ed72ea25e1217)) +- further Tooltip improvements ([e101f92](https://github.com/payloadcms/payload/commit/e101f925cc71af4c3a1b5ce4ad552d9834d35bfd)) # [1.3.0](https://github.com/payloadcms/payload/compare/v1.2.5...v1.3.0) (2022-12-09) - ### Bug Fixes -* [#1547](https://github.com/payloadcms/payload/issues/1547), global afterChange hook not falling back to original global if nothing returned ([a72123d](https://github.com/payloadcms/payload/commit/a72123dd471e1032d832e409560bda9cf3058095)) -* [#1632](https://github.com/payloadcms/payload/issues/1632) graphQL non-nullable relationship and upload fields ([#1633](https://github.com/payloadcms/payload/issues/1633)) ([eff3f18](https://github.com/payloadcms/payload/commit/eff3f18e7c184e5f82325e960b4cbe84b6377d82)) -* change edit key to prevent richtext editor from crashing ([#1616](https://github.com/payloadcms/payload/issues/1616)) ([471d214](https://github.com/payloadcms/payload/commit/471d21410ac9ac852a8581a019dd6759f56cd8b2)) -* filterOptions function argument relationTo is an array ([#1627](https://github.com/payloadcms/payload/issues/1627)) ([11b1c0e](https://github.com/payloadcms/payload/commit/11b1c0efc66acd32de2efcaf65bad504d2e2eb45)) -* resets slate state when initialValue changes, fixes [#1600](https://github.com/payloadcms/payload/issues/1600), [#1546](https://github.com/payloadcms/payload/issues/1546) ([9558a22](https://github.com/payloadcms/payload/commit/9558a22ce6cdf9bc13215931b43bde0a7dd4bf50)) -* sanitizes global find query params ([512bc1e](https://github.com/payloadcms/payload/commit/512bc1ebe636841f1dee6ce49c1d97db1810c4bd)) -* Select with hasMany and localized ([#1636](https://github.com/payloadcms/payload/issues/1636)) ([756edb8](https://github.com/payloadcms/payload/commit/756edb858a1ca66c32e674770ddcdceae77bf349)) -* translation key in revert published modal ([#1628](https://github.com/payloadcms/payload/issues/1628)) ([b6c597a](https://github.com/payloadcms/payload/commit/b6c597ab5c4fcd879496db5373155df48c657e28)) -* unflattens fields in filterOptions callback ([acff46b](https://github.com/payloadcms/payload/commit/acff46b4a5b57f01fa0b14c1e9fd8330b4d787db)) - - -* feat!: no longer sanitize collection slugs to kebab case (#1607) ([ba2f2d6](https://github.com/payloadcms/payload/commit/ba2f2d6e9b66568b11632bacdd92cfdc8ddae300)), closes [#1607](https://github.com/payloadcms/payload/issues/1607) +- [#1547](https://github.com/payloadcms/payload/issues/1547), global afterChange hook not falling back to original global if nothing returned ([a72123d](https://github.com/payloadcms/payload/commit/a72123dd471e1032d832e409560bda9cf3058095)) +- [#1632](https://github.com/payloadcms/payload/issues/1632) graphQL non-nullable relationship and upload fields ([#1633](https://github.com/payloadcms/payload/issues/1633)) ([eff3f18](https://github.com/payloadcms/payload/commit/eff3f18e7c184e5f82325e960b4cbe84b6377d82)) +- change edit key to prevent richtext editor from crashing ([#1616](https://github.com/payloadcms/payload/issues/1616)) ([471d214](https://github.com/payloadcms/payload/commit/471d21410ac9ac852a8581a019dd6759f56cd8b2)) +- filterOptions function argument relationTo is an array ([#1627](https://github.com/payloadcms/payload/issues/1627)) ([11b1c0e](https://github.com/payloadcms/payload/commit/11b1c0efc66acd32de2efcaf65bad504d2e2eb45)) +- resets slate state when initialValue changes, fixes [#1600](https://github.com/payloadcms/payload/issues/1600), [#1546](https://github.com/payloadcms/payload/issues/1546) ([9558a22](https://github.com/payloadcms/payload/commit/9558a22ce6cdf9bc13215931b43bde0a7dd4bf50)) +- sanitizes global find query params ([512bc1e](https://github.com/payloadcms/payload/commit/512bc1ebe636841f1dee6ce49c1d97db1810c4bd)) +- Select with hasMany and localized ([#1636](https://github.com/payloadcms/payload/issues/1636)) ([756edb8](https://github.com/payloadcms/payload/commit/756edb858a1ca66c32e674770ddcdceae77bf349)) +- translation key in revert published modal ([#1628](https://github.com/payloadcms/payload/issues/1628)) ([b6c597a](https://github.com/payloadcms/payload/commit/b6c597ab5c4fcd879496db5373155df48c657e28)) +- unflattens fields in filterOptions callback ([acff46b](https://github.com/payloadcms/payload/commit/acff46b4a5b57f01fa0b14c1e9fd8330b4d787db)) +- feat!: no longer sanitize collection slugs to kebab case (#1607) ([ba2f2d6](https://github.com/payloadcms/payload/commit/ba2f2d6e9b66568b11632bacdd92cfdc8ddae300)), closes [#1607](https://github.com/payloadcms/payload/issues/1607) ### Features -* add Norwegian bokmål (nb) translation ([#1614](https://github.com/payloadcms/payload/issues/1614)) ([759f001](https://github.com/payloadcms/payload/commit/759f00168137ff1a0fd862796a5971a9ba0264cd)) -* add Thai translation ([#1630](https://github.com/payloadcms/payload/issues/1630)) ([7777d11](https://github.com/payloadcms/payload/commit/7777d11b9ed458a6c64efc8c9572edb898f6ceed)) -* upload support pasting file ([eb69b82](https://github.com/payloadcms/payload/commit/eb69b82adfb4e94c1ef36b219310c55afc7a1d4e)) - +- add Norwegian bokmål (nb) translation ([#1614](https://github.com/payloadcms/payload/issues/1614)) ([759f001](https://github.com/payloadcms/payload/commit/759f00168137ff1a0fd862796a5971a9ba0264cd)) +- add Thai translation ([#1630](https://github.com/payloadcms/payload/issues/1630)) ([7777d11](https://github.com/payloadcms/payload/commit/7777d11b9ed458a6c64efc8c9572edb898f6ceed)) +- upload support pasting file ([eb69b82](https://github.com/payloadcms/payload/commit/eb69b82adfb4e94c1ef36b219310c55afc7a1d4e)) ### BREAKING CHANGES -* collection slugs are no longer automatically sanitized to be kebab case. This will only be an issue if your current slugs were in camel case. The upgrade path will be to change those slugs to the kebab case version that the slug was automatically being sanitized to on the backend. +- collection slugs are no longer automatically sanitized to be kebab case. This will only be an issue if your current slugs were in camel case. The upgrade path will be to change those slugs to the kebab case version that the slug was automatically being sanitized to on the backend. If you only use kebab case or single word slugs: no action needed. @@ -230,762 +431,696 @@ Any future slugs after updating will be used as-is. ## [1.2.5](https://github.com/payloadcms/payload/compare/v1.2.4...v1.2.5) (2022-12-06) - ### Bug Fixes -* exits findOptionsByValue when matchedOption is found ([881c067](https://github.com/payloadcms/payload/commit/881c067c40d7477fa2a56d9c700feab49410e1c1)) -* mismatch language condition when rendering unpublish ([3ddd0ea](https://github.com/payloadcms/payload/commit/3ddd0ea3efbd4d673a943dbf63363c548ae5562c)) -* safely coerces limit and depth to number or undefined ([dd04d78](https://github.com/payloadcms/payload/commit/dd04d7842efe9228e98271a878fd68a814042f41)) -* uses pathOrName to pass to internal Relationship field components ([8874e87](https://github.com/payloadcms/payload/commit/8874e871d4a48d5d3fccb8233464437d8ea61ad4)) - +- exits findOptionsByValue when matchedOption is found ([881c067](https://github.com/payloadcms/payload/commit/881c067c40d7477fa2a56d9c700feab49410e1c1)) +- mismatch language condition when rendering unpublish ([3ddd0ea](https://github.com/payloadcms/payload/commit/3ddd0ea3efbd4d673a943dbf63363c548ae5562c)) +- safely coerces limit and depth to number or undefined ([dd04d78](https://github.com/payloadcms/payload/commit/dd04d7842efe9228e98271a878fd68a814042f41)) +- uses pathOrName to pass to internal Relationship field components ([8874e87](https://github.com/payloadcms/payload/commit/8874e871d4a48d5d3fccb8233464437d8ea61ad4)) ### Features -* add Turkish translations ([#1596](https://github.com/payloadcms/payload/issues/1596)) ([c8a6831](https://github.com/payloadcms/payload/commit/c8a683100f1ec663a2fdfd5c1ab82300d2618995)) +- add Turkish translations ([#1596](https://github.com/payloadcms/payload/issues/1596)) ([c8a6831](https://github.com/payloadcms/payload/commit/c8a683100f1ec663a2fdfd5c1ab82300d2618995)) ## [1.2.4](https://github.com/payloadcms/payload/compare/v1.2.3...v1.2.4) (2022-12-03) - ### Bug Fixes -* missing translation richText link modal ([#1573](https://github.com/payloadcms/payload/issues/1573)) ([2dcada1](https://github.com/payloadcms/payload/commit/2dcada199c21bee97eca88aa6bc8ba1bc2b45e7c)) +- missing translation richText link modal ([#1573](https://github.com/payloadcms/payload/issues/1573)) ([2dcada1](https://github.com/payloadcms/payload/commit/2dcada199c21bee97eca88aa6bc8ba1bc2b45e7c)) ## [1.2.3](https://github.com/payloadcms/payload/compare/v1.2.2...v1.2.3) (2022-12-02) - ### Bug Fixes -* reset password regression ([#1574](https://github.com/payloadcms/payload/issues/1574)) ([396ea0b](https://github.com/payloadcms/payload/commit/396ea0bd53dc9e1ae1e348d6fe1eb3c36232b35b)) +- reset password regression ([#1574](https://github.com/payloadcms/payload/issues/1574)) ([396ea0b](https://github.com/payloadcms/payload/commit/396ea0bd53dc9e1ae1e348d6fe1eb3c36232b35b)) ## [1.2.2](https://github.com/payloadcms/payload/compare/v1.2.1...v1.2.2) (2022-12-02) - ### Bug Fixes -* adds contain operators for text/email/radio fields ([4c37af6](https://github.com/payloadcms/payload/commit/4c37af6f10dcfd77b5aec963bc5f84a178942143)) -* adjusts how limit is set, both in options and paginates limit ([a718010](https://github.com/payloadcms/payload/commit/a71801006cbc4b989d5057a5f04e8e8e0a6dbeed)) -* aligns mongoose PaginatedDocs type with actual lib type ([dce2081](https://github.com/payloadcms/payload/commit/dce208166337a8e47cc41301c9c5be0854199eaa)) -* allows for form controlled relationship fields to be populated ([e4435bb](https://github.com/payloadcms/payload/commit/e4435bb8bd13fd7122124fb6e171f4bd1cce819c)) -* allows for limit bypass on version find operations ([891f00d](https://github.com/payloadcms/payload/commit/891f00d05cd57d9387dd25be81daa3de99e315ed)) -* blockName grows in all browsers ([03c2ab5](https://github.com/payloadcms/payload/commit/03c2ab52a89817e94ec9a7b4339e807d995e04f6)) -* corrects skipValidation ([e6f1c6f](https://github.com/payloadcms/payload/commit/e6f1c6fc7bb56fe5a858b405c3bf799a46ac57f4)) -* dynamic relationship filterOptions ([99c1f41](https://github.com/payloadcms/payload/commit/99c1f41e306a11547965fd938fa5607787243003)) -* ensures enums cannot query on partial matches ([ec51929](https://github.com/payloadcms/payload/commit/ec51929b1af0b2c1138aa315d106b52f7e771779)) -* german translation optimizations ([#1485](https://github.com/payloadcms/payload/issues/1485)) ([e9d2163](https://github.com/payloadcms/payload/commit/e9d21636011ac084fa26ffbea199fc766fe19b25)) -* handle multiple locales in relationship population ([#1452](https://github.com/payloadcms/payload/issues/1452)) ([04c689c](https://github.com/payloadcms/payload/commit/04c689c5b04bc91020eb682b97721eba213836d2)) -* **i18n:** requiresAtLeast variable in de.json ([#1556](https://github.com/payloadcms/payload/issues/1556)) ([47fd0d9](https://github.com/payloadcms/payload/commit/47fd0d9ec4aa62335d505a0bfba0305355a318ca)) -* ignore validation when unpublishing, do not allow restore with invalid form state ([77ab542](https://github.com/payloadcms/payload/commit/77ab54243ab1857f4f430be4f8c4dc51e15f94ca)) -* indexSortableFields timestamp fields [#1506](https://github.com/payloadcms/payload/issues/1506) ([#1537](https://github.com/payloadcms/payload/issues/1537)) ([7aada3c](https://github.com/payloadcms/payload/commit/7aada3c746603b91bbb4fadf953f36e23fba5121)) -* infinite rerenders, accounts for hasMany false ([16d00e8](https://github.com/payloadcms/payload/commit/16d00e87c2f8b63e695e46ccbf279ad90621dc17)) -* moves relationship field useEffect into async reducer action ([54ef40a](https://github.com/payloadcms/payload/commit/54ef40a335905f7295f847c68762f7fe06bccc30)) -* moves sharp types from devDeps to deps ([b3d526b](https://github.com/payloadcms/payload/commit/b3d526b59a275a1f58a76322a588ba8a6370f26b)) -* reverts async reducer and resolves infinite effect ([a9da81f](https://github.com/payloadcms/payload/commit/a9da81f18cf9e6eba67187a3a2735b267949e0ae)) -* sanitize number query params before passing to find operation ([c8d1b9f](https://github.com/payloadcms/payload/commit/c8d1b9f88af62ad1ab927ca3d035fa4c031989f1)) -* translate select field option labels ([#1476](https://github.com/payloadcms/payload/issues/1476)) ([3a9dc9e](https://github.com/payloadcms/payload/commit/3a9dc9ef68374692c3314651bee6e1b00ae55f17)) -* update drafts includes latest version changes ([48989d0](https://github.com/payloadcms/payload/commit/48989d0f6ed086dc60dc94165a4e0ca8120f9b1a)) -* updates code field css ([3eebd66](https://github.com/payloadcms/payload/commit/3eebd6613f66f3cac38e00cfd94e80b2999cf791)) -* updates syntax colors for light theme ([dbfe7ca](https://github.com/payloadcms/payload/commit/dbfe7ca6e61e3a93baabc378f52835af9e53fd38)) -* uses baseClass in code field ([d03f0ae](https://github.com/payloadcms/payload/commit/d03f0aef8423597aceb36ddbbb1cc63033d0066d)) - +- adds contain operators for text/email/radio fields ([4c37af6](https://github.com/payloadcms/payload/commit/4c37af6f10dcfd77b5aec963bc5f84a178942143)) +- adjusts how limit is set, both in options and paginates limit ([a718010](https://github.com/payloadcms/payload/commit/a71801006cbc4b989d5057a5f04e8e8e0a6dbeed)) +- aligns mongoose PaginatedDocs type with actual lib type ([dce2081](https://github.com/payloadcms/payload/commit/dce208166337a8e47cc41301c9c5be0854199eaa)) +- allows for form controlled relationship fields to be populated ([e4435bb](https://github.com/payloadcms/payload/commit/e4435bb8bd13fd7122124fb6e171f4bd1cce819c)) +- allows for limit bypass on version find operations ([891f00d](https://github.com/payloadcms/payload/commit/891f00d05cd57d9387dd25be81daa3de99e315ed)) +- blockName grows in all browsers ([03c2ab5](https://github.com/payloadcms/payload/commit/03c2ab52a89817e94ec9a7b4339e807d995e04f6)) +- corrects skipValidation ([e6f1c6f](https://github.com/payloadcms/payload/commit/e6f1c6fc7bb56fe5a858b405c3bf799a46ac57f4)) +- dynamic relationship filterOptions ([99c1f41](https://github.com/payloadcms/payload/commit/99c1f41e306a11547965fd938fa5607787243003)) +- ensures enums cannot query on partial matches ([ec51929](https://github.com/payloadcms/payload/commit/ec51929b1af0b2c1138aa315d106b52f7e771779)) +- german translation optimizations ([#1485](https://github.com/payloadcms/payload/issues/1485)) ([e9d2163](https://github.com/payloadcms/payload/commit/e9d21636011ac084fa26ffbea199fc766fe19b25)) +- handle multiple locales in relationship population ([#1452](https://github.com/payloadcms/payload/issues/1452)) ([04c689c](https://github.com/payloadcms/payload/commit/04c689c5b04bc91020eb682b97721eba213836d2)) +- **i18n:** requiresAtLeast variable in de.json ([#1556](https://github.com/payloadcms/payload/issues/1556)) ([47fd0d9](https://github.com/payloadcms/payload/commit/47fd0d9ec4aa62335d505a0bfba0305355a318ca)) +- ignore validation when unpublishing, do not allow restore with invalid form state ([77ab542](https://github.com/payloadcms/payload/commit/77ab54243ab1857f4f430be4f8c4dc51e15f94ca)) +- indexSortableFields timestamp fields [#1506](https://github.com/payloadcms/payload/issues/1506) ([#1537](https://github.com/payloadcms/payload/issues/1537)) ([7aada3c](https://github.com/payloadcms/payload/commit/7aada3c746603b91bbb4fadf953f36e23fba5121)) +- infinite rerenders, accounts for hasMany false ([16d00e8](https://github.com/payloadcms/payload/commit/16d00e87c2f8b63e695e46ccbf279ad90621dc17)) +- moves relationship field useEffect into async reducer action ([54ef40a](https://github.com/payloadcms/payload/commit/54ef40a335905f7295f847c68762f7fe06bccc30)) +- moves sharp types from devDeps to deps ([b3d526b](https://github.com/payloadcms/payload/commit/b3d526b59a275a1f58a76322a588ba8a6370f26b)) +- reverts async reducer and resolves infinite effect ([a9da81f](https://github.com/payloadcms/payload/commit/a9da81f18cf9e6eba67187a3a2735b267949e0ae)) +- sanitize number query params before passing to find operation ([c8d1b9f](https://github.com/payloadcms/payload/commit/c8d1b9f88af62ad1ab927ca3d035fa4c031989f1)) +- translate select field option labels ([#1476](https://github.com/payloadcms/payload/issues/1476)) ([3a9dc9e](https://github.com/payloadcms/payload/commit/3a9dc9ef68374692c3314651bee6e1b00ae55f17)) +- update drafts includes latest version changes ([48989d0](https://github.com/payloadcms/payload/commit/48989d0f6ed086dc60dc94165a4e0ca8120f9b1a)) +- updates code field css ([3eebd66](https://github.com/payloadcms/payload/commit/3eebd6613f66f3cac38e00cfd94e80b2999cf791)) +- updates syntax colors for light theme ([dbfe7ca](https://github.com/payloadcms/payload/commit/dbfe7ca6e61e3a93baabc378f52835af9e53fd38)) +- uses baseClass in code field ([d03f0ae](https://github.com/payloadcms/payload/commit/d03f0aef8423597aceb36ddbbb1cc63033d0066d)) ### Features -* decouples limit from pagination, allows for no limit query ([f7ce0c6](https://github.com/payloadcms/payload/commit/f7ce0c615d76035ee48ef32047613ab1415deb44)) -* improve typescript comments ([#1467](https://github.com/payloadcms/payload/issues/1467)) ([5bd8657](https://github.com/payloadcms/payload/commit/5bd86571cada5791003bbfa84183f5b300649533)) -* log email transport error messages ([#1469](https://github.com/payloadcms/payload/issues/1469)) ([a90a1a9](https://github.com/payloadcms/payload/commit/a90a1a9e19bb54eb6d88129b5e2cb6483e22db61)) -* removes theme provider and updates background for code fields ([1a6c9a3](https://github.com/payloadcms/payload/commit/1a6c9a3e181930a6f45027fecc5313e8d7228c71)) +- decouples limit from pagination, allows for no limit query ([f7ce0c6](https://github.com/payloadcms/payload/commit/f7ce0c615d76035ee48ef32047613ab1415deb44)) +- improve typescript comments ([#1467](https://github.com/payloadcms/payload/issues/1467)) ([5bd8657](https://github.com/payloadcms/payload/commit/5bd86571cada5791003bbfa84183f5b300649533)) +- log email transport error messages ([#1469](https://github.com/payloadcms/payload/issues/1469)) ([a90a1a9](https://github.com/payloadcms/payload/commit/a90a1a9e19bb54eb6d88129b5e2cb6483e22db61)) +- removes theme provider and updates background for code fields ([1a6c9a3](https://github.com/payloadcms/payload/commit/1a6c9a3e181930a6f45027fecc5313e8d7228c71)) ## [1.2.1](https://github.com/payloadcms/payload/compare/v1.2.0...v1.2.1) (2022-11-22) - ### Bug Fixes -* adjusts styles to allow error bg to fill textarea ([2e57b76](https://github.com/payloadcms/payload/commit/2e57b76df01acf7ed1ce5fcb824ef5f96d11621d)) -* allows patching global drafts [#1415](https://github.com/payloadcms/payload/issues/1415) ([25822a9](https://github.com/payloadcms/payload/commit/25822a91b1e4f2bf4804f15947d211138d696219)) -* dynamically sets stepnav from default edit view ([40c8778](https://github.com/payloadcms/payload/commit/40c87784b0c6281c599b6d2a46a27b70b0568c30)) -* ensures drafts operations saves as draft [#1415](https://github.com/payloadcms/payload/issues/1415) ([fc16ffe](https://github.com/payloadcms/payload/commit/fc16ffefdb354ea023462d784cdac7ab6fcc26d3)) -* flattens locales before versioning published docs [#1415](https://github.com/payloadcms/payload/issues/1415) ([f700f51](https://github.com/payloadcms/payload/commit/f700f51f2bcdd657d1fab6b6d83ac00a11ed870d)) -* **i18n:** version count ([#1465](https://github.com/payloadcms/payload/issues/1465)) ([075b7e9](https://github.com/payloadcms/payload/commit/075b7e9f02498ea253cf270654dcce0f11ec1f93)) -* Increase textarea click area ([c303913](https://github.com/payloadcms/payload/commit/c303913e61881a3b0d90615dda905b20347d6f1e)) -* invalid query string user account request ([#1478](https://github.com/payloadcms/payload/issues/1478)) ([400cb9b](https://github.com/payloadcms/payload/commit/400cb9b6bcfd09c39cb6aa438daad876d12e8e13)) -* removes incorrectly import/export option type - [#1441](https://github.com/payloadcms/payload/issues/1441) ([ed01a17](https://github.com/payloadcms/payload/commit/ed01a176210a02a32874f4d0d1c5206d9a772e7e)) -* rendering of localized select value ([1d1d249](https://github.com/payloadcms/payload/commit/1d1d2493aa08db4c300c01e72ccb6c11e03f9e09)) -* sanitizes select values on the server, allowing isClearable selects to be cleared without error ([699ca14](https://github.com/payloadcms/payload/commit/699ca14434eeff3025cffd3f6e00efada80e021f)) -* translate version comparison view field labels ([#1470](https://github.com/payloadcms/payload/issues/1470)) ([8123585](https://github.com/payloadcms/payload/commit/8123585592b9a53ef746f17476b36a2661cca025)) -* versionCount was broken & other i18n improvements ([#1450](https://github.com/payloadcms/payload/issues/1450)) ([078c28b](https://github.com/payloadcms/payload/commit/078c28bd5fd08fd17a0b0b360e904f51fe8a2e98)) -* versions tests ([af6a7aa](https://github.com/payloadcms/payload/commit/af6a7aa9e850c0817ea40d755f51255ccf0938c2)) - +- adjusts styles to allow error bg to fill textarea ([2e57b76](https://github.com/payloadcms/payload/commit/2e57b76df01acf7ed1ce5fcb824ef5f96d11621d)) +- allows patching global drafts [#1415](https://github.com/payloadcms/payload/issues/1415) ([25822a9](https://github.com/payloadcms/payload/commit/25822a91b1e4f2bf4804f15947d211138d696219)) +- dynamically sets stepnav from default edit view ([40c8778](https://github.com/payloadcms/payload/commit/40c87784b0c6281c599b6d2a46a27b70b0568c30)) +- ensures drafts operations saves as draft [#1415](https://github.com/payloadcms/payload/issues/1415) ([fc16ffe](https://github.com/payloadcms/payload/commit/fc16ffefdb354ea023462d784cdac7ab6fcc26d3)) +- flattens locales before versioning published docs [#1415](https://github.com/payloadcms/payload/issues/1415) ([f700f51](https://github.com/payloadcms/payload/commit/f700f51f2bcdd657d1fab6b6d83ac00a11ed870d)) +- **i18n:** version count ([#1465](https://github.com/payloadcms/payload/issues/1465)) ([075b7e9](https://github.com/payloadcms/payload/commit/075b7e9f02498ea253cf270654dcce0f11ec1f93)) +- Increase textarea click area ([c303913](https://github.com/payloadcms/payload/commit/c303913e61881a3b0d90615dda905b20347d6f1e)) +- invalid query string user account request ([#1478](https://github.com/payloadcms/payload/issues/1478)) ([400cb9b](https://github.com/payloadcms/payload/commit/400cb9b6bcfd09c39cb6aa438daad876d12e8e13)) +- removes incorrectly import/export option type - [#1441](https://github.com/payloadcms/payload/issues/1441) ([ed01a17](https://github.com/payloadcms/payload/commit/ed01a176210a02a32874f4d0d1c5206d9a772e7e)) +- rendering of localized select value ([1d1d249](https://github.com/payloadcms/payload/commit/1d1d2493aa08db4c300c01e72ccb6c11e03f9e09)) +- sanitizes select values on the server, allowing isClearable selects to be cleared without error ([699ca14](https://github.com/payloadcms/payload/commit/699ca14434eeff3025cffd3f6e00efada80e021f)) +- translate version comparison view field labels ([#1470](https://github.com/payloadcms/payload/issues/1470)) ([8123585](https://github.com/payloadcms/payload/commit/8123585592b9a53ef746f17476b36a2661cca025)) +- versionCount was broken & other i18n improvements ([#1450](https://github.com/payloadcms/payload/issues/1450)) ([078c28b](https://github.com/payloadcms/payload/commit/078c28bd5fd08fd17a0b0b360e904f51fe8a2e98)) +- versions tests ([af6a7aa](https://github.com/payloadcms/payload/commit/af6a7aa9e850c0817ea40d755f51255ccf0938c2)) ### Features -* add i18n to option labels in version comparison ([#1477](https://github.com/payloadcms/payload/issues/1477)) ([7b6a9ed](https://github.com/payloadcms/payload/commit/7b6a9ede6e3a72e7e64358cb88946b16153d8dc6)) -* exports field types properly ([7c6d6fd](https://github.com/payloadcms/payload/commit/7c6d6fd1caeb25e1a871fa1b9cecc53be8a2a7a1)) +- add i18n to option labels in version comparison ([#1477](https://github.com/payloadcms/payload/issues/1477)) ([7b6a9ed](https://github.com/payloadcms/payload/commit/7b6a9ede6e3a72e7e64358cb88946b16153d8dc6)) +- exports field types properly ([7c6d6fd](https://github.com/payloadcms/payload/commit/7c6d6fd1caeb25e1a871fa1b9cecc53be8a2a7a1)) # [1.2.0](https://github.com/payloadcms/payload/compare/v1.1.26...v1.2.0) (2022-11-18) - ### 🐛 Bug Fixes -* build errors ([65f0e1c](https://github.com/payloadcms/payload/commit/65f0e1caace193f034139e331883d01d8eb92d2c)) -* components optional chaining ([d5e725c](https://github.com/payloadcms/payload/commit/d5e725c608588e96b974291fa86d5e89dea9060d)) -* corrects exported custom component type ([2878b4b](https://github.com/payloadcms/payload/commit/2878b4b1bec5c0c9997c1ba2a080640d4d3f8e5f)) -* corrects type for CollapsibleLabel example type, adjusts custom component filenames ([ccb4231](https://github.com/payloadcms/payload/commit/ccb42319abf0679d998e15b6b47fff3ce95d4ca1)) -* sets pointer-events to none so the entire label bar is clickable ([e458087](https://github.com/payloadcms/payload/commit/e458087a55cbbad29ca3568ca4c089aaee49693a)) - +- build errors ([65f0e1c](https://github.com/payloadcms/payload/commit/65f0e1caace193f034139e331883d01d8eb92d2c)) +- components optional chaining ([d5e725c](https://github.com/payloadcms/payload/commit/d5e725c608588e96b974291fa86d5e89dea9060d)) +- corrects exported custom component type ([2878b4b](https://github.com/payloadcms/payload/commit/2878b4b1bec5c0c9997c1ba2a080640d4d3f8e5f)) +- corrects type for CollapsibleLabel example type, adjusts custom component filenames ([ccb4231](https://github.com/payloadcms/payload/commit/ccb42319abf0679d998e15b6b47fff3ce95d4ca1)) +- sets pointer-events to none so the entire label bar is clickable ([e458087](https://github.com/payloadcms/payload/commit/e458087a55cbbad29ca3568ca4c089aaee49693a)) ### ✨ Features -* add i18n to admin panel ([#1326](https://github.com/payloadcms/payload/issues/1326)) ([bab34d8](https://github.com/payloadcms/payload/commit/bab34d82f5fddad32ceafd116ad97e87cab4c862)) -* adds docs example ([2bf0fff](https://github.com/payloadcms/payload/commit/2bf0fffa0dd83f395aa3318b3baba1e22dd58b51)) -* adds playwright tests for array fields ([57a8c35](https://github.com/payloadcms/payload/commit/57a8c352e44750d1785b65074c15812dc8226585)) -* converts rowHeader to collapsibleLabel, extends data passed to functions/components ([13ec1e0](https://github.com/payloadcms/payload/commit/13ec1e0398d2a9ce1aeddc5692008173acfde45e)) -* customizable header-labels ([d45de99](https://github.com/payloadcms/payload/commit/d45de99956273c59e6d1a3a11c7cce36f3d123f6)) -* simplifies collapsible label API, adds e2e tests ([d9df98f](https://github.com/payloadcms/payload/commit/d9df98ff22041908fc2ce0972c844116edd409be)) -* specifies component names for arrays/collapsibles, simplifies threaded data ([b74ea21](https://github.com/payloadcms/payload/commit/b74ea218ca47ce9db9d20586dbbce73e4ce0f917)) - +- add i18n to admin panel ([#1326](https://github.com/payloadcms/payload/issues/1326)) ([bab34d8](https://github.com/payloadcms/payload/commit/bab34d82f5fddad32ceafd116ad97e87cab4c862)) +- adds docs example ([2bf0fff](https://github.com/payloadcms/payload/commit/2bf0fffa0dd83f395aa3318b3baba1e22dd58b51)) +- adds playwright tests for array fields ([57a8c35](https://github.com/payloadcms/payload/commit/57a8c352e44750d1785b65074c15812dc8226585)) +- converts rowHeader to collapsibleLabel, extends data passed to functions/components ([13ec1e0](https://github.com/payloadcms/payload/commit/13ec1e0398d2a9ce1aeddc5692008173acfde45e)) +- customizable header-labels ([d45de99](https://github.com/payloadcms/payload/commit/d45de99956273c59e6d1a3a11c7cce36f3d123f6)) +- simplifies collapsible label API, adds e2e tests ([d9df98f](https://github.com/payloadcms/payload/commit/d9df98ff22041908fc2ce0972c844116edd409be)) +- specifies component names for arrays/collapsibles, simplifies threaded data ([b74ea21](https://github.com/payloadcms/payload/commit/b74ea218ca47ce9db9d20586dbbce73e4ce0f917)) ### 🚨 BREAKING CHANGES -* You ***might*** need to update your config. This change affects `collections`, `globals` and `block fields` with custom labeling. - * **Collections:** are affected if you have a custom `labels.singular` defined that differs from your collection slug. +- You **_might_** need to update your config. This change affects `collections`, `globals` and `block fields` with custom labeling. + + - **Collections:** are affected if you have a custom `labels.singular` defined that differs from your collection slug. + ```typescript // ExampleCollection.ts // Before const ExampleCollection: CollectionConfig = { - slug: 'case-studies', + slug: "case-studies", labels: { // Before Payload used `labels.singular` to generate types/graphQL schema - singular: 'Project', - plural: 'Projects', + singular: "Project", + plural: "Projects", }, - } + }; // After const ExampleCollection: CollectionConfig = { // Now Payload uses `slug` to generate types/graphQL schema - slug: 'case-studies', + slug: "case-studies", labels: { - singular: 'Project', - plural: 'Projects', + singular: "Project", + plural: "Projects", }, // To override the usage of slug in graphQL schema generation graphQL: { - singularName: 'Project', - pluralName: 'Projects', + singularName: "Project", + pluralName: "Projects", }, // To override the usage of slug in type file generation typescript: { - interface: 'Project', - } - } + interface: "Project", + }, + }; ``` - * **Globals:** are affected if you have a `label` defined that differs from your global slug. + + - **Globals:** are affected if you have a `label` defined that differs from your global slug. + ```typescript // ExampleGlobal.ts // Before const ExampleGlobal: GlobalConfig = { - slug: 'footer', + slug: "footer", // Before Payload used `label` to generate types/graphQL schema - label: 'Page Footer', - } + label: "Page Footer", + }; // After const ExampleGlobal: GlobalConfig = { // Now Payload uses `slug` to generate types/graphQL schema - slug: 'footer', - label: 'Page Footer', + slug: "footer", + label: "Page Footer", // To override the usage of slug in graphQL schema generation graphQL: { - name: 'PageFooter', + name: "PageFooter", }, // To override the usage of slug in type file generation typescript: { - interface: 'PageFooter', + interface: "PageFooter", }, - } + }; ``` - * **Block Fields:** are affected if you have a `label` defined that differs from your block slug. - ```typescript + + - **Block Fields:** are affected if you have a `label` defined that differs from your block slug. + + ````typescript // ExampleBlock.ts - // Before - const ExampleBlock: Block = { - slug: 'content', - // Before Payload used `label` to generate graphQL schema - label: 'Content Block', - } + // Before + const ExampleBlock: Block = { + slug: 'content', + // Before Payload used `label` to generate graphQL schema + label: 'Content Block', + } + + // After + const ExampleBlock: Block = { + // Now Payload uses `slug` to generate graphQL schema + slug: 'content', + label: 'Content Block', + // To override the usage of slug in graphQL schema generation + graphQL: { + singularName: 'ContentBlock', + }, + } + ``` + + **Breaking changes recap**: + ```` + +* On Collections - // After - const ExampleBlock: Block = { - // Now Payload uses `slug` to generate graphQL schema - slug: 'content', - label: 'Content Block', - // To override the usage of slug in graphQL schema generation - graphQL: { - singularName: 'ContentBlock', - }, - } - ``` -**Breaking changes recap**: -- On Collections - Use `graphQL.singularName`, `graphQL.pluralName` for GraphQL schema names. - Use `typescript.interface` for typescript generation name. -- On Globals +* On Globals + - Use `graphQL.name` for GraphQL Schema name. - Use `typescript.interface` for typescript generation name. -- On Blocks (within Block fields) +* On Blocks (within Block fields) - Use `graphQL.singularName` for graphQL schema names. ## [1.1.26](https://github.com/payloadcms/payload/compare/v1.1.25...v1.1.26) (2022-11-15) - ### Bug Fixes -* [#1414](https://github.com/payloadcms/payload/issues/1414) ([50bcf00](https://github.com/payloadcms/payload/commit/50bcf001ea613c65cfe0545e7257d5b13ca688f3)) +- [#1414](https://github.com/payloadcms/payload/issues/1414) ([50bcf00](https://github.com/payloadcms/payload/commit/50bcf001ea613c65cfe0545e7257d5b13ca688f3)) ## [1.1.25](https://github.com/payloadcms/payload/compare/v1.1.24...v1.1.25) (2022-11-15) - ### Bug Fixes -* add slug to DocumentInfo context ([#1389](https://github.com/payloadcms/payload/issues/1389)) ([4d8cc97](https://github.com/payloadcms/payload/commit/4d8cc97475c73e5131699ef03dca275a17535a25)) -* adds unique key to upload cards to prevent old images being shown while navigating to new page ([5e8a8b2](https://github.com/payloadcms/payload/commit/5e8a8b2df9af435f0df8a8a07dddf7dcc24cf9ac)) -* ensures admin components is defaulted ([d103f6c](https://github.com/payloadcms/payload/commit/d103f6c94f91b5359aea722c2d7781bf144f6a26)) -* global afterRead and afterChange execution ([#1405](https://github.com/payloadcms/payload/issues/1405)) ([cdaa8cc](https://github.com/payloadcms/payload/commit/cdaa8cc29f58308a387375ec41eafd0d38b13bcb)) - +- add slug to DocumentInfo context ([#1389](https://github.com/payloadcms/payload/issues/1389)) ([4d8cc97](https://github.com/payloadcms/payload/commit/4d8cc97475c73e5131699ef03dca275a17535a25)) +- adds unique key to upload cards to prevent old images being shown while navigating to new page ([5e8a8b2](https://github.com/payloadcms/payload/commit/5e8a8b2df9af435f0df8a8a07dddf7dcc24cf9ac)) +- ensures admin components is defaulted ([d103f6c](https://github.com/payloadcms/payload/commit/d103f6c94f91b5359aea722c2d7781bf144f6a26)) +- global afterRead and afterChange execution ([#1405](https://github.com/payloadcms/payload/issues/1405)) ([cdaa8cc](https://github.com/payloadcms/payload/commit/cdaa8cc29f58308a387375ec41eafd0d38b13bcb)) ### Features -* admin UI logout extensibility ([#1274](https://github.com/payloadcms/payload/issues/1274)) ([a345ef0](https://github.com/payloadcms/payload/commit/a345ef0d3179000a2930f8b09886e06fd0801d21)) -* let textarea grow based on value ([#1398](https://github.com/payloadcms/payload/issues/1398)) ([0f27b10](https://github.com/payloadcms/payload/commit/0f27b103b44935480b8ffe17427fc5ed05b92446)) -* saves tab index to user preferences ([5eb8e4a](https://github.com/payloadcms/payload/commit/5eb8e4a28f34a1c51790d4eabfb21606b7fb41c6)) +- admin UI logout extensibility ([#1274](https://github.com/payloadcms/payload/issues/1274)) ([a345ef0](https://github.com/payloadcms/payload/commit/a345ef0d3179000a2930f8b09886e06fd0801d21)) +- let textarea grow based on value ([#1398](https://github.com/payloadcms/payload/issues/1398)) ([0f27b10](https://github.com/payloadcms/payload/commit/0f27b103b44935480b8ffe17427fc5ed05b92446)) +- saves tab index to user preferences ([5eb8e4a](https://github.com/payloadcms/payload/commit/5eb8e4a28f34a1c51790d4eabfb21606b7fb41c6)) ## [1.1.24](https://github.com/payloadcms/payload/compare/v1.1.23...v1.1.24) (2022-11-14) - ### Bug Fixes -* cursor jumping while typing in inputs ([216b9f8](https://github.com/payloadcms/payload/commit/216b9f88d988c692d6acdf920ee4dbb9903020ae)), closes [#1393](https://github.com/payloadcms/payload/issues/1393) +- cursor jumping while typing in inputs ([216b9f8](https://github.com/payloadcms/payload/commit/216b9f88d988c692d6acdf920ee4dbb9903020ae)), closes [#1393](https://github.com/payloadcms/payload/issues/1393) ## [1.1.23](https://github.com/payloadcms/payload/compare/v1.1.22...v1.1.23) (2022-11-12) - ### Bug Fixes -* [#1361](https://github.com/payloadcms/payload/issues/1361), ensures collection auth depth works while retrieving static assets ([2f68404](https://github.com/payloadcms/payload/commit/2f684040fc9ca717d48b0d95cbd3468c35973993)) - +- [#1361](https://github.com/payloadcms/payload/issues/1361), ensures collection auth depth works while retrieving static assets ([2f68404](https://github.com/payloadcms/payload/commit/2f684040fc9ca717d48b0d95cbd3468c35973993)) ### Features -* optimizes field performance by storing internal values in useField hook ([66210b8](https://github.com/payloadcms/payload/commit/66210b856b97139f9959fac47154bca44f0a4de0)) +- optimizes field performance by storing internal values in useField hook ([66210b8](https://github.com/payloadcms/payload/commit/66210b856b97139f9959fac47154bca44f0a4de0)) ## [1.1.22](https://github.com/payloadcms/payload/compare/v1.1.21...v1.1.22) (2022-11-12) - ### Bug Fixes -* [#1353](https://github.com/payloadcms/payload/issues/1353), ensures errors returned from server make their way to UI ([3f28a69](https://github.com/payloadcms/payload/commit/3f28a69959be9c98869f81bcd379b8c7cd505a12)) -* [#1357](https://github.com/payloadcms/payload/issues/1357), nested arrays and blocks sometimes not allowing save ([86855d6](https://github.com/payloadcms/payload/commit/86855d68f65dfadbf51050bdaf6a28c3220add6f)) -* [#1358](https://github.com/payloadcms/payload/issues/1358), allows listSearchableFields to work when indicated fields are nested ([eb0023e](https://github.com/payloadcms/payload/commit/eb0023e9617894873fe75748de187d85279498c8)) -* [#1360](https://github.com/payloadcms/payload/issues/1360), relationship field onMenuScrollToBottom not working in some browsers ([7136db4](https://github.com/payloadcms/payload/commit/7136db4c718b70833fa75f5c8e9ae596298b3aa9)) -* [#1367](https://github.com/payloadcms/payload/issues/1367), allows custom global components within schema validation ([1d76e97](https://github.com/payloadcms/payload/commit/1d76e973bb8e6e33e40b469bd410042ae4b90e2e)) -* 1309, duplicative logout in admin UI ([35f91b0](https://github.com/payloadcms/payload/commit/35f91b038b66d74468dad250dbe7cbf1ea88b444)) -* fixed GraphQL Access query resolver to return the correct data ([#1339](https://github.com/payloadcms/payload/issues/1339)) ([cfef68f](https://github.com/payloadcms/payload/commit/cfef68f36477e34b9943d9334c65fa46ee3eb339)) +- [#1353](https://github.com/payloadcms/payload/issues/1353), ensures errors returned from server make their way to UI ([3f28a69](https://github.com/payloadcms/payload/commit/3f28a69959be9c98869f81bcd379b8c7cd505a12)) +- [#1357](https://github.com/payloadcms/payload/issues/1357), nested arrays and blocks sometimes not allowing save ([86855d6](https://github.com/payloadcms/payload/commit/86855d68f65dfadbf51050bdaf6a28c3220add6f)) +- [#1358](https://github.com/payloadcms/payload/issues/1358), allows listSearchableFields to work when indicated fields are nested ([eb0023e](https://github.com/payloadcms/payload/commit/eb0023e9617894873fe75748de187d85279498c8)) +- [#1360](https://github.com/payloadcms/payload/issues/1360), relationship field onMenuScrollToBottom not working in some browsers ([7136db4](https://github.com/payloadcms/payload/commit/7136db4c718b70833fa75f5c8e9ae596298b3aa9)) +- [#1367](https://github.com/payloadcms/payload/issues/1367), allows custom global components within schema validation ([1d76e97](https://github.com/payloadcms/payload/commit/1d76e973bb8e6e33e40b469bd410042ae4b90e2e)) +- 1309, duplicative logout in admin UI ([35f91b0](https://github.com/payloadcms/payload/commit/35f91b038b66d74468dad250dbe7cbf1ea88b444)) +- fixed GraphQL Access query resolver to return the correct data ([#1339](https://github.com/payloadcms/payload/issues/1339)) ([cfef68f](https://github.com/payloadcms/payload/commit/cfef68f36477e34b9943d9334c65fa46ee3eb339)) ## [1.1.21](https://github.com/payloadcms/payload/compare/v1.1.20...v1.1.21) (2022-11-05) ## [1.1.20](https://github.com/payloadcms/payload/compare/v1.1.19...v1.1.20) (2022-11-05) - ### Features -* optimizes blocks and arrays by removing some additional rerenders ([483adf0](https://github.com/payloadcms/payload/commit/483adf08c4131d0401e47ec45d72200b9dc60de2)) +- optimizes blocks and arrays by removing some additional rerenders ([483adf0](https://github.com/payloadcms/payload/commit/483adf08c4131d0401e47ec45d72200b9dc60de2)) ## [1.1.19](https://github.com/payloadcms/payload/compare/v1.1.18...v1.1.19) (2022-10-31) - ### Bug Fixes -* [#1307](https://github.com/payloadcms/payload/issues/1307), [#1321](https://github.com/payloadcms/payload/issues/1321) - bug with disableFormData and blocks field ([2a09f15](https://github.com/payloadcms/payload/commit/2a09f15a158ff30e89c5454f81aa140448f15d30)) -* [#1311](https://github.com/payloadcms/payload/issues/1311), select existing upload modal always updates state ([e2ec2f7](https://github.com/payloadcms/payload/commit/e2ec2f7b97ed308c4ff7deefbc58cf0df6ff0602)) -* [#1318](https://github.com/payloadcms/payload/issues/1318), improves popup positioning and logic ([c651835](https://github.com/payloadcms/payload/commit/c6518350617d14818dfc537b5b0a147274c1119b)) -* custom pino logger options ([#1299](https://github.com/payloadcms/payload/issues/1299)) ([2500026](https://github.com/payloadcms/payload/commit/25000261bd6ecb0f05ae79de9a0693078a0e3e0d)) +- [#1307](https://github.com/payloadcms/payload/issues/1307), [#1321](https://github.com/payloadcms/payload/issues/1321) - bug with disableFormData and blocks field ([2a09f15](https://github.com/payloadcms/payload/commit/2a09f15a158ff30e89c5454f81aa140448f15d30)) +- [#1311](https://github.com/payloadcms/payload/issues/1311), select existing upload modal always updates state ([e2ec2f7](https://github.com/payloadcms/payload/commit/e2ec2f7b97ed308c4ff7deefbc58cf0df6ff0602)) +- [#1318](https://github.com/payloadcms/payload/issues/1318), improves popup positioning and logic ([c651835](https://github.com/payloadcms/payload/commit/c6518350617d14818dfc537b5b0a147274c1119b)) +- custom pino logger options ([#1299](https://github.com/payloadcms/payload/issues/1299)) ([2500026](https://github.com/payloadcms/payload/commit/25000261bd6ecb0f05ae79de9a0693078a0e3e0d)) ## [1.1.18](https://github.com/payloadcms/payload/compare/v1.1.17...v1.1.18) (2022-10-25) ## [1.1.17](https://github.com/payloadcms/payload/compare/v1.1.16...v1.1.17) (2022-10-25) - ### Bug Fixes -* [#1286](https://github.com/payloadcms/payload/issues/1286), uses defaultDepth in graphql rich text depth ([66bf8c3](https://github.com/payloadcms/payload/commit/66bf8c3cbd080ee5a28b7af521d427d3aae59ba2)) -* [#1290](https://github.com/payloadcms/payload/issues/1290), renders more than one rich text leaf where applicable ([a9f2f0e](https://github.com/payloadcms/payload/commit/a9f2f0ec03383ef4c3ef3ba98274b0abaaf962ed)) -* [#1291](https://github.com/payloadcms/payload/issues/1291), add inline relationship drafts ([3967c12](https://github.com/payloadcms/payload/commit/3967c1233fda00b48e9df15276502a6b14b737ff)) -* enforces depth: 0 in graphql resolvers ([3301f59](https://github.com/payloadcms/payload/commit/3301f598223d517ac310909bb74e455891c27693)) -* ensures field updates when disableFormData changes ([c929725](https://github.com/payloadcms/payload/commit/c929725dd565de08871dad655442ee9ac4f29dd5)) -* group + group styles within collapsible ([17dbbc7](https://github.com/payloadcms/payload/commit/17dbbc77757a7cd6e517bac443859561fee86e32)) - +- [#1286](https://github.com/payloadcms/payload/issues/1286), uses defaultDepth in graphql rich text depth ([66bf8c3](https://github.com/payloadcms/payload/commit/66bf8c3cbd080ee5a28b7af521d427d3aae59ba2)) +- [#1290](https://github.com/payloadcms/payload/issues/1290), renders more than one rich text leaf where applicable ([a9f2f0e](https://github.com/payloadcms/payload/commit/a9f2f0ec03383ef4c3ef3ba98274b0abaaf962ed)) +- [#1291](https://github.com/payloadcms/payload/issues/1291), add inline relationship drafts ([3967c12](https://github.com/payloadcms/payload/commit/3967c1233fda00b48e9df15276502a6b14b737ff)) +- enforces depth: 0 in graphql resolvers ([3301f59](https://github.com/payloadcms/payload/commit/3301f598223d517ac310909bb74e455891c27693)) +- ensures field updates when disableFormData changes ([c929725](https://github.com/payloadcms/payload/commit/c929725dd565de08871dad655442ee9ac4f29dd5)) +- group + group styles within collapsible ([17dbbc7](https://github.com/payloadcms/payload/commit/17dbbc77757a7cd6e517bac443859561fee86e32)) ### Features -* added beforeLogin hook ([#1289](https://github.com/payloadcms/payload/issues/1289)) ([09d7939](https://github.com/payloadcms/payload/commit/09d793926dbb642bbcb6ab975735d069df355a8a)) -* adds default max length for text-based fields ([6a1b25a](https://github.com/payloadcms/payload/commit/6a1b25ab302cbdf7f312012b29b78288815810af)) -* specify node 14+ and yarn classic LTS ([#1240](https://github.com/payloadcms/payload/issues/1240)) ([9181477](https://github.com/payloadcms/payload/commit/91814777b0bf3830c4a468b76783ff6f42ad824a)) +- added beforeLogin hook ([#1289](https://github.com/payloadcms/payload/issues/1289)) ([09d7939](https://github.com/payloadcms/payload/commit/09d793926dbb642bbcb6ab975735d069df355a8a)) +- adds default max length for text-based fields ([6a1b25a](https://github.com/payloadcms/payload/commit/6a1b25ab302cbdf7f312012b29b78288815810af)) +- specify node 14+ and yarn classic LTS ([#1240](https://github.com/payloadcms/payload/issues/1240)) ([9181477](https://github.com/payloadcms/payload/commit/91814777b0bf3830c4a468b76783ff6f42ad824a)) ## [1.1.16](https://github.com/payloadcms/payload/compare/v1.1.15...v1.1.16) (2022-10-21) - ### Bug Fixes -* indexSortableFields not respected ([785b992](https://github.com/payloadcms/payload/commit/785b992c3ea31f7818f1c87c816b8b8de644851d)) -* obscure bug where upload collection has upload field relating to itself ([36ef378](https://github.com/payloadcms/payload/commit/36ef3789fbe00cafe8b3587d6c370e28efd5a187)) +- indexSortableFields not respected ([785b992](https://github.com/payloadcms/payload/commit/785b992c3ea31f7818f1c87c816b8b8de644851d)) +- obscure bug where upload collection has upload field relating to itself ([36ef378](https://github.com/payloadcms/payload/commit/36ef3789fbe00cafe8b3587d6c370e28efd5a187)) ## [1.1.15](https://github.com/payloadcms/payload/compare/v1.1.14...v1.1.15) (2022-10-14) - ### Bug Fixes -* ensures svg mime type is always image/svg+xml ([0b0d971](https://github.com/payloadcms/payload/commit/0b0d9714917b1a56fb899a053e2e35c878a00992)) +- ensures svg mime type is always image/svg+xml ([0b0d971](https://github.com/payloadcms/payload/commit/0b0d9714917b1a56fb899a053e2e35c878a00992)) ## [1.1.14](https://github.com/payloadcms/payload/compare/v1.1.13...v1.1.14) (2022-10-14) ## [1.1.11](https://github.com/payloadcms/payload/compare/v1.1.10...v1.1.11) (2022-10-12) - ### Bug Fixes -* ensures arrays and blocks mount as disableFormData: true, fixes [#1242](https://github.com/payloadcms/payload/issues/1242) ([5ca5aba](https://github.com/payloadcms/payload/commit/5ca5abab422ad1cdb1b449a8298f439c57dda464)) - +- ensures arrays and blocks mount as disableFormData: true, fixes [#1242](https://github.com/payloadcms/payload/issues/1242) ([5ca5aba](https://github.com/payloadcms/payload/commit/5ca5abab422ad1cdb1b449a8298f439c57dda464)) ### Features -* builds beforeDuplicate admin hook, closes [#1243](https://github.com/payloadcms/payload/issues/1243) ([6f6f2f8](https://github.com/payloadcms/payload/commit/6f6f2f8e7b83821ae2f2d30d08460439746cc0c6)) +- builds beforeDuplicate admin hook, closes [#1243](https://github.com/payloadcms/payload/issues/1243) ([6f6f2f8](https://github.com/payloadcms/payload/commit/6f6f2f8e7b83821ae2f2d30d08460439746cc0c6)) ## [1.1.10](https://github.com/payloadcms/payload/compare/v1.1.9...v1.1.10) (2022-10-11) ## [1.1.9](https://github.com/payloadcms/payload/compare/v1.1.8...v1.1.9) (2022-10-11) - ### Features -* improves access control typing ([5322ada](https://github.com/payloadcms/payload/commit/5322ada9e690544c4864abba202a14ec1f2f5e9d)) +- improves access control typing ([5322ada](https://github.com/payloadcms/payload/commit/5322ada9e690544c4864abba202a14ec1f2f5e9d)) ## [1.1.8](https://github.com/payloadcms/payload/compare/v1.1.7...v1.1.8) (2022-10-11) - ### Features -* adds ability to create related docs while editing another ([1e048fe](https://github.com/payloadcms/payload/commit/1e048fe03787577fe4d584cec9c2d7c78bc90a17)) -* implements use-context-selector for form field access ([5c1a3fa](https://github.com/payloadcms/payload/commit/5c1a3fabeef48b78f173af084f9117515e1297ba)) +- adds ability to create related docs while editing another ([1e048fe](https://github.com/payloadcms/payload/commit/1e048fe03787577fe4d584cec9c2d7c78bc90a17)) +- implements use-context-selector for form field access ([5c1a3fa](https://github.com/payloadcms/payload/commit/5c1a3fabeef48b78f173af084f9117515e1297ba)) ## [1.1.7](https://github.com/payloadcms/payload/compare/v1.1.6...v1.1.7) (2022-10-06) ## [1.1.6](https://github.com/payloadcms/payload/compare/v1.1.5...v1.1.6) (2022-10-06) - ### Bug Fixes -* [#1184](https://github.com/payloadcms/payload/issues/1184) ([c2ec54a](https://github.com/payloadcms/payload/commit/c2ec54a7cbd8cd94bcd4a68d885e35986fec7f18)) -* [#1189](https://github.com/payloadcms/payload/issues/1189) ([3641dfd](https://github.com/payloadcms/payload/commit/3641dfd38a147b24e0e3ef93a125b12ad7763f66)) -* [#1204](https://github.com/payloadcms/payload/issues/1204) ([b4becd1](https://github.com/payloadcms/payload/commit/b4becd1493d55aae887008ab573ab710c400103a)) -* [#940](https://github.com/payloadcms/payload/issues/940) ([7926083](https://github.com/payloadcms/payload/commit/7926083732fbaec78d87f67742cdbd8bd00cd48a)) -* ajusts how disabled states are being set on anchors and buttons ([00ef170](https://github.com/payloadcms/payload/commit/00ef1700ae41e68ff0831a587bf3f09fe6c2c966)) -* remove min-width from fileupload ([73848b6](https://github.com/payloadcms/payload/commit/73848b603790b3c3d8ad8c9dac81b33c0b65fc7e)) -* resize textarea only vertically ([6e1dfff](https://github.com/payloadcms/payload/commit/6e1dfff1b8195a1f81e6ea6ccf3b36dd5359c039)) -* richText e2e test, specific selectors ([09a8144](https://github.com/payloadcms/payload/commit/09a8144f3cc63f7ec15fd75f51b8ac8d0cf3f1b5)) -* styles readOnly RichTextEditor, removes interactivity within when readOnly ([9181304](https://github.com/payloadcms/payload/commit/918130486e1e38a3d57fb993f466207209c5c0bb)) -* **style:** system dark scrollbars ([a30d9dc](https://github.com/payloadcms/payload/commit/a30d9dc1d70340cc6c5ac5b3415a6f57bec117ae)) -* threads readOnly to ReactSelect ([b454811](https://github.com/payloadcms/payload/commit/b454811698c7ea0cee944ed50030c13163cf72c9)) -* upload xls renaming ext ([7fd8124](https://github.com/payloadcms/payload/commit/7fd8124df68d208813de46172c5cd3f479b9b8be)) - +- [#1184](https://github.com/payloadcms/payload/issues/1184) ([c2ec54a](https://github.com/payloadcms/payload/commit/c2ec54a7cbd8cd94bcd4a68d885e35986fec7f18)) +- [#1189](https://github.com/payloadcms/payload/issues/1189) ([3641dfd](https://github.com/payloadcms/payload/commit/3641dfd38a147b24e0e3ef93a125b12ad7763f66)) +- [#1204](https://github.com/payloadcms/payload/issues/1204) ([b4becd1](https://github.com/payloadcms/payload/commit/b4becd1493d55aae887008ab573ab710c400103a)) +- [#940](https://github.com/payloadcms/payload/issues/940) ([7926083](https://github.com/payloadcms/payload/commit/7926083732fbaec78d87f67742cdbd8bd00cd48a)) +- ajusts how disabled states are being set on anchors and buttons ([00ef170](https://github.com/payloadcms/payload/commit/00ef1700ae41e68ff0831a587bf3f09fe6c2c966)) +- remove min-width from fileupload ([73848b6](https://github.com/payloadcms/payload/commit/73848b603790b3c3d8ad8c9dac81b33c0b65fc7e)) +- resize textarea only vertically ([6e1dfff](https://github.com/payloadcms/payload/commit/6e1dfff1b8195a1f81e6ea6ccf3b36dd5359c039)) +- richText e2e test, specific selectors ([09a8144](https://github.com/payloadcms/payload/commit/09a8144f3cc63f7ec15fd75f51b8ac8d0cf3f1b5)) +- styles readOnly RichTextEditor, removes interactivity within when readOnly ([9181304](https://github.com/payloadcms/payload/commit/918130486e1e38a3d57fb993f466207209c5c0bb)) +- **style:** system dark scrollbars ([a30d9dc](https://github.com/payloadcms/payload/commit/a30d9dc1d70340cc6c5ac5b3415a6f57bec117ae)) +- threads readOnly to ReactSelect ([b454811](https://github.com/payloadcms/payload/commit/b454811698c7ea0cee944ed50030c13163cf72c9)) +- upload xls renaming ext ([7fd8124](https://github.com/payloadcms/payload/commit/7fd8124df68d208813de46172c5cd3f479b9b8be)) ### Features -* async admin access control ([1cfce87](https://github.com/payloadcms/payload/commit/1cfce8754947487e6c598ed5bc881526295acabf)) -* sort select and relationship fields by default ([813c46c](https://github.com/payloadcms/payload/commit/813c46c86d86f8b0a3ba7280d31f24e844c916b6)) +- async admin access control ([1cfce87](https://github.com/payloadcms/payload/commit/1cfce8754947487e6c598ed5bc881526295acabf)) +- sort select and relationship fields by default ([813c46c](https://github.com/payloadcms/payload/commit/813c46c86d86f8b0a3ba7280d31f24e844c916b6)) ## [1.1.5](https://github.com/payloadcms/payload/compare/v1.1.4...v1.1.5) (2022-09-29) - ### Bug Fixes -* bug in useThrottledEffect ([3ce8ee4](https://github.com/payloadcms/payload/commit/3ce8ee4661bfa3825c5b8c41232d5da57f7591ed)) +- bug in useThrottledEffect ([3ce8ee4](https://github.com/payloadcms/payload/commit/3ce8ee4661bfa3825c5b8c41232d5da57f7591ed)) ## [1.1.4](https://github.com/payloadcms/payload/compare/v1.1.3...v1.1.4) (2022-09-24) - ### Bug Fixes -* field level access for nested fields ([22ea98c](https://github.com/payloadcms/payload/commit/22ea98ca33770a0ec6652f814726454abb6da24e)) -* refine type generation for relationships ([ef83bdb](https://github.com/payloadcms/payload/commit/ef83bdb709ebde008b90930a6875b24f042a41b0)) - +- field level access for nested fields ([22ea98c](https://github.com/payloadcms/payload/commit/22ea98ca33770a0ec6652f814726454abb6da24e)) +- refine type generation for relationships ([ef83bdb](https://github.com/payloadcms/payload/commit/ef83bdb709ebde008b90930a6875b24f042a41b0)) ### Features -* supports root endpoints ([52cd3b4](https://github.com/payloadcms/payload/commit/52cd3b4a7ed9bc85e93d753a3aaf190489ca98cd)) +- supports root endpoints ([52cd3b4](https://github.com/payloadcms/payload/commit/52cd3b4a7ed9bc85e93d753a3aaf190489ca98cd)) ## [1.1.3](https://github.com/payloadcms/payload/compare/v1.1.2...v1.1.3) (2022-09-16) - ### Bug Fixes -* adjust prevPage and nextPage graphql typing ([#1140](https://github.com/payloadcms/payload/issues/1140)) ([b3bb421](https://github.com/payloadcms/payload/commit/b3bb421c6ca4176974488b3270384386a151560c)) -* duplicate with relationships ([eabb981](https://github.com/payloadcms/payload/commit/eabb981243e005facb5fff6d9222903d4704ca55)) +- adjust prevPage and nextPage graphql typing ([#1140](https://github.com/payloadcms/payload/issues/1140)) ([b3bb421](https://github.com/payloadcms/payload/commit/b3bb421c6ca4176974488b3270384386a151560c)) +- duplicate with relationships ([eabb981](https://github.com/payloadcms/payload/commit/eabb981243e005facb5fff6d9222903d4704ca55)) ## [1.1.2](https://github.com/payloadcms/payload/compare/v1.1.1...v1.1.2) (2022-09-14) - ### Bug Fixes -* resize images without local storage ([1496679](https://github.com/payloadcms/payload/commit/14966796ae0d0bcff8cb56b62e3a21c2de2176da)) -* resize images without local storage ([7b756f3](https://github.com/payloadcms/payload/commit/7b756f3421f02d1ff55374a72396e15e9f3e23d7)) +- resize images without local storage ([1496679](https://github.com/payloadcms/payload/commit/14966796ae0d0bcff8cb56b62e3a21c2de2176da)) +- resize images without local storage ([7b756f3](https://github.com/payloadcms/payload/commit/7b756f3421f02d1ff55374a72396e15e9f3e23d7)) ## [1.1.1](https://github.com/payloadcms/payload/compare/v1.1.0...v1.1.1) (2022-09-13) - ### Bug Fixes -* conditions on collapsible fields ([9c4f2b6](https://github.com/payloadcms/payload/commit/9c4f2b68b07bbdd2ac9a6dee280f50379638fc50)) -* dashboard links to globals ([dcc8dad](https://github.com/payloadcms/payload/commit/dcc8dad53b006f86e93150f9439eafc8d9e01d79)) +- conditions on collapsible fields ([9c4f2b6](https://github.com/payloadcms/payload/commit/9c4f2b68b07bbdd2ac9a6dee280f50379638fc50)) +- dashboard links to globals ([dcc8dad](https://github.com/payloadcms/payload/commit/dcc8dad53b006f86e93150f9439eafc8d9e01d79)) # [1.1.0](https://github.com/payloadcms/payload/compare/v1.0.36...v1.1.0) (2022-09-13) - ### Bug Fixes -* [#1106](https://github.com/payloadcms/payload/issues/1106) ([9a461b8](https://github.com/payloadcms/payload/commit/9a461b853689fdbc8229c8e103c5e237e451425f)) -* word boundaries, no regex lookbehind support for Safari ([#1114](https://github.com/payloadcms/payload/issues/1114)) ([391c9d8](https://github.com/payloadcms/payload/commit/391c9d8682175ea37f1f7b2bb9d1361dc4ac8140)) - +- [#1106](https://github.com/payloadcms/payload/issues/1106) ([9a461b8](https://github.com/payloadcms/payload/commit/9a461b853689fdbc8229c8e103c5e237e451425f)) +- word boundaries, no regex lookbehind support for Safari ([#1114](https://github.com/payloadcms/payload/issues/1114)) ([391c9d8](https://github.com/payloadcms/payload/commit/391c9d8682175ea37f1f7b2bb9d1361dc4ac8140)) ### Features -* [#1001](https://github.com/payloadcms/payload/issues/1001) - builds a way to allow list view to search multiple fields ([a108372](https://github.com/payloadcms/payload/commit/a1083727ef54ec15ea2c3b4dfd114567639dfef1)) -* collection groups ([dffeaf6](https://github.com/payloadcms/payload/commit/dffeaf6a69746b944bf36bd172da3cc19fa025a0)) -* globals groups ([59af872](https://github.com/payloadcms/payload/commit/59af8725b4625f8e08aaab730fce177e870279ca)) -* hide nav labels with no un-grouped collections ([c40e232](https://github.com/payloadcms/payload/commit/c40e232ac67e7bc1ced3775060beb835efff46b9)) -* implement gravatar ([#1107](https://github.com/payloadcms/payload/issues/1107)) ([ca434b8](https://github.com/payloadcms/payload/commit/ca434b8a929af081bb3b92b51f35058a23ce5e37)) -* support localized tab fields ([a83921a](https://github.com/payloadcms/payload/commit/a83921a2fe927d59562272cb111c68a840b1914f)) -* tabs support localization at the tab level ([6a6a691](https://github.com/payloadcms/payload/commit/6a6a69190fe13bebf3e0b089265d71be2a691488)) -* WIP tab compatible with traverseFields ([2ae33b6](https://github.com/payloadcms/payload/commit/2ae33b603abaec4ff80261a465781f508b4a1e06)) +- [#1001](https://github.com/payloadcms/payload/issues/1001) - builds a way to allow list view to search multiple fields ([a108372](https://github.com/payloadcms/payload/commit/a1083727ef54ec15ea2c3b4dfd114567639dfef1)) +- collection groups ([dffeaf6](https://github.com/payloadcms/payload/commit/dffeaf6a69746b944bf36bd172da3cc19fa025a0)) +- globals groups ([59af872](https://github.com/payloadcms/payload/commit/59af8725b4625f8e08aaab730fce177e870279ca)) +- hide nav labels with no un-grouped collections ([c40e232](https://github.com/payloadcms/payload/commit/c40e232ac67e7bc1ced3775060beb835efff46b9)) +- implement gravatar ([#1107](https://github.com/payloadcms/payload/issues/1107)) ([ca434b8](https://github.com/payloadcms/payload/commit/ca434b8a929af081bb3b92b51f35058a23ce5e37)) +- support localized tab fields ([a83921a](https://github.com/payloadcms/payload/commit/a83921a2fe927d59562272cb111c68a840b1914f)) +- tabs support localization at the tab level ([6a6a691](https://github.com/payloadcms/payload/commit/6a6a69190fe13bebf3e0b089265d71be2a691488)) +- WIP tab compatible with traverseFields ([2ae33b6](https://github.com/payloadcms/payload/commit/2ae33b603abaec4ff80261a465781f508b4a1e06)) ## [1.0.36](https://github.com/payloadcms/payload/compare/v1.0.35...v1.0.36) (2022-09-10) - ### Bug Fixes -* bug with account view ([ada1871](https://github.com/payloadcms/payload/commit/ada1871993bae92bc7a30f48029b437d63eb3871)) +- bug with account view ([ada1871](https://github.com/payloadcms/payload/commit/ada1871993bae92bc7a30f48029b437d63eb3871)) ## [1.0.35](https://github.com/payloadcms/payload/compare/v1.0.34...v1.0.35) (2022-09-10) - ### Bug Fixes -* [#1059](https://github.com/payloadcms/payload/issues/1059) ([13dc39d](https://github.com/payloadcms/payload/commit/13dc39dc6da4cb7c450477f539b09a3cb54ed5af)) -* add height/width if imageSizes not specified ([8bd2a0e](https://github.com/payloadcms/payload/commit/8bd2a0e6c9a9cd05c7b162ade47f3bb111236ba3)) -* incorrect auth strategy type ([c8b37f4](https://github.com/payloadcms/payload/commit/c8b37f40cbdc766a45dbe21573b1848bfc091901)) -* rich text link with no selection ([5a19f69](https://github.com/payloadcms/payload/commit/5a19f6915a17dbb072b89f63f32705d5f0fc75ce)) - +- [#1059](https://github.com/payloadcms/payload/issues/1059) ([13dc39d](https://github.com/payloadcms/payload/commit/13dc39dc6da4cb7c450477f539b09a3cb54ed5af)) +- add height/width if imageSizes not specified ([8bd2a0e](https://github.com/payloadcms/payload/commit/8bd2a0e6c9a9cd05c7b162ade47f3bb111236ba3)) +- incorrect auth strategy type ([c8b37f4](https://github.com/payloadcms/payload/commit/c8b37f40cbdc766a45dbe21573b1848bfc091901)) +- rich text link with no selection ([5a19f69](https://github.com/payloadcms/payload/commit/5a19f6915a17dbb072b89f63f32705d5f0fc75ce)) ### Features -* allows rich text links to link to other docs ([a99d9c9](https://github.com/payloadcms/payload/commit/a99d9c98c3f92d6fbeb65c384ca4d43b82184bfd)) -* improves rich text link ux ([91000d7](https://github.com/payloadcms/payload/commit/91000d7fdaa9628650c737fc3f7f6a900b7447d4)) +- allows rich text links to link to other docs ([a99d9c9](https://github.com/payloadcms/payload/commit/a99d9c98c3f92d6fbeb65c384ca4d43b82184bfd)) +- improves rich text link ux ([91000d7](https://github.com/payloadcms/payload/commit/91000d7fdaa9628650c737fc3f7f6a900b7447d4)) ## [1.0.34](https://github.com/payloadcms/payload/compare/v1.0.33...v1.0.34) (2022-09-07) - ### Bug Fixes -* pins faceless ui modal ([b38b642](https://github.com/payloadcms/payload/commit/b38b6427b8b813487922db0bb7d3762cc41d3447)) +- pins faceless ui modal ([b38b642](https://github.com/payloadcms/payload/commit/b38b6427b8b813487922db0bb7d3762cc41d3447)) ## [1.0.33](https://github.com/payloadcms/payload/compare/v1.0.30...v1.0.33) (2022-09-07) - ### Bug Fixes -* [#1062](https://github.com/payloadcms/payload/issues/1062) ([05d1b14](https://github.com/payloadcms/payload/commit/05d1b141b22f66cb9007f20f2ae9d8e31db4f32f)) -* [#948](https://github.com/payloadcms/payload/issues/948) ([8df9ee7](https://github.com/payloadcms/payload/commit/8df9ee7b2dfcb2f77f049d02788a5c60c45f8c12)) -* [#981](https://github.com/payloadcms/payload/issues/981) ([d588843](https://github.com/payloadcms/payload/commit/d58884312132e109ae3f6619be2e0d7bab3f3111)) -* accented label char sanitization for GraphQL ([#1080](https://github.com/payloadcms/payload/issues/1080)) ([888734d](https://github.com/payloadcms/payload/commit/888734dcdf775f416395f8830561c47235bb9019)) -* children of conditional fields required in graphql schema ([#1055](https://github.com/payloadcms/payload/issues/1055)) ([29e82ec](https://github.com/payloadcms/payload/commit/29e82ec845f69bf5a09b682739e88529ebc53c16)) -* ensures adding new media to upload works when existing doc does not exist ([5ae666b](https://github.com/payloadcms/payload/commit/5ae666b0e08b128bdf2d576428e8638c2b8c2ed8)) -* implement the same word boundary search as the like query ([#1038](https://github.com/payloadcms/payload/issues/1038)) ([c3a0bd8](https://github.com/payloadcms/payload/commit/c3a0bd86254dfc3f49e46d4e41bdf717424ea342)) -* reorder plugin wrapping ([#1051](https://github.com/payloadcms/payload/issues/1051)) ([cd8edba](https://github.com/payloadcms/payload/commit/cd8edbaa1faa5a94166396918089a01058a4e75e)) -* require min 1 option in field schema validation ([#1082](https://github.com/payloadcms/payload/issues/1082)) ([d56882c](https://github.com/payloadcms/payload/commit/d56882cc20764b793049f20a91864c943e711375)) -* update removing a relationship with null ([#1056](https://github.com/payloadcms/payload/issues/1056)) ([44b0073](https://github.com/payloadcms/payload/commit/44b0073834830a9d645a11bcafab3869b4eb1899)) -* update removing an upload with null ([#1076](https://github.com/payloadcms/payload/issues/1076)) ([2ee4c7a](https://github.com/payloadcms/payload/commit/2ee4c7ad727b9311578d3049660de81c27dace55)) - +- [#1062](https://github.com/payloadcms/payload/issues/1062) ([05d1b14](https://github.com/payloadcms/payload/commit/05d1b141b22f66cb9007f20f2ae9d8e31db4f32f)) +- [#948](https://github.com/payloadcms/payload/issues/948) ([8df9ee7](https://github.com/payloadcms/payload/commit/8df9ee7b2dfcb2f77f049d02788a5c60c45f8c12)) +- [#981](https://github.com/payloadcms/payload/issues/981) ([d588843](https://github.com/payloadcms/payload/commit/d58884312132e109ae3f6619be2e0d7bab3f3111)) +- accented label char sanitization for GraphQL ([#1080](https://github.com/payloadcms/payload/issues/1080)) ([888734d](https://github.com/payloadcms/payload/commit/888734dcdf775f416395f8830561c47235bb9019)) +- children of conditional fields required in graphql schema ([#1055](https://github.com/payloadcms/payload/issues/1055)) ([29e82ec](https://github.com/payloadcms/payload/commit/29e82ec845f69bf5a09b682739e88529ebc53c16)) +- ensures adding new media to upload works when existing doc does not exist ([5ae666b](https://github.com/payloadcms/payload/commit/5ae666b0e08b128bdf2d576428e8638c2b8c2ed8)) +- implement the same word boundary search as the like query ([#1038](https://github.com/payloadcms/payload/issues/1038)) ([c3a0bd8](https://github.com/payloadcms/payload/commit/c3a0bd86254dfc3f49e46d4e41bdf717424ea342)) +- reorder plugin wrapping ([#1051](https://github.com/payloadcms/payload/issues/1051)) ([cd8edba](https://github.com/payloadcms/payload/commit/cd8edbaa1faa5a94166396918089a01058a4e75e)) +- require min 1 option in field schema validation ([#1082](https://github.com/payloadcms/payload/issues/1082)) ([d56882c](https://github.com/payloadcms/payload/commit/d56882cc20764b793049f20a91864c943e711375)) +- update removing a relationship with null ([#1056](https://github.com/payloadcms/payload/issues/1056)) ([44b0073](https://github.com/payloadcms/payload/commit/44b0073834830a9d645a11bcafab3869b4eb1899)) +- update removing an upload with null ([#1076](https://github.com/payloadcms/payload/issues/1076)) ([2ee4c7a](https://github.com/payloadcms/payload/commit/2ee4c7ad727b9311578d3049660de81c27dace55)) ### Features -* cyrillic like query support ([#1078](https://github.com/payloadcms/payload/issues/1078)) ([b7e5828](https://github.com/payloadcms/payload/commit/b7e5828adc7bc6602da7992b073b005b30aa896f)) -* duplicate copies all locales ([51c7770](https://github.com/payloadcms/payload/commit/51c7770b10c34a3e40520ca8d64beedc67693c5c)) -* update operator type with contains ([#1045](https://github.com/payloadcms/payload/issues/1045)) ([482cbe7](https://github.com/payloadcms/payload/commit/482cbe71c7b1d39b665fb0b29a7a0b69f454180a)) +- cyrillic like query support ([#1078](https://github.com/payloadcms/payload/issues/1078)) ([b7e5828](https://github.com/payloadcms/payload/commit/b7e5828adc7bc6602da7992b073b005b30aa896f)) +- duplicate copies all locales ([51c7770](https://github.com/payloadcms/payload/commit/51c7770b10c34a3e40520ca8d64beedc67693c5c)) +- update operator type with contains ([#1045](https://github.com/payloadcms/payload/issues/1045)) ([482cbe7](https://github.com/payloadcms/payload/commit/482cbe71c7b1d39b665fb0b29a7a0b69f454180a)) ## [1.0.30](https://github.com/payloadcms/payload/compare/v1.0.29...v1.0.30) (2022-08-30) - ### Bug Fixes -* upload field validation not required ([#1025](https://github.com/payloadcms/payload/issues/1025)) ([689fa00](https://github.com/payloadcms/payload/commit/689fa008fb0b28fb92be4ca785a77f4c35ae16b2)) +- upload field validation not required ([#1025](https://github.com/payloadcms/payload/issues/1025)) ([689fa00](https://github.com/payloadcms/payload/commit/689fa008fb0b28fb92be4ca785a77f4c35ae16b2)) ## [1.0.29](https://github.com/payloadcms/payload/compare/v1.0.28...v1.0.29) (2022-08-29) - ### Bug Fixes -* [#953](https://github.com/payloadcms/payload/issues/953) ([a73c391](https://github.com/payloadcms/payload/commit/a73c391c2cecc3acf8dc3115b56c018f85d9bebf)) +- [#953](https://github.com/payloadcms/payload/issues/953) ([a73c391](https://github.com/payloadcms/payload/commit/a73c391c2cecc3acf8dc3115b56c018f85d9bebf)) ## [1.0.28](https://github.com/payloadcms/payload/compare/v1.0.27...v1.0.28) (2022-08-29) - ### Bug Fixes -* incorrect field paths when nesting unnamed fields ([#1011](https://github.com/payloadcms/payload/issues/1011)) ([50b0303](https://github.com/payloadcms/payload/commit/50b0303ab39f0d0500c5e4116df95f02d1d7fff3)), closes [#976](https://github.com/payloadcms/payload/issues/976) -* relationship cell loading ([#1021](https://github.com/payloadcms/payload/issues/1021)) ([6a3cfce](https://github.com/payloadcms/payload/commit/6a3cfced9a6e0ef75b398ec663f908c725b10d1a)) -* remove lazy loading of array and blocks ([4900fa7](https://github.com/payloadcms/payload/commit/4900fa799ffbeb70e689622b269dc04a67978552)) -* require properties in blocks and arrays fields ([#1020](https://github.com/payloadcms/payload/issues/1020)) ([6bc6e7b](https://github.com/payloadcms/payload/commit/6bc6e7bb616bd9f28f2464d3e55e7a1d19a8e7f8)) -* unpublish item will not crash the UI anymore ([#1016](https://github.com/payloadcms/payload/issues/1016)) ([0586d7a](https://github.com/payloadcms/payload/commit/0586d7aa7d0938df25492487aa073c2aa366e1e4)) - +- incorrect field paths when nesting unnamed fields ([#1011](https://github.com/payloadcms/payload/issues/1011)) ([50b0303](https://github.com/payloadcms/payload/commit/50b0303ab39f0d0500c5e4116df95f02d1d7fff3)), closes [#976](https://github.com/payloadcms/payload/issues/976) +- relationship cell loading ([#1021](https://github.com/payloadcms/payload/issues/1021)) ([6a3cfce](https://github.com/payloadcms/payload/commit/6a3cfced9a6e0ef75b398ec663f908c725b10d1a)) +- remove lazy loading of array and blocks ([4900fa7](https://github.com/payloadcms/payload/commit/4900fa799ffbeb70e689622b269dc04a67978552)) +- require properties in blocks and arrays fields ([#1020](https://github.com/payloadcms/payload/issues/1020)) ([6bc6e7b](https://github.com/payloadcms/payload/commit/6bc6e7bb616bd9f28f2464d3e55e7a1d19a8e7f8)) +- unpublish item will not crash the UI anymore ([#1016](https://github.com/payloadcms/payload/issues/1016)) ([0586d7a](https://github.com/payloadcms/payload/commit/0586d7aa7d0938df25492487aa073c2aa366e1e4)) ### Features -* export more fields config types and validation type ([#989](https://github.com/payloadcms/payload/issues/989)) ([25f5d68](https://github.com/payloadcms/payload/commit/25f5d68b74b081c060ddf6f0405c9211f5da6b54)) -* types custom components to allow any props ([#1013](https://github.com/payloadcms/payload/issues/1013)) ([3736755](https://github.com/payloadcms/payload/commit/3736755a12cf5bbaaa916a5c0363026318a60823)) -* validate relationship and upload ids ([#1004](https://github.com/payloadcms/payload/issues/1004)) ([d727fc8](https://github.com/payloadcms/payload/commit/d727fc8e2467e3f438ea6b1d2031e0657bffd183)) +- export more fields config types and validation type ([#989](https://github.com/payloadcms/payload/issues/989)) ([25f5d68](https://github.com/payloadcms/payload/commit/25f5d68b74b081c060ddf6f0405c9211f5da6b54)) +- types custom components to allow any props ([#1013](https://github.com/payloadcms/payload/issues/1013)) ([3736755](https://github.com/payloadcms/payload/commit/3736755a12cf5bbaaa916a5c0363026318a60823)) +- validate relationship and upload ids ([#1004](https://github.com/payloadcms/payload/issues/1004)) ([d727fc8](https://github.com/payloadcms/payload/commit/d727fc8e2467e3f438ea6b1d2031e0657bffd183)) ## [1.0.27](https://github.com/payloadcms/payload/compare/v1.0.26...v1.0.27) (2022-08-18) - ### Bug Fixes -* react-sortable-hoc dependency instead of dev dependency ([4ef6801](https://github.com/payloadcms/payload/commit/4ef6801230cb0309a9d20dd092f8a3372f75f9ca)) +- react-sortable-hoc dependency instead of dev dependency ([4ef6801](https://github.com/payloadcms/payload/commit/4ef6801230cb0309a9d20dd092f8a3372f75f9ca)) ## [1.0.26](https://github.com/payloadcms/payload/compare/v1.0.25...v1.0.26) (2022-08-18) - ### Bug Fixes -* missing fields in rows on custom id collections ([#954](https://github.com/payloadcms/payload/issues/954)) ([39586d3](https://github.com/payloadcms/payload/commit/39586d3cdb01131b29f1f8f7346086d2bc9903c1)) - +- missing fields in rows on custom id collections ([#954](https://github.com/payloadcms/payload/issues/954)) ([39586d3](https://github.com/payloadcms/payload/commit/39586d3cdb01131b29f1f8f7346086d2bc9903c1)) ### Features -* adds more prismjs syntax highlighting options for code blocks ([#961](https://github.com/payloadcms/payload/issues/961)) ([f45d5a0](https://github.com/payloadcms/payload/commit/f45d5a0421117180f85f8e3cd86f835c13ac6d16)) -* enable reordering of hasMany relationship and select fields ([#952](https://github.com/payloadcms/payload/issues/952)) ([38a1a38](https://github.com/payloadcms/payload/commit/38a1a38c0c52403083458619b2f9b58044c5c0ea)) +- adds more prismjs syntax highlighting options for code blocks ([#961](https://github.com/payloadcms/payload/issues/961)) ([f45d5a0](https://github.com/payloadcms/payload/commit/f45d5a0421117180f85f8e3cd86f835c13ac6d16)) +- enable reordering of hasMany relationship and select fields ([#952](https://github.com/payloadcms/payload/issues/952)) ([38a1a38](https://github.com/payloadcms/payload/commit/38a1a38c0c52403083458619b2f9b58044c5c0ea)) ## [1.0.25](https://github.com/payloadcms/payload/compare/v1.0.24...v1.0.25) (2022-08-17) - ### Bug Fixes -* [#568](https://github.com/payloadcms/payload/issues/568) ([a3edbf4](https://github.com/payloadcms/payload/commit/a3edbf4fef5efd8293cb4d6139b2513441cb741e)) - +- [#568](https://github.com/payloadcms/payload/issues/568) ([a3edbf4](https://github.com/payloadcms/payload/commit/a3edbf4fef5efd8293cb4d6139b2513441cb741e)) ### Features -* add new pickerAppearance option 'monthOnly' ([566c6ba](https://github.com/payloadcms/payload/commit/566c6ba3a9beb13ea9437844313ec6701effce27)) -* custom api endpoints ([11d8fc7](https://github.com/payloadcms/payload/commit/11d8fc71e8bdb62c6755789903702b0ee257b448)) +- add new pickerAppearance option 'monthOnly' ([566c6ba](https://github.com/payloadcms/payload/commit/566c6ba3a9beb13ea9437844313ec6701effce27)) +- custom api endpoints ([11d8fc7](https://github.com/payloadcms/payload/commit/11d8fc71e8bdb62c6755789903702b0ee257b448)) ## [1.0.24](https://github.com/payloadcms/payload/compare/v1.0.23...v1.0.24) (2022-08-16) - ### Bug Fixes -* [#939](https://github.com/payloadcms/payload/issues/939) ([b1a1575](https://github.com/payloadcms/payload/commit/b1a1575122f602ff6ba77973ab2a67893d352487)) -* create indexes in nested fields ([f615abc](https://github.com/payloadcms/payload/commit/f615abc9b1d9000aff114010ef7f618ec70b6491)) -* format graphql localization input type ([#932](https://github.com/payloadcms/payload/issues/932)) ([1c7445d](https://github.com/payloadcms/payload/commit/1c7445dc7fd883f6d5dcba532e9e048b1cff08f5)) - +- [#939](https://github.com/payloadcms/payload/issues/939) ([b1a1575](https://github.com/payloadcms/payload/commit/b1a1575122f602ff6ba77973ab2a67893d352487)) +- create indexes in nested fields ([f615abc](https://github.com/payloadcms/payload/commit/f615abc9b1d9000aff114010ef7f618ec70b6491)) +- format graphql localization input type ([#932](https://github.com/payloadcms/payload/issues/932)) ([1c7445d](https://github.com/payloadcms/payload/commit/1c7445dc7fd883f6d5dcba532e9e048b1cff08f5)) ### Features -* ensures you can query on blocks via specifying locale or not specifying locale ([078e8dc](https://github.com/payloadcms/payload/commit/078e8dcc51197133788294bac6fa380b192defbc)) +- ensures you can query on blocks via specifying locale or not specifying locale ([078e8dc](https://github.com/payloadcms/payload/commit/078e8dcc51197133788294bac6fa380b192defbc)) ## [1.0.23](https://github.com/payloadcms/payload/compare/v1.0.22...v1.0.23) (2022-08-15) - ### Bug Fixes -* [#930](https://github.com/payloadcms/payload/issues/930) ([cbb1c84](https://github.com/payloadcms/payload/commit/cbb1c84be76146301ce41c4bdace647df83a4aac)) -* dev:generate-types on all test configs ([#919](https://github.com/payloadcms/payload/issues/919)) ([145e1db](https://github.com/payloadcms/payload/commit/145e1db05db0e71149ba74e95764970dfdfd8b6b)) +- [#930](https://github.com/payloadcms/payload/issues/930) ([cbb1c84](https://github.com/payloadcms/payload/commit/cbb1c84be76146301ce41c4bdace647df83a4aac)) +- dev:generate-types on all test configs ([#919](https://github.com/payloadcms/payload/issues/919)) ([145e1db](https://github.com/payloadcms/payload/commit/145e1db05db0e71149ba74e95764970dfdfd8b6b)) ## [1.0.22](https://github.com/payloadcms/payload/compare/v1.0.21...v1.0.22) (2022-08-12) - ### Bug Fixes -* [#905](https://github.com/payloadcms/payload/issues/905) ([b8421dd](https://github.com/payloadcms/payload/commit/b8421ddc0c9357de7a61bdc565fe2f9c4cf62681)) -* ensures you can query on mixed schema type within blocks ([fba0847](https://github.com/payloadcms/payload/commit/fba0847f0fbc4c144ec85bb7a1ed3f2a953f5e05)) +- [#905](https://github.com/payloadcms/payload/issues/905) ([b8421dd](https://github.com/payloadcms/payload/commit/b8421ddc0c9357de7a61bdc565fe2f9c4cf62681)) +- ensures you can query on mixed schema type within blocks ([fba0847](https://github.com/payloadcms/payload/commit/fba0847f0fbc4c144ec85bb7a1ed3f2a953f5e05)) ## [1.0.21](https://github.com/payloadcms/payload/compare/v1.0.20...v1.0.21) (2022-08-11) - ### Bug Fixes -* ensures you can query on nested block fields ([ca852e8](https://github.com/payloadcms/payload/commit/ca852e8cb2d78982abeae0b5db4117f0261d8fed)) -* saving multiple versions ([#918](https://github.com/payloadcms/payload/issues/918)) ([d0da3d7](https://github.com/payloadcms/payload/commit/d0da3d7962bbddfbdc1c553816409823bf6e1335)) +- ensures you can query on nested block fields ([ca852e8](https://github.com/payloadcms/payload/commit/ca852e8cb2d78982abeae0b5db4117f0261d8fed)) +- saving multiple versions ([#918](https://github.com/payloadcms/payload/issues/918)) ([d0da3d7](https://github.com/payloadcms/payload/commit/d0da3d7962bbddfbdc1c553816409823bf6e1335)) ## [1.0.20](https://github.com/payloadcms/payload/compare/v1.0.19...v1.0.20) (2022-08-11) - ### Bug Fixes -* E11000 duplicate key error has no keyValue ([#916](https://github.com/payloadcms/payload/issues/916)) ([50972b9](https://github.com/payloadcms/payload/commit/50972b98a1d30c86d8b429ee5ba1c7dacac59f2c)) -* number validation works with 0 min and max ([#906](https://github.com/payloadcms/payload/issues/906)) ([874c001](https://github.com/payloadcms/payload/commit/874c001d3b9712bce342c206e66f794a7e4938ba)) - +- E11000 duplicate key error has no keyValue ([#916](https://github.com/payloadcms/payload/issues/916)) ([50972b9](https://github.com/payloadcms/payload/commit/50972b98a1d30c86d8b429ee5ba1c7dacac59f2c)) +- number validation works with 0 min and max ([#906](https://github.com/payloadcms/payload/issues/906)) ([874c001](https://github.com/payloadcms/payload/commit/874c001d3b9712bce342c206e66f794a7e4938ba)) ### Features -* field name validation ([#903](https://github.com/payloadcms/payload/issues/903)) ([2f4f075](https://github.com/payloadcms/payload/commit/2f4f075441768475f1202587abf578d5e4ae9f2a)) +- field name validation ([#903](https://github.com/payloadcms/payload/issues/903)) ([2f4f075](https://github.com/payloadcms/payload/commit/2f4f075441768475f1202587abf578d5e4ae9f2a)) ## [1.0.19](https://github.com/payloadcms/payload/compare/v1.0.18...v1.0.19) (2022-08-07) - ### Features -* exposes static upload handlers ([a8d2e09](https://github.com/payloadcms/payload/commit/a8d2e099523cc7b99f94ae0cad574b41679c6e25)) +- exposes static upload handlers ([a8d2e09](https://github.com/payloadcms/payload/commit/a8d2e099523cc7b99f94ae0cad574b41679c6e25)) ## [1.0.18](https://github.com/payloadcms/payload/compare/v1.0.17...v1.0.18) (2022-08-06) ## [1.0.17](https://github.com/payloadcms/payload/compare/v1.0.16...v1.0.17) (2022-08-06) - ### Bug Fixes -* [#898](https://github.com/payloadcms/payload/issues/898) ([209b02b](https://github.com/payloadcms/payload/commit/209b02b0699b17d060dab3cc09cdd06ad813c053)) +- [#898](https://github.com/payloadcms/payload/issues/898) ([209b02b](https://github.com/payloadcms/payload/commit/209b02b0699b17d060dab3cc09cdd06ad813c053)) ## [1.0.16](https://github.com/payloadcms/payload/compare/v1.0.15...v1.0.16) (2022-08-05) - ### Bug Fixes -* [#896](https://github.com/payloadcms/payload/issues/896) ([c32dfea](https://github.com/payloadcms/payload/commit/c32dfea35607991f7260c74121074d105f1b200c)) +- [#896](https://github.com/payloadcms/payload/issues/896) ([c32dfea](https://github.com/payloadcms/payload/commit/c32dfea35607991f7260c74121074d105f1b200c)) ## [1.0.15](https://github.com/payloadcms/payload/compare/v1.0.14...v1.0.15) (2022-08-04) ## [1.0.14](https://github.com/payloadcms/payload/compare/v1.0.13...v1.0.14) (2022-08-04) - ### Bug Fixes -* [#884](https://github.com/payloadcms/payload/issues/884) ([e9b3f3f](https://github.com/payloadcms/payload/commit/e9b3f3f060d134f3ed4b410adddb9d2593f6ee95)) -* allows querying incomplete drafts in graphql ([8d968b7](https://github.com/payloadcms/payload/commit/8d968b7690c147685d569c334c108d8830ee7581)) - +- [#884](https://github.com/payloadcms/payload/issues/884) ([e9b3f3f](https://github.com/payloadcms/payload/commit/e9b3f3f060d134f3ed4b410adddb9d2593f6ee95)) +- allows querying incomplete drafts in graphql ([8d968b7](https://github.com/payloadcms/payload/commit/8d968b7690c147685d569c334c108d8830ee7581)) ### Features -* allows querying on rich text content ([3343adb](https://github.com/payloadcms/payload/commit/3343adb95257daae0be49daf6c768788292ef267)) +- allows querying on rich text content ([3343adb](https://github.com/payloadcms/payload/commit/3343adb95257daae0be49daf6c768788292ef267)) ## [1.0.13](https://github.com/payloadcms/payload/compare/v1.0.12...v1.0.13) (2022-08-03) - ### Bug Fixes -* [#878](https://github.com/payloadcms/payload/issues/878) ([b8504ff](https://github.com/payloadcms/payload/commit/b8504ffb25310095097f35107e2b33dc648580cc)) -* [#880](https://github.com/payloadcms/payload/issues/880) ([9c0c606](https://github.com/payloadcms/payload/commit/9c0c606b20e963a12d23b428c54c63d6a73be472)) - +- [#878](https://github.com/payloadcms/payload/issues/878) ([b8504ff](https://github.com/payloadcms/payload/commit/b8504ffb25310095097f35107e2b33dc648580cc)) +- [#880](https://github.com/payloadcms/payload/issues/880) ([9c0c606](https://github.com/payloadcms/payload/commit/9c0c606b20e963a12d23b428c54c63d6a73be472)) ### Features -* improves adjacent group styling ([0294c02](https://github.com/payloadcms/payload/commit/0294c02aedaa11a72240ab1dc7d6ccd2318de51f)) +- improves adjacent group styling ([0294c02](https://github.com/payloadcms/payload/commit/0294c02aedaa11a72240ab1dc7d6ccd2318de51f)) ## [1.0.12](https://github.com/payloadcms/payload/compare/v1.0.11...v1.0.12) (2022-08-02) - ### Bug Fixes -* ensures tabs can overflow on mobile when there are many ([663cae4](https://github.com/payloadcms/payload/commit/663cae4788f2726f3fa2430228706be63b7e642b)) -* unique index creation ([#867](https://github.com/payloadcms/payload/issues/867)) ([c175476](https://github.com/payloadcms/payload/commit/c175476e74b31ea1fbc4a250fa8d23953d13e541)) +- ensures tabs can overflow on mobile when there are many ([663cae4](https://github.com/payloadcms/payload/commit/663cae4788f2726f3fa2430228706be63b7e642b)) +- unique index creation ([#867](https://github.com/payloadcms/payload/issues/867)) ([c175476](https://github.com/payloadcms/payload/commit/c175476e74b31ea1fbc4a250fa8d23953d13e541)) ## [1.0.11](https://github.com/payloadcms/payload/compare/v1.0.10...v1.0.11) (2022-07-28) - ### Bug Fixes -* ensures when initial values changes, field value is updated ([858b1af](https://github.com/payloadcms/payload/commit/858b1afa546db68416d625a7ab970c9693d0595e)) +- ensures when initial values changes, field value is updated ([858b1af](https://github.com/payloadcms/payload/commit/858b1afa546db68416d625a7ab970c9693d0595e)) ## [1.0.10](https://github.com/payloadcms/payload/compare/v1.0.9...v1.0.10) (2022-07-27) - ### Bug Fixes -* [#806](https://github.com/payloadcms/payload/issues/806), allow partial word matches using 'like' operator ([c96985b](https://github.com/payloadcms/payload/commit/c96985be0c14fcff768e036de96ebef3caa24d1c)) -* [#836](https://github.com/payloadcms/payload/issues/836) ([84611af](https://github.com/payloadcms/payload/commit/84611aff2c9e0b1a1e721a72e9d3fc0740f10aff)) -* accesses payload config correctly in gql refresh resolver ([d5e88cc](https://github.com/payloadcms/payload/commit/d5e88cc1a93ee8f93ee2eb75ab1690281f266f6a)) -* email not always loading while viewing auth collections ([36e9acc](https://github.com/payloadcms/payload/commit/36e9acc637c4a706f0d3d07fbfb88e9afdccc2da)) -* ensures collapsible preferences are retained through doc save ([61f0e8e](https://github.com/payloadcms/payload/commit/61f0e8ea9fd574fc40186f63c0016da150610d70)) -* id now properly required in graphql findByID operation ([5dc7caf](https://github.com/payloadcms/payload/commit/5dc7caf35689d3f5cd71b9b2759edcb9b7eaadc5)) -* set overflow payload modal container to auto ([cfb5540](https://github.com/payloadcms/payload/commit/cfb5540e64ccc016a4ef408a71b9aaf3d219b0fc)) -* trim trailing whitespaces of email in login ([8feed39](https://github.com/payloadcms/payload/commit/8feed39fb92f2e194ae628b090cbb84d802586b6)) - +- [#806](https://github.com/payloadcms/payload/issues/806), allow partial word matches using 'like' operator ([c96985b](https://github.com/payloadcms/payload/commit/c96985be0c14fcff768e036de96ebef3caa24d1c)) +- [#836](https://github.com/payloadcms/payload/issues/836) ([84611af](https://github.com/payloadcms/payload/commit/84611aff2c9e0b1a1e721a72e9d3fc0740f10aff)) +- accesses payload config correctly in gql refresh resolver ([d5e88cc](https://github.com/payloadcms/payload/commit/d5e88cc1a93ee8f93ee2eb75ab1690281f266f6a)) +- email not always loading while viewing auth collections ([36e9acc](https://github.com/payloadcms/payload/commit/36e9acc637c4a706f0d3d07fbfb88e9afdccc2da)) +- ensures collapsible preferences are retained through doc save ([61f0e8e](https://github.com/payloadcms/payload/commit/61f0e8ea9fd574fc40186f63c0016da150610d70)) +- id now properly required in graphql findByID operation ([5dc7caf](https://github.com/payloadcms/payload/commit/5dc7caf35689d3f5cd71b9b2759edcb9b7eaadc5)) +- set overflow payload modal container to auto ([cfb5540](https://github.com/payloadcms/payload/commit/cfb5540e64ccc016a4ef408a71b9aaf3d219b0fc)) +- trim trailing whitespaces of email in login ([8feed39](https://github.com/payloadcms/payload/commit/8feed39fb92f2e194ae628b090cbb84d802586b6)) ### Features -* greatly enhances performance by using dataloader pattern to batch populations ([c5bcd1e](https://github.com/payloadcms/payload/commit/c5bcd1e3412087249a2a3d98830a1b69e33736a0)) -* significantly improves complex GraphQL query performance ([5d57bfa](https://github.com/payloadcms/payload/commit/5d57bfa4382470d2a171dcac3743523c930e3a3f)) +- greatly enhances performance by using dataloader pattern to batch populations ([c5bcd1e](https://github.com/payloadcms/payload/commit/c5bcd1e3412087249a2a3d98830a1b69e33736a0)) +- significantly improves complex GraphQL query performance ([5d57bfa](https://github.com/payloadcms/payload/commit/5d57bfa4382470d2a171dcac3743523c930e3a3f)) ## [1.0.9](https://github.com/payloadcms/payload/compare/v1.0.8...v1.0.9) (2022-07-21) - ### Bug Fixes -* avoid assuming Email will be present on JWT token. Using ID instead as email might not be in if using disableLocalStrategy ([#789](https://github.com/payloadcms/payload/issues/789)) ([3b4d5af](https://github.com/payloadcms/payload/commit/3b4d5afd41f898c06c5d0f2b96ce0478c27d0976)) -* enable index creation from schema ([#791](https://github.com/payloadcms/payload/issues/791)) ([2a1f387](https://github.com/payloadcms/payload/commit/2a1f387bcc071730692b5eadadf01a91d7a1f5d4)) -* graphql gen logging output ([#795](https://github.com/payloadcms/payload/issues/795)) ([8a81d0b](https://github.com/payloadcms/payload/commit/8a81d0b2746b727784280704aab26b0aed3a757d)) -* sharpens radio input edges by replacing box-shadow trick with border property ([#768](https://github.com/payloadcms/payload/issues/768)) ([e2c366f](https://github.com/payloadcms/payload/commit/e2c366f5363aa88b29a1b90688f75a1da0c2cca8)) - +- avoid assuming Email will be present on JWT token. Using ID instead as email might not be in if using disableLocalStrategy ([#789](https://github.com/payloadcms/payload/issues/789)) ([3b4d5af](https://github.com/payloadcms/payload/commit/3b4d5afd41f898c06c5d0f2b96ce0478c27d0976)) +- enable index creation from schema ([#791](https://github.com/payloadcms/payload/issues/791)) ([2a1f387](https://github.com/payloadcms/payload/commit/2a1f387bcc071730692b5eadadf01a91d7a1f5d4)) +- graphql gen logging output ([#795](https://github.com/payloadcms/payload/issues/795)) ([8a81d0b](https://github.com/payloadcms/payload/commit/8a81d0b2746b727784280704aab26b0aed3a757d)) +- sharpens radio input edges by replacing box-shadow trick with border property ([#768](https://github.com/payloadcms/payload/issues/768)) ([e2c366f](https://github.com/payloadcms/payload/commit/e2c366f5363aa88b29a1b90688f75a1da0c2cca8)) ### Features -* pass payload and names to custom auth strategies ([#781](https://github.com/payloadcms/payload/issues/781)) ([3a3026c](https://github.com/payloadcms/payload/commit/3a3026cd637c1274fdf6e4c4cba4f30a202e1ff7)) -* use provided auth strategy name or strategy.name ([#797](https://github.com/payloadcms/payload/issues/797)) ([f22f56e](https://github.com/payloadcms/payload/commit/f22f56e73c979ee3e1b165b327b1bcf6e1de6eda)) +- pass payload and names to custom auth strategies ([#781](https://github.com/payloadcms/payload/issues/781)) ([3a3026c](https://github.com/payloadcms/payload/commit/3a3026cd637c1274fdf6e4c4cba4f30a202e1ff7)) +- use provided auth strategy name or strategy.name ([#797](https://github.com/payloadcms/payload/issues/797)) ([f22f56e](https://github.com/payloadcms/payload/commit/f22f56e73c979ee3e1b165b327b1bcf6e1de6eda)) ## [1.0.8](https://github.com/payloadcms/payload/compare/v1.0.7...v1.0.8) (2022-07-20) - ### Bug Fixes -* await field hooks recursively ([893772e](https://github.com/payloadcms/payload/commit/893772ebd8b3d565f9c62d83ca0fa131b9d59970)) -* potential solution for [#756](https://github.com/payloadcms/payload/issues/756) ([b987cb8](https://github.com/payloadcms/payload/commit/b987cb8dc4774fbcc11b71661f2c4d25208f7de2)) - +- await field hooks recursively ([893772e](https://github.com/payloadcms/payload/commit/893772ebd8b3d565f9c62d83ca0fa131b9d59970)) +- potential solution for [#756](https://github.com/payloadcms/payload/issues/756) ([b987cb8](https://github.com/payloadcms/payload/commit/b987cb8dc4774fbcc11b71661f2c4d25208f7de2)) ### Features -* export PayloadRequest ([66c820c](https://github.com/payloadcms/payload/commit/66c820c863e7aeaa9050c0a0964256d6878af9d9)) -* improves generated types by removing unnecessary optional properties ([#784](https://github.com/payloadcms/payload/issues/784)) ([6f748f1](https://github.com/payloadcms/payload/commit/6f748f1adb78a70c9e5dba6cedcf1e2cdd55498a)) +- export PayloadRequest ([66c820c](https://github.com/payloadcms/payload/commit/66c820c863e7aeaa9050c0a0964256d6878af9d9)) +- improves generated types by removing unnecessary optional properties ([#784](https://github.com/payloadcms/payload/issues/784)) ([6f748f1](https://github.com/payloadcms/payload/commit/6f748f1adb78a70c9e5dba6cedcf1e2cdd55498a)) ## [1.0.7](https://github.com/payloadcms/payload/compare/v1.0.6...v1.0.7) (2022-07-19) ## [1.0.6](https://github.com/payloadcms/payload/compare/v1.0.5...v1.0.6) (2022-07-19) - ### Features -* improves initAsync pattern ([428edb0](https://github.com/payloadcms/payload/commit/428edb05c4d8805bb2c4fb98f51e57eed2926374)) +- improves initAsync pattern ([428edb0](https://github.com/payloadcms/payload/commit/428edb05c4d8805bb2c4fb98f51e57eed2926374)) ## [1.0.5](https://github.com/payloadcms/payload/compare/v1.0.4...v1.0.5) (2022-07-19) - ### Features -* adds initAsync ([b4ffa22](https://github.com/payloadcms/payload/commit/b4ffa228858e584b3a177b0b096077a5c660b892)) +- adds initAsync ([b4ffa22](https://github.com/payloadcms/payload/commit/b4ffa228858e584b3a177b0b096077a5c660b892)) ## [1.0.4](https://github.com/payloadcms/payload/compare/v0.20.1...v1.0.4) (2022-07-19) ### Features -* Updated UI: Dark Mode -* Updated UI: Collapsibles ([60bfb1c](https://github.com/payloadcms/payload/commit/60bfb1c3b801c89de055d11cee50a1b51e864b7b)) -* Updated UI: Tabs field ([68e7c41](https://github.com/payloadcms/payload/commit/68e7c41fdc07df04dcc3caaf486d2d596354039d)) -* Updated UI: Styling Revamp and responsive improvements -* More maintainable colors via CSS vars -* Improved test coverage through granular Payload configs -* Introduction of E2E tests through Playwright -* allow clear select value ([#735](https://github.com/payloadcms/payload/issues/735)) ([3132d35](https://github.com/payloadcms/payload/commit/3132d35e27f3c1037aeb3d1801e13df2e992e98b)) +- Updated UI: Dark Mode +- Updated UI: Collapsibles ([60bfb1c](https://github.com/payloadcms/payload/commit/60bfb1c3b801c89de055d11cee50a1b51e864b7b)) +- Updated UI: Tabs field ([68e7c41](https://github.com/payloadcms/payload/commit/68e7c41fdc07df04dcc3caaf486d2d596354039d)) +- Updated UI: Styling Revamp and responsive improvements +- More maintainable colors via CSS vars +- Improved test coverage through granular Payload configs +- Introduction of E2E tests through Playwright +- allow clear select value ([#735](https://github.com/payloadcms/payload/issues/735)) ([3132d35](https://github.com/payloadcms/payload/commit/3132d35e27f3c1037aeb3d1801e13df2e992e98b)) ### BREAKING CHANGES @@ -997,47 +1132,47 @@ Due to this change, the `admin.scss` functionality has become obsolete, and over ### Bug Fixes -* ensures only plain objects are merged within incoming configs ([2c66ad8](https://github.com/payloadcms/payload/commit/2c66ad86898c28da32b1714821c2ea8fe8e17868)) +- ensures only plain objects are merged within incoming configs ([2c66ad8](https://github.com/payloadcms/payload/commit/2c66ad86898c28da32b1714821c2ea8fe8e17868)) ### Features -* :tada: [Extensible Authentication Strategies](https://github.com/payloadcms/payload/discussions/290)! -* add afterMe afterLogout and afterRefresh ([4055908](https://github.com/payloadcms/payload/commit/4055908bc885ec1b2d69817a9937e4591d099fa1)) -* add preMiddleware and postMiddleware, deprecate middleware ([e806437](https://github.com/payloadcms/payload/commit/e8064371b01b4e66d3b1af980e71364714bf3d5b)) -* better types useAuth and custom provider components ([38b52bf](https://github.com/payloadcms/payload/commit/38b52bf67b0d1545bb8ee627f3b6140e27887099)) +- :tada: [Extensible Authentication Strategies](https://github.com/payloadcms/payload/discussions/290)! +- add afterMe afterLogout and afterRefresh ([4055908](https://github.com/payloadcms/payload/commit/4055908bc885ec1b2d69817a9937e4591d099fa1)) +- add preMiddleware and postMiddleware, deprecate middleware ([e806437](https://github.com/payloadcms/payload/commit/e8064371b01b4e66d3b1af980e71364714bf3d5b)) +- better types useAuth and custom provider components ([38b52bf](https://github.com/payloadcms/payload/commit/38b52bf67b0d1545bb8ee627f3b6140e27887099)) ## [0.19.1](https://github.com/payloadcms/payload/compare/v0.19.0...v0.19.1) (2022-07-09) ### Bug Fixes -* ensures duplicative relationship options are not present ([#732](https://github.com/payloadcms/payload/issues/732)) ([ce1c99b](https://github.com/payloadcms/payload/commit/ce1c99b01c0b615401d618bd1894450114cc1f4c)) +- ensures duplicative relationship options are not present ([#732](https://github.com/payloadcms/payload/issues/732)) ([ce1c99b](https://github.com/payloadcms/payload/commit/ce1c99b01c0b615401d618bd1894450114cc1f4c)) # [0.19.0](https://github.com/payloadcms/payload/compare/v0.18.5...v0.19.0) (2022-07-08) ### BREAKING CHANGES -* relationship fields with access control preventing read of relation will return id instead of null ([#644](https://github.com/payloadcms/payload/pull/644)) +- relationship fields with access control preventing read of relation will return id instead of null ([#644](https://github.com/payloadcms/payload/pull/644)) ### Bug Fixes -* allow passing of autoIndex mongoose connectionOptions ([#722](https://github.com/payloadcms/payload/issues/722)) ([567d8c1](https://github.com/payloadcms/payload/commit/567d8c19bff05c4d5edfcff1f04ff5e7804412ce)) -* copyfiles cross platform ([#712](https://github.com/payloadcms/payload/issues/712)) ([67331eb](https://github.com/payloadcms/payload/commit/67331eb975c57897236466bef109a9559ff0d1a0)) -* ensures auth/me relations in gql can be queried ([01bc1fe](https://github.com/payloadcms/payload/commit/01bc1fef1e498038457b9454fc0969c2a1fe4601)) -* ensures old data from arrays is not persisted ([d9ef803](https://github.com/payloadcms/payload/commit/d9ef803d203c03a161dedff7076381ed944cf8d6)) -* relationship field disabled from access control in related collections ([#644](https://github.com/payloadcms/payload/issues/644)) ([91e33d1](https://github.com/payloadcms/payload/commit/91e33d1c1cf97d3f8512caea72dc1012969b84bb)) +- allow passing of autoIndex mongoose connectionOptions ([#722](https://github.com/payloadcms/payload/issues/722)) ([567d8c1](https://github.com/payloadcms/payload/commit/567d8c19bff05c4d5edfcff1f04ff5e7804412ce)) +- copyfiles cross platform ([#712](https://github.com/payloadcms/payload/issues/712)) ([67331eb](https://github.com/payloadcms/payload/commit/67331eb975c57897236466bef109a9559ff0d1a0)) +- ensures auth/me relations in gql can be queried ([01bc1fe](https://github.com/payloadcms/payload/commit/01bc1fef1e498038457b9454fc0969c2a1fe4601)) +- ensures old data from arrays is not persisted ([d9ef803](https://github.com/payloadcms/payload/commit/d9ef803d203c03a161dedff7076381ed944cf8d6)) +- relationship field disabled from access control in related collections ([#644](https://github.com/payloadcms/payload/issues/644)) ([91e33d1](https://github.com/payloadcms/payload/commit/91e33d1c1cf97d3f8512caea72dc1012969b84bb)) ### Features -* allow clearing DatePicker value ([#641](https://github.com/payloadcms/payload/issues/641)) ([9fd171b](https://github.com/payloadcms/payload/commit/9fd171b26db5e3aaa6ade706f02c9697e1d785f3)) -* File argument in create/update operation ([#708](https://github.com/payloadcms/payload/issues/708)) ([f3b7dcf](https://github.com/payloadcms/payload/commit/f3b7dcff57961e0c6a5b1536de23b7fe6fa035cf)) -* graphql schema output ([#730](https://github.com/payloadcms/payload/issues/730)) ([ad43cbc](https://github.com/payloadcms/payload/commit/ad43cbc808572f15157e4e52d211253c63012d7f)) +- allow clearing DatePicker value ([#641](https://github.com/payloadcms/payload/issues/641)) ([9fd171b](https://github.com/payloadcms/payload/commit/9fd171b26db5e3aaa6ade706f02c9697e1d785f3)) +- File argument in create/update operation ([#708](https://github.com/payloadcms/payload/issues/708)) ([f3b7dcf](https://github.com/payloadcms/payload/commit/f3b7dcff57961e0c6a5b1536de23b7fe6fa035cf)) +- graphql schema output ([#730](https://github.com/payloadcms/payload/issues/730)) ([ad43cbc](https://github.com/payloadcms/payload/commit/ad43cbc808572f15157e4e52d211253c63012d7f)) ## [0.18.5](https://github.com/payloadcms/payload/compare/v0.18.4...v0.18.5) (2022-06-29) ### Bug Fixes -* empty cell data renders in list ([#699](https://github.com/payloadcms/payload/issues/699)) ([b6b0ffb](https://github.com/payloadcms/payload/commit/b6b0ffb674ca6d1568981ab110013e66c678270f)) -* icon appears above select field's option list ([#685](https://github.com/payloadcms/payload/issues/685)) ([c78d774](https://github.com/payloadcms/payload/commit/c78d77446a6a8fd1e85f8c094f751dfc1f8b0530)) +- empty cell data renders in list ([#699](https://github.com/payloadcms/payload/issues/699)) ([b6b0ffb](https://github.com/payloadcms/payload/commit/b6b0ffb674ca6d1568981ab110013e66c678270f)) +- icon appears above select field's option list ([#685](https://github.com/payloadcms/payload/issues/685)) ([c78d774](https://github.com/payloadcms/payload/commit/c78d77446a6a8fd1e85f8c094f751dfc1f8b0530)) ## [0.18.4](https://github.com/payloadcms/payload/compare/v0.18.3...v0.18.4) (2022-06-24) @@ -1045,100 +1180,100 @@ Due to this change, the `admin.scss` functionality has become obsolete, and over ### Bug Fixes -* [#670](https://github.com/payloadcms/payload/issues/670), max tokenExpiration ([918062d](https://github.com/payloadcms/payload/commit/918062de2fba371068efc62a989a93ee07fd4c17)) +- [#670](https://github.com/payloadcms/payload/issues/670), max tokenExpiration ([918062d](https://github.com/payloadcms/payload/commit/918062de2fba371068efc62a989a93ee07fd4c17)) ## [0.18.2](https://github.com/payloadcms/payload/compare/v0.18.1...v0.18.2) (2022-06-24) ### Features -* telemetry ([1c37ec3](https://github.com/payloadcms/payload/commit/1c37ec39027c73e57ff53db58eca94d485d1fa14)) +- telemetry ([1c37ec3](https://github.com/payloadcms/payload/commit/1c37ec39027c73e57ff53db58eca94d485d1fa14)) ## [0.18.1](https://github.com/payloadcms/payload/compare/v0.18.0...v0.18.1) (2022-06-21) ### Bug Fixes -* [#671](https://github.com/payloadcms/payload/issues/671), password reset broken ([3d5ed93](https://github.com/payloadcms/payload/commit/3d5ed93fcea8a44d70aa6d46184fa7a50372cf88)) +- [#671](https://github.com/payloadcms/payload/issues/671), password reset broken ([3d5ed93](https://github.com/payloadcms/payload/commit/3d5ed93fcea8a44d70aa6d46184fa7a50372cf88)) # [0.18.0](https://github.com/payloadcms/payload/compare/v0.17.3...v0.18.0) (2022-06-14) ### Bug Fixes -* custom fields values resetting in ui ([#626](https://github.com/payloadcms/payload/issues/626)) ([f2bf239](https://github.com/payloadcms/payload/commit/f2bf2399fa34c49b3b68be55257908b0f8733962)) -* me auth route breaks with query params ([#648](https://github.com/payloadcms/payload/issues/648)) ([a1fe17d](https://github.com/payloadcms/payload/commit/a1fe17d05da57a6fc3ab933d064289fdcd7bf280)) +- custom fields values resetting in ui ([#626](https://github.com/payloadcms/payload/issues/626)) ([f2bf239](https://github.com/payloadcms/payload/commit/f2bf2399fa34c49b3b68be55257908b0f8733962)) +- me auth route breaks with query params ([#648](https://github.com/payloadcms/payload/issues/648)) ([a1fe17d](https://github.com/payloadcms/payload/commit/a1fe17d05da57a6fc3ab933d064289fdcd7bf280)) ### Features -* adds timestamps to generated collection types if enabled ([#604](https://github.com/payloadcms/payload/issues/604)) ([af6479b](https://github.com/payloadcms/payload/commit/af6479bf34128ee1c64f534778d6151fdc15f4f6)) -* enable webpack filesystem cache in dev ([#621](https://github.com/payloadcms/payload/issues/621)) ([44c1232](https://github.com/payloadcms/payload/commit/44c12325b4e47eed26c70047c4e594650bcf2648)) +- adds timestamps to generated collection types if enabled ([#604](https://github.com/payloadcms/payload/issues/604)) ([af6479b](https://github.com/payloadcms/payload/commit/af6479bf34128ee1c64f534778d6151fdc15f4f6)) +- enable webpack filesystem cache in dev ([#621](https://github.com/payloadcms/payload/issues/621)) ([44c1232](https://github.com/payloadcms/payload/commit/44c12325b4e47eed26c70047c4e594650bcf2648)) ## [0.17.3](https://github.com/payloadcms/payload/compare/v0.17.2...v0.17.3) (2022-06-08) ### Bug Fixes -* duplicate objects in array fields in validate data and siblingData ([#599](https://github.com/payloadcms/payload/issues/599)) ([20bbda9](https://github.com/payloadcms/payload/commit/20bbda95c67efb985f08b0380c6f21c13068a8b5)) -* ensures unflattening locales only happens if config specifies locales ([c18cc23](https://github.com/payloadcms/payload/commit/c18cc23c71bf8147a0cebed8415642c81f38eb0f)) +- duplicate objects in array fields in validate data and siblingData ([#599](https://github.com/payloadcms/payload/issues/599)) ([20bbda9](https://github.com/payloadcms/payload/commit/20bbda95c67efb985f08b0380c6f21c13068a8b5)) +- ensures unflattening locales only happens if config specifies locales ([c18cc23](https://github.com/payloadcms/payload/commit/c18cc23c71bf8147a0cebed8415642c81f38eb0f)) ## [0.17.2](https://github.com/payloadcms/payload/compare/v0.17.1...v0.17.2) (2022-05-24) ### Bug Fixes -* [#576](https://github.com/payloadcms/payload/issues/576), graphql where on hasMany relationship not working ([#582](https://github.com/payloadcms/payload/issues/582)) ([20d251f](https://github.com/payloadcms/payload/commit/20d251fd5dabd06f8d58ffcd5acec4dbd64ee515)) -* adds optional chaining to safely read drafts setting on versions ([#577](https://github.com/payloadcms/payload/issues/577)) ([982b3f0](https://github.com/payloadcms/payload/commit/982b3f0582d9f64bd560e96b0df3cc505cc86a2a)) -* passes required prop for select field ([#579](https://github.com/payloadcms/payload/issues/579)) ([734e905](https://github.com/payloadcms/payload/commit/734e905c186ebf96ff659008cb240f5adaa2b5b5)) +- [#576](https://github.com/payloadcms/payload/issues/576), graphql where on hasMany relationship not working ([#582](https://github.com/payloadcms/payload/issues/582)) ([20d251f](https://github.com/payloadcms/payload/commit/20d251fd5dabd06f8d58ffcd5acec4dbd64ee515)) +- adds optional chaining to safely read drafts setting on versions ([#577](https://github.com/payloadcms/payload/issues/577)) ([982b3f0](https://github.com/payloadcms/payload/commit/982b3f0582d9f64bd560e96b0df3cc505cc86a2a)) +- passes required prop for select field ([#579](https://github.com/payloadcms/payload/issues/579)) ([734e905](https://github.com/payloadcms/payload/commit/734e905c186ebf96ff659008cb240f5adaa2b5b5)) ## [0.17.1](https://github.com/payloadcms/payload/compare/v0.17.0...v0.17.1) (2022-05-17) ### Bug Fixes -* only localizes schema if both field and top-level config are enabled ([e1a5547](https://github.com/payloadcms/payload/commit/e1a5547fea065f5590930cbeb6d07bf59d62d21d)) +- only localizes schema if both field and top-level config are enabled ([e1a5547](https://github.com/payloadcms/payload/commit/e1a5547fea065f5590930cbeb6d07bf59d62d21d)) # [0.17.0](https://github.com/payloadcms/payload/compare/v0.16.4...v0.17.0) (2022-05-16) ### Bug Fixes -* apply field condition to custom components ([#560](https://github.com/payloadcms/payload/issues/560)) ([1dfe2b8](https://github.com/payloadcms/payload/commit/1dfe2b892947411ff5295f5818befe28c4972915)) -* prevent changing order of readOnly arrays ([#563](https://github.com/payloadcms/payload/issues/563)) ([16b7edb](https://github.com/payloadcms/payload/commit/16b7edbc9782dcfb3bef77f1ff312e041d66922c)) +- apply field condition to custom components ([#560](https://github.com/payloadcms/payload/issues/560)) ([1dfe2b8](https://github.com/payloadcms/payload/commit/1dfe2b892947411ff5295f5818befe28c4972915)) +- prevent changing order of readOnly arrays ([#563](https://github.com/payloadcms/payload/issues/563)) ([16b7edb](https://github.com/payloadcms/payload/commit/16b7edbc9782dcfb3bef77f1ff312e041d66922c)) ## [0.16.4](https://github.com/payloadcms/payload/compare/v0.16.3...v0.16.4) (2022-05-06) ### Bug Fixes -* fields in groups causing console error in browser ([#553](https://github.com/payloadcms/payload/issues/553)) ([78edac6](https://github.com/payloadcms/payload/commit/78edac684e54d335b15303d8348c8abcb2bba716)) -* save resized image file when equal to upload size ([#555](https://github.com/payloadcms/payload/issues/555)) ([46f4bc2](https://github.com/payloadcms/payload/commit/46f4bc2a077ce668e9b30c187092b9b0c6d83f86)) +- fields in groups causing console error in browser ([#553](https://github.com/payloadcms/payload/issues/553)) ([78edac6](https://github.com/payloadcms/payload/commit/78edac684e54d335b15303d8348c8abcb2bba716)) +- save resized image file when equal to upload size ([#555](https://github.com/payloadcms/payload/issues/555)) ([46f4bc2](https://github.com/payloadcms/payload/commit/46f4bc2a077ce668e9b30c187092b9b0c6d83f86)) ## [0.16.3](https://github.com/payloadcms/payload/compare/v0.16.2...v0.16.3) (2022-05-04) ### Bug Fixes -* rare bug while merging locale data ([47c37e0](https://github.com/payloadcms/payload/commit/47c37e015300be4f9d5d4387f26a0adb39b8379c)) +- rare bug while merging locale data ([47c37e0](https://github.com/payloadcms/payload/commit/47c37e015300be4f9d5d4387f26a0adb39b8379c)) ## [0.16.2](https://github.com/payloadcms/payload/compare/v0.16.1...v0.16.2) (2022-05-02) ### Bug Fixes -* checkbox defaultValues and more typing of sanitize ([#550](https://github.com/payloadcms/payload/issues/550)) ([1e4a68f](https://github.com/payloadcms/payload/commit/1e4a68f76eeaab58ced0cc500223a1b86d66668e)) +- checkbox defaultValues and more typing of sanitize ([#550](https://github.com/payloadcms/payload/issues/550)) ([1e4a68f](https://github.com/payloadcms/payload/commit/1e4a68f76eeaab58ced0cc500223a1b86d66668e)) ### Features -* exposes findMany argument to afterRead hooks to discern between find and findByID ([b3832e2](https://github.com/payloadcms/payload/commit/b3832e21c91fa5d52067cfc24a0b4f8aa6e178ec)) -* optimizes field operations ([18489fa](https://github.com/payloadcms/payload/commit/18489facebe5d7b0abc87dcc30fae28510b6bb19)) +- exposes findMany argument to afterRead hooks to discern between find and findByID ([b3832e2](https://github.com/payloadcms/payload/commit/b3832e21c91fa5d52067cfc24a0b4f8aa6e178ec)) +- optimizes field operations ([18489fa](https://github.com/payloadcms/payload/commit/18489facebe5d7b0abc87dcc30fae28510b6bb19)) ## [0.16.1](https://github.com/payloadcms/payload/compare/v0.16.0...v0.16.1) (2022-04-29) ### Features -* exposes payload within server-side validation args ([e46b942](https://github.com/payloadcms/payload/commit/e46b94225957bba7758a0a2c22776c44a2d2d633)) +- exposes payload within server-side validation args ([e46b942](https://github.com/payloadcms/payload/commit/e46b94225957bba7758a0a2c22776c44a2d2d633)) # [0.16.0](https://github.com/payloadcms/payload/compare/v0.15.13...v0.16.0) (2022-04-29) ### Bug Fixes -* file upload safely handles missing mimeTypes ([#540](https://github.com/payloadcms/payload/issues/540)) ([bf48fdf](https://github.com/payloadcms/payload/commit/bf48fdf18961a2e57bcc5aae73de4c569e97e42b)) +- file upload safely handles missing mimeTypes ([#540](https://github.com/payloadcms/payload/issues/540)) ([bf48fdf](https://github.com/payloadcms/payload/commit/bf48fdf18961a2e57bcc5aae73de4c569e97e42b)) ### Features -* allow subfield readOnly to override parent readOnly ([#546](https://github.com/payloadcms/payload/issues/546)) ([834f4c2](https://github.com/payloadcms/payload/commit/834f4c270020bf32852c00a3abbb908853689006)) -* allows defaultValue to accept async function to calculate defaultValue ([#547](https://github.com/payloadcms/payload/issues/547)) ([e297eb9](https://github.com/payloadcms/payload/commit/e297eb90907d933524d220255d5f8dc4276358c5)) +- allow subfield readOnly to override parent readOnly ([#546](https://github.com/payloadcms/payload/issues/546)) ([834f4c2](https://github.com/payloadcms/payload/commit/834f4c270020bf32852c00a3abbb908853689006)) +- allows defaultValue to accept async function to calculate defaultValue ([#547](https://github.com/payloadcms/payload/issues/547)) ([e297eb9](https://github.com/payloadcms/payload/commit/e297eb90907d933524d220255d5f8dc4276358c5)) ## [0.15.13](https://github.com/payloadcms/payload/compare/v0.15.12...v0.15.13) (2022-04-26) @@ -1146,88 +1281,88 @@ Due to this change, the `admin.scss` functionality has become obsolete, and over ### Bug Fixes -* ensures adding array / block rows modifies form state ([8bdbd0d](https://github.com/payloadcms/payload/commit/8bdbd0dd418cd665441703fa4fd87becafd26170)) +- ensures adding array / block rows modifies form state ([8bdbd0d](https://github.com/payloadcms/payload/commit/8bdbd0dd418cd665441703fa4fd87becafd26170)) ## [0.15.11](https://github.com/payloadcms/payload/compare/v0.15.10...v0.15.11) (2022-04-24) ### Bug Fixes -* improperly typed access control ([b99ec06](https://github.com/payloadcms/payload/commit/b99ec060cacf7a05c20ba0a05dd6ef6ab60df304)) +- improperly typed access control ([b99ec06](https://github.com/payloadcms/payload/commit/b99ec060cacf7a05c20ba0a05dd6ef6ab60df304)) ## [0.15.10](https://github.com/payloadcms/payload/compare/v0.15.9...v0.15.10) (2022-04-24) ### Bug Fixes -* block form-data bug ([3b70560](https://github.com/payloadcms/payload/commit/3b70560e2566de5294eb15945120ffd6f1f5f1c4)) +- block form-data bug ([3b70560](https://github.com/payloadcms/payload/commit/3b70560e2566de5294eb15945120ffd6f1f5f1c4)) ## [0.15.9](https://github.com/payloadcms/payload/compare/v0.15.8...v0.15.9) (2022-04-20) ### Bug Fixes -* intermittent blocks UI issue ([3c1dfb8](https://github.com/payloadcms/payload/commit/3c1dfb88df8651b26cb1dbc102a34cd0aad722bc)) +- intermittent blocks UI issue ([3c1dfb8](https://github.com/payloadcms/payload/commit/3c1dfb88df8651b26cb1dbc102a34cd0aad722bc)) ## [0.15.8](https://github.com/payloadcms/payload/compare/v0.15.7...v0.15.8) (2022-04-20) ### Bug Fixes -* ensure relationTo is valid in upload fields ([#533](https://github.com/payloadcms/payload/issues/533)) ([9e324be](https://github.com/payloadcms/payload/commit/9e324be0577447965ee2f87c3a3943cd4f0c0a1c)) -* richtext editor input height ([#529](https://github.com/payloadcms/payload/issues/529)) ([3dcd8a2](https://github.com/payloadcms/payload/commit/3dcd8a24cb8cbb77aae82a1f841429e7149e3182)) +- ensure relationTo is valid in upload fields ([#533](https://github.com/payloadcms/payload/issues/533)) ([9e324be](https://github.com/payloadcms/payload/commit/9e324be0577447965ee2f87c3a3943cd4f0c0a1c)) +- richtext editor input height ([#529](https://github.com/payloadcms/payload/issues/529)) ([3dcd8a2](https://github.com/payloadcms/payload/commit/3dcd8a24cb8cbb77aae82a1f841429e7149e3182)) ## [0.15.7](https://github.com/payloadcms/payload/compare/v0.15.6...v0.15.7) (2022-04-12) ### Bug Fixes -* checkbox validation error positioning ([9af89b6](https://github.com/payloadcms/payload/commit/9af89b6c03bc4e82a0c3e353f0d53ec14a847ee2)) +- checkbox validation error positioning ([9af89b6](https://github.com/payloadcms/payload/commit/9af89b6c03bc4e82a0c3e353f0d53ec14a847ee2)) ### Features -* sanitize defaultValue to false when field is required ([6f84c0a](https://github.com/payloadcms/payload/commit/6f84c0a86943e9d99edde21b1d448e7ece3dd83c)) +- sanitize defaultValue to false when field is required ([6f84c0a](https://github.com/payloadcms/payload/commit/6f84c0a86943e9d99edde21b1d448e7ece3dd83c)) ## [0.15.6](https://github.com/payloadcms/payload/compare/v0.15.5...v0.15.6) (2022-04-06) ### Bug Fixes -* new up separate logger for generateTypes script ([cf54b33](https://github.com/payloadcms/payload/commit/cf54b336d17a79d775dd673c0eda361b356d159c)) +- new up separate logger for generateTypes script ([cf54b33](https://github.com/payloadcms/payload/commit/cf54b336d17a79d775dd673c0eda361b356d159c)) ## [0.15.5](https://github.com/payloadcms/payload/compare/v0.15.4...v0.15.5) (2022-04-06) ### Bug Fixes -* relationship component showing no results ([#508](https://github.com/payloadcms/payload/issues/508)) ([e1c6d9d](https://github.com/payloadcms/payload/commit/e1c6d9dd7d390c671edb0430d04aa0f194bf43e3)) +- relationship component showing no results ([#508](https://github.com/payloadcms/payload/issues/508)) ([e1c6d9d](https://github.com/payloadcms/payload/commit/e1c6d9dd7d390c671edb0430d04aa0f194bf43e3)) ## [0.15.4](https://github.com/payloadcms/payload/compare/v0.15.3...v0.15.4) (2022-04-05) ### Bug Fixes -* [#495](https://github.com/payloadcms/payload/issues/495), avoids appending version to id queries ([ab432a4](https://github.com/payloadcms/payload/commit/ab432a43dc568da0b7e65e275aed335d729600fa)) -* default point validation allows not required and some edge cases ([29405bb](https://github.com/payloadcms/payload/commit/29405bbc0e3a5c3c1f3dadb2386a68e1fe159c42)) +- [#495](https://github.com/payloadcms/payload/issues/495), avoids appending version to id queries ([ab432a4](https://github.com/payloadcms/payload/commit/ab432a43dc568da0b7e65e275aed335d729600fa)) +- default point validation allows not required and some edge cases ([29405bb](https://github.com/payloadcms/payload/commit/29405bbc0e3a5c3c1f3dadb2386a68e1fe159c42)) ### Features -* allows like to search by many words, adds contain to match exact strings ([ec91757](https://github.com/payloadcms/payload/commit/ec91757257ed062c7743fca3d07d1b6af21cacb4)) -* extended validation function arguments ([#494](https://github.com/payloadcms/payload/issues/494)) ([1b4b570](https://github.com/payloadcms/payload/commit/1b4b5707bfa731bedc5d9ca49ac9f425932b999c)), closes [#495](https://github.com/payloadcms/payload/issues/495) -* filter relationship options using filterOptions ([485991b](https://github.com/payloadcms/payload/commit/485991bd48c3512acca8dd94b3ab6c160bf1f153)) -* **logging:** allow pino logger options to be passed into init ([6620a4f](https://github.com/payloadcms/payload/commit/6620a4f682f0a3169218dd83e1de315f95726287)) -* support className config for row, block and array fields ([#504](https://github.com/payloadcms/payload/issues/504)) ([0461c21](https://github.com/payloadcms/payload/commit/0461c2109bea76742f94ae6f830c655ec67d1428)) +- allows like to search by many words, adds contain to match exact strings ([ec91757](https://github.com/payloadcms/payload/commit/ec91757257ed062c7743fca3d07d1b6af21cacb4)) +- extended validation function arguments ([#494](https://github.com/payloadcms/payload/issues/494)) ([1b4b570](https://github.com/payloadcms/payload/commit/1b4b5707bfa731bedc5d9ca49ac9f425932b999c)), closes [#495](https://github.com/payloadcms/payload/issues/495) +- filter relationship options using filterOptions ([485991b](https://github.com/payloadcms/payload/commit/485991bd48c3512acca8dd94b3ab6c160bf1f153)) +- **logging:** allow pino logger options to be passed into init ([6620a4f](https://github.com/payloadcms/payload/commit/6620a4f682f0a3169218dd83e1de315f95726287)) +- support className config for row, block and array fields ([#504](https://github.com/payloadcms/payload/issues/504)) ([0461c21](https://github.com/payloadcms/payload/commit/0461c2109bea76742f94ae6f830c655ec67d1428)) ## [0.15.3](https://github.com/payloadcms/payload/compare/v0.15.2...v0.15.3) (2022-04-04) ### Bug Fixes -* [#499](https://github.com/payloadcms/payload/issues/499), graphql row / ui field bug ([f4a2dff](https://github.com/payloadcms/payload/commit/f4a2dff892e6e8a6aa201c2a66b4db4fa2cd98b8)) +- [#499](https://github.com/payloadcms/payload/issues/499), graphql row / ui field bug ([f4a2dff](https://github.com/payloadcms/payload/commit/f4a2dff892e6e8a6aa201c2a66b4db4fa2cd98b8)) ## [0.15.2](https://github.com/payloadcms/payload/compare/v0.15.1...v0.15.2) (2022-04-04) ### Bug Fixes -* [#495](https://github.com/payloadcms/payload/issues/495), avoids appending version to id queries ([a703e05](https://github.com/payloadcms/payload/commit/a703e0582df3f4706ee051cf1752c79ff4b551ef)) +- [#495](https://github.com/payloadcms/payload/issues/495), avoids appending version to id queries ([a703e05](https://github.com/payloadcms/payload/commit/a703e0582df3f4706ee051cf1752c79ff4b551ef)) ## [0.15.1](https://github.com/payloadcms/payload/compare/v0.15.0...v0.15.1) (2022-03-28) ### Features -* builds a way to inject custom React providers into admin UI ([5a7e8a9](https://github.com/payloadcms/payload/commit/5a7e8a980be4e93f2503d8d007019948199a4867)) -* export Plugin type from config types ([#491](https://github.com/payloadcms/payload/issues/491)) ([45f7011](https://github.com/payloadcms/payload/commit/45f70114e6664942228b46373843879c06ab8211)) +- builds a way to inject custom React providers into admin UI ([5a7e8a9](https://github.com/payloadcms/payload/commit/5a7e8a980be4e93f2503d8d007019948199a4867)) +- export Plugin type from config types ([#491](https://github.com/payloadcms/payload/issues/491)) ([45f7011](https://github.com/payloadcms/payload/commit/45f70114e6664942228b46373843879c06ab8211)) # [0.15.0](https://github.com/payloadcms/payload/compare/v0.14.0...v0.15.0) (2022-03-16) @@ -1265,413 +1400,413 @@ The new shape of GraphQL errors is as follows: ### Bug Fixes -* [#422](https://github.com/payloadcms/payload/issues/422), prevents loading duplicative relationship options ([414679d](https://github.com/payloadcms/payload/commit/414679d86aac7ed94970a6eee14ff77b65f5c1d1)) -* [#423](https://github.com/payloadcms/payload/issues/423), [#391](https://github.com/payloadcms/payload/issues/391) - prevents loading edit views until data initializes ([2884654](https://github.com/payloadcms/payload/commit/28846547afc7e7bb8accc5dbe9f3b98593f332fa)) -* [#424](https://github.com/payloadcms/payload/issues/424), unable to clear localized property vals ([1a05fe4](https://github.com/payloadcms/payload/commit/1a05fe448c0755438dedc20c95d4a6a587912e2f)) -* [#431](https://github.com/payloadcms/payload/issues/431) - relationship field not properly fetching option results ([6fab8bf](https://github.com/payloadcms/payload/commit/6fab8bfbef43d5da67cadc7dd61fd14b9b36bdc1)) -* [#454](https://github.com/payloadcms/payload/issues/454), withCondition type usability ([56c16d5](https://github.com/payloadcms/payload/commit/56c16d5c16311b445662f715cc07e67d651e53a6)) -* [#459](https://github.com/payloadcms/payload/issues/459) - in Relationship field to multiple collections, when the value is null, options are not populated ([#460](https://github.com/payloadcms/payload/issues/460)) ([a9b83c8](https://github.com/payloadcms/payload/commit/a9b83c87980df0a62823950e5ef31ad0de218f1a)) -* [#461](https://github.com/payloadcms/payload/issues/461) ([08924a1](https://github.com/payloadcms/payload/commit/08924a1934ef257992381dfdded0cd9c7333e40c)) -* [#464](https://github.com/payloadcms/payload/issues/464), graphql upload access control ([fd0629e](https://github.com/payloadcms/payload/commit/fd0629e93202dfaa399c753c59481b1cbd139bf6)) -* adds key to RichText based on initialValue ([f710b8c](https://github.com/payloadcms/payload/commit/f710b8c4f3247156f64fb2b528a960bf808ef7ac)) -* adjusts lte and gte types to match docs and codebase ([#480](https://github.com/payloadcms/payload/issues/480)) ([8fc4f7f](https://github.com/payloadcms/payload/commit/8fc4f7f8068cb8fcef13b1cfd6de7b4f74b5415f)) -* allow jwt to work without csrf in config ([4048734](https://github.com/payloadcms/payload/commit/40487347e3f8bd03da440a73bec0ee491abbef85)) -* awaits beforeDelete hooks ([609b871](https://github.com/payloadcms/payload/commit/609b871fa274e8b6d9eaf301e52ab42179aad9b7)) -* config empty and sparse csrf is now allowed ([7e7b058](https://github.com/payloadcms/payload/commit/7e7b0589ef6c06941af3e7e3a24c7071d8b77a1a)) -* ensures empty hasMany relationships save as empty arrays ([08b3e8f](https://github.com/payloadcms/payload/commit/08b3e8f18f0aa620d537f3258b2e080600e0f43e)) -* ensures nested lists always render properly ([20e5dfb](https://github.com/payloadcms/payload/commit/20e5dfbb4ab8dab320d60772f5195c5faffe38d3)) -* ensures overrideAccess is false if undefined while populating ([97f3178](https://github.com/payloadcms/payload/commit/97f31780051828a9d506eba3520a1390acb99a96)) -* ensures rte upload is populated when only upload is enabled ([39438b8](https://github.com/payloadcms/payload/commit/39438b8460f853f64d84436eed49dde74cd207d2)) -* import path for createRichTextRelationshipPromise ([586cd4d](https://github.com/payloadcms/payload/commit/586cd4d6af5485116ebb299a5af3d24f5baeaa2e)) -* improperly typed local create method ([48aa27c](https://github.com/payloadcms/payload/commit/48aa27ce701e44561edf442ee6c248b007ecafcb)) -* mobile styling to not found page ([d3f88a1](https://github.com/payloadcms/payload/commit/d3f88a1bd9aeb1551d64b9ed975da5e69e5821bd)) -* new slate version types ([c5de01b](https://github.com/payloadcms/payload/commit/c5de01bfc48ca6793c1526499fe934d9ad8f0cc9)) -* optimizes relationship input search querying ([7e69fcb](https://github.com/payloadcms/payload/commit/7e69fcbc7d89012a7caff6e0e9013a9ad8a62a14)) -* prevents None from appearing in hasMany relationship select options ([cbf43fa](https://github.com/payloadcms/payload/commit/cbf43fa0d8ba50b7a9ef952f1693de6923068ffd)) -* rare crash with link rte element ([f5535f6](https://github.com/payloadcms/payload/commit/f5535f613ac4d876d040be74b45e105e0f4775a8)) -* rte upload field population ([8327b5a](https://github.com/payloadcms/payload/commit/8327b5aae505a189a5b9617c3485d646b5f8b517)) -* type error in useField ([ef4e6d3](https://github.com/payloadcms/payload/commit/ef4e6d32a90215c07aa2c1e7217cf53558bfae97)) +- [#422](https://github.com/payloadcms/payload/issues/422), prevents loading duplicative relationship options ([414679d](https://github.com/payloadcms/payload/commit/414679d86aac7ed94970a6eee14ff77b65f5c1d1)) +- [#423](https://github.com/payloadcms/payload/issues/423), [#391](https://github.com/payloadcms/payload/issues/391) - prevents loading edit views until data initializes ([2884654](https://github.com/payloadcms/payload/commit/28846547afc7e7bb8accc5dbe9f3b98593f332fa)) +- [#424](https://github.com/payloadcms/payload/issues/424), unable to clear localized property vals ([1a05fe4](https://github.com/payloadcms/payload/commit/1a05fe448c0755438dedc20c95d4a6a587912e2f)) +- [#431](https://github.com/payloadcms/payload/issues/431) - relationship field not properly fetching option results ([6fab8bf](https://github.com/payloadcms/payload/commit/6fab8bfbef43d5da67cadc7dd61fd14b9b36bdc1)) +- [#454](https://github.com/payloadcms/payload/issues/454), withCondition type usability ([56c16d5](https://github.com/payloadcms/payload/commit/56c16d5c16311b445662f715cc07e67d651e53a6)) +- [#459](https://github.com/payloadcms/payload/issues/459) - in Relationship field to multiple collections, when the value is null, options are not populated ([#460](https://github.com/payloadcms/payload/issues/460)) ([a9b83c8](https://github.com/payloadcms/payload/commit/a9b83c87980df0a62823950e5ef31ad0de218f1a)) +- [#461](https://github.com/payloadcms/payload/issues/461) ([08924a1](https://github.com/payloadcms/payload/commit/08924a1934ef257992381dfdded0cd9c7333e40c)) +- [#464](https://github.com/payloadcms/payload/issues/464), graphql upload access control ([fd0629e](https://github.com/payloadcms/payload/commit/fd0629e93202dfaa399c753c59481b1cbd139bf6)) +- adds key to RichText based on initialValue ([f710b8c](https://github.com/payloadcms/payload/commit/f710b8c4f3247156f64fb2b528a960bf808ef7ac)) +- adjusts lte and gte types to match docs and codebase ([#480](https://github.com/payloadcms/payload/issues/480)) ([8fc4f7f](https://github.com/payloadcms/payload/commit/8fc4f7f8068cb8fcef13b1cfd6de7b4f74b5415f)) +- allow jwt to work without csrf in config ([4048734](https://github.com/payloadcms/payload/commit/40487347e3f8bd03da440a73bec0ee491abbef85)) +- awaits beforeDelete hooks ([609b871](https://github.com/payloadcms/payload/commit/609b871fa274e8b6d9eaf301e52ab42179aad9b7)) +- config empty and sparse csrf is now allowed ([7e7b058](https://github.com/payloadcms/payload/commit/7e7b0589ef6c06941af3e7e3a24c7071d8b77a1a)) +- ensures empty hasMany relationships save as empty arrays ([08b3e8f](https://github.com/payloadcms/payload/commit/08b3e8f18f0aa620d537f3258b2e080600e0f43e)) +- ensures nested lists always render properly ([20e5dfb](https://github.com/payloadcms/payload/commit/20e5dfbb4ab8dab320d60772f5195c5faffe38d3)) +- ensures overrideAccess is false if undefined while populating ([97f3178](https://github.com/payloadcms/payload/commit/97f31780051828a9d506eba3520a1390acb99a96)) +- ensures rte upload is populated when only upload is enabled ([39438b8](https://github.com/payloadcms/payload/commit/39438b8460f853f64d84436eed49dde74cd207d2)) +- import path for createRichTextRelationshipPromise ([586cd4d](https://github.com/payloadcms/payload/commit/586cd4d6af5485116ebb299a5af3d24f5baeaa2e)) +- improperly typed local create method ([48aa27c](https://github.com/payloadcms/payload/commit/48aa27ce701e44561edf442ee6c248b007ecafcb)) +- mobile styling to not found page ([d3f88a1](https://github.com/payloadcms/payload/commit/d3f88a1bd9aeb1551d64b9ed975da5e69e5821bd)) +- new slate version types ([c5de01b](https://github.com/payloadcms/payload/commit/c5de01bfc48ca6793c1526499fe934d9ad8f0cc9)) +- optimizes relationship input search querying ([7e69fcb](https://github.com/payloadcms/payload/commit/7e69fcbc7d89012a7caff6e0e9013a9ad8a62a14)) +- prevents None from appearing in hasMany relationship select options ([cbf43fa](https://github.com/payloadcms/payload/commit/cbf43fa0d8ba50b7a9ef952f1693de6923068ffd)) +- rare crash with link rte element ([f5535f6](https://github.com/payloadcms/payload/commit/f5535f613ac4d876d040be74b45e105e0f4775a8)) +- rte upload field population ([8327b5a](https://github.com/payloadcms/payload/commit/8327b5aae505a189a5b9617c3485d646b5f8b517)) +- type error in useField ([ef4e6d3](https://github.com/payloadcms/payload/commit/ef4e6d32a90215c07aa2c1e7217cf53558bfae97)) ### Features -* :tada: versions, drafts, & autosave! -* [#458](https://github.com/payloadcms/payload/issues/458), provides field hooks with sibling data ([8e23a24](https://github.com/payloadcms/payload/commit/8e23a24f34ef7425bb4d43e96e869b255740c739)) -* add before and after login components ([#427](https://github.com/payloadcms/payload/issues/427)) ([5591eea](https://github.com/payloadcms/payload/commit/5591eeafca1aa6e8abcc2d8276f7478e00b75ef2)) -* add logMockCredentials email option ([ff33453](https://github.com/payloadcms/payload/commit/ff3345373630ca6913165284123a62269b3fa2c6)) -* add pagination argument to optimize graphql relationships and use in local api ([#482](https://github.com/payloadcms/payload/issues/482)) ([647db51](https://github.com/payloadcms/payload/commit/647db5122e7b7be7f032d50ccf332780d8203369)) -* adds a way to customize express.static options ([dbb3c50](https://github.com/payloadcms/payload/commit/dbb3c502227597ef4d04c9e5c8db6d2f51a8aac4)) -* adds admin.upload.collections[collection-name].fields to the RTE to save specific data on upload elements ([3adf44a](https://github.com/payloadcms/payload/commit/3adf44a24162e5adbcebdb0ca7d0d460d23c57eb)) -* adds indentation controls to rich text ([7df50f9](https://github.com/payloadcms/payload/commit/7df50f9bf9d4867e65bdd8cebdf43e0ab1737a63)) -* adds originalDoc to field access control ([c979513](https://github.com/payloadcms/payload/commit/c9795133b376d8159457a0a38784d0b53a549061)) -* adds path to GraphQL errors ([#457](https://github.com/payloadcms/payload/issues/457)) ([ad98b29](https://github.com/payloadcms/payload/commit/ad98b293983016db3c730112c9d2387de7bacb34)) -* adds recursion to richText field to populate relationship and upload nested fields ([42af22c](https://github.com/payloadcms/payload/commit/42af22c2a10de44555bfedf902e7b4a4c9b25d6b)) -* allow empty string radio and select option values ([#479](https://github.com/payloadcms/payload/issues/479)) ([f14e187](https://github.com/payloadcms/payload/commit/f14e187545b759ac4623189d5e31f25382728cc0)) -* allows access control to prevent reading of drafts ([c38470c](https://github.com/payloadcms/payload/commit/c38470c7b2119cec6ff9a3efc89f087a5999bb66)) -* allows global access control to return query constraints ([c0150ae](https://github.com/payloadcms/payload/commit/c0150ae8465777a2be1b6bc496a5be30cf478f42)) -* allows select input to receive new options ([#435](https://github.com/payloadcms/payload/issues/435)) ([500fb1c](https://github.com/payloadcms/payload/commit/500fb1c5c41a55d35c41173d50a976388fd0bd1b)) -* builds a way for multipart/form-data reqs to retain non-string values ([4efc2cf](https://github.com/payloadcms/payload/commit/4efc2cf71c8ec4c452fea0febfd1156b37868739)) -* enhances rich text upload with custom field API ([0e4eb90](https://github.com/payloadcms/payload/commit/0e4eb906f2881dca518fea6b41e460bc57da9801)) -* ensures field hooks run on all locales when locale=all ([c3f743a](https://github.com/payloadcms/payload/commit/c3f743af03bbde856dcd87114383f0b484c0b20f)) -* exposes data arg within create and update access control ([73f418b](https://github.com/payloadcms/payload/commit/73f418bb5cadf73f683fe04ee94e4d24c8cfe96f)) -* exposes FieldWithPath type for reuse ([df3a836](https://github.com/payloadcms/payload/commit/df3a83634fcb64724ef239600e3af4fc295fee4f)) -* exposes useLocale for reuse ([bef0206](https://github.com/payloadcms/payload/commit/bef02062e769d1b0279c51af748f06d41c924c8a)) -* improves adding rich text voids to RTE ([966c3c6](https://github.com/payloadcms/payload/commit/966c3c647198569ba06013481a3b6fa9042b058d)) -* improves relationship field performance ([13318ff](https://github.com/payloadcms/payload/commit/13318ff3608a6be3dc7b86cc4e97155b26ef9df6)) -* improves rich text link ([2e9a4c7](https://github.com/payloadcms/payload/commit/2e9a4c7d717e3a08b2982b8c49eb358baf23da17)) -* indexes filenames ([07c8ac0](https://github.com/payloadcms/payload/commit/07c8ac08e21689cc6a3a2a546e58cf544fb61dec)) +- :tada: versions, drafts, & autosave! +- [#458](https://github.com/payloadcms/payload/issues/458), provides field hooks with sibling data ([8e23a24](https://github.com/payloadcms/payload/commit/8e23a24f34ef7425bb4d43e96e869b255740c739)) +- add before and after login components ([#427](https://github.com/payloadcms/payload/issues/427)) ([5591eea](https://github.com/payloadcms/payload/commit/5591eeafca1aa6e8abcc2d8276f7478e00b75ef2)) +- add logMockCredentials email option ([ff33453](https://github.com/payloadcms/payload/commit/ff3345373630ca6913165284123a62269b3fa2c6)) +- add pagination argument to optimize graphql relationships and use in local api ([#482](https://github.com/payloadcms/payload/issues/482)) ([647db51](https://github.com/payloadcms/payload/commit/647db5122e7b7be7f032d50ccf332780d8203369)) +- adds a way to customize express.static options ([dbb3c50](https://github.com/payloadcms/payload/commit/dbb3c502227597ef4d04c9e5c8db6d2f51a8aac4)) +- adds admin.upload.collections[collection-name].fields to the RTE to save specific data on upload elements ([3adf44a](https://github.com/payloadcms/payload/commit/3adf44a24162e5adbcebdb0ca7d0d460d23c57eb)) +- adds indentation controls to rich text ([7df50f9](https://github.com/payloadcms/payload/commit/7df50f9bf9d4867e65bdd8cebdf43e0ab1737a63)) +- adds originalDoc to field access control ([c979513](https://github.com/payloadcms/payload/commit/c9795133b376d8159457a0a38784d0b53a549061)) +- adds path to GraphQL errors ([#457](https://github.com/payloadcms/payload/issues/457)) ([ad98b29](https://github.com/payloadcms/payload/commit/ad98b293983016db3c730112c9d2387de7bacb34)) +- adds recursion to richText field to populate relationship and upload nested fields ([42af22c](https://github.com/payloadcms/payload/commit/42af22c2a10de44555bfedf902e7b4a4c9b25d6b)) +- allow empty string radio and select option values ([#479](https://github.com/payloadcms/payload/issues/479)) ([f14e187](https://github.com/payloadcms/payload/commit/f14e187545b759ac4623189d5e31f25382728cc0)) +- allows access control to prevent reading of drafts ([c38470c](https://github.com/payloadcms/payload/commit/c38470c7b2119cec6ff9a3efc89f087a5999bb66)) +- allows global access control to return query constraints ([c0150ae](https://github.com/payloadcms/payload/commit/c0150ae8465777a2be1b6bc496a5be30cf478f42)) +- allows select input to receive new options ([#435](https://github.com/payloadcms/payload/issues/435)) ([500fb1c](https://github.com/payloadcms/payload/commit/500fb1c5c41a55d35c41173d50a976388fd0bd1b)) +- builds a way for multipart/form-data reqs to retain non-string values ([4efc2cf](https://github.com/payloadcms/payload/commit/4efc2cf71c8ec4c452fea0febfd1156b37868739)) +- enhances rich text upload with custom field API ([0e4eb90](https://github.com/payloadcms/payload/commit/0e4eb906f2881dca518fea6b41e460bc57da9801)) +- ensures field hooks run on all locales when locale=all ([c3f743a](https://github.com/payloadcms/payload/commit/c3f743af03bbde856dcd87114383f0b484c0b20f)) +- exposes data arg within create and update access control ([73f418b](https://github.com/payloadcms/payload/commit/73f418bb5cadf73f683fe04ee94e4d24c8cfe96f)) +- exposes FieldWithPath type for reuse ([df3a836](https://github.com/payloadcms/payload/commit/df3a83634fcb64724ef239600e3af4fc295fee4f)) +- exposes useLocale for reuse ([bef0206](https://github.com/payloadcms/payload/commit/bef02062e769d1b0279c51af748f06d41c924c8a)) +- improves adding rich text voids to RTE ([966c3c6](https://github.com/payloadcms/payload/commit/966c3c647198569ba06013481a3b6fa9042b058d)) +- improves relationship field performance ([13318ff](https://github.com/payloadcms/payload/commit/13318ff3608a6be3dc7b86cc4e97155b26ef9df6)) +- improves rich text link ([2e9a4c7](https://github.com/payloadcms/payload/commit/2e9a4c7d717e3a08b2982b8c49eb358baf23da17)) +- indexes filenames ([07c8ac0](https://github.com/payloadcms/payload/commit/07c8ac08e21689cc6a3a2a546e58cf544fb61dec)) a79570c)) -* rich text indentation ([2deed8b](https://github.com/payloadcms/payload/commit/2deed8b1464931c4bc76a288923b307cf04b6a4a)) -* serverURL is no longer required ([#437](https://github.com/payloadcms/payload/issues/437)) ([dca90c4](https://github.com/payloadcms/payload/commit/dca90c4aa92dd0cc2084ba16249254c9259622c3)) -* updates dependencies ([3ca3f53](https://github.com/payloadcms/payload/commit/3ca3f533d07b644fa8a3d077932860e9f12318c2)) +- rich text indentation ([2deed8b](https://github.com/payloadcms/payload/commit/2deed8b1464931c4bc76a288923b307cf04b6a4a)) +- serverURL is no longer required ([#437](https://github.com/payloadcms/payload/issues/437)) ([dca90c4](https://github.com/payloadcms/payload/commit/dca90c4aa92dd0cc2084ba16249254c9259622c3)) +- updates dependencies ([3ca3f53](https://github.com/payloadcms/payload/commit/3ca3f533d07b644fa8a3d077932860e9f12318c2)) ## [0.14.31-beta.0](https://github.com/payloadcms/payload/compare/v0.14.0...v0.14.31-beta.0) (2022-03-10) ### Bug Fixes -* improves rich text link ([2e9a4c7](https://github.com/payloadcms/payload/commit/2e9a4c7d717e3a08b2982b8c49eb358baf23da17)) -* improves adding rich text voids to RTE ([966c3c6](https://github.com/payloadcms/payload/commit/966c3c647198569ba06013481a3b6fa9042b058d)) -* rare crash with link rte element ([f5535f6](https://github.com/payloadcms/payload/commit/f5535f613ac4d876d040be74b45e105e0f4775a8)) -* ensures empty hasMany relationships save as empty arrays ([08b3e8f](https://github.com/payloadcms/payload/commit/08b3e8f18f0aa620d537f3258b2e080600e0f43e)) -* [#422](https://github.com/payloadcms/payload/issues/422), prevents loading duplicative relationship options ([414679d](https://github.com/payloadcms/payload/commit/414679d86aac7ed94970a6eee14ff77b65f5c1d1)) -* [#423](https://github.com/payloadcms/payload/issues/423), [#391](https://github.com/payloadcms/payload/issues/391) - prevents loading edit views until data initializes ([2884654](https://github.com/payloadcms/payload/commit/28846547afc7e7bb8accc5dbe9f3b98593f332fa)) -* [#424](https://github.com/payloadcms/payload/issues/424), unable to clear localized property vals ([1a05fe4](https://github.com/payloadcms/payload/commit/1a05fe448c0755438dedc20c95d4a6a587912e2f)) -* [#431](https://github.com/payloadcms/payload/issues/431) - relationship field not properly fetching option results ([6fab8bf](https://github.com/payloadcms/payload/commit/6fab8bfbef43d5da67cadc7dd61fd14b9b36bdc1)) -* adds key to RichText based on initialValue ([f710b8c](https://github.com/payloadcms/payload/commit/f710b8c4f3247156f64fb2b528a960bf808ef7ac)) -* awaits beforeDelete hooks ([609b871](https://github.com/payloadcms/payload/commit/609b871fa274e8b6d9eaf301e52ab42179aad9b7)) -* ensures multipart/form-data using \_payload flattens field data before sending ([ae44727](https://github.com/payloadcms/payload/commit/ae44727fb9734fc3801f7249fa9e78668311c09e)) -* ensures nested lists always render properly ([20e5dfb](https://github.com/payloadcms/payload/commit/20e5dfbb4ab8dab320d60772f5195c5faffe38d3)) -* ensures rte upload is populated when only upload is enabled ([39438b8](https://github.com/payloadcms/payload/commit/39438b8460f853f64d84436eed49dde74cd207d2)) -* import path for createRichTextRelationshipPromise ([586cd4d](https://github.com/payloadcms/payload/commit/586cd4d6af5485116ebb299a5af3d24f5baeaa2e)) -* improperly typed local create method ([48aa27c](https://github.com/payloadcms/payload/commit/48aa27ce701e44561edf442ee6c248b007ecafcb)) -* mobile styling to not found page ([d3f88a1](https://github.com/payloadcms/payload/commit/d3f88a1bd9aeb1551d64b9ed975da5e69e5821bd)) -* new slate version types ([c5de01b](https://github.com/payloadcms/payload/commit/c5de01bfc48ca6793c1526499fe934d9ad8f0cc9)) -* rte upload field population ([8327b5a](https://github.com/payloadcms/payload/commit/8327b5aae505a189a5b9617c3485d646b5f8b517)) -* type error in useField ([ef4e6d3](https://github.com/payloadcms/payload/commit/ef4e6d32a90215c07aa2c1e7217cf53558bfae97)) -* [#464](https://github.com/payloadcms/payload/issues/464), graphql upload access control ([fd0629e](https://github.com/payloadcms/payload/commit/fd0629e93202dfaa399c753c59481b1cbd139bf6)) -* ensures overrideAccess is false if undefined while populating ([97f3178](https://github.com/payloadcms/payload/commit/97f31780051828a9d506eba3520a1390acb99a96)) +- improves rich text link ([2e9a4c7](https://github.com/payloadcms/payload/commit/2e9a4c7d717e3a08b2982b8c49eb358baf23da17)) +- improves adding rich text voids to RTE ([966c3c6](https://github.com/payloadcms/payload/commit/966c3c647198569ba06013481a3b6fa9042b058d)) +- rare crash with link rte element ([f5535f6](https://github.com/payloadcms/payload/commit/f5535f613ac4d876d040be74b45e105e0f4775a8)) +- ensures empty hasMany relationships save as empty arrays ([08b3e8f](https://github.com/payloadcms/payload/commit/08b3e8f18f0aa620d537f3258b2e080600e0f43e)) +- [#422](https://github.com/payloadcms/payload/issues/422), prevents loading duplicative relationship options ([414679d](https://github.com/payloadcms/payload/commit/414679d86aac7ed94970a6eee14ff77b65f5c1d1)) +- [#423](https://github.com/payloadcms/payload/issues/423), [#391](https://github.com/payloadcms/payload/issues/391) - prevents loading edit views until data initializes ([2884654](https://github.com/payloadcms/payload/commit/28846547afc7e7bb8accc5dbe9f3b98593f332fa)) +- [#424](https://github.com/payloadcms/payload/issues/424), unable to clear localized property vals ([1a05fe4](https://github.com/payloadcms/payload/commit/1a05fe448c0755438dedc20c95d4a6a587912e2f)) +- [#431](https://github.com/payloadcms/payload/issues/431) - relationship field not properly fetching option results ([6fab8bf](https://github.com/payloadcms/payload/commit/6fab8bfbef43d5da67cadc7dd61fd14b9b36bdc1)) +- adds key to RichText based on initialValue ([f710b8c](https://github.com/payloadcms/payload/commit/f710b8c4f3247156f64fb2b528a960bf808ef7ac)) +- awaits beforeDelete hooks ([609b871](https://github.com/payloadcms/payload/commit/609b871fa274e8b6d9eaf301e52ab42179aad9b7)) +- ensures multipart/form-data using \_payload flattens field data before sending ([ae44727](https://github.com/payloadcms/payload/commit/ae44727fb9734fc3801f7249fa9e78668311c09e)) +- ensures nested lists always render properly ([20e5dfb](https://github.com/payloadcms/payload/commit/20e5dfbb4ab8dab320d60772f5195c5faffe38d3)) +- ensures rte upload is populated when only upload is enabled ([39438b8](https://github.com/payloadcms/payload/commit/39438b8460f853f64d84436eed49dde74cd207d2)) +- import path for createRichTextRelationshipPromise ([586cd4d](https://github.com/payloadcms/payload/commit/586cd4d6af5485116ebb299a5af3d24f5baeaa2e)) +- improperly typed local create method ([48aa27c](https://github.com/payloadcms/payload/commit/48aa27ce701e44561edf442ee6c248b007ecafcb)) +- mobile styling to not found page ([d3f88a1](https://github.com/payloadcms/payload/commit/d3f88a1bd9aeb1551d64b9ed975da5e69e5821bd)) +- new slate version types ([c5de01b](https://github.com/payloadcms/payload/commit/c5de01bfc48ca6793c1526499fe934d9ad8f0cc9)) +- rte upload field population ([8327b5a](https://github.com/payloadcms/payload/commit/8327b5aae505a189a5b9617c3485d646b5f8b517)) +- type error in useField ([ef4e6d3](https://github.com/payloadcms/payload/commit/ef4e6d32a90215c07aa2c1e7217cf53558bfae97)) +- [#464](https://github.com/payloadcms/payload/issues/464), graphql upload access control ([fd0629e](https://github.com/payloadcms/payload/commit/fd0629e93202dfaa399c753c59481b1cbd139bf6)) +- ensures overrideAccess is false if undefined while populating ([97f3178](https://github.com/payloadcms/payload/commit/97f31780051828a9d506eba3520a1390acb99a96)) ### Features -* :tada: versions, drafts, & autosave! -* adds originalDoc to field access control ([c979513](https://github.com/payloadcms/payload/commit/c9795133b376d8159457a0a38784d0b53a549061)) -* [#458](https://github.com/payloadcms/payload/issues/458), provides field hooks with sibling data ([8e23a24](https://github.com/payloadcms/payload/commit/8e23a24f34ef7425bb4d43e96e869b255740c739)) -* add before and after login components ([#427](https://github.com/payloadcms/payload/issues/427)) ([5591eea](https://github.com/payloadcms/payload/commit/5591eeafca1aa6e8abcc2d8276f7478e00b75ef2)) -* add logMockCredentials email option ([ff33453](https://github.com/payloadcms/payload/commit/ff3345373630ca6913165284123a62269b3fa2c6)) -* adds a way to customize express.static options ([dbb3c50](https://github.com/payloadcms/payload/commit/dbb3c502227597ef4d04c9e5c8db6d2f51a8aac4)) -* adds admin.upload.collections[collection-name].fields to the RTE to save specific data on upload elements ([3adf44a](https://github.com/payloadcms/payload/commit/3adf44a24162e5adbcebdb0ca7d0d460d23c57eb)) -* adds indentation controls to rich text ([7df50f9](https://github.com/payloadcms/payload/commit/7df50f9bf9d4867e65bdd8cebdf43e0ab1737a63)) -* adds recursion to richText field to populate relationship and upload nested fields ([42af22c](https://github.com/payloadcms/payload/commit/42af22c2a10de44555bfedf902e7b4a4c9b25d6b)) -* allows access control to prevent reading of drafts ([c38470c](https://github.com/payloadcms/payload/commit/c38470c7b2119cec6ff9a3efc89f087a5999bb66)) -* allows global access control to return query constraints ([c0150ae](https://github.com/payloadcms/payload/commit/c0150ae8465777a2be1b6bc496a5be30cf478f42)) -* allows select input to receive new options ([#435](https://github.com/payloadcms/payload/issues/435)) ([500fb1c](https://github.com/payloadcms/payload/commit/500fb1c5c41a55d35c41173d50a976388fd0bd1b)) -* builds a way for multipart/form-data reqs to retain non-string values ([4efc2cf](https://github.com/payloadcms/payload/commit/4efc2cf71c8ec4c452fea0febfd1156b37868739)) -* enhances rich text upload with custom field API ([0e4eb90](https://github.com/payloadcms/payload/commit/0e4eb906f2881dca518fea6b41e460bc57da9801)) -* ensures field hooks run on all locales when locale=all ([c3f743a](https://github.com/payloadcms/payload/commit/c3f743af03bbde856dcd87114383f0b484c0b20f)) -* exposes FieldWithPath type for reuse ([df3a836](https://github.com/payloadcms/payload/commit/df3a83634fcb64724ef239600e3af4fc295fee4f)) -* exposes useLocale for reuse ([bef0206](https://github.com/payloadcms/payload/commit/bef02062e769d1b0279c51af748f06d41c924c8a)) -* improves relationship field performance ([13318ff](https://github.com/payloadcms/payload/commit/13318ff3608a6be3dc7b86cc4e97155b26ef9df6)) -* indexes filenames ([07c8ac0](https://github.com/payloadcms/payload/commit/07c8ac08e21689cc6a3a2a546e58cf544fb61dec)) -* serverURL is no longer required ([#437](https://github.com/payloadcms/payload/issues/437)) ([dca90c4](https://github.com/payloadcms/payload/commit/dca90c4aa92dd0cc2084ba16249254c9259622c3)) -* updates dependencies ([3ca3f53](https://github.com/payloadcms/payload/commit/3ca3f533d07b644fa8a3d077932860e9f12318c2)) -* uses DocumentInfo to fetch and maintain doc versions ([8f30c3b](https://github.com/payloadcms/payload/commit/8f30c3bfefaa1530ac086aba22d4b8e6bac8f97d)) -* exposes data arg within create and update access control ([73f418b](https://github.com/payloadcms/payload/commit/73f418bb5cadf73f683fe04ee94e4d24c8cfe96f)) +- :tada: versions, drafts, & autosave! +- adds originalDoc to field access control ([c979513](https://github.com/payloadcms/payload/commit/c9795133b376d8159457a0a38784d0b53a549061)) +- [#458](https://github.com/payloadcms/payload/issues/458), provides field hooks with sibling data ([8e23a24](https://github.com/payloadcms/payload/commit/8e23a24f34ef7425bb4d43e96e869b255740c739)) +- add before and after login components ([#427](https://github.com/payloadcms/payload/issues/427)) ([5591eea](https://github.com/payloadcms/payload/commit/5591eeafca1aa6e8abcc2d8276f7478e00b75ef2)) +- add logMockCredentials email option ([ff33453](https://github.com/payloadcms/payload/commit/ff3345373630ca6913165284123a62269b3fa2c6)) +- adds a way to customize express.static options ([dbb3c50](https://github.com/payloadcms/payload/commit/dbb3c502227597ef4d04c9e5c8db6d2f51a8aac4)) +- adds admin.upload.collections[collection-name].fields to the RTE to save specific data on upload elements ([3adf44a](https://github.com/payloadcms/payload/commit/3adf44a24162e5adbcebdb0ca7d0d460d23c57eb)) +- adds indentation controls to rich text ([7df50f9](https://github.com/payloadcms/payload/commit/7df50f9bf9d4867e65bdd8cebdf43e0ab1737a63)) +- adds recursion to richText field to populate relationship and upload nested fields ([42af22c](https://github.com/payloadcms/payload/commit/42af22c2a10de44555bfedf902e7b4a4c9b25d6b)) +- allows access control to prevent reading of drafts ([c38470c](https://github.com/payloadcms/payload/commit/c38470c7b2119cec6ff9a3efc89f087a5999bb66)) +- allows global access control to return query constraints ([c0150ae](https://github.com/payloadcms/payload/commit/c0150ae8465777a2be1b6bc496a5be30cf478f42)) +- allows select input to receive new options ([#435](https://github.com/payloadcms/payload/issues/435)) ([500fb1c](https://github.com/payloadcms/payload/commit/500fb1c5c41a55d35c41173d50a976388fd0bd1b)) +- builds a way for multipart/form-data reqs to retain non-string values ([4efc2cf](https://github.com/payloadcms/payload/commit/4efc2cf71c8ec4c452fea0febfd1156b37868739)) +- enhances rich text upload with custom field API ([0e4eb90](https://github.com/payloadcms/payload/commit/0e4eb906f2881dca518fea6b41e460bc57da9801)) +- ensures field hooks run on all locales when locale=all ([c3f743a](https://github.com/payloadcms/payload/commit/c3f743af03bbde856dcd87114383f0b484c0b20f)) +- exposes FieldWithPath type for reuse ([df3a836](https://github.com/payloadcms/payload/commit/df3a83634fcb64724ef239600e3af4fc295fee4f)) +- exposes useLocale for reuse ([bef0206](https://github.com/payloadcms/payload/commit/bef02062e769d1b0279c51af748f06d41c924c8a)) +- improves relationship field performance ([13318ff](https://github.com/payloadcms/payload/commit/13318ff3608a6be3dc7b86cc4e97155b26ef9df6)) +- indexes filenames ([07c8ac0](https://github.com/payloadcms/payload/commit/07c8ac08e21689cc6a3a2a546e58cf544fb61dec)) +- serverURL is no longer required ([#437](https://github.com/payloadcms/payload/issues/437)) ([dca90c4](https://github.com/payloadcms/payload/commit/dca90c4aa92dd0cc2084ba16249254c9259622c3)) +- updates dependencies ([3ca3f53](https://github.com/payloadcms/payload/commit/3ca3f533d07b644fa8a3d077932860e9f12318c2)) +- uses DocumentInfo to fetch and maintain doc versions ([8f30c3b](https://github.com/payloadcms/payload/commit/8f30c3bfefaa1530ac086aba22d4b8e6bac8f97d)) +- exposes data arg within create and update access control ([73f418b](https://github.com/payloadcms/payload/commit/73f418bb5cadf73f683fe04ee94e4d24c8cfe96f)) # [0.14.0](https://github.com/payloadcms/payload/compare/v0.13.6...v0.14.0) (2022-01-03) ### Bug Fixes -* [#370](https://github.com/payloadcms/payload/issues/370), only performs password functions when auth enabled ([9738873](https://github.com/payloadcms/payload/commit/97388738def687f3b26eaf8de6b067f4d3758418)) -* [#390](https://github.com/payloadcms/payload/issues/390), safari rich text link bug ([a16b99b](https://github.com/payloadcms/payload/commit/a16b99b0c87d55f768ed74ab35708a291fc7bbb0)) -* [#393](https://github.com/payloadcms/payload/issues/393), ensures preview button gets up to date data ([2f47e39](https://github.com/payloadcms/payload/commit/2f47e39a9f765bd8ce437d4b7500a5b314a192a5)) -* [#408](https://github.com/payloadcms/payload/issues/408) ([5c3cfa4](https://github.com/payloadcms/payload/commit/5c3cfa4c93767a5ead9e816bf11a000ebdac9761)) -* [#408](https://github.com/payloadcms/payload/issues/408) ([e2c5d93](https://github.com/payloadcms/payload/commit/e2c5d93751cb1902d6dce2147953b97c2dc17939)) -* 407 ([a09570c](https://github.com/payloadcms/payload/commit/a09570c78dc923f3553f36d726e5cfac925290a0)) -* allows null in ImageSize width and height types ([ba79fd4](https://github.com/payloadcms/payload/commit/ba79fd42dbf20ba712a0632da9193fcc516c0257)) -* cross-browser upload drag and drop ([4119eec](https://github.com/payloadcms/payload/commit/4119eec796794d6a026f34f8b097b379eb9895a0)) -* ensures getDataByPath works ([140a3aa](https://github.com/payloadcms/payload/commit/140a3aa9eafa29b2a43bdfd8883c79c6ee4a93e4)) -* ensures local findByID retains user ([05288ee](https://github.com/payloadcms/payload/commit/05288ee08c077019e4432bf385aeacc23a0643f3)) -* ensures row count is set properly in block fields ([9e091af](https://github.com/payloadcms/payload/commit/9e091af67e944e6a15d1d1174a18cde6deda40d7)) -* ensures searching relationships works with many pages of results ([961787d](https://github.com/payloadcms/payload/commit/961787d681882e5ab48bb676490555c93f5d4a2e)) -* globals model typing ([da7c0c9](https://github.com/payloadcms/payload/commit/da7c0c984c1fb57038d620fc59bcd27972919ade)) +- [#370](https://github.com/payloadcms/payload/issues/370), only performs password functions when auth enabled ([9738873](https://github.com/payloadcms/payload/commit/97388738def687f3b26eaf8de6b067f4d3758418)) +- [#390](https://github.com/payloadcms/payload/issues/390), safari rich text link bug ([a16b99b](https://github.com/payloadcms/payload/commit/a16b99b0c87d55f768ed74ab35708a291fc7bbb0)) +- [#393](https://github.com/payloadcms/payload/issues/393), ensures preview button gets up to date data ([2f47e39](https://github.com/payloadcms/payload/commit/2f47e39a9f765bd8ce437d4b7500a5b314a192a5)) +- [#408](https://github.com/payloadcms/payload/issues/408) ([5c3cfa4](https://github.com/payloadcms/payload/commit/5c3cfa4c93767a5ead9e816bf11a000ebdac9761)) +- [#408](https://github.com/payloadcms/payload/issues/408) ([e2c5d93](https://github.com/payloadcms/payload/commit/e2c5d93751cb1902d6dce2147953b97c2dc17939)) +- 407 ([a09570c](https://github.com/payloadcms/payload/commit/a09570c78dc923f3553f36d726e5cfac925290a0)) +- allows null in ImageSize width and height types ([ba79fd4](https://github.com/payloadcms/payload/commit/ba79fd42dbf20ba712a0632da9193fcc516c0257)) +- cross-browser upload drag and drop ([4119eec](https://github.com/payloadcms/payload/commit/4119eec796794d6a026f34f8b097b379eb9895a0)) +- ensures getDataByPath works ([140a3aa](https://github.com/payloadcms/payload/commit/140a3aa9eafa29b2a43bdfd8883c79c6ee4a93e4)) +- ensures local findByID retains user ([05288ee](https://github.com/payloadcms/payload/commit/05288ee08c077019e4432bf385aeacc23a0643f3)) +- ensures row count is set properly in block fields ([9e091af](https://github.com/payloadcms/payload/commit/9e091af67e944e6a15d1d1174a18cde6deda40d7)) +- ensures searching relationships works with many pages of results ([961787d](https://github.com/payloadcms/payload/commit/961787d681882e5ab48bb676490555c93f5d4a2e)) +- globals model typing ([da7c0c9](https://github.com/payloadcms/payload/commit/da7c0c984c1fb57038d620fc59bcd27972919ade)) ### Features -* builds custom routes API, Before/After Dashboard and Nav custom components ([e337c62](https://github.com/payloadcms/payload/commit/e337c62ba179821c994404a2b693871b2401861b)) -* exports custom text and select inputs ([52edb5b](https://github.com/payloadcms/payload/commit/52edb5b77f45e267c43a284c5591044ac4d726e7)) -* exposes default Dashboard and Nav components for re-import ([ffe8e17](https://github.com/payloadcms/payload/commit/ffe8e17ac06c2fc89c3c51cab545df9756d3910b)) +- builds custom routes API, Before/After Dashboard and Nav custom components ([e337c62](https://github.com/payloadcms/payload/commit/e337c62ba179821c994404a2b693871b2401861b)) +- exports custom text and select inputs ([52edb5b](https://github.com/payloadcms/payload/commit/52edb5b77f45e267c43a284c5591044ac4d726e7)) +- exposes default Dashboard and Nav components for re-import ([ffe8e17](https://github.com/payloadcms/payload/commit/ffe8e17ac06c2fc89c3c51cab545df9756d3910b)) ## [0.13.21-beta.0](https://github.com/payloadcms/payload/compare/v0.13.6...v0.13.21-beta.0) (2021-12-29) ### Bug Fixes -* [#370](https://github.com/payloadcms/payload/issues/370), only performs password functions when auth enabled ([9738873](https://github.com/payloadcms/payload/commit/97388738def687f3b26eaf8de6b067f4d3758418)) -* [#390](https://github.com/payloadcms/payload/issues/390), safari rich text link bug ([a16b99b](https://github.com/payloadcms/payload/commit/a16b99b0c87d55f768ed74ab35708a291fc7bbb0)) -* [#393](https://github.com/payloadcms/payload/issues/393), ensures preview button gets up to date data ([2f47e39](https://github.com/payloadcms/payload/commit/2f47e39a9f765bd8ce437d4b7500a5b314a192a5)) -* [#408](https://github.com/payloadcms/payload/issues/408) ([5c3cfa4](https://github.com/payloadcms/payload/commit/5c3cfa4c93767a5ead9e816bf11a000ebdac9761)) -* [#408](https://github.com/payloadcms/payload/issues/408) ([e2c5d93](https://github.com/payloadcms/payload/commit/e2c5d93751cb1902d6dce2147953b97c2dc17939)) -* 407 ([a09570c](https://github.com/payloadcms/payload/commit/a09570c78dc923f3553f36d726e5cfac925290a0)) -* allows null in ImageSize width and height types ([ba79fd4](https://github.com/payloadcms/payload/commit/ba79fd42dbf20ba712a0632da9193fcc516c0257)) -* cross-browser upload drag and drop ([4119eec](https://github.com/payloadcms/payload/commit/4119eec796794d6a026f34f8b097b379eb9895a0)) -* ensures getDataByPath works ([140a3aa](https://github.com/payloadcms/payload/commit/140a3aa9eafa29b2a43bdfd8883c79c6ee4a93e4)) -* ensures local findByID retains user ([05288ee](https://github.com/payloadcms/payload/commit/05288ee08c077019e4432bf385aeacc23a0643f3)) -* ensures row count is set properly in block fields ([9e091af](https://github.com/payloadcms/payload/commit/9e091af67e944e6a15d1d1174a18cde6deda40d7)) -* ensures searching relationships works with many pages of results ([961787d](https://github.com/payloadcms/payload/commit/961787d681882e5ab48bb676490555c93f5d4a2e)) -* globals model typing ([da7c0c9](https://github.com/payloadcms/payload/commit/da7c0c984c1fb57038d620fc59bcd27972919ade)) +- [#370](https://github.com/payloadcms/payload/issues/370), only performs password functions when auth enabled ([9738873](https://github.com/payloadcms/payload/commit/97388738def687f3b26eaf8de6b067f4d3758418)) +- [#390](https://github.com/payloadcms/payload/issues/390), safari rich text link bug ([a16b99b](https://github.com/payloadcms/payload/commit/a16b99b0c87d55f768ed74ab35708a291fc7bbb0)) +- [#393](https://github.com/payloadcms/payload/issues/393), ensures preview button gets up to date data ([2f47e39](https://github.com/payloadcms/payload/commit/2f47e39a9f765bd8ce437d4b7500a5b314a192a5)) +- [#408](https://github.com/payloadcms/payload/issues/408) ([5c3cfa4](https://github.com/payloadcms/payload/commit/5c3cfa4c93767a5ead9e816bf11a000ebdac9761)) +- [#408](https://github.com/payloadcms/payload/issues/408) ([e2c5d93](https://github.com/payloadcms/payload/commit/e2c5d93751cb1902d6dce2147953b97c2dc17939)) +- 407 ([a09570c](https://github.com/payloadcms/payload/commit/a09570c78dc923f3553f36d726e5cfac925290a0)) +- allows null in ImageSize width and height types ([ba79fd4](https://github.com/payloadcms/payload/commit/ba79fd42dbf20ba712a0632da9193fcc516c0257)) +- cross-browser upload drag and drop ([4119eec](https://github.com/payloadcms/payload/commit/4119eec796794d6a026f34f8b097b379eb9895a0)) +- ensures getDataByPath works ([140a3aa](https://github.com/payloadcms/payload/commit/140a3aa9eafa29b2a43bdfd8883c79c6ee4a93e4)) +- ensures local findByID retains user ([05288ee](https://github.com/payloadcms/payload/commit/05288ee08c077019e4432bf385aeacc23a0643f3)) +- ensures row count is set properly in block fields ([9e091af](https://github.com/payloadcms/payload/commit/9e091af67e944e6a15d1d1174a18cde6deda40d7)) +- ensures searching relationships works with many pages of results ([961787d](https://github.com/payloadcms/payload/commit/961787d681882e5ab48bb676490555c93f5d4a2e)) +- globals model typing ([da7c0c9](https://github.com/payloadcms/payload/commit/da7c0c984c1fb57038d620fc59bcd27972919ade)) ### Features -* builds custom routes API, Before/After Dashboard and Nav custom components ([e337c62](https://github.com/payloadcms/payload/commit/e337c62ba179821c994404a2b693871b2401861b)) -* exports custom text and select inputs ([52edb5b](https://github.com/payloadcms/payload/commit/52edb5b77f45e267c43a284c5591044ac4d726e7)) -* exposes default Dashboard and Nav components for re-import ([ffe8e17](https://github.com/payloadcms/payload/commit/ffe8e17ac06c2fc89c3c51cab545df9756d3910b)) +- builds custom routes API, Before/After Dashboard and Nav custom components ([e337c62](https://github.com/payloadcms/payload/commit/e337c62ba179821c994404a2b693871b2401861b)) +- exports custom text and select inputs ([52edb5b](https://github.com/payloadcms/payload/commit/52edb5b77f45e267c43a284c5591044ac4d726e7)) +- exposes default Dashboard and Nav components for re-import ([ffe8e17](https://github.com/payloadcms/payload/commit/ffe8e17ac06c2fc89c3c51cab545df9756d3910b)) ## [0.13.6](https://github.com/payloadcms/payload/compare/v0.13.5...v0.13.6) (2021-11-30) ### Bug Fixes -* requires path in select, text, textarea, and upload components ([925a33e](https://github.com/payloadcms/payload/commit/925a33e5602336f6128188aaf73001dbd23bd411)) +- requires path in select, text, textarea, and upload components ([925a33e](https://github.com/payloadcms/payload/commit/925a33e5602336f6128188aaf73001dbd23bd411)) ## [0.13.5](https://github.com/payloadcms/payload/compare/v0.13.4...v0.13.5) (2021-11-30) ### Bug Fixes -* select component rendered value ([ecabf13](https://github.com/payloadcms/payload/commit/ecabf130fd1b4b87c45196d4bdf675e76b20c9e3)) +- select component rendered value ([ecabf13](https://github.com/payloadcms/payload/commit/ecabf130fd1b4b87c45196d4bdf675e76b20c9e3)) ## [0.13.4](https://github.com/payloadcms/payload/compare/v0.13.3...v0.13.4) (2021-11-30) ### Bug Fixes -* passes hasMany through select component ([c77bf3a](https://github.com/payloadcms/payload/commit/c77bf3aa42d76b7a0649b28fee3fe5d4bd06dcf6)) -* prevents uncontrolled text field component ([f0fd859](https://github.com/payloadcms/payload/commit/f0fd859347804fdf0d79bbe566412abaeec6ff6a)) -* select component types ([7e2b259](https://github.com/payloadcms/payload/commit/7e2b2598167dc59b8982f635cb95eacf247abb43)) -* threads props through textarea component ([0b13eda](https://github.com/payloadcms/payload/commit/0b13eda1e55299f7d6dfac2854acc04cff459396)) +- passes hasMany through select component ([c77bf3a](https://github.com/payloadcms/payload/commit/c77bf3aa42d76b7a0649b28fee3fe5d4bd06dcf6)) +- prevents uncontrolled text field component ([f0fd859](https://github.com/payloadcms/payload/commit/f0fd859347804fdf0d79bbe566412abaeec6ff6a)) +- select component types ([7e2b259](https://github.com/payloadcms/payload/commit/7e2b2598167dc59b8982f635cb95eacf247abb43)) +- threads props through textarea component ([0b13eda](https://github.com/payloadcms/payload/commit/0b13eda1e55299f7d6dfac2854acc04cff459396)) ### Features -* abstracts input from text component ([615e369](https://github.com/payloadcms/payload/commit/615e3695f2e62ce5d8a43ccb84192aca57770af8)) -* abstracts select component ([fa67137](https://github.com/payloadcms/payload/commit/fa671378c7282cda1ed6f46340a53622e3bc96dc)) -* abstracts textarea component and improves event typing ([86480b7](https://github.com/payloadcms/payload/commit/86480b7482b2b9413272ab0f9d0a82cd5e2920b8)) -* abstracts upload component ([f234f68](https://github.com/payloadcms/payload/commit/f234f68019f122bd46cb2af2e8f62cf07cd53c1b)) +- abstracts input from text component ([615e369](https://github.com/payloadcms/payload/commit/615e3695f2e62ce5d8a43ccb84192aca57770af8)) +- abstracts select component ([fa67137](https://github.com/payloadcms/payload/commit/fa671378c7282cda1ed6f46340a53622e3bc96dc)) +- abstracts textarea component and improves event typing ([86480b7](https://github.com/payloadcms/payload/commit/86480b7482b2b9413272ab0f9d0a82cd5e2920b8)) +- abstracts upload component ([f234f68](https://github.com/payloadcms/payload/commit/f234f68019f122bd46cb2af2e8f62cf07cd53c1b)) ## [0.13.3](https://github.com/payloadcms/payload/compare/v0.13.2...v0.13.3) (2021-11-29) ### Bug Fixes -* upgrade sharp for prebuilt M1 binaries ([34f416a](https://github.com/payloadcms/payload/commit/34f416aace112013359351e17c4371c30303156f)) +- upgrade sharp for prebuilt M1 binaries ([34f416a](https://github.com/payloadcms/payload/commit/34f416aace112013359351e17c4371c30303156f)) ## [0.13.2](https://github.com/payloadcms/payload/compare/v0.13.1...v0.13.2) (2021-11-29) ### Bug Fixes -* [#373](https://github.com/payloadcms/payload/issues/373) ([727fbec](https://github.com/payloadcms/payload/commit/727fbeceb4b93936ca08d0ca48ac0d2beb1ce96e)) +- [#373](https://github.com/payloadcms/payload/issues/373) ([727fbec](https://github.com/payloadcms/payload/commit/727fbeceb4b93936ca08d0ca48ac0d2beb1ce96e)) ## [0.13.1](https://github.com/payloadcms/payload/compare/v0.13.0...v0.13.1) (2021-11-29) ### Bug Fixes -* ensures sorting by \_id instead of improper id ([ded891e](https://github.com/payloadcms/payload/commit/ded891e390a93f71963762c0200c97a0beec5cad)) +- ensures sorting by \_id instead of improper id ([ded891e](https://github.com/payloadcms/payload/commit/ded891e390a93f71963762c0200c97a0beec5cad)) ### Features -* only adds list search query param if value is present ([d6d76d4](https://github.com/payloadcms/payload/commit/d6d76d4088a23ed43122333873ada6846c808d37)) +- only adds list search query param if value is present ([d6d76d4](https://github.com/payloadcms/payload/commit/d6d76d4088a23ed43122333873ada6846c808d37)) # [0.13.0](https://github.com/payloadcms/payload/compare/v0.12.3...v0.13.0) (2021-11-26) ### Bug Fixes -* [#351](https://github.com/payloadcms/payload/issues/351) ([94c2b8d](https://github.com/payloadcms/payload/commit/94c2b8d80b046c067057d4ad089ed6a2edd656cf)) -* [#358](https://github.com/payloadcms/payload/issues/358) - reuploading with existing filenames ([a0fb48c](https://github.com/payloadcms/payload/commit/a0fb48c9a37beceafc6f0638604e9946d0814635)) -* allows sync or async preview urls ([da6e1df](https://github.com/payloadcms/payload/commit/da6e1df293ce46bc4d0c84645db61feea2881aa7)) -* bug with relationship cell when no doc is available ([40b33d9](https://github.com/payloadcms/payload/commit/40b33d9f5e99285cb0de148dbe059259817fcad8)) +- [#351](https://github.com/payloadcms/payload/issues/351) ([94c2b8d](https://github.com/payloadcms/payload/commit/94c2b8d80b046c067057d4ad089ed6a2edd656cf)) +- [#358](https://github.com/payloadcms/payload/issues/358) - reuploading with existing filenames ([a0fb48c](https://github.com/payloadcms/payload/commit/a0fb48c9a37beceafc6f0638604e9946d0814635)) +- allows sync or async preview urls ([da6e1df](https://github.com/payloadcms/payload/commit/da6e1df293ce46bc4d0c84645db61feea2881aa7)) +- bug with relationship cell when no doc is available ([40b33d9](https://github.com/payloadcms/payload/commit/40b33d9f5e99285cb0de148dbe059259817fcad8)) 3839ef75151f)) -* ensures richtext links retain proper formatting ([abf61d0](https://github.com/payloadcms/payload/commit/abf61d0734c09fd0fc5c5b827cb0631e11701f71)) -* ensures that querying by relationship subpaths works ([37b21b0](https://github.com/payloadcms/payload/commit/37b21b07628e892e85c2cf979d9e2c8af0d291f7)) -* ensures uploads can be fetched with CORS ([96421b3](https://github.com/payloadcms/payload/commit/96421b3d59a87f8a3d781005c02344fe5d3a607f)) -* typing for collection description ([bb18e82](https://github.com/payloadcms/payload/commit/bb18e8250c5742d9615e5780c1cd02d33ecca3d0)) -* updates field description type to include react nodes ([291c193](https://github.com/payloadcms/payload/commit/291c193ad4a9ec8ce9310cc63c714eba10eca102)) +- ensures richtext links retain proper formatting ([abf61d0](https://github.com/payloadcms/payload/commit/abf61d0734c09fd0fc5c5b827cb0631e11701f71)) +- ensures that querying by relationship subpaths works ([37b21b0](https://github.com/payloadcms/payload/commit/37b21b07628e892e85c2cf979d9e2c8af0d291f7)) +- ensures uploads can be fetched with CORS ([96421b3](https://github.com/payloadcms/payload/commit/96421b3d59a87f8a3d781005c02344fe5d3a607f)) +- typing for collection description ([bb18e82](https://github.com/payloadcms/payload/commit/bb18e8250c5742d9615e5780c1cd02d33ecca3d0)) +- updates field description type to include react nodes ([291c193](https://github.com/payloadcms/payload/commit/291c193ad4a9ec8ce9310cc63c714eba10eca102)) ### Features -* :tada: :tada: builds a way to automatically generate types for collections and globals!. -* :tada: dramatically improves Payload types like local API methods and hooks to function as `generic`s -* adds relationship filter field ([463c4e6](https://github.com/payloadcms/payload/commit/463c4e60de8e647fca6268b826d826f9c6e45412)) -* applies upload access control to all auto-generated image sizes ([051b7d4](https://github.com/payloadcms/payload/commit/051b7d45befc331af3f73a669b2bb6467505902f)) -* azure cosmos compatibility ([6fd5ac2](https://github.com/payloadcms/payload/commit/6fd5ac2c082a5a5e6f510d781b2a2e12b7b62cb9)) -* ensures update hooks have access to full original docs even in spite of access control ([b2c5b7e](https://github.com/payloadcms/payload/commit/b2c5b7e5752e829c7a53c054decceb43ec33065e)) -* improves querying logic ([4c85747](https://github.com/payloadcms/payload/commit/4c8574784995b1cb1f939648f4d2158286089b3d)) -* indexes filenames ([5d43262](https://github.com/payloadcms/payload/commit/5d43262f42e0529a44572f398aa1ec5fd7858286)) -* renames useFieldType to useField ([0245747](https://github.com/payloadcms/payload/commit/0245747020c7c039b15d055f54a4548a364d047e)) -* supports custom onChange handling in text, select, and upload fields ([4affdc3](https://github.com/payloadcms/payload/commit/4affdc3a9397d70f5baacdd12753c8fc8c7d8368)) +- :tada: :tada: builds a way to automatically generate types for collections and globals!. +- :tada: dramatically improves Payload types like local API methods and hooks to function as `generic`s +- adds relationship filter field ([463c4e6](https://github.com/payloadcms/payload/commit/463c4e60de8e647fca6268b826d826f9c6e45412)) +- applies upload access control to all auto-generated image sizes ([051b7d4](https://github.com/payloadcms/payload/commit/051b7d45befc331af3f73a669b2bb6467505902f)) +- azure cosmos compatibility ([6fd5ac2](https://github.com/payloadcms/payload/commit/6fd5ac2c082a5a5e6f510d781b2a2e12b7b62cb9)) +- ensures update hooks have access to full original docs even in spite of access control ([b2c5b7e](https://github.com/payloadcms/payload/commit/b2c5b7e5752e829c7a53c054decceb43ec33065e)) +- improves querying logic ([4c85747](https://github.com/payloadcms/payload/commit/4c8574784995b1cb1f939648f4d2158286089b3d)) +- indexes filenames ([5d43262](https://github.com/payloadcms/payload/commit/5d43262f42e0529a44572f398aa1ec5fd7858286)) +- renames useFieldType to useField ([0245747](https://github.com/payloadcms/payload/commit/0245747020c7c039b15d055f54a4548a364d047e)) +- supports custom onChange handling in text, select, and upload fields ([4affdc3](https://github.com/payloadcms/payload/commit/4affdc3a9397d70f5baacdd12753c8fc8c7d8368)) ## [0.12.3](https://github.com/payloadcms/payload/compare/v0.12.2...v0.12.3) (2021-10-23) ### Bug Fixes -* [#348](https://github.com/payloadcms/payload/issues/348), relationship options appearing twice in admin ui ([b4c15ed](https://github.com/payloadcms/payload/commit/b4c15ed3f3649ea6d157987571874fb8486ab3cb)) -* ensures tooltips in email fields are positioned properly ([a0b38f6](https://github.com/payloadcms/payload/commit/a0b38f68322cd7a39ca6ae08e6ffb7f57aa62171)) +- [#348](https://github.com/payloadcms/payload/issues/348), relationship options appearing twice in admin ui ([b4c15ed](https://github.com/payloadcms/payload/commit/b4c15ed3f3649ea6d157987571874fb8486ab3cb)) +- ensures tooltips in email fields are positioned properly ([a0b38f6](https://github.com/payloadcms/payload/commit/a0b38f68322cd7a39ca6ae08e6ffb7f57aa62171)) ## [0.12.2](https://github.com/payloadcms/payload/compare/v0.12.1...v0.12.2) (2021-10-21) ### Bug Fixes -* improves paste html formatting ([d443ea5](https://github.com/payloadcms/payload/commit/d443ea582cc60be367dd3edbdcb062af0786b8ee)) +- improves paste html formatting ([d443ea5](https://github.com/payloadcms/payload/commit/d443ea582cc60be367dd3edbdcb062af0786b8ee)) ## [0.12.1](https://github.com/payloadcms/payload/compare/v0.12.0...v0.12.1) (2021-10-21) ### Bug Fixes -* rich text copy and paste now saves formatting properly ([9d7feb9](https://github.com/payloadcms/payload/commit/9d7feb9796e4b76e01f4ac2d0cb117bb091aa3d5)) +- rich text copy and paste now saves formatting properly ([9d7feb9](https://github.com/payloadcms/payload/commit/9d7feb9796e4b76e01f4ac2d0cb117bb091aa3d5)) # [0.12.0](https://github.com/payloadcms/payload/compare/v0.11.0...v0.12.0) (2021-10-21) ### Bug Fixes -* bug where field hooks and access control couuld potentially compete ([c35009f](https://github.com/payloadcms/payload/commit/c35009f14c9403e63727d4d77af51a449a5f7b4b)) +- bug where field hooks and access control couuld potentially compete ([c35009f](https://github.com/payloadcms/payload/commit/c35009f14c9403e63727d4d77af51a449a5f7b4b)) ### Features -* builds UI field ([edb723a](https://github.com/payloadcms/payload/commit/edb723a4fb8b4c353a9073cc7ec5f5cfd026cbe0)) -* exposes withCondition for re-use ([c02e8f1](https://github.com/payloadcms/payload/commit/c02e8f14c74a2ab9a53b0d8fd81f1083bede594e)) +- builds UI field ([edb723a](https://github.com/payloadcms/payload/commit/edb723a4fb8b4c353a9073cc7ec5f5cfd026cbe0)) +- exposes withCondition for re-use ([c02e8f1](https://github.com/payloadcms/payload/commit/c02e8f14c74a2ab9a53b0d8fd81f1083bede594e)) ## [0.11.2-beta.0](https://github.com/payloadcms/payload/compare/v0.11.0...v0.11.2-beta.0) (2021-10-21) ### Features -* exposes withCondition for re-use ([c02e8f1](https://github.com/payloadcms/payload/commit/c02e8f14c74a2ab9a53b0d8fd81f1083bede594e)) +- exposes withCondition for re-use ([c02e8f1](https://github.com/payloadcms/payload/commit/c02e8f14c74a2ab9a53b0d8fd81f1083bede594e)) ## [0.11.1-beta.0](https://github.com/payloadcms/payload/compare/v0.11.0...v0.11.1-beta.0) (2021-10-20) ### Features -* builds UI field ([edb723a](https://github.com/payloadcms/payload/commit/edb723a4fb8b4c353a9073cc7ec5f5cfd026cbe0)) +- builds UI field ([edb723a](https://github.com/payloadcms/payload/commit/edb723a4fb8b4c353a9073cc7ec5f5cfd026cbe0)) # [0.11.0](https://github.com/payloadcms/payload/compare/v0.10.11...v0.11.0) (2021-10-20) ### Bug Fixes -* [#338](https://github.com/payloadcms/payload/issues/338), array / block fields with only nested array block fields break admin UI ([86e88d9](https://github.com/payloadcms/payload/commit/86e88d998fbc36d7ea2456dfbc685edadff107d3)) -* [#341](https://github.com/payloadcms/payload/issues/341) - searching on multiple relationship collections ([3b99ded](https://github.com/payloadcms/payload/commit/3b99deda450fbbe4a9d05c28c9c485c466872097)) -* [#343](https://github.com/payloadcms/payload/issues/343) - upload rte element crashes admin when no upload collection present ([914cca6](https://github.com/payloadcms/payload/commit/914cca6b926923bd238605856a7b7125c13244e1)) -* make name required on field types ([#337](https://github.com/payloadcms/payload/issues/337)) ([b257e01](https://github.com/payloadcms/payload/commit/b257e01c8dea5d22172ce4f71e4124aecc39bba8)) -* more strict field typing ([84f6a9d](https://github.com/payloadcms/payload/commit/84f6a9d659fd443545f3ba7adf9f6adab98452ca)) -* per page now properly modifies search query ([fcd9c28](https://github.com/payloadcms/payload/commit/fcd9c2887175396bdedc051f3f30f1080d8c5953)) -* properly types row field ([7d49302](https://github.com/payloadcms/payload/commit/7d49302ffa8207498e6e70255b3be84b3ac890c1)) -* removes node 15 from CI ([a2df67e](https://github.com/payloadcms/payload/commit/a2df67eccd9ab6f8c9d4982bdade9b47186c2c82)) -* use proper error code on webpack build failure ([2eb8154](https://github.com/payloadcms/payload/commit/2eb81546c3b4bf1804d25ccd5307af4855c4f750)) +- [#338](https://github.com/payloadcms/payload/issues/338), array / block fields with only nested array block fields break admin UI ([86e88d9](https://github.com/payloadcms/payload/commit/86e88d998fbc36d7ea2456dfbc685edadff107d3)) +- [#341](https://github.com/payloadcms/payload/issues/341) - searching on multiple relationship collections ([3b99ded](https://github.com/payloadcms/payload/commit/3b99deda450fbbe4a9d05c28c9c485c466872097)) +- [#343](https://github.com/payloadcms/payload/issues/343) - upload rte element crashes admin when no upload collection present ([914cca6](https://github.com/payloadcms/payload/commit/914cca6b926923bd238605856a7b7125c13244e1)) +- make name required on field types ([#337](https://github.com/payloadcms/payload/issues/337)) ([b257e01](https://github.com/payloadcms/payload/commit/b257e01c8dea5d22172ce4f71e4124aecc39bba8)) +- more strict field typing ([84f6a9d](https://github.com/payloadcms/payload/commit/84f6a9d659fd443545f3ba7adf9f6adab98452ca)) +- per page now properly modifies search query ([fcd9c28](https://github.com/payloadcms/payload/commit/fcd9c2887175396bdedc051f3f30f1080d8c5953)) +- properly types row field ([7d49302](https://github.com/payloadcms/payload/commit/7d49302ffa8207498e6e70255b3be84b3ac890c1)) +- removes node 15 from CI ([a2df67e](https://github.com/payloadcms/payload/commit/a2df67eccd9ab6f8c9d4982bdade9b47186c2c82)) +- use proper error code on webpack build failure ([2eb8154](https://github.com/payloadcms/payload/commit/2eb81546c3b4bf1804d25ccd5307af4855c4f750)) ### Features -* adds dynamic url field to upload-enabled collections ([cc4d1fd](https://github.com/payloadcms/payload/commit/cc4d1fd045ed54c6a35c7104182e6fbeadb6dac4)) -* adds safety checks while querying on id with bad values ([900f05e](https://github.com/payloadcms/payload/commit/900f05eefdc63978809a88a2e1474be08afff6c6)) -* **admin:** initial per page component ([3715e01](https://github.com/payloadcms/payload/commit/3715e011c97c8e30174c35c502fa7db12bc84e2c)) -* allows richText enter key break out functionality to be extended in custom elements ([ca91f47](https://github.com/payloadcms/payload/commit/ca91f47d325de5211f24000c7d90b10a8fdfc544)) -* improves richtext link ([423ca01](https://github.com/payloadcms/payload/commit/423ca01ab1d5d07e2f5369d82928d6c7dad052b0)) -* **per-page:** add pagination to admin config ([c132f2f](https://github.com/payloadcms/payload/commit/c132f2ff10b3efdb3854ec2d5a895120ccf22002)) -* **per-page:** set and load from preferences ([d88ce2d](https://github.com/payloadcms/payload/commit/d88ce2d342b20c1601b1b58470c226a9826758b3)) -* saves active list filters in URL, implements per-page control ([a6fc1fd](https://github.com/payloadcms/payload/commit/a6fc1fdc5838c3d17c5a8b6cbe9a46b86c89af71)) +- adds dynamic url field to upload-enabled collections ([cc4d1fd](https://github.com/payloadcms/payload/commit/cc4d1fd045ed54c6a35c7104182e6fbeadb6dac4)) +- adds safety checks while querying on id with bad values ([900f05e](https://github.com/payloadcms/payload/commit/900f05eefdc63978809a88a2e1474be08afff6c6)) +- **admin:** initial per page component ([3715e01](https://github.com/payloadcms/payload/commit/3715e011c97c8e30174c35c502fa7db12bc84e2c)) +- allows richText enter key break out functionality to be extended in custom elements ([ca91f47](https://github.com/payloadcms/payload/commit/ca91f47d325de5211f24000c7d90b10a8fdfc544)) +- improves richtext link ([423ca01](https://github.com/payloadcms/payload/commit/423ca01ab1d5d07e2f5369d82928d6c7dad052b0)) +- **per-page:** add pagination to admin config ([c132f2f](https://github.com/payloadcms/payload/commit/c132f2ff10b3efdb3854ec2d5a895120ccf22002)) +- **per-page:** set and load from preferences ([d88ce2d](https://github.com/payloadcms/payload/commit/d88ce2d342b20c1601b1b58470c226a9826758b3)) +- saves active list filters in URL, implements per-page control ([a6fc1fd](https://github.com/payloadcms/payload/commit/a6fc1fdc5838c3d17c5a8b6cbe9a46b86c89af71)) ## [0.10.11](https://github.com/payloadcms/payload/compare/v0.10.10...v0.10.11) (2021-10-08) ### Bug Fixes -* bug with local API and not passing array / block data ([fd4fbe8](https://github.com/payloadcms/payload/commit/fd4fbe8c8b492445ab29d26d9648cff4e98d5708)) +- bug with local API and not passing array / block data ([fd4fbe8](https://github.com/payloadcms/payload/commit/fd4fbe8c8b492445ab29d26d9648cff4e98d5708)) ## [0.10.10](https://github.com/payloadcms/payload/compare/v0.10.9...v0.10.10) (2021-10-07) ### Bug Fixes -* deepObjectCopy returns Date object instead of empty object ([2711729](https://github.com/payloadcms/payload/commit/27117292f3a4e207d9705e79f82fb78f70985915)) +- deepObjectCopy returns Date object instead of empty object ([2711729](https://github.com/payloadcms/payload/commit/27117292f3a4e207d9705e79f82fb78f70985915)) ## [0.10.9](https://github.com/payloadcms/payload/compare/v0.10.8...v0.10.9) (2021-10-05) ### Bug Fixes -* ensures field read access within login operation has id ([e3229c5](https://github.com/payloadcms/payload/commit/e3229c55f352a2f68bbea967f816badfd265dd02)) +- ensures field read access within login operation has id ([e3229c5](https://github.com/payloadcms/payload/commit/e3229c55f352a2f68bbea967f816badfd265dd02)) ## [0.10.8](https://github.com/payloadcms/payload/compare/v0.10.7...v0.10.8) (2021-10-04) ### Bug Fixes -* ensures update field access control receives id ([ffab6c4](https://github.com/payloadcms/payload/commit/ffab6c46c1c267f46d1d4eb3fd8060a4e5fada4b)) +- ensures update field access control receives id ([ffab6c4](https://github.com/payloadcms/payload/commit/ffab6c46c1c267f46d1d4eb3fd8060a4e5fada4b)) ## [0.10.7](https://github.com/payloadcms/payload/compare/v0.10.6...v0.10.7) (2021-10-04) ### Bug Fixes -* ensures non populated relationships still retain IDs ([a201109](https://github.com/payloadcms/payload/commit/a20110974d781e972831fa8a52a0839a613121f6)) -* ensures relationship field access control receives id ([470d434](https://github.com/payloadcms/payload/commit/470d4345f9ccc7630dc55b40172937509475d534)) +- ensures non populated relationships still retain IDs ([a201109](https://github.com/payloadcms/payload/commit/a20110974d781e972831fa8a52a0839a613121f6)) +- ensures relationship field access control receives id ([470d434](https://github.com/payloadcms/payload/commit/470d4345f9ccc7630dc55b40172937509475d534)) ### Features -* add indexSortableField option to create indexes for sortable fields on all collections ([ad09782](https://github.com/payloadcms/payload/commit/ad097820bfe32b0a4ef428a37a78e5a569258ec6)) +- add indexSortableField option to create indexes for sortable fields on all collections ([ad09782](https://github.com/payloadcms/payload/commit/ad097820bfe32b0a4ef428a37a78e5a569258ec6)) ## [0.10.6](https://github.com/payloadcms/payload/compare/v0.10.5...v0.10.6) (2021-09-30) ### Bug Fixes -* allow debug in payload config ([65bf13d](https://github.com/payloadcms/payload/commit/65bf13d7c137eafdbbeadc1d36d26b7b8389088f)) -* relationship + new slate incompatibility ([f422053](https://github.com/payloadcms/payload/commit/f42205307e33916fc3b139f6ee97eb66d5d0816a)) +- allow debug in payload config ([65bf13d](https://github.com/payloadcms/payload/commit/65bf13d7c137eafdbbeadc1d36d26b7b8389088f)) +- relationship + new slate incompatibility ([f422053](https://github.com/payloadcms/payload/commit/f42205307e33916fc3b139f6ee97eb66d5d0816a)) ## [0.10.5](https://github.com/payloadcms/payload/compare/v0.10.4...v0.10.5) (2021-09-28) ### Bug Fixes -* ensures that fields within non-required groups are correctly not required ([1597055](https://github.com/payloadcms/payload/commit/15970550f7b00ce0527027c362a9550ff8ad5d2a)) -* index creation on localized field parent ([23e8197](https://github.com/payloadcms/payload/commit/23e81971eb94fd5b991aedb02aab84931937ae37)) -* pagination estimatedCount limited to near query ([73bd698](https://github.com/payloadcms/payload/commit/73bd69870c4ff8ae92053e77ef95cfae18c142b5)) +- ensures that fields within non-required groups are correctly not required ([1597055](https://github.com/payloadcms/payload/commit/15970550f7b00ce0527027c362a9550ff8ad5d2a)) +- index creation on localized field parent ([23e8197](https://github.com/payloadcms/payload/commit/23e81971eb94fd5b991aedb02aab84931937ae37)) +- pagination estimatedCount limited to near query ([73bd698](https://github.com/payloadcms/payload/commit/73bd69870c4ff8ae92053e77ef95cfae18c142b5)) ### Features -* adds rich text editor upload element ([aa76950](https://github.com/payloadcms/payload/commit/aa769500c934f4dee51a24c0cfc0297c12b5ae47)) -* updates slate, finishes rte upload ([08db431](https://github.com/payloadcms/payload/commit/08db431c0c4626a0d10f4e1c7bca29fa075eedc6)) +- adds rich text editor upload element ([aa76950](https://github.com/payloadcms/payload/commit/aa769500c934f4dee51a24c0cfc0297c12b5ae47)) +- updates slate, finishes rte upload ([08db431](https://github.com/payloadcms/payload/commit/08db431c0c4626a0d10f4e1c7bca29fa075eedc6)) ## [0.10.4](https://github.com/payloadcms/payload/compare/v0.10.0...v0.10.4) (2021-09-22) ### Bug Fixes -* allows image resizing if either width or height is larger ([8661115](https://github.com/payloadcms/payload/commit/866111528377808009fa71595691e6a08ec77dc5)) -* array objects now properly save IDs ([2b8f925](https://github.com/payloadcms/payload/commit/2b8f925e81c58f6aa010bf13a318236f211ea091)) -* date field error message position ([03c0435](https://github.com/payloadcms/payload/commit/03c0435e3b3ecdfa0713e3e5026b80f8985ca290)) -* properly types optional req in local findByID ([02e7fe3](https://github.com/payloadcms/payload/commit/02e7fe3f1f3763f32f100cf2e5a8596aa16f3bd9)) +- allows image resizing if either width or height is larger ([8661115](https://github.com/payloadcms/payload/commit/866111528377808009fa71595691e6a08ec77dc5)) +- array objects now properly save IDs ([2b8f925](https://github.com/payloadcms/payload/commit/2b8f925e81c58f6aa010bf13a318236f211ea091)) +- date field error message position ([03c0435](https://github.com/payloadcms/payload/commit/03c0435e3b3ecdfa0713e3e5026b80f8985ca290)) +- properly types optional req in local findByID ([02e7fe3](https://github.com/payloadcms/payload/commit/02e7fe3f1f3763f32f100cf2e5a8596aa16f3bd9)) ### Features -* defaults empty group fields to empty object ([8a890fd](https://github.com/payloadcms/payload/commit/8a890fdc15b646c24963a1ef7584237b1d3c5783)) -* allows local update api to replace existing files with newly uploaded ones ([dbbff4c](https://github.com/payloadcms/payload/commit/dbbff4cfa41aa20077e47c8c7b87d4d00683c571)) -* exposes Pill component for re-use ([7e8df10](https://github.com/payloadcms/payload/commit/7e8df100bbf86798de292466afd4c00c455ecb35)) -* performance improvement while saving large docs ([901ad49](https://github.com/payloadcms/payload/commit/901ad498b47bcb8ae995ade18f2fc08cd33f0645)) +- defaults empty group fields to empty object ([8a890fd](https://github.com/payloadcms/payload/commit/8a890fdc15b646c24963a1ef7584237b1d3c5783)) +- allows local update api to replace existing files with newly uploaded ones ([dbbff4c](https://github.com/payloadcms/payload/commit/dbbff4cfa41aa20077e47c8c7b87d4d00683c571)) +- exposes Pill component for re-use ([7e8df10](https://github.com/payloadcms/payload/commit/7e8df100bbf86798de292466afd4c00c455ecb35)) +- performance improvement while saving large docs ([901ad49](https://github.com/payloadcms/payload/commit/901ad498b47bcb8ae995ade18f2fc08cd33f0645)) # [0.10.0](https://github.com/payloadcms/payload/compare/v0.9.5...v0.10.0) (2021-09-09) ### Bug Fixes -* admin UI collection id is required ([dc96b90](https://github.com/payloadcms/payload/commit/dc96b90cba01756374dde5b91f7702e0a0c661aa)) -* allow save of collection with an undefined point ([f80646c](https://github.com/payloadcms/payload/commit/f80646c5987db4c228b00beda9549259021c2a40)) -* config validation correctly prevents empty strings for option values ([41e7feb](https://github.com/payloadcms/payload/commit/41e7febf6a21d2fff39a335c033d9e9582294147)) -* ensures hooks run before access ([96629f1](https://github.com/payloadcms/payload/commit/96629f1f0100efdb9c5ad57c1a46add3c15ea65d)) -* ensures proper order while transforming incoming and outgoing data ([c187da0](https://github.com/payloadcms/payload/commit/c187da00b1f18c66d9252a5a3e2029455d75b371)) -* improve id type semantic and restrict possible types to text and number ([29529b2](https://github.com/payloadcms/payload/commit/29529b2c56d4af7c6abce113da2f7ce84f1dcc02)) -* remove media directory to improve test run consistency ([d42d8f7](https://github.com/payloadcms/payload/commit/d42d8f76efcda7a24f2f50d60caf47b1027d81f6)) -* sanitize custom id number types ([c7558d8](https://github.com/payloadcms/payload/commit/c7558d8652780e24479b39e5f2a08a49ffff3358)) -* sort id columns ([114dc1b](https://github.com/payloadcms/payload/commit/114dc1b3fb9a1895e09671aca7a57fd5c7d84911)) +- admin UI collection id is required ([dc96b90](https://github.com/payloadcms/payload/commit/dc96b90cba01756374dde5b91f7702e0a0c661aa)) +- allow save of collection with an undefined point ([f80646c](https://github.com/payloadcms/payload/commit/f80646c5987db4c228b00beda9549259021c2a40)) +- config validation correctly prevents empty strings for option values ([41e7feb](https://github.com/payloadcms/payload/commit/41e7febf6a21d2fff39a335c033d9e9582294147)) +- ensures hooks run before access ([96629f1](https://github.com/payloadcms/payload/commit/96629f1f0100efdb9c5ad57c1a46add3c15ea65d)) +- ensures proper order while transforming incoming and outgoing data ([c187da0](https://github.com/payloadcms/payload/commit/c187da00b1f18c66d9252a5a3e2029455d75b371)) +- improve id type semantic and restrict possible types to text and number ([29529b2](https://github.com/payloadcms/payload/commit/29529b2c56d4af7c6abce113da2f7ce84f1dcc02)) +- remove media directory to improve test run consistency ([d42d8f7](https://github.com/payloadcms/payload/commit/d42d8f76efcda7a24f2f50d60caf47b1027d81f6)) +- sanitize custom id number types ([c7558d8](https://github.com/payloadcms/payload/commit/c7558d8652780e24479b39e5f2a08a49ffff3358)) +- sort id columns ([114dc1b](https://github.com/payloadcms/payload/commit/114dc1b3fb9a1895e09671aca7a57fd5c7d84911)) ### Features -* add config validation for collections with custom id ([fe1dc0b](https://github.com/payloadcms/payload/commit/fe1dc0b191e73f350b77a90887d8172bf76d46fd)) -* add config validation for collections with custom id ([d0aaf4a](https://github.com/payloadcms/payload/commit/d0aaf4a4128ad585013c392bb608f586985b71ad)) -* add point field type ([7504155](https://github.com/payloadcms/payload/commit/7504155e17a2881b7a60f49e610c062665b46d21)) -* allows user to pass req through local findByID ([8675481](https://github.com/payloadcms/payload/commit/8675481343ef45fefc2eaaea939eda8ed0a2577f)) -* frontend polish to point field ([64ad6a3](https://github.com/payloadcms/payload/commit/64ad6a30a56969127dfb592a7e0c8807e9f3d8f7)) -* graphql support for custom id types ([bc2a6e1](https://github.com/payloadcms/payload/commit/bc2a6e15753c62d2041e9afded3f1ca040dbffa3)) -* point field localization and graphql ([30f1750](https://github.com/payloadcms/payload/commit/30f17509ea9927d923ffd42c703adefc902b66ea)) -* replace the collection idType option with an explicit id field ([4b70a12](https://github.com/payloadcms/payload/commit/4b70a1225f834ecd0aab50c6e92ad50572389962)) -* support custom ids ([3cc921a](https://github.com/payloadcms/payload/commit/3cc921acc92e1b4a372468b644b7e676400d9c26)) +- add config validation for collections with custom id ([fe1dc0b](https://github.com/payloadcms/payload/commit/fe1dc0b191e73f350b77a90887d8172bf76d46fd)) +- add config validation for collections with custom id ([d0aaf4a](https://github.com/payloadcms/payload/commit/d0aaf4a4128ad585013c392bb608f586985b71ad)) +- add point field type ([7504155](https://github.com/payloadcms/payload/commit/7504155e17a2881b7a60f49e610c062665b46d21)) +- allows user to pass req through local findByID ([8675481](https://github.com/payloadcms/payload/commit/8675481343ef45fefc2eaaea939eda8ed0a2577f)) +- frontend polish to point field ([64ad6a3](https://github.com/payloadcms/payload/commit/64ad6a30a56969127dfb592a7e0c8807e9f3d8f7)) +- graphql support for custom id types ([bc2a6e1](https://github.com/payloadcms/payload/commit/bc2a6e15753c62d2041e9afded3f1ca040dbffa3)) +- point field localization and graphql ([30f1750](https://github.com/payloadcms/payload/commit/30f17509ea9927d923ffd42c703adefc902b66ea)) +- replace the collection idType option with an explicit id field ([4b70a12](https://github.com/payloadcms/payload/commit/4b70a1225f834ecd0aab50c6e92ad50572389962)) +- support custom ids ([3cc921a](https://github.com/payloadcms/payload/commit/3cc921acc92e1b4a372468b644b7e676400d9c26)) ## [0.9.5](https://github.com/payloadcms/payload/compare/v0.9.4...v0.9.5) (2021-08-23) ### Bug Fixes -* obscure conditional logic bug ([b0dc125](https://github.com/payloadcms/payload/commit/b0dc12560423af5083d36cfd16f464f08ab66d9d)) -* windows compatible absolute paths for staticDir ([b21316b](https://github.com/payloadcms/payload/commit/b21316b6cc392c793614024648c5301c7e03c326)) +- obscure conditional logic bug ([b0dc125](https://github.com/payloadcms/payload/commit/b0dc12560423af5083d36cfd16f464f08ab66d9d)) +- windows compatible absolute paths for staticDir ([b21316b](https://github.com/payloadcms/payload/commit/b21316b6cc392c793614024648c5301c7e03c326)) ## [0.9.4](https://github.com/payloadcms/payload/compare/v0.9.3...v0.9.4) (2021-08-06) @@ -1679,57 +1814,57 @@ The new shape of GraphQL errors is as follows: ### Bug Fixes -* args no longer optional in collection and global hooks ([a5ea0ff](https://github.com/payloadcms/payload/commit/a5ea0ff61945f3da106f0d9dbb6a90fb1d884061)) +- args no longer optional in collection and global hooks ([a5ea0ff](https://github.com/payloadcms/payload/commit/a5ea0ff61945f3da106f0d9dbb6a90fb1d884061)) ## [0.9.2](https://github.com/payloadcms/payload/compare/v0.9.1...v0.9.2) (2021-08-06) ### Bug Fixes -* row admin type ([deef520](https://github.com/payloadcms/payload/commit/deef5202c15301b685fe5efc8a6ff59b012ea1d4)) +- row admin type ([deef520](https://github.com/payloadcms/payload/commit/deef5202c15301b685fe5efc8a6ff59b012ea1d4)) ### Features -* allow completely disabling local file storage ([9661c6d](https://github.com/payloadcms/payload/commit/9661c6d40acc41d21eebc42b0cc1871f28d35a73)) -* allows upload resizing to maintain aspect ratio ([dea54a4](https://github.com/payloadcms/payload/commit/dea54a4cccead86e6ffc9f20457f295e1c08405b)) -* exposes auto-sized uploads on payload req ([9c8935f](https://github.com/payloadcms/payload/commit/9c8935fd51439627cccf3f6625236375f5909445)) -* reduces group heading from h2 to h3 ([907f8fd](https://github.com/payloadcms/payload/commit/907f8fd94d7e6cfa7eac0040c134cc714f29800d)) +- allow completely disabling local file storage ([9661c6d](https://github.com/payloadcms/payload/commit/9661c6d40acc41d21eebc42b0cc1871f28d35a73)) +- allows upload resizing to maintain aspect ratio ([dea54a4](https://github.com/payloadcms/payload/commit/dea54a4cccead86e6ffc9f20457f295e1c08405b)) +- exposes auto-sized uploads on payload req ([9c8935f](https://github.com/payloadcms/payload/commit/9c8935fd51439627cccf3f6625236375f5909445)) +- reduces group heading from h2 to h3 ([907f8fd](https://github.com/payloadcms/payload/commit/907f8fd94d7e6cfa7eac0040c134cc714f29800d)) ## [0.9.1](https://github.com/payloadcms/payload/compare/v0.9.0...v0.9.1) (2021-08-03) ### Bug Fixes -* groups with failing conditions being incorrectly required on backend ([4cc0ea1](https://github.com/payloadcms/payload/commit/4cc0ea1d81cd7579cb330091eb111a27262ff031)) -* relationship field access control in admin UI ([65db8d9](https://github.com/payloadcms/payload/commit/65db8d9fc2c8b556cc284966b9b69f5d6512aca5)) +- groups with failing conditions being incorrectly required on backend ([4cc0ea1](https://github.com/payloadcms/payload/commit/4cc0ea1d81cd7579cb330091eb111a27262ff031)) +- relationship field access control in admin UI ([65db8d9](https://github.com/payloadcms/payload/commit/65db8d9fc2c8b556cc284966b9b69f5d6512aca5)) ### Features -* exposes collection after read hook type ([01a191a](https://github.com/payloadcms/payload/commit/01a191a13967d98ebf57891efd21b2607804e4e3)) +- exposes collection after read hook type ([01a191a](https://github.com/payloadcms/payload/commit/01a191a13967d98ebf57891efd21b2607804e4e3)) # [0.9.0](https://github.com/payloadcms/payload/compare/v0.8.2...v0.9.0) (2021-08-02) ### BREAKING CHANGES -* Due to greater plugin possibilities and performance enhancements, plugins themselves no longer accept a completely sanitized config. Instead, they accept a _validated_ config as-provided, but sanitization is now only performed after all plugins have been initialized. By config santitization, we refer to merging in default values and ensuring that the config has its full, required shape. What this now means for plugins is that within plugin code, deeply nested properties like `config.graphQL.mutations` will need to be accessed safely (optional chaining is great for this), because a user's config may not have defined `config.graphQL`. So, the only real breaking change here is are that plugins now need to safely access properties from an incoming config. +- Due to greater plugin possibilities and performance enhancements, plugins themselves no longer accept a completely sanitized config. Instead, they accept a _validated_ config as-provided, but sanitization is now only performed after all plugins have been initialized. By config santitization, we refer to merging in default values and ensuring that the config has its full, required shape. What this now means for plugins is that within plugin code, deeply nested properties like `config.graphQL.mutations` will need to be accessed safely (optional chaining is great for this), because a user's config may not have defined `config.graphQL`. So, the only real breaking change here is are that plugins now need to safely access properties from an incoming config. ### Features -* removes sanitization of configs before plugins are instantiated ([8af3947](https://github.com/payloadcms/payload/commit/8af39472e19a26453647d1c1ab0bbce15db2c642)) +- removes sanitization of configs before plugins are instantiated ([8af3947](https://github.com/payloadcms/payload/commit/8af39472e19a26453647d1c1ab0bbce15db2c642)) ## [0.8.2](https://github.com/payloadcms/payload/compare/v0.8.1...v0.8.2) (2021-08-02) ### Bug Fixes -* more advanced conditional logic edge cases ([33983de](https://github.com/payloadcms/payload/commit/33983deb3761813506348f8ff804a2117d1324ef)) +- more advanced conditional logic edge cases ([33983de](https://github.com/payloadcms/payload/commit/33983deb3761813506348f8ff804a2117d1324ef)) ### Features -* export error types ([12cba62](https://github.com/payloadcms/payload/commit/12cba62930b8d35b22e3a7a99cf06df29bd4964a)) +- export error types ([12cba62](https://github.com/payloadcms/payload/commit/12cba62930b8d35b22e3a7a99cf06df29bd4964a)) ## [0.8.1](https://github.com/payloadcms/payload/compare/v0.8.0...v0.8.1) (2021-07-29) ### BREAKING CHANGES -* If you have any plugins that are written in TypeScript, we have changed plugin types to make them more flexible. Whereas before you needed to take in a fully sanitized config, and return a fully sanitized config, we now have simplified that requirement so that you can write configs in your own plugins just as an end user of Payload can write their own configs. +- If you have any plugins that are written in TypeScript, we have changed plugin types to make them more flexible. Whereas before you needed to take in a fully sanitized config, and return a fully sanitized config, we now have simplified that requirement so that you can write configs in your own plugins just as an end user of Payload can write their own configs. Now, configs will be sanitized **_before_** plugins are executed **_as well as_** after plugins are executed. @@ -1759,80 +1894,80 @@ const plugin = (config: Config): Config => { ### Features -* improves plugin writability ([a002b71](https://github.com/payloadcms/payload/commit/a002b7105f5c312e846c80032a350046db10236c)) +- improves plugin writability ([a002b71](https://github.com/payloadcms/payload/commit/a002b7105f5c312e846c80032a350046db10236c)) # [0.8.0](https://github.com/payloadcms/payload/compare/v0.7.10...v0.8.0) (2021-07-28) ### BREAKING CHANGES -* There have been a few very minor, yet breaking TypeScript changes in this release. If you are accessing Payload config types from directly within the `dist` folder, like any of the following: +- There have been a few very minor, yet breaking TypeScript changes in this release. If you are accessing Payload config types from directly within the `dist` folder, like any of the following: -* `import { PayloadCollectionConfig, CollectionConfig } from 'payload/dist/collections/config/types';` -* `import { PayloadGlobalConfig, GlobalConfig } from 'payload/dist/globals/config/types';` -* `import { Config, PayloadConfig } from 'payload/config';` +- `import { PayloadCollectionConfig, CollectionConfig } from 'payload/dist/collections/config/types';` +- `import { PayloadGlobalConfig, GlobalConfig } from 'payload/dist/globals/config/types';` +- `import { Config, PayloadConfig } from 'payload/config';` You may need to modify your code to work with this release. The TL;DR of the change is that we have improved our naming conventions of internally used types, which will become more important over time. Now, we have landed on a naming convention as follows: -* Incoming configs, typed correctly for optional / required config properties, are named `Config`, `CollectionConfig`, and `GlobalConfig`. -* Fully defaulted, sanitized, and validated configs are now named `SanitizedConfig`, `SanitizedCollectionConfig`, and `SanitizedGlobalConfig`. +- Incoming configs, typed correctly for optional / required config properties, are named `Config`, `CollectionConfig`, and `GlobalConfig`. +- Fully defaulted, sanitized, and validated configs are now named `SanitizedConfig`, `SanitizedCollectionConfig`, and `SanitizedGlobalConfig`. They can be imported safely outside of the `dist` folder now as well. For more information on how to properly import which types you need, see the following Docs pages which have now been updated with examples on how to properly access the new types: -* [Base Payload config docs](https://payloadcms.com/docs/configuration/overview) -* [Collection config docs](https://payloadcms.com/docs/configuration/collections) -* [Global config docs](https://payloadcms.com/docs/configuration/globals) +- [Base Payload config docs](https://payloadcms.com/docs/configuration/overview) +- [Collection config docs](https://payloadcms.com/docs/configuration/collections) +- [Global config docs](https://payloadcms.com/docs/configuration/globals) ### Bug Fixes -* ensures text component is always controlled ([c649362](https://github.com/payloadcms/payload/commit/c649362b95f1ddaeb47cb121b814ca30712dea86)) +- ensures text component is always controlled ([c649362](https://github.com/payloadcms/payload/commit/c649362b95f1ddaeb47cb121b814ca30712dea86)) ### Features -* revises naming conventions of config types ([5a7e5b9](https://github.com/payloadcms/payload/commit/5a7e5b921d7803ec2da8cc3dc8162c1dd6828ca0)) +- revises naming conventions of config types ([5a7e5b9](https://github.com/payloadcms/payload/commit/5a7e5b921d7803ec2da8cc3dc8162c1dd6828ca0)) ## [0.7.10](https://github.com/payloadcms/payload/compare/v0.7.9...v0.7.10) (2021-07-27) ### Bug Fixes -* jest debug testing ([a2fa30f](https://github.com/payloadcms/payload/commit/a2fa30fad2cd9b8ab6ac4f3905706b97d5663954)) -* skipValidation logic ([fedeaea](https://github.com/payloadcms/payload/commit/fedeaeafc9607f7c21e40c2df44923056e5d460c)) +- jest debug testing ([a2fa30f](https://github.com/payloadcms/payload/commit/a2fa30fad2cd9b8ab6ac4f3905706b97d5663954)) +- skipValidation logic ([fedeaea](https://github.com/payloadcms/payload/commit/fedeaeafc9607f7c21e40c2df44923056e5d460c)) ### Features -* improves conditional logic performance and edge cases ([d43390f](https://github.com/payloadcms/payload/commit/d43390f2a4c5ebeb7b9b0f07e003816005efc761)) +- improves conditional logic performance and edge cases ([d43390f](https://github.com/payloadcms/payload/commit/d43390f2a4c5ebeb7b9b0f07e003816005efc761)) ## [0.7.9](https://github.com/payloadcms/payload/compare/v0.7.8...v0.7.9) (2021-07-27) ### Bug Fixes -* missing richtext gutter ([4d1249d](https://github.com/payloadcms/payload/commit/4d1249dd03f441ee872e66437118c3e8703aaefc)) +- missing richtext gutter ([4d1249d](https://github.com/payloadcms/payload/commit/4d1249dd03f441ee872e66437118c3e8703aaefc)) ### Features -* add admin description to collections and globals ([4544711](https://github.com/payloadcms/payload/commit/4544711f0e4ea0e78570b93717a4bf213946d9b3)) -* add collection slug to schema validation errors ([ebfb72c](https://github.com/payloadcms/payload/commit/ebfb72c8fa0723ec75922c6fa4739b48ee82b29f)) -* add component support to collection and global description ([fe0098c](https://github.com/payloadcms/payload/commit/fe0098ccd9b3477b47985222659a0e3fc2e7bb3b)) -* add component support to field description ([e0933f6](https://github.com/payloadcms/payload/commit/e0933f612a70af0a18c88ef96e7af0878e20cf01)) -* add customizable admin field descriptions ([dac60a0](https://github.com/payloadcms/payload/commit/dac60a024b0eb7197d5a501daea342827ee7c751)) -* add descriptions to every allowed field type, globals and collections ([29a1108](https://github.com/payloadcms/payload/commit/29a1108518c7942f8ae06a990393a6e0ad4b6b16)) -* add global slug and field names to schema validation errors ([bb63b4a](https://github.com/payloadcms/payload/commit/bb63b4aad153d125f68bf1fe1e9a3e4a5358ded9)) -* improves group styling when there is no label ([ea358a6](https://github.com/payloadcms/payload/commit/ea358a66e8b8d2e54dd162eae0cf7066128cfabf)) +- add admin description to collections and globals ([4544711](https://github.com/payloadcms/payload/commit/4544711f0e4ea0e78570b93717a4bf213946d9b3)) +- add collection slug to schema validation errors ([ebfb72c](https://github.com/payloadcms/payload/commit/ebfb72c8fa0723ec75922c6fa4739b48ee82b29f)) +- add component support to collection and global description ([fe0098c](https://github.com/payloadcms/payload/commit/fe0098ccd9b3477b47985222659a0e3fc2e7bb3b)) +- add component support to field description ([e0933f6](https://github.com/payloadcms/payload/commit/e0933f612a70af0a18c88ef96e7af0878e20cf01)) +- add customizable admin field descriptions ([dac60a0](https://github.com/payloadcms/payload/commit/dac60a024b0eb7197d5a501daea342827ee7c751)) +- add descriptions to every allowed field type, globals and collections ([29a1108](https://github.com/payloadcms/payload/commit/29a1108518c7942f8ae06a990393a6e0ad4b6b16)) +- add global slug and field names to schema validation errors ([bb63b4a](https://github.com/payloadcms/payload/commit/bb63b4aad153d125f68bf1fe1e9a3e4a5358ded9)) +- improves group styling when there is no label ([ea358a6](https://github.com/payloadcms/payload/commit/ea358a66e8b8d2e54dd162eae0cf7066128cfabf)) ## [0.7.8](https://github.com/payloadcms/payload/compare/v0.7.7...v0.7.8) (2021-07-23) ### Features -* fixes group label schema validation ([cbac888](https://github.com/payloadcms/payload/commit/cbac8887ddb7a4446f5502c577d4600905b13380)) +- fixes group label schema validation ([cbac888](https://github.com/payloadcms/payload/commit/cbac8887ddb7a4446f5502c577d4600905b13380)) ## [0.7.7](https://github.com/payloadcms/payload/compare/v0.7.6...v0.7.7) (2021-07-23) ### Bug Fixes -* accurately documents the props for the datepicker field ([dcd8052](https://github.com/payloadcms/payload/commit/dcd8052498dd2900f228eaffcf6142b63e8e5a9b)) +- accurately documents the props for the datepicker field ([dcd8052](https://github.com/payloadcms/payload/commit/dcd8052498dd2900f228eaffcf6142b63e8e5a9b)) ### Features -* only attempts to find config when payload is initialized ([266ccb3](https://github.com/payloadcms/payload/commit/266ccb374449b0a131a574d9b12275b6bb7e5c60)) +- only attempts to find config when payload is initialized ([266ccb3](https://github.com/payloadcms/payload/commit/266ccb374449b0a131a574d9b12275b6bb7e5c60)) ## [0.7.6](https://github.com/payloadcms/payload/compare/v0.7.5...v0.7.6) (2021-07-07) @@ -1840,58 +1975,58 @@ They can be imported safely outside of the `dist` folder now as well. For more i ### Bug Fixes -* crash on bullet list de-selection ([5388513](https://github.com/payloadcms/payload/commit/538851325d1558425918098e35e108595189774b)) -* updates demo richtext elements with proper SCSS ([0075912](https://github.com/payloadcms/payload/commit/007591272f77e5dcc5e5a4a8f71459402f6605d4)) +- crash on bullet list de-selection ([5388513](https://github.com/payloadcms/payload/commit/538851325d1558425918098e35e108595189774b)) +- updates demo richtext elements with proper SCSS ([0075912](https://github.com/payloadcms/payload/commit/007591272f77e5dcc5e5a4a8f71459402f6605d4)) ### Features -* adds plugins infrastructure ([6b25531](https://github.com/payloadcms/payload/commit/6b255315e0c475d700383f2738839966449fc563)) -* enables backspace to deactivate richtext list elements ([91141ad](https://github.com/payloadcms/payload/commit/91141ad62f0f6ef3528e62eef23711e937d302ce)) +- adds plugins infrastructure ([6b25531](https://github.com/payloadcms/payload/commit/6b255315e0c475d700383f2738839966449fc563)) +- enables backspace to deactivate richtext list elements ([91141ad](https://github.com/payloadcms/payload/commit/91141ad62f0f6ef3528e62eef23711e937d302ce)) ## [0.7.4](https://github.com/payloadcms/payload/compare/v0.7.3...v0.7.4) (2021-07-01) ### Bug Fixes -* adds proper scss stylesheets to payload/scss ([84e31ae](https://github.com/payloadcms/payload/commit/84e31aed141efe5aa1b0c24a61bf35eb3d671242)) +- adds proper scss stylesheets to payload/scss ([84e31ae](https://github.com/payloadcms/payload/commit/84e31aed141efe5aa1b0c24a61bf35eb3d671242)) ## [0.7.3](https://github.com/payloadcms/payload/compare/v0.7.2...v0.7.3) (2021-07-01) ### Bug Fixes -* changes scss imports to allow vars imports to payload projects ([ea80fd6](https://github.com/payloadcms/payload/commit/ea80fd68b14139cb01259a47ea597d33526d0c76)) +- changes scss imports to allow vars imports to payload projects ([ea80fd6](https://github.com/payloadcms/payload/commit/ea80fd68b14139cb01259a47ea597d33526d0c76)) ### Features -* export all field prop types for custom components ([5bea9ae](https://github.com/payloadcms/payload/commit/5bea9ae1263f1d93e8b011ae97bb067a8c9bb4e1)) +- export all field prop types for custom components ([5bea9ae](https://github.com/payloadcms/payload/commit/5bea9ae1263f1d93e8b011ae97bb067a8c9bb4e1)) ## [0.7.2](https://github.com/payloadcms/payload/compare/v0.7.1...v0.7.2) (2021-06-22) ### Bug Fixes -* parses incoming numbers through query string for use in where clauses ([4933b34](https://github.com/payloadcms/payload/commit/4933b34f6b5dfa960c2a830a8c74769d6712130a)) -* respect maxDepth 0 ([95c1650](https://github.com/payloadcms/payload/commit/95c165018edf8e80c4dc828d3d77b6fa6d799de9)) -* safely stringifies ObjectIDs while populating relationships ([d6bc6f9](https://github.com/payloadcms/payload/commit/d6bc6f9f0e8391818783cdf7edf282506e2c9fed)) +- parses incoming numbers through query string for use in where clauses ([4933b34](https://github.com/payloadcms/payload/commit/4933b34f6b5dfa960c2a830a8c74769d6712130a)) +- respect maxDepth 0 ([95c1650](https://github.com/payloadcms/payload/commit/95c165018edf8e80c4dc828d3d77b6fa6d799de9)) +- safely stringifies ObjectIDs while populating relationships ([d6bc6f9](https://github.com/payloadcms/payload/commit/d6bc6f9f0e8391818783cdf7edf282506e2c9fed)) ### Features -* adds maxDepth to relationships and upload fields ([880dabd](https://github.com/payloadcms/payload/commit/880dabdcad10dcd9f057da71a601190fbeecf92d)) +- adds maxDepth to relationships and upload fields ([880dabd](https://github.com/payloadcms/payload/commit/880dabdcad10dcd9f057da71a601190fbeecf92d)) ## [0.7.1](https://github.com/payloadcms/payload/compare/v0.7.0...v0.7.1) (2021-06-21) ### Bug Fixes -* babel config file error ([3af2554](https://github.com/payloadcms/payload/commit/3af2554eacab45317745ad72c8848b4dd1ddc16a)) +- babel config file error ([3af2554](https://github.com/payloadcms/payload/commit/3af2554eacab45317745ad72c8848b4dd1ddc16a)) # [0.7.0](https://github.com/payloadcms/payload/compare/v0.6.10...v0.7.0) (2021-06-21) ### Bug Fixes -* handle all scenarios in select cell ([dd40ab0](https://github.com/payloadcms/payload/commit/dd40ab07fa359802578ed948136018dfc9a538c5)) +- handle all scenarios in select cell ([dd40ab0](https://github.com/payloadcms/payload/commit/dd40ab07fa359802578ed948136018dfc9a538c5)) ### Features -* exposes babel config via payload/babel ([#203](https://github.com/payloadcms/payload/issues/203)) ([67c1e28](https://github.com/payloadcms/payload/commit/67c1e280eb891a736703e242518bbeac8b8c2878)) -* user preferences ([#195](https://github.com/payloadcms/payload/issues/195)) ([fb60bc7](https://github.com/payloadcms/payload/commit/fb60bc79a11d69c5dab6b4921d62614a7b914fef)) +- exposes babel config via payload/babel ([#203](https://github.com/payloadcms/payload/issues/203)) ([67c1e28](https://github.com/payloadcms/payload/commit/67c1e280eb891a736703e242518bbeac8b8c2878)) +- user preferences ([#195](https://github.com/payloadcms/payload/issues/195)) ([fb60bc7](https://github.com/payloadcms/payload/commit/fb60bc79a11d69c5dab6b4921d62614a7b914fef)) ## [0.6.10](https://github.com/payloadcms/payload/compare/v0.6.9...v0.6.10) (2021-05-23) @@ -1899,84 +2034,84 @@ They can be imported safely outside of the `dist` folder now as well. For more i ### Bug Fixes -* misc responsive improvements -* date clipping in sidebar ([#165](https://github.com/payloadcms/payload/issues/165)) -* misc polish to popup component -* admin \_verified field not displaying proper field value -* properly typed express-fileupload config options ([#180](https://github.com/payloadcms/payload/issues/180)) +- misc responsive improvements +- date clipping in sidebar ([#165](https://github.com/payloadcms/payload/issues/165)) +- misc polish to popup component +- admin \_verified field not displaying proper field value +- properly typed express-fileupload config options ([#180](https://github.com/payloadcms/payload/issues/180)) ## [0.6.8](https://github.com/payloadcms/payload/compare/v0.6.7...v0.6.8) (2021-05-12) ### Features -* add mimeTypes validation for uploads ([a5fcdf0](https://github.com/payloadcms/payload/commit/a5fcdf03bae681c5b2e0de6b681d20efe8ebdd7f)) -* disables user scalable in mobile ([#177](https://github.com/payloadcms/payload/issues/177)) ([46c1a36](https://github.com/payloadcms/payload/commit/46c1a36fdb9363201b65ecdec44088cb41532bd6)) -* exposes locale within preview function ([2d67448](https://github.com/payloadcms/payload/commit/2d67448d8ad1a7d4238820d0ccd93da961fc051c)) -* restrict upload mime types in file picker ([1c6f32f](https://github.com/payloadcms/payload/commit/1c6f32f2881410a1534b61711af05fd35e7977c2)) +- add mimeTypes validation for uploads ([a5fcdf0](https://github.com/payloadcms/payload/commit/a5fcdf03bae681c5b2e0de6b681d20efe8ebdd7f)) +- disables user scalable in mobile ([#177](https://github.com/payloadcms/payload/issues/177)) ([46c1a36](https://github.com/payloadcms/payload/commit/46c1a36fdb9363201b65ecdec44088cb41532bd6)) +- exposes locale within preview function ([2d67448](https://github.com/payloadcms/payload/commit/2d67448d8ad1a7d4238820d0ccd93da961fc051c)) +- restrict upload mime types in file picker ([1c6f32f](https://github.com/payloadcms/payload/commit/1c6f32f2881410a1534b61711af05fd35e7977c2)) ## [0.6.7](https://github.com/payloadcms/payload/compare/v0.6.6...v0.6.7) (2021-05-07) ### Features -* add ability to hide gutter for RichText fields ([e791c5b](https://github.com/payloadcms/payload/commit/e791c5b7b325e58d273041ff426d19bafc4fc102)) -* allows group field gutter to be disabled ([9aebeaf](https://github.com/payloadcms/payload/commit/9aebeaf579b9c8add64734dce92e4d92c0a1a24c)) -* exposes component types ([99466fa](https://github.com/payloadcms/payload/commit/99466fa41e24779705f517d29d57e6174508ebcc)) -* shrink image thumbnails on larger screens ([e565fa6](https://github.com/payloadcms/payload/commit/e565fa6f1ce13d76b8111e543d4c799a5d7f450e)) -* support global date format ([670ccf2](https://github.com/payloadcms/payload/commit/670ccf2f589c306d13f3060b8acf4f4d33fcdd23)) +- add ability to hide gutter for RichText fields ([e791c5b](https://github.com/payloadcms/payload/commit/e791c5b7b325e58d273041ff426d19bafc4fc102)) +- allows group field gutter to be disabled ([9aebeaf](https://github.com/payloadcms/payload/commit/9aebeaf579b9c8add64734dce92e4d92c0a1a24c)) +- exposes component types ([99466fa](https://github.com/payloadcms/payload/commit/99466fa41e24779705f517d29d57e6174508ebcc)) +- shrink image thumbnails on larger screens ([e565fa6](https://github.com/payloadcms/payload/commit/e565fa6f1ce13d76b8111e543d4c799a5d7f450e)) +- support global date format ([670ccf2](https://github.com/payloadcms/payload/commit/670ccf2f589c306d13f3060b8acf4f4d33fcdd23)) ## [0.6.6](https://github.com/payloadcms/payload/compare/v0.6.5...v0.6.6) (2021-04-27) ### Bug Fixes -* graphql returns compatible error format ([6f188b1](https://github.com/payloadcms/payload/commit/6f188b1fa6e631a992439f055e8e76c341ca6dfa)) -* handle rich text saving as empty string ([382089b](https://github.com/payloadcms/payload/commit/382089b484b278e6ff491a2447ad06c41b96d5e3)) -* removes incoming.data.length check, since data is typed as a keyed array when it is an instance of APIError ([2643e1a](https://github.com/payloadcms/payload/commit/2643e1a1006f86b24001f65cf39da245fa4daaad)) -* support image resizing on M1 chip ([8cfc039](https://github.com/payloadcms/payload/commit/8cfc039cd0ffd497728f185b6ab45695302d3b95)) -* update operation can save password changes ([a85bf9e](https://github.com/payloadcms/payload/commit/a85bf9e836f9463d94f13857254f5d4df6f68c72)) +- graphql returns compatible error format ([6f188b1](https://github.com/payloadcms/payload/commit/6f188b1fa6e631a992439f055e8e76c341ca6dfa)) +- handle rich text saving as empty string ([382089b](https://github.com/payloadcms/payload/commit/382089b484b278e6ff491a2447ad06c41b96d5e3)) +- removes incoming.data.length check, since data is typed as a keyed array when it is an instance of APIError ([2643e1a](https://github.com/payloadcms/payload/commit/2643e1a1006f86b24001f65cf39da245fa4daaad)) +- support image resizing on M1 chip ([8cfc039](https://github.com/payloadcms/payload/commit/8cfc039cd0ffd497728f185b6ab45695302d3b95)) +- update operation can save password changes ([a85bf9e](https://github.com/payloadcms/payload/commit/a85bf9e836f9463d94f13857254f5d4df6f68c72)) ## [0.6.5](https://github.com/payloadcms/payload/compare/v0.6.4...v0.6.5) (2021-04-22) ### Features -* builds plugin infrastructure ([#149](https://github.com/payloadcms/payload/issues/149)) ([f17c6e4](https://github.com/payloadcms/payload/commit/f17c6e4010de07578af21398f667fa55bc8343bc)) +- builds plugin infrastructure ([#149](https://github.com/payloadcms/payload/issues/149)) ([f17c6e4](https://github.com/payloadcms/payload/commit/f17c6e4010de07578af21398f667fa55bc8343bc)) ## [0.6.4](https://github.com/payloadcms/payload/compare/v0.6.3...v0.6.4) (2021-04-21) ### Bug Fixes -* allows \_verificationToken to come back via showHiddenFields ([74430ea](https://github.com/payloadcms/payload/commit/74430ea1519c1ba0ad655daf4e8f5d8dae855358)) +- allows \_verificationToken to come back via showHiddenFields ([74430ea](https://github.com/payloadcms/payload/commit/74430ea1519c1ba0ad655daf4e8f5d8dae855358)) ## [0.6.3](https://github.com/payloadcms/payload/compare/v0.6.2...v0.6.3) (2021-04-21) ### Bug Fixes -* make admin field properties in joi schema match TS types ([519c021](https://github.com/payloadcms/payload/commit/519c021525be114f43ad321233a9b8211d309ed0)) -* properly label arrays/blocks with plural and singular ([fa49811](https://github.com/payloadcms/payload/commit/fa49811377103db9241f43537e508da62eb19076)) -* safely parses incoming stringified richtext json ([9c95c75](https://github.com/payloadcms/payload/commit/9c95c750305633e99e7d80b5ba407b5b3146d691)) +- make admin field properties in joi schema match TS types ([519c021](https://github.com/payloadcms/payload/commit/519c021525be114f43ad321233a9b8211d309ed0)) +- properly label arrays/blocks with plural and singular ([fa49811](https://github.com/payloadcms/payload/commit/fa49811377103db9241f43537e508da62eb19076)) +- safely parses incoming stringified richtext json ([9c95c75](https://github.com/payloadcms/payload/commit/9c95c750305633e99e7d80b5ba407b5b3146d691)) ## [0.6.2](https://github.com/payloadcms/payload/compare/v0.6.1...v0.6.2) (2021-04-19) ### Features -* modifies relationship field to react to changing relationTo ([ddf25fb](https://github.com/payloadcms/payload/commit/ddf25fbb6559d93dd5b9105bd4a0a952fc72154b)) +- modifies relationship field to react to changing relationTo ([ddf25fb](https://github.com/payloadcms/payload/commit/ddf25fbb6559d93dd5b9105bd4a0a952fc72154b)) ## [0.6.1](https://github.com/payloadcms/payload/compare/v0.6.0...v0.6.1) (2021-04-19) ### Bug Fixes -* cleans up duplicative columns ([5f2073a](https://github.com/payloadcms/payload/commit/5f2073ae685f22d099bc8f0d3e406e73ee59cd1d)) -* graphql localized relationship bugs ([280f809](https://github.com/payloadcms/payload/commit/280f8094217de759ba6424dfd2294a6bfcb1d57a)) -* moves enableRichTextRelationship to proper spot ([16ca22b](https://github.com/payloadcms/payload/commit/16ca22b4cc0d8e5d106fa8c8c6e2dde0ff972839)) +- cleans up duplicative columns ([5f2073a](https://github.com/payloadcms/payload/commit/5f2073ae685f22d099bc8f0d3e406e73ee59cd1d)) +- graphql localized relationship bugs ([280f809](https://github.com/payloadcms/payload/commit/280f8094217de759ba6424dfd2294a6bfcb1d57a)) +- moves enableRichTextRelationship to proper spot ([16ca22b](https://github.com/payloadcms/payload/commit/16ca22b4cc0d8e5d106fa8c8c6e2dde0ff972839)) ### Features -* sets enableRichTextRelationship to true by default ([9970470](https://github.com/payloadcms/payload/commit/99704707dda25f8617d26552942915aa6e9d7a57)) +- sets enableRichTextRelationship to true by default ([9970470](https://github.com/payloadcms/payload/commit/99704707dda25f8617d26552942915aa6e9d7a57)) # [0.6.0](https://github.com/payloadcms/payload/compare/v0.5.10...v0.6.0) (2021-04-19) ### BREAKING CHANGES -* By default, all Collection and Global access control functions are now set to require a user to be logged in to interact through GraphQL or REST APIs. This default access control is set to ensure that your API data is secure out of the box. From there, you can opt to publicly expose API actions as you need. +- By default, all Collection and Global access control functions are now set to require a user to be logged in to interact through GraphQL or REST APIs. This default access control is set to ensure that your API data is secure out of the box. From there, you can opt to publicly expose API actions as you need. #### Migration Instructions to `0.6.x` @@ -2010,24 +2145,24 @@ If none of your collections or globals should be publicly exposed, you don't nee ### Bug Fixes -* clears richtext element on enter, refocuses on toolbar button click ([4b19795](https://github.com/payloadcms/payload/commit/4b1979540d2ec33ce8396f572baba5e64962c0da)) -* ensures api keys are properly populated in admin ([4359a70](https://github.com/payloadcms/payload/commit/4359a70a8b0bca380cc513dfcb83b2fbe28cbef4)) -* ensures first relationship options are loaded only once ([75a5b04](https://github.com/payloadcms/payload/commit/75a5b047056b4e4e7a415a6903a1131cc61b0318)) -* searching on relationship fields properly fetches results ([b86c3da](https://github.com/payloadcms/payload/commit/b86c3daa9952ccc9db324fecd53bb75f69cecfd4)) -* upload useAsTitle set to filename by default ([7db23f8](https://github.com/payloadcms/payload/commit/7db23f8ebbf115ca45fa55718b0d1be18ca54cd3)) +- clears richtext element on enter, refocuses on toolbar button click ([4b19795](https://github.com/payloadcms/payload/commit/4b1979540d2ec33ce8396f572baba5e64962c0da)) +- ensures api keys are properly populated in admin ([4359a70](https://github.com/payloadcms/payload/commit/4359a70a8b0bca380cc513dfcb83b2fbe28cbef4)) +- ensures first relationship options are loaded only once ([75a5b04](https://github.com/payloadcms/payload/commit/75a5b047056b4e4e7a415a6903a1131cc61b0318)) +- searching on relationship fields properly fetches results ([b86c3da](https://github.com/payloadcms/payload/commit/b86c3daa9952ccc9db324fecd53bb75f69cecfd4)) +- upload useAsTitle set to filename by default ([7db23f8](https://github.com/payloadcms/payload/commit/7db23f8ebbf115ca45fa55718b0d1be18ca54cd3)) ### Features -* autolabel fields when label is omitted ([#42](https://github.com/payloadcms/payload/issues/42)) ([b383eb6](https://github.com/payloadcms/payload/commit/b383eb65c6b524fd7cfddb7ac60a3f263e1b891e)) -* dynamically populates richtext relationships ([3530424](https://github.com/payloadcms/payload/commit/353042467f12458994d734cf54423eb95eea9003)) -* improve unique field value error handling ([21b2bd4](https://github.com/payloadcms/payload/commit/21b2bd4b6708823880fb87035495ab4c2c55da90)) -* improves margins in rich text elements ([20d7a01](https://github.com/payloadcms/payload/commit/20d7a01919634faa366add792f98a36e68f213e9)) +- autolabel fields when label is omitted ([#42](https://github.com/payloadcms/payload/issues/42)) ([b383eb6](https://github.com/payloadcms/payload/commit/b383eb65c6b524fd7cfddb7ac60a3f263e1b891e)) +- dynamically populates richtext relationships ([3530424](https://github.com/payloadcms/payload/commit/353042467f12458994d734cf54423eb95eea9003)) +- improve unique field value error handling ([21b2bd4](https://github.com/payloadcms/payload/commit/21b2bd4b6708823880fb87035495ab4c2c55da90)) +- improves margins in rich text elements ([20d7a01](https://github.com/payloadcms/payload/commit/20d7a01919634faa366add792f98a36e68f213e9)) ## [0.5.10](https://github.com/payloadcms/payload/compare/v0.5.9...v0.5.10) (2021-04-14) ### Bug Fixes -* feeds collectionSlug through me auth for graphql resolver ([9ee2f9c](https://github.com/payloadcms/payload/commit/9ee2f9c0dc25ea32ee0f0864e30afb389903b3cd)) +- feeds collectionSlug through me auth for graphql resolver ([9ee2f9c](https://github.com/payloadcms/payload/commit/9ee2f9c0dc25ea32ee0f0864e30afb389903b3cd)) ## [0.5.9](https://github.com/payloadcms/payload/compare/v0.5.8...v0.5.9) (2021-04-14) @@ -2035,70 +2170,70 @@ If none of your collections or globals should be publicly exposed, you don't nee ### Bug Fixes -* revises graphql import syntax ([20f1e6c](https://github.com/payloadcms/payload/commit/20f1e6cb044254af7a0db72cc9dab95d32db0333)) +- revises graphql import syntax ([20f1e6c](https://github.com/payloadcms/payload/commit/20f1e6cb044254af7a0db72cc9dab95d32db0333)) ## [0.5.7](https://github.com/payloadcms/payload/compare/v0.5.5...v0.5.7) (2021-04-13) ### Bug Fixes -* clears verificationToken when \_verified is true ([e58b152](https://github.com/payloadcms/payload/commit/e58b152d40394ec59b7a779feb3b9f02a6f4a0b6)) -* custom query / mutation types ([a78fc97](https://github.com/payloadcms/payload/commit/a78fc974b80b153028e4796b15d2b6b17fe023bb)) -* ensures email is still prefilled in auth configs ([31c41c2](https://github.com/payloadcms/payload/commit/31c41c22eca96721ce2982bcf5860dfd9e5c7beb)) -* ensures failed conditions send path to form ([dff72fb](https://github.com/payloadcms/payload/commit/dff72fbf2f49d372423da8bc2840aad6d9c1ea1b)) -* handle add/remove labels for all usage of Array field type ([ddf5df2](https://github.com/payloadcms/payload/commit/ddf5df290c5b36af0dc37a79c476001387f73275)) -* make upload cell mimetype inline ([414bc01](https://github.com/payloadcms/payload/commit/414bc01b055ed6075613f4241f185cb0c25f046d)) -* pagination calculation for current range ([000dee8](https://github.com/payloadcms/payload/commit/000dee85bd5858fe3d45e08c62943a6a1c6e349c)) -* updates config schema for graphQL mutations and queries ([afc9454](https://github.com/payloadcms/payload/commit/afc9454465d7445c45f560eade0b17d831b04e2c)) +- clears verificationToken when \_verified is true ([e58b152](https://github.com/payloadcms/payload/commit/e58b152d40394ec59b7a779feb3b9f02a6f4a0b6)) +- custom query / mutation types ([a78fc97](https://github.com/payloadcms/payload/commit/a78fc974b80b153028e4796b15d2b6b17fe023bb)) +- ensures email is still prefilled in auth configs ([31c41c2](https://github.com/payloadcms/payload/commit/31c41c22eca96721ce2982bcf5860dfd9e5c7beb)) +- ensures failed conditions send path to form ([dff72fb](https://github.com/payloadcms/payload/commit/dff72fbf2f49d372423da8bc2840aad6d9c1ea1b)) +- handle add/remove labels for all usage of Array field type ([ddf5df2](https://github.com/payloadcms/payload/commit/ddf5df290c5b36af0dc37a79c476001387f73275)) +- make upload cell mimetype inline ([414bc01](https://github.com/payloadcms/payload/commit/414bc01b055ed6075613f4241f185cb0c25f046d)) +- pagination calculation for current range ([000dee8](https://github.com/payloadcms/payload/commit/000dee85bd5858fe3d45e08c62943a6a1c6e349c)) +- updates config schema for graphQL mutations and queries ([afc9454](https://github.com/payloadcms/payload/commit/afc9454465d7445c45f560eade0b17d831b04e2c)) ### Features -* auto verifies first user registration ([8f720c0](https://github.com/payloadcms/payload/commit/8f720c000df26d34f7f8652f170525c7d54184a5)) -* optimize save within Edit ([91d37fb](https://github.com/payloadcms/payload/commit/91d37fb41d820fe2cdcdbb28f999df2de751316e)) -* prevents DraggableSections from re-mounting on doc save ([0094837](https://github.com/payloadcms/payload/commit/00948376358a4bfecc3a6cb8cf0a6ad9a0b5a227)) -* remembers conditional field values after removing / readding ([988d0a4](https://github.com/payloadcms/payload/commit/988d0a4b08e1228bb358bb133bcb05dbce7f55ab)) -* remove mimetype from upload cell type ([776b9c9](https://github.com/payloadcms/payload/commit/776b9c9c30b6d9d795c509a558fd1eee666b2652)) +- auto verifies first user registration ([8f720c0](https://github.com/payloadcms/payload/commit/8f720c000df26d34f7f8652f170525c7d54184a5)) +- optimize save within Edit ([91d37fb](https://github.com/payloadcms/payload/commit/91d37fb41d820fe2cdcdbb28f999df2de751316e)) +- prevents DraggableSections from re-mounting on doc save ([0094837](https://github.com/payloadcms/payload/commit/00948376358a4bfecc3a6cb8cf0a6ad9a0b5a227)) +- remembers conditional field values after removing / readding ([988d0a4](https://github.com/payloadcms/payload/commit/988d0a4b08e1228bb358bb133bcb05dbce7f55ab)) +- remove mimetype from upload cell type ([776b9c9](https://github.com/payloadcms/payload/commit/776b9c9c30b6d9d795c509a558fd1eee666b2652)) ## [0.5.5](https://github.com/payloadcms/payload/compare/v0.5.4...v0.5.5) (2021-04-02) ### Features -* allows soft breaks in rich text ([ecd277d](https://github.com/payloadcms/payload/commit/ecd277da7dff24dc49f6061e7d50e4b21bc285c9)) +- allows soft breaks in rich text ([ecd277d](https://github.com/payloadcms/payload/commit/ecd277da7dff24dc49f6061e7d50e4b21bc285c9)) ## [0.5.4](https://github.com/payloadcms/payload/compare/v0.5.2...v0.5.4) (2021-04-02) ### Bug Fixes -* ensures arrays and blocks reset row count on initialState change ([9a7c0e3](https://github.com/payloadcms/payload/commit/9a7c0e3dbdf4e6decb03ae085a41fb239fd5b7a8)) -* unique indices ([23c45f1](https://github.com/payloadcms/payload/commit/23c45f137ac97c99ed38969bed64928f2ce2795e)) +- ensures arrays and blocks reset row count on initialState change ([9a7c0e3](https://github.com/payloadcms/payload/commit/9a7c0e3dbdf4e6decb03ae085a41fb239fd5b7a8)) +- unique indices ([23c45f1](https://github.com/payloadcms/payload/commit/23c45f137ac97c99ed38969bed64928f2ce2795e)) ## [0.5.2](https://github.com/payloadcms/payload/compare/v0.5.1...v0.5.2) (2021-03-31) ### Bug Fixes -* modal issues with richtext relationship ([8ea4407](https://github.com/payloadcms/payload/commit/8ea4407f04fd4b63df6afffbe15301f7d5746016)) +- modal issues with richtext relationship ([8ea4407](https://github.com/payloadcms/payload/commit/8ea4407f04fd4b63df6afffbe15301f7d5746016)) ## [0.5.1](https://github.com/payloadcms/payload/compare/v0.5.0...v0.5.1) (2021-03-29) ### Bug Fixes -* base auth / upload fields no longer cause validation issues ([23e1fc3](https://github.com/payloadcms/payload/commit/23e1fc3f73673d4694763908bb819c77bf600702)) +- base auth / upload fields no longer cause validation issues ([23e1fc3](https://github.com/payloadcms/payload/commit/23e1fc3f73673d4694763908bb819c77bf600702)) # [0.5.0](https://github.com/payloadcms/payload/compare/v0.4.7...v0.5.0) (2021-03-29) ### BREAKING CHANGES -* changes global find and update payload api from global to slug as the key to find/update with ([c71ba2b](https://github.com/payloadcms/payload/commit/c71ba2b079d109d4028d74f76603905d9382d364)) +- changes global find and update payload api from global to slug as the key to find/update with ([c71ba2b](https://github.com/payloadcms/payload/commit/c71ba2b079d109d4028d74f76603905d9382d364)) ### Bug Fixes -* allows absolute urls within adminThumbnail ([51b46d4](https://github.com/payloadcms/payload/commit/51b46d44b0c88387d8b23859129f163b581bf1cc)) -* handles empty indices within array field data ([d47e2c5](https://github.com/payloadcms/payload/commit/d47e2c57868667f2ff9ca87aa9ad862687bd985e)) -* moving nested arrays now properly persists row count ([5f9a5c8](https://github.com/payloadcms/payload/commit/5f9a5c859eca8854592b2a7a32bef50db4584709)) -* validation consistency within admin ([50b9937](https://github.com/payloadcms/payload/commit/50b99370d2b849e858fd64e6018ebf0e94103998)) +- allows absolute urls within adminThumbnail ([51b46d4](https://github.com/payloadcms/payload/commit/51b46d44b0c88387d8b23859129f163b581bf1cc)) +- handles empty indices within array field data ([d47e2c5](https://github.com/payloadcms/payload/commit/d47e2c57868667f2ff9ca87aa9ad862687bd985e)) +- moving nested arrays now properly persists row count ([5f9a5c8](https://github.com/payloadcms/payload/commit/5f9a5c859eca8854592b2a7a32bef50db4584709)) +- validation consistency within admin ([50b9937](https://github.com/payloadcms/payload/commit/50b99370d2b849e858fd64e6018ebf0e94103998)) ### Features -* saves cursor position when relationship element is added to richText ([d24b3f7](https://github.com/payloadcms/payload/commit/d24b3f72ce222e4551c12e202238f171f9cc4b97)) +- saves cursor position when relationship element is added to richText ([d24b3f7](https://github.com/payloadcms/payload/commit/d24b3f72ce222e4551c12e202238f171f9cc4b97)) ## [0.4.7](https://github.com/payloadcms/payload/compare/v0.4.6...v0.4.7) (2021-03-15) @@ -2106,127 +2241,127 @@ If none of your collections or globals should be publicly exposed, you don't nee ### Features -* allows admin thumbnail to be set programmatically ([b6a9fe4](https://github.com/payloadcms/payload/commit/b6a9fe4bcfc85815a60a3fe8d3cb38b7ae673424)) -* exports collection field hook types from payload/types ([36aae5c](https://github.com/payloadcms/payload/commit/36aae5c37f8ea8c5dde16a898a28b9301efa6a5b)) -* only runs adminThumbnail func if image type ([5e1ddb5](https://github.com/payloadcms/payload/commit/5e1ddb552ee9fc8972c9537eee62cddc93a24f42)) -* provides field access control with document data ([339f750](https://github.com/payloadcms/payload/commit/339f7503a41802421bb38c8cf5da0f0f1573bdd6)) -* reorders uploads to provide beforeChange hooks with upload data ([3c42e6e](https://github.com/payloadcms/payload/commit/3c42e6e6af849a8acc45e93017b0eafea74ecdba)) +- allows admin thumbnail to be set programmatically ([b6a9fe4](https://github.com/payloadcms/payload/commit/b6a9fe4bcfc85815a60a3fe8d3cb38b7ae673424)) +- exports collection field hook types from payload/types ([36aae5c](https://github.com/payloadcms/payload/commit/36aae5c37f8ea8c5dde16a898a28b9301efa6a5b)) +- only runs adminThumbnail func if image type ([5e1ddb5](https://github.com/payloadcms/payload/commit/5e1ddb552ee9fc8972c9537eee62cddc93a24f42)) +- provides field access control with document data ([339f750](https://github.com/payloadcms/payload/commit/339f7503a41802421bb38c8cf5da0f0f1573bdd6)) +- reorders uploads to provide beforeChange hooks with upload data ([3c42e6e](https://github.com/payloadcms/payload/commit/3c42e6e6af849a8acc45e93017b0eafea74ecdba)) ## [0.4.5](https://github.com/payloadcms/payload/compare/v0.4.4...v0.4.5) (2021-03-04) ### Bug Fixes -* config validation allow admin dashboard ([2d1d1b4](https://github.com/payloadcms/payload/commit/2d1d1b4f32bcc6ee1ce709208ae28369611e5bdd)) +- config validation allow admin dashboard ([2d1d1b4](https://github.com/payloadcms/payload/commit/2d1d1b4f32bcc6ee1ce709208ae28369611e5bdd)) ## [0.4.4](https://github.com/payloadcms/payload/compare/v0.4.3...v0.4.4) (2021-03-04) ### Bug Fixes -* email verification template missing token ([93ed664](https://github.com/payloadcms/payload/commit/93ed6649201511edfaea14c199022f05623c404c)) +- email verification template missing token ([93ed664](https://github.com/payloadcms/payload/commit/93ed6649201511edfaea14c199022f05623c404c)) ## [0.4.1](https://github.com/payloadcms/payload/compare/v0.4.0...v0.4.3) (2021-03-04) ### Documentation -* fixed broken links throughout docs ([3afefbe](https://github.com/payloadcms/payload/commit/3afefbe5922ee7aff496a96c61ff9a5270d6a7cb)) +- fixed broken links throughout docs ([3afefbe](https://github.com/payloadcms/payload/commit/3afefbe5922ee7aff496a96c61ff9a5270d6a7cb)) ## [0.4.0](https://github.com/payloadcms/payload/compare/v0.3.0...v0.4.0) (2021-02-28) ### Breaking Changes -* reverts preview function to only requiring the return of a preview URL ([ca14e66](https://github.com/payloadcms/payload/commit/ca14e66a580fea94ef71416edf6c8caffcf446b0)) +- reverts preview function to only requiring the return of a preview URL ([ca14e66](https://github.com/payloadcms/payload/commit/ca14e66a580fea94ef71416edf6c8caffcf446b0)) ### Features -* implements new billing model, including new Personal license which is free forever ([c97ddeb](https://github.com/payloadcms/payload/commit/c97ddeb2d96f949604d46212166c4784330cc72d)) -* simplifies logic in update operations ([e268e25](https://github.com/payloadcms/payload/commit/e268e25719dd4ebd1a6818dca86d12dc057386ca)) -* removes the requirement of returning a value from field hooks ([4de5605](https://github.com/payloadcms/payload/commit/4de56059319a6d13b6f0ec20ac4d344f265446bf)) +- implements new billing model, including new Personal license which is free forever ([c97ddeb](https://github.com/payloadcms/payload/commit/c97ddeb2d96f949604d46212166c4784330cc72d)) +- simplifies logic in update operations ([e268e25](https://github.com/payloadcms/payload/commit/e268e25719dd4ebd1a6818dca86d12dc057386ca)) +- removes the requirement of returning a value from field hooks ([4de5605](https://github.com/payloadcms/payload/commit/4de56059319a6d13b6f0ec20ac4d344f265446bf)) ### Bug Fixes -* properly exposes scss variables for re-use ([c1b2301](https://github.com/payloadcms/payload/commit/c1b230165033ed3cf382a6e42b590815489525f9)) -* explicitly sets modal z-index and css breakpoints ([c1b2301](https://github.com/payloadcms/payload/commit/c1b230165033ed3cf382a6e42b590815489525f9)) -* removes `overwrite` from update operation to ensure hidden fields don't get lost on document update ([a8e2cc1](https://github.com/payloadcms/payload/commit/a8e2cc11af177641409ff7726ed8c4f1a154dee4)) +- properly exposes scss variables for re-use ([c1b2301](https://github.com/payloadcms/payload/commit/c1b230165033ed3cf382a6e42b590815489525f9)) +- explicitly sets modal z-index and css breakpoints ([c1b2301](https://github.com/payloadcms/payload/commit/c1b230165033ed3cf382a6e42b590815489525f9)) +- removes `overwrite` from update operation to ensure hidden fields don't get lost on document update ([a8e2cc1](https://github.com/payloadcms/payload/commit/a8e2cc11af177641409ff7726ed8c4f1a154dee4)) ## [0.3.0](https://github.com/payloadcms/payload/compare/v0.2.13...v0.3.0) (2021-02-23) ### Bug Fixes -* properly exposes scss variables for re-use ([c1b2301](https://github.com/payloadcms/payload/commit/c1b230165033ed3cf382a6e42b590815489525f9)) -* explicitly sets modal z-index and css breakpoints ([c1b2301](https://github.com/payloadcms/payload/commit/c1b230165033ed3cf382a6e42b590815489525f9)) -* removes `overwrite` from update operation to ensure hidden fields don't get lost on document update ([a8e2cc1](https://github.com/payloadcms/payload/commit/a8e2cc11af177641409ff7726ed8c4f1a154dee4)) +- properly exposes scss variables for re-use ([c1b2301](https://github.com/payloadcms/payload/commit/c1b230165033ed3cf382a6e42b590815489525f9)) +- explicitly sets modal z-index and css breakpoints ([c1b2301](https://github.com/payloadcms/payload/commit/c1b230165033ed3cf382a6e42b590815489525f9)) +- removes `overwrite` from update operation to ensure hidden fields don't get lost on document update ([a8e2cc1](https://github.com/payloadcms/payload/commit/a8e2cc11af177641409ff7726ed8c4f1a154dee4)) ## [0.2.13](https://github.com/payloadcms/payload/compare/v0.2.12...v0.2.13) (2021-02-20) ### Breaking Changes -* Preview function now no longer takes form field state as an arg and instead takes a copy of the document itself +- Preview function now no longer takes form field state as an arg and instead takes a copy of the document itself ### Features -* supports newTab in Button, updates generatePreviewURL api to forward through PreviewButton ([6b6297f](https://github.com/payloadcms/payload/commit/6b6297fb2d22b813f45729429b7efbe9a6ab97da)) -* detaches localization from mongoose entirely ([162ec74](https://github.com/payloadcms/payload/commit/162ec74445c51a79cd50f75ffb56de8e4bcf9ace)) +- supports newTab in Button, updates generatePreviewURL api to forward through PreviewButton ([6b6297f](https://github.com/payloadcms/payload/commit/6b6297fb2d22b813f45729429b7efbe9a6ab97da)) +- detaches localization from mongoose entirely ([162ec74](https://github.com/payloadcms/payload/commit/162ec74445c51a79cd50f75ffb56de8e4bcf9ace)) ### Bug Fixes -* infinite loop caused within block component ([9e42d11](https://github.com/payloadcms/payload/commit/9e42d119e471b0efe0d6f69e99d0e31ba5e9237f)) -* sets sparse true if field localized and unique ([2bc5c59](https://github.com/payloadcms/payload/commit/2bc5c59fec842cd5c5adf201084cdba9b0cab310)) -* returns entire doc to generatePreviewURL callback of PreviewButton ([9b9d0f2](https://github.com/payloadcms/payload/commit/9b9d0f24b54d46c24734f30ed9640d25e6c19097)) -* log mongoose connect error message ([e36c7d2](https://github.com/payloadcms/payload/commit/e36c7d269c4b5b49d6c85f416b26196999aadfc0)) +- infinite loop caused within block component ([9e42d11](https://github.com/payloadcms/payload/commit/9e42d119e471b0efe0d6f69e99d0e31ba5e9237f)) +- sets sparse true if field localized and unique ([2bc5c59](https://github.com/payloadcms/payload/commit/2bc5c59fec842cd5c5adf201084cdba9b0cab310)) +- returns entire doc to generatePreviewURL callback of PreviewButton ([9b9d0f2](https://github.com/payloadcms/payload/commit/9b9d0f24b54d46c24734f30ed9640d25e6c19097)) +- log mongoose connect error message ([e36c7d2](https://github.com/payloadcms/payload/commit/e36c7d269c4b5b49d6c85f416b26196999aadfc0)) ### Documentation -* removes incorrect hasMany from upload field type ([e549298](https://github.com/payloadcms/payload/commit/e549298ad5a9a6116659258bb738f5d87abe4ff7)) +- removes incorrect hasMany from upload field type ([e549298](https://github.com/payloadcms/payload/commit/e549298ad5a9a6116659258bb738f5d87abe4ff7)) ## [0.2.12](https://github.com/payloadcms/payload/compare/v0.2.11...v0.2.12) (2021-02-1-0) ### Bug Fixes -* middleware for cors set up on static files -* windows compatible upload filename paths +- middleware for cors set up on static files +- windows compatible upload filename paths ## [0.2.11](https://github.com/payloadcms/payload/compare/v0.2.11...v0.2.12) (2021-02-05) ### Bug Fixes -* middleware for cors set up on static files ([55e0de1](https://github.com/payloadcms/payload/commit/55e0de1719ec387e2182bf33922602243f7eda94)) -* file size in local operations ([0feb7b7](https://github.com/payloadcms/payload/commit/0feb7b7379de6429cf5cb1cdbdad0142f72cc5dc)) +- middleware for cors set up on static files ([55e0de1](https://github.com/payloadcms/payload/commit/55e0de1719ec387e2182bf33922602243f7eda94)) +- file size in local operations ([0feb7b7](https://github.com/payloadcms/payload/commit/0feb7b7379de6429cf5cb1cdbdad0142f72cc5dc)) ## [0.2.11](https://github.com/payloadcms/payload/compare/v0.2.10...v0.2.11) (2021-02-05) ### Features -* allows upload through Local API ([1a59028](https://github.com/payloadcms/payload/commit/1a590287ea181e4548c8e75d8cdb25ada5cbbdbf)) +- allows upload through Local API ([1a59028](https://github.com/payloadcms/payload/commit/1a590287ea181e4548c8e75d8cdb25ada5cbbdbf)) ### Bug Fixes -* fix localization within blocks ([e50fc1f](https://github.com/payloadcms/payload/commit/e50fc1f3142ae5e387cef3c778988c473b04417e)) -* forces fallbackLocale to null in update ops ([3005360](https://github.com/payloadcms/payload/commit/300536033ffe50a2eaedd2a714e844a5282f2ef0)) +- fix localization within blocks ([e50fc1f](https://github.com/payloadcms/payload/commit/e50fc1f3142ae5e387cef3c778988c473b04417e)) +- forces fallbackLocale to null in update ops ([3005360](https://github.com/payloadcms/payload/commit/300536033ffe50a2eaedd2a714e844a5282f2ef0)) ## [0.2.10](https://github.com/payloadcms/payload/compare/v0.2.9...v0.2.10) (2021-02-04) ### Features -* add support for setting mongoose connection options ([82c4898](https://github.com/payloadcms/payload/commit/82c489841c418b953c7f08d30c8b19751ff050f4)) -* admin ui create first user add confirm password field () +- add support for setting mongoose connection options ([82c4898](https://github.com/payloadcms/payload/commit/82c489841c418b953c7f08d30c8b19751ff050f4)) +- admin ui create first user add confirm password field () ### Bug Fixes -* flag scss variables with default ([8916e8a](https://github.com/payloadcms/payload/commit/8916e8af45e179748bf6f2a75216e8d1c35958f2)) -* relationship component hasMany bug ([d540706](https://github.com/payloadcms/payload/commit/d5407060d079c333081b0298e45dfe866d31b86e)) -* hide force unlock in admin ui when creating auth collection item ([3bd0de0](https://github.com/payloadcms/payload/commit/3bd0de0a0b6832f5940474c8c40fd85f6fcd1b74)) +- flag scss variables with default ([8916e8a](https://github.com/payloadcms/payload/commit/8916e8af45e179748bf6f2a75216e8d1c35958f2)) +- relationship component hasMany bug ([d540706](https://github.com/payloadcms/payload/commit/d5407060d079c333081b0298e45dfe866d31b86e)) +- hide force unlock in admin ui when creating auth collection item ([3bd0de0](https://github.com/payloadcms/payload/commit/3bd0de0a0b6832f5940474c8c40fd85f6fcd1b74)) ## [0.2.9](https://github.com/payloadcms/payload/compare/v0.2.6...v0.2.9) (2021-01-27) ### Bug Fixes -* field validation type can return promise ([06ddab1](https://github.com/payloadcms/payload/commit/06ddab124919b28b74667e36e315682a0c9cf459)) +- field validation type can return promise ([06ddab1](https://github.com/payloadcms/payload/commit/06ddab124919b28b74667e36e315682a0c9cf459)) ## [0.2.8](https://github.com/payloadcms/payload/compare/v0.2.6...v0.2.8) (2021-01-25) ### Chore -* add bugs and keywords to package.json ([37f5b32](https://github.com/payloadcms/payload/commit/37f5b3283363220caa63a5066011b1cb9841812d)) +- add bugs and keywords to package.json ([37f5b32](https://github.com/payloadcms/payload/commit/37f5b3283363220caa63a5066011b1cb9841812d)) ## [0.2.6](https://github.com/payloadcms/payload/compare/v0.2.5...v0.2.6) (2021-01-25) @@ -2234,130 +2369,130 @@ If none of your collections or globals should be publicly exposed, you don't nee ### Bug Fixes -* field gutter padding ([90d2078](https://github.com/payloadcms/payload/commit/90d20786c33b2ef4ea937e75769c023c5776db1b)) -* richtext sticky toolbar within block ([8218343](https://github.com/payloadcms/payload/commit/8218343b6cf629faed0f752fb27b546684580ec4)) +- field gutter padding ([90d2078](https://github.com/payloadcms/payload/commit/90d20786c33b2ef4ea937e75769c023c5776db1b)) +- richtext sticky toolbar within block ([8218343](https://github.com/payloadcms/payload/commit/8218343b6cf629faed0f752fb27b546684580ec4)) ## [0.2.4](https://github.com/payloadcms/payload/compare/v0.2.3...v0.2.4) (2021-01-24) ### Bug Fixes -* block field styles ([36f0bd8](https://github.com/payloadcms/payload/commit/36f0bd81eb340b6d8ac3011a4b10e828e79c20d8)) +- block field styles ([36f0bd8](https://github.com/payloadcms/payload/commit/36f0bd81eb340b6d8ac3011a4b10e828e79c20d8)) ## [0.2.3](https://github.com/payloadcms/payload/compare/v0.2.2...v0.2.3) (2021-01-24) ### Bug Fixes -* ensures modal heights are 100% of viewport ([7edab5d](https://github.com/payloadcms/payload/commit/7edab5d3543db27c444b180548fc076dd483848a)) +- ensures modal heights are 100% of viewport ([7edab5d](https://github.com/payloadcms/payload/commit/7edab5d3543db27c444b180548fc076dd483848a)) ## [0.2.2](https://github.com/payloadcms/payload/compare/v0.2.1...v0.2.2) (2021-01-24) ### Bug Fixes -* revert serverURL config change ([f558bd2](https://github.com/payloadcms/payload/commit/f558bd2733a82f1ed9d14604f8b3dea5bb5e8ef5)) +- revert serverURL config change ([f558bd2](https://github.com/payloadcms/payload/commit/f558bd2733a82f1ed9d14604f8b3dea5bb5e8ef5)) ### Features -* adds better serverURL validation ([75056e2](https://github.com/payloadcms/payload/commit/75056e2e13c4d5f9a2d4341282b6c1f4c42e1609)) +- adds better serverURL validation ([75056e2](https://github.com/payloadcms/payload/commit/75056e2e13c4d5f9a2d4341282b6c1f4c42e1609)) ### Reverts -* Revert "docs: configuration overview describe serverURL and removed from code examples where not needed" ([bd446b6](https://github.com/payloadcms/payload/commit/bd446b60b8c56857fb99cda5a9f8a93216efc8b0)) +- Revert "docs: configuration overview describe serverURL and removed from code examples where not needed" ([bd446b6](https://github.com/payloadcms/payload/commit/bd446b60b8c56857fb99cda5a9f8a93216efc8b0)) ## [0.2.1](https://github.com/payloadcms/payload/compare/v0.2.0...v0.2.1) (2021-01-24) ### Features -* exposes further types ([e056348](https://github.com/payloadcms/payload/commit/e056348850638f3c621072668a4a9232492c209b)) +- exposes further types ([e056348](https://github.com/payloadcms/payload/commit/e056348850638f3c621072668a4a9232492c209b)) # [0.2.0](https://github.com/payloadcms/payload/compare/v0.1.146...v0.2.0) (2021-01-23) ### Bug Fixes -* better error handler when sendMail fails ([ea47736](https://github.com/payloadcms/payload/commit/ea47736274b3b176da534b461907da4ddeffa5e9)) -* button css specificity ([d8b5233](https://github.com/payloadcms/payload/commit/d8b52337b2d34785817b536fe7017853bbc3b5a6)) -* migrates Condition UI value/operator pattern ([d23cc20](https://github.com/payloadcms/payload/commit/d23cc20b3d0fa061a2b8111f65e04dd5d35a5557)) -* target es2019, optional chaining not supported for Node < 14 ([52a0096](https://github.com/payloadcms/payload/commit/52a0096d3b8eca47a8afdef42d47117d028b754d)) +- better error handler when sendMail fails ([ea47736](https://github.com/payloadcms/payload/commit/ea47736274b3b176da534b461907da4ddeffa5e9)) +- button css specificity ([d8b5233](https://github.com/payloadcms/payload/commit/d8b52337b2d34785817b536fe7017853bbc3b5a6)) +- migrates Condition UI value/operator pattern ([d23cc20](https://github.com/payloadcms/payload/commit/d23cc20b3d0fa061a2b8111f65e04dd5d35a5557)) +- target es2019, optional chaining not supported for Node < 14 ([52a0096](https://github.com/payloadcms/payload/commit/52a0096d3b8eca47a8afdef42d47117d028b754d)) ### Features -* adds contributing guidelines ([de5bf6e](https://github.com/payloadcms/payload/commit/de5bf6ea280f771e96de703b3732f851903b1fe5)) -* allows admins to autoverify via admin ([a6a23e3](https://github.com/payloadcms/payload/commit/a6a23e3b154802e5ec874760b3d3e44e90f56e7c)) -* auto-removes verificationToken upon manual user verify ([2139eb4](https://github.com/payloadcms/payload/commit/2139eb410f8c95505ef7b90e35a099b0955d4e12)) -* serverURL no longer required in config ([4770f24](https://github.com/payloadcms/payload/commit/4770f24adb50367ec6f6637cafc3f076023b0416)) +- adds contributing guidelines ([de5bf6e](https://github.com/payloadcms/payload/commit/de5bf6ea280f771e96de703b3732f851903b1fe5)) +- allows admins to autoverify via admin ([a6a23e3](https://github.com/payloadcms/payload/commit/a6a23e3b154802e5ec874760b3d3e44e90f56e7c)) +- auto-removes verificationToken upon manual user verify ([2139eb4](https://github.com/payloadcms/payload/commit/2139eb410f8c95505ef7b90e35a099b0955d4e12)) +- serverURL no longer required in config ([4770f24](https://github.com/payloadcms/payload/commit/4770f24adb50367ec6f6637cafc3f076023b0416)) ## [0.1.146](https://github.com/payloadcms/payload/compare/v0.1.145...v0.1.146) (2021-01-18) ### Bug Fixes -* localized groups ([f38e0fc](https://github.com/payloadcms/payload/commit/f38e0fce981a188b0adb2050cfe8a8e0f047e606)) -* textarea handle undefined ([ba31397](https://github.com/payloadcms/payload/commit/ba31397ac15402eb3837bcbe454e0aaf82ecbf03)) +- localized groups ([f38e0fc](https://github.com/payloadcms/payload/commit/f38e0fce981a188b0adb2050cfe8a8e0f047e606)) +- textarea handle undefined ([ba31397](https://github.com/payloadcms/payload/commit/ba31397ac15402eb3837bcbe454e0aaf82ecbf03)) ## [0.1.145](https://github.com/payloadcms/payload/compare/v0.1.144...v0.1.145) (2021-01-17) ### Bug Fixes -* add minLength and maxLength to textarea field validations ([2c98087](https://github.com/payloadcms/payload/commit/2c98087c6f40c32dcbccf557aa61ebf8fc1fe17f)) -* minLength field validation error messages ([5e60b86](https://github.com/payloadcms/payload/commit/5e60b8617e715378831f10b90dedd017ed8d4a8c)) +- add minLength and maxLength to textarea field validations ([2c98087](https://github.com/payloadcms/payload/commit/2c98087c6f40c32dcbccf557aa61ebf8fc1fe17f)) +- minLength field validation error messages ([5e60b86](https://github.com/payloadcms/payload/commit/5e60b8617e715378831f10b90dedd017ed8d4a8c)) ## [0.1.144](https://github.com/payloadcms/payload/compare/v0.1.143...v0.1.144) (2021-01-16) ### Bug Fixes -* add default user to collections before checking for valid relationships ([b2d05c7](https://github.com/payloadcms/payload/commit/b2d05c781d7751bbede9e37996cbdc0736d07a66)) -* handle user collection 'auth: true' ([c303711](https://github.com/payloadcms/payload/commit/c3037118133a242769dfa4a31914e8e61068edcf)) +- add default user to collections before checking for valid relationships ([b2d05c7](https://github.com/payloadcms/payload/commit/b2d05c781d7751bbede9e37996cbdc0736d07a66)) +- handle user collection 'auth: true' ([c303711](https://github.com/payloadcms/payload/commit/c3037118133a242769dfa4a31914e8e61068edcf)) ## [0.1.143](https://github.com/payloadcms/payload/compare/v0.1.142...v0.1.143) (2021-01-14) ### Bug Fixes -* payload schema validation allow '\*' ([bd92b0a](https://github.com/payloadcms/payload/commit/bd92b0a94ba3562b01000a58a4bc0e0071c1f35b)) +- payload schema validation allow '\*' ([bd92b0a](https://github.com/payloadcms/payload/commit/bd92b0a94ba3562b01000a58a4bc0e0071c1f35b)) ### Features -* allows undefined collections ([6bb58ce](https://github.com/payloadcms/payload/commit/6bb58cecd8bc0b8faa42bc8995ec5da0421375db)) +- allows undefined collections ([6bb58ce](https://github.com/payloadcms/payload/commit/6bb58cecd8bc0b8faa42bc8995ec5da0421375db)) ## [0.1.142](https://github.com/payloadcms/payload/compare/v0.1.141...v0.1.142) (2021-01-09) ### Bug Fixes -* adds disableDuplicate to schema validation of collections config ([e9ed7ee](https://github.com/payloadcms/payload/commit/e9ed7ee4bdc99bdcc0d86272816f3d5c6904ac2b)) +- adds disableDuplicate to schema validation of collections config ([e9ed7ee](https://github.com/payloadcms/payload/commit/e9ed7ee4bdc99bdcc0d86272816f3d5c6904ac2b)) ### Features -* add getAdminURL and getAPIURL functions ([8db73bb](https://github.com/payloadcms/payload/commit/8db73bbec22646bc626d17bb783b10ea2d837520)) -* adds build to CI ([87a1717](https://github.com/payloadcms/payload/commit/87a1717dcae8ec30892cebc46e88cabe8e62bf4c)) -* disable graphQL flag that will bypass gql on payload init ([d78c76e](https://github.com/payloadcms/payload/commit/d78c76e0b4b7e2c2cc834a2a1288ec75468852ec)) +- add getAdminURL and getAPIURL functions ([8db73bb](https://github.com/payloadcms/payload/commit/8db73bbec22646bc626d17bb783b10ea2d837520)) +- adds build to CI ([87a1717](https://github.com/payloadcms/payload/commit/87a1717dcae8ec30892cebc46e88cabe8e62bf4c)) +- disable graphQL flag that will bypass gql on payload init ([d78c76e](https://github.com/payloadcms/payload/commit/d78c76e0b4b7e2c2cc834a2a1288ec75468852ec)) ## [0.1.141](https://github.com/payloadcms/payload/compare/v0.1.140...v0.1.141) (2021-01-07) ### Bug Fixes -* properly exports ES6 components ([f493263](https://github.com/payloadcms/payload/commit/f49326395dba523c2193c46a8ca4142ff761f3fd)) +- properly exports ES6 components ([f493263](https://github.com/payloadcms/payload/commit/f49326395dba523c2193c46a8ca4142ff761f3fd)) ## [0.1.140](https://github.com/payloadcms/payload/compare/v0.1.139...v0.1.140) (2021-01-07) ### Bug Fixes -* admin field error messages ([423df3f](https://github.com/payloadcms/payload/commit/423df3f83af0f899b4a9eafa041ab7c79ccfac78)) +- admin field error messages ([423df3f](https://github.com/payloadcms/payload/commit/423df3f83af0f899b4a9eafa041ab7c79ccfac78)) ## [0.1.139](https://github.com/payloadcms/payload/compare/v0.1.138...v0.1.139) (2021-01-06) ### Bug Fixes -* improves typing in delete op ([644519c](https://github.com/payloadcms/payload/commit/644519c539f6fda29d7b61978416b70306d0ea35)) -* use FileSize and ImageSize types ([4d6871a](https://github.com/payloadcms/payload/commit/4d6871abc854385121c761eea4e4705f45c35832)) +- improves typing in delete op ([644519c](https://github.com/payloadcms/payload/commit/644519c539f6fda29d7b61978416b70306d0ea35)) +- use FileSize and ImageSize types ([4d6871a](https://github.com/payloadcms/payload/commit/4d6871abc854385121c761eea4e4705f45c35832)) ## [0.1.138](https://github.com/payloadcms/payload/compare/v0.1.137...v0.1.138) (2021-01-06) ### Bug Fixes -* removes old css ([6066f28](https://github.com/payloadcms/payload/commit/6066f2896a5c1e21137d41404f2a6161ef6de7a2)) +- removes old css ([6066f28](https://github.com/payloadcms/payload/commit/6066f2896a5c1e21137d41404f2a6161ef6de7a2)) ## [0.1.137](https://github.com/payloadcms/payload/compare/v0.1.136...v0.1.137) (2021-01-05) ### Bug Fixes -* removes prod devtool ([6808637](https://github.com/payloadcms/payload/commit/680863702e67d69dc4ec8d6a48b0e1402164cc97)) +- removes prod devtool ([6808637](https://github.com/payloadcms/payload/commit/680863702e67d69dc4ec8d6a48b0e1402164cc97)) ## [0.1.136](https://github.com/payloadcms/payload/compare/v0.1.135...v0.1.136) (2021-01-05) @@ -2367,7 +2502,7 @@ If none of your collections or globals should be publicly exposed, you don't nee ### Bug Fixes -* updates payload-config path within webpack ([6bf141c](https://github.com/payloadcms/payload/commit/6bf141c6d4707e622f56f5df4f8f3f366d847173)) +- updates payload-config path within webpack ([6bf141c](https://github.com/payloadcms/payload/commit/6bf141c6d4707e622f56f5df4f8f3f366d847173)) ## [0.1.133](https://github.com/payloadcms/payload/compare/v0.1.132...v0.1.133) (2021-01-05) @@ -2375,7 +2510,7 @@ If none of your collections or globals should be publicly exposed, you don't nee ### Bug Fixes -* renames webpack config alias ([c0636df](https://github.com/payloadcms/payload/commit/c0636dfe220b72c129c4e2b144e5714755a20043)) +- renames webpack config alias ([c0636df](https://github.com/payloadcms/payload/commit/c0636dfe220b72c129c4e2b144e5714755a20043)) ## [0.1.131](https://github.com/payloadcms/payload/compare/v0.1.130...v0.1.131) (2021-01-05) @@ -2387,76 +2522,76 @@ If none of your collections or globals should be publicly exposed, you don't nee ### Bug Fixes -* adds default thumbnail size ([f582a25](https://github.com/payloadcms/payload/commit/f582a254cd6b6f56bb8146923f3ab0130a4b7859)) -* config validation of block imageURL ([c572057](https://github.com/payloadcms/payload/commit/c572057706f58f7759e167a724837f84e88d0d10)) -* default config value for email removed as the property was moved out of config ([cf89d4c](https://github.com/payloadcms/payload/commit/cf89d4cb56add645e68cf0be31d943b734dabe39)) -* demo email start on payload init ([57d2c86](https://github.com/payloadcms/payload/commit/57d2c8602fb81a5d67d34a38c25a0429c2b9c44b)) -* Edit view main / sidebar widths ([e067fa1](https://github.com/payloadcms/payload/commit/e067fa12b2465d4767bc35b5f1ec0de8096f7439)) -* graphQL access ([4d871c2](https://github.com/payloadcms/payload/commit/4d871c27f6eefea26ec55302e654fc3b0f4a2933)) -* graphQL logout ([709cc9c](https://github.com/payloadcms/payload/commit/709cc9c294d959913b382e24dd0d7002d6a7c9cd)) -* improves edit view layout constraints ([0f7046b](https://github.com/payloadcms/payload/commit/0f7046b98efd82caf98d0d872bd6e68b076452a1)) -* issues with select hasMany ([a0bf503](https://github.com/payloadcms/payload/commit/a0bf503f888b7fde0c9660e9f8a461da2fab5d67)) -* lowecases joi like everywhere else in payload ([5823a86](https://github.com/payloadcms/payload/commit/5823a864f926bc6441267a21277059a368410b92)) -* payload config remove types for email ([faec969](https://github.com/payloadcms/payload/commit/faec969752622c70e9175cc226d888bf32ec732c)) -* reinstate explicit labels for AllFields collection ([885c73c](https://github.com/payloadcms/payload/commit/885c73c838c597ac03f79558af9946686274969f)) -* removes delete and unlock from baseField type and schema ([4fa942f](https://github.com/payloadcms/payload/commit/4fa942f3a02089c8320e483b896a59627c28f11e)) -* removes old reliance on config.email ([e093e06](https://github.com/payloadcms/payload/commit/e093e06926e55916ddb0bdb6f17e0317dfab951c)) +- adds default thumbnail size ([f582a25](https://github.com/payloadcms/payload/commit/f582a254cd6b6f56bb8146923f3ab0130a4b7859)) +- config validation of block imageURL ([c572057](https://github.com/payloadcms/payload/commit/c572057706f58f7759e167a724837f84e88d0d10)) +- default config value for email removed as the property was moved out of config ([cf89d4c](https://github.com/payloadcms/payload/commit/cf89d4cb56add645e68cf0be31d943b734dabe39)) +- demo email start on payload init ([57d2c86](https://github.com/payloadcms/payload/commit/57d2c8602fb81a5d67d34a38c25a0429c2b9c44b)) +- Edit view main / sidebar widths ([e067fa1](https://github.com/payloadcms/payload/commit/e067fa12b2465d4767bc35b5f1ec0de8096f7439)) +- graphQL access ([4d871c2](https://github.com/payloadcms/payload/commit/4d871c27f6eefea26ec55302e654fc3b0f4a2933)) +- graphQL logout ([709cc9c](https://github.com/payloadcms/payload/commit/709cc9c294d959913b382e24dd0d7002d6a7c9cd)) +- improves edit view layout constraints ([0f7046b](https://github.com/payloadcms/payload/commit/0f7046b98efd82caf98d0d872bd6e68b076452a1)) +- issues with select hasMany ([a0bf503](https://github.com/payloadcms/payload/commit/a0bf503f888b7fde0c9660e9f8a461da2fab5d67)) +- lowecases joi like everywhere else in payload ([5823a86](https://github.com/payloadcms/payload/commit/5823a864f926bc6441267a21277059a368410b92)) +- payload config remove types for email ([faec969](https://github.com/payloadcms/payload/commit/faec969752622c70e9175cc226d888bf32ec732c)) +- reinstate explicit labels for AllFields collection ([885c73c](https://github.com/payloadcms/payload/commit/885c73c838c597ac03f79558af9946686274969f)) +- removes delete and unlock from baseField type and schema ([4fa942f](https://github.com/payloadcms/payload/commit/4fa942f3a02089c8320e483b896a59627c28f11e)) +- removes old reliance on config.email ([e093e06](https://github.com/payloadcms/payload/commit/e093e06926e55916ddb0bdb6f17e0317dfab951c)) ### Features -* allows for refresh operation to accept a deliberately specified token ([7d05069](https://github.com/payloadcms/payload/commit/7d05069f361d30ff36d990e0926a60b1c374149a)) -* types this within crreate op ([d43ff8b](https://github.com/payloadcms/payload/commit/d43ff8b4a764dd203fa7eebda28b09dc21a88e31)) +- allows for refresh operation to accept a deliberately specified token ([7d05069](https://github.com/payloadcms/payload/commit/7d05069f361d30ff36d990e0926a60b1c374149a)) +- types this within crreate op ([d43ff8b](https://github.com/payloadcms/payload/commit/d43ff8b4a764dd203fa7eebda28b09dc21a88e31)) ## [0.1.127](https://github.com/payloadcms/payload/compare/v0.1.126...v0.1.127) (2020-12-31) ### Bug Fixes -* converts class methods to arrow functions ([662839f](https://github.com/payloadcms/payload/commit/662839fb06e95001bb0ef20c4f318cc4c2fccc31)) +- converts class methods to arrow functions ([662839f](https://github.com/payloadcms/payload/commit/662839fb06e95001bb0ef20c4f318cc4c2fccc31)) ## [0.1.126](https://github.com/payloadcms/payload/compare/v0.1.125...v0.1.126) (2020-12-30) ### Bug Fixes -* adds delete and unlock to joi baseField schema ([36d51de](https://github.com/payloadcms/payload/commit/36d51de201b27ef91f43f05992d980ad306ba9f3)) +- adds delete and unlock to joi baseField schema ([36d51de](https://github.com/payloadcms/payload/commit/36d51de201b27ef91f43f05992d980ad306ba9f3)) ## [0.1.125](https://github.com/payloadcms/payload/compare/v0.1.124...v0.1.125) (2020-12-30) ### Bug Fixes -* removes prod source maps ([eeea06d](https://github.com/payloadcms/payload/commit/eeea06d6aaa84efdfb479baf1baad7bdf038d7cd)) +- removes prod source maps ([eeea06d](https://github.com/payloadcms/payload/commit/eeea06d6aaa84efdfb479baf1baad7bdf038d7cd)) ## [0.1.124](https://github.com/payloadcms/payload/compare/v0.1.123...v0.1.124) (2020-12-30) ### Bug Fixes -* disable requiring default props in eslint ([64cf321](https://github.com/payloadcms/payload/commit/64cf32146ad75d8ce3e5f3e8e690391ac7884819)) -* disables inline sourcemaps for admin dist ([8090b2a](https://github.com/payloadcms/payload/commit/8090b2a23bb6298fdd998d9a72c6f596e7473cb0)) -* type issues that arose from reorganizing certain config props ([0c03c2e](https://github.com/payloadcms/payload/commit/0c03c2e3af34657e3dde1c3f2b675840147f78ec)) -* updates typing on DatePicker component and joi schema ([5100fd3](https://github.com/payloadcms/payload/commit/5100fd35dc796c5862ef9fd7261abdcba925b020)) -* webpack config override ([8401400](https://github.com/payloadcms/payload/commit/84014001297519ce7f82f691fb2c4d1c525222f9)) +- disable requiring default props in eslint ([64cf321](https://github.com/payloadcms/payload/commit/64cf32146ad75d8ce3e5f3e8e690391ac7884819)) +- disables inline sourcemaps for admin dist ([8090b2a](https://github.com/payloadcms/payload/commit/8090b2a23bb6298fdd998d9a72c6f596e7473cb0)) +- type issues that arose from reorganizing certain config props ([0c03c2e](https://github.com/payloadcms/payload/commit/0c03c2e3af34657e3dde1c3f2b675840147f78ec)) +- updates typing on DatePicker component and joi schema ([5100fd3](https://github.com/payloadcms/payload/commit/5100fd35dc796c5862ef9fd7261abdcba925b020)) +- webpack config override ([8401400](https://github.com/payloadcms/payload/commit/84014001297519ce7f82f691fb2c4d1c525222f9)) ### Features -* allows for adding custom CSS in addition to SCSS overrides ([544a4db](https://github.com/payloadcms/payload/commit/544a4dbd3ab17e1c8c9ed864fe17b7359883d845)) +- allows for adding custom CSS in addition to SCSS overrides ([544a4db](https://github.com/payloadcms/payload/commit/544a4dbd3ab17e1c8c9ed864fe17b7359883d845)) ## [0.1.123](https://github.com/payloadcms/payload/compare/v0.1.123...v0.1.123) (2020-12-28) ### Bug Fixes -* allows config validation to accept esmodules as components ([b8ad84c](https://github.com/payloadcms/payload/commit/b8ad84c525e597e237caf05e00832ded30668a6b)) -* prod webpack publicPath ([8bda6ea](https://github.com/payloadcms/payload/commit/8bda6eaa762dff0027036d918155f4618740a84c)) +- allows config validation to accept esmodules as components ([b8ad84c](https://github.com/payloadcms/payload/commit/b8ad84c525e597e237caf05e00832ded30668a6b)) +- prod webpack publicPath ([8bda6ea](https://github.com/payloadcms/payload/commit/8bda6eaa762dff0027036d918155f4618740a84c)) ## [0.1.122](https://github.com/payloadcms/payload/compare/v0.1.121...v0.1.122) (2020-12-28) ### Bug Fixes -* improves field schema validation ([db13512](https://github.com/payloadcms/payload/commit/db135129d84bab9df03516ebfa2b667acead3cc9)) -* safely accesses field permissions ([1fff737](https://github.com/payloadcms/payload/commit/1fff7374d43921d203b9b655ac64dbed3867ad2a)) +- improves field schema validation ([db13512](https://github.com/payloadcms/payload/commit/db135129d84bab9df03516ebfa2b667acead3cc9)) +- safely accesses field permissions ([1fff737](https://github.com/payloadcms/payload/commit/1fff7374d43921d203b9b655ac64dbed3867ad2a)) ### Features -* sends config through babel/register ([fec718e](https://github.com/payloadcms/payload/commit/fec718e9e523b1e92ca2dc216d99eef2dcbed83a)) -* splits tsconfig between admin and server ([efe0b40](https://github.com/payloadcms/payload/commit/efe0b40aca4b88084c71f851604d08cae1d62a9a)) +- sends config through babel/register ([fec718e](https://github.com/payloadcms/payload/commit/fec718e9e523b1e92ca2dc216d99eef2dcbed83a)) +- splits tsconfig between admin and server ([efe0b40](https://github.com/payloadcms/payload/commit/efe0b40aca4b88084c71f851604d08cae1d62a9a)) ## [0.1.121](https://github.com/payloadcms/payload/compare/v0.1.120...v0.1.121) (2020-12-27) @@ -2464,23 +2599,23 @@ If none of your collections or globals should be publicly exposed, you don't nee ### Bug Fixes -* production webpack css ([6e83edc](https://github.com/payloadcms/payload/commit/6e83edc988e9284ec52164fc6399f45ab5851652)) -* removes unnecessary meta defaults in admin config ([0117f18](https://github.com/payloadcms/payload/commit/0117f18eb1dd163143e18cd8061a4b96d41c411e)) +- production webpack css ([6e83edc](https://github.com/payloadcms/payload/commit/6e83edc988e9284ec52164fc6399f45ab5851652)) +- removes unnecessary meta defaults in admin config ([0117f18](https://github.com/payloadcms/payload/commit/0117f18eb1dd163143e18cd8061a4b96d41c411e)) ### Features -* improves edit scroll UX in Account and Globals ([604922a](https://github.com/payloadcms/payload/commit/604922a26e7aabde71b470c96ff1b27e0f7b6fc8)) -* improves scrolling UX in Edit views ([a715a42](https://github.com/payloadcms/payload/commit/a715a4206ed2cedc9b02b58339e44354c571fec5)) +- improves edit scroll UX in Account and Globals ([604922a](https://github.com/payloadcms/payload/commit/604922a26e7aabde71b470c96ff1b27e0f7b6fc8)) +- improves scrolling UX in Edit views ([a715a42](https://github.com/payloadcms/payload/commit/a715a4206ed2cedc9b02b58339e44354c571fec5)) ## [0.1.19](https://github.com/payloadcms/payload/compare/v0.1.18...v0.1.19) (2020-12-27) ### Bug Fixes -* copyfiles, autocomplete transition ([5b8c721](https://github.com/payloadcms/payload/commit/5b8c721292140e4cd0ed55d13e97c1d4cd359c98)) +- copyfiles, autocomplete transition ([5b8c721](https://github.com/payloadcms/payload/commit/5b8c721292140e4cd0ed55d13e97c1d4cd359c98)) ### Features -* flattens build into one command ([8571dc3](https://github.com/payloadcms/payload/commit/8571dc396591487d2a2854b9fe93f5338eb10659)) +- flattens build into one command ([8571dc3](https://github.com/payloadcms/payload/commit/8571dc396591487d2a2854b9fe93f5338eb10659)) ## [0.1.18](https://github.com/payloadcms/payload/compare/v0.1.17...v0.1.18) (2020-12-27) @@ -2490,8 +2625,8 @@ If none of your collections or globals should be publicly exposed, you don't nee ### Bug Fixes -* handle access result gracefully ([1cd578e](https://github.com/payloadcms/payload/commit/1cd578ef445499ceb3704ab28d736baaae123cbd)) -* undo property fix, field exists - bad typing ([66946c8](https://github.com/payloadcms/payload/commit/66946c86973c252585e98aa3f0a453cae9dff598)) +- handle access result gracefully ([1cd578e](https://github.com/payloadcms/payload/commit/1cd578ef445499ceb3704ab28d736baaae123cbd)) +- undo property fix, field exists - bad typing ([66946c8](https://github.com/payloadcms/payload/commit/66946c86973c252585e98aa3f0a453cae9dff598)) ## [0.1.15](https://github.com/payloadcms/payload/compare/v0.1.14...v0.1.15) (2020-12-02) @@ -2527,13 +2662,13 @@ If none of your collections or globals should be publicly exposed, you don't nee ### Bug Fixes -* **webpack:** more require.resolves needed ([924eb1d](https://github.com/payloadcms/payload/commit/924eb1d0b566eb7bb3912018e06cf431e5a85524)) -* **webpack:** use require.resolve for modules ([badd59a](https://github.com/payloadcms/payload/commit/badd59ac38e10e9caf700eece5761e7d65341c21)) -* add missing webpack dep path-browserify ([8789dae](https://github.com/payloadcms/payload/commit/8789dae155bbb93fdef5104cc616e0a29b1b6409)) +- **webpack:** more require.resolves needed ([924eb1d](https://github.com/payloadcms/payload/commit/924eb1d0b566eb7bb3912018e06cf431e5a85524)) +- **webpack:** use require.resolve for modules ([badd59a](https://github.com/payloadcms/payload/commit/badd59ac38e10e9caf700eece5761e7d65341c21)) +- add missing webpack dep path-browserify ([8789dae](https://github.com/payloadcms/payload/commit/8789dae155bbb93fdef5104cc616e0a29b1b6409)) ### Features -* add initial types ([983bf71](https://github.com/payloadcms/payload/commit/983bf713b395a68d2374f2446a8a759aeda48579)) +- add initial types ([983bf71](https://github.com/payloadcms/payload/commit/983bf713b395a68d2374f2446a8a759aeda48579)) ## [0.0.141](https://github.com/payloadcms/payload/compare/v0.0.140...v0.0.141) (2020-11-20) @@ -2541,27 +2676,27 @@ If none of your collections or globals should be publicly exposed, you don't nee ### Features -* show email creds when explicitly set to 'mock' ([dbd305a](https://github.com/payloadcms/payload/commit/dbd305acc5b083cea08227cbff8afebe8aa4c374)) -* use react-toastify for notifications ([131dd51](https://github.com/payloadcms/payload/commit/131dd51c39b08c2235582d23deb53188a04e5d80)) -* validate admin user ([83d32e4](https://github.com/payloadcms/payload/commit/83d32e44498460584bbc82512df91848bcf7cf47)) +- show email creds when explicitly set to 'mock' ([dbd305a](https://github.com/payloadcms/payload/commit/dbd305acc5b083cea08227cbff8afebe8aa4c374)) +- use react-toastify for notifications ([131dd51](https://github.com/payloadcms/payload/commit/131dd51c39b08c2235582d23deb53188a04e5d80)) +- validate admin user ([83d32e4](https://github.com/payloadcms/payload/commit/83d32e44498460584bbc82512df91848bcf7cf47)) ## [0.0.139](https://github.com/payloadcms/payload/compare/v0.0.138...v0.0.139) (2020-11-17) ### Bug Fixes -* missed a file ([f52836a](https://github.com/payloadcms/payload/commit/f52836a7e342ecccd7409ba382eade43adb18d90)) +- missed a file ([f52836a](https://github.com/payloadcms/payload/commit/f52836a7e342ecccd7409ba382eade43adb18d90)) ## [0.0.138](https://github.com/payloadcms/payload/compare/v0.0.137...v0.0.138) (2020-11-17) ### Bug Fixes -* allow e-mail to be unconfigured, remove default fromName and fromAddress ([dceeeaa](https://github.com/payloadcms/payload/commit/dceeeaac6a1a9057cdd9f973c7500b3763514f0a)) -* auth json schema didn't allow auth as boolean ([0694a09](https://github.com/payloadcms/payload/commit/0694a09abdde59eb8e785301230ed4e8e244c84a)) -* properly concat verification and locking fields ([2624ad5](https://github.com/payloadcms/payload/commit/2624ad5f7e50332eb9212877d0eefcdcb2fa399b)) +- allow e-mail to be unconfigured, remove default fromName and fromAddress ([dceeeaa](https://github.com/payloadcms/payload/commit/dceeeaac6a1a9057cdd9f973c7500b3763514f0a)) +- auth json schema didn't allow auth as boolean ([0694a09](https://github.com/payloadcms/payload/commit/0694a09abdde59eb8e785301230ed4e8e244c84a)) +- properly concat verification and locking fields ([2624ad5](https://github.com/payloadcms/payload/commit/2624ad5f7e50332eb9212877d0eefcdcb2fa399b)) ### Features -* add blind index for encrypting API Keys ([9a1c1f6](https://github.com/payloadcms/payload/commit/9a1c1f64c0ea0066b679195f50e6cb1ac4bf3552)) -* add license key to access routej ([2565005](https://github.com/payloadcms/payload/commit/2565005cc099797a6e3b8995e0984c28b7837e82)) +- add blind index for encrypting API Keys ([9a1c1f6](https://github.com/payloadcms/payload/commit/9a1c1f64c0ea0066b679195f50e6cb1ac4bf3552)) +- add license key to access routej ([2565005](https://github.com/payloadcms/payload/commit/2565005cc099797a6e3b8995e0984c28b7837e82)) -## [0.0.137](https://github.com/payloadcms/payload/commit/5c1e2846a2694a80cc8707703406c2ac1bb6af8a) (2020-11-12) \ No newline at end of file +## [0.0.137](https://github.com/payloadcms/payload/commit/5c1e2846a2694a80cc8707703406c2ac1bb6af8a) (2020-11-12) diff --git a/components/elements.ts b/components/elements.d.ts similarity index 100% rename from components/elements.ts rename to components/elements.d.ts diff --git a/components/elements.js b/components/elements.js new file mode 100644 index 0000000000..e1de4dca94 --- /dev/null +++ b/components/elements.js @@ -0,0 +1,5 @@ +exports.Button = require('../dist/admin/components/elements/Button').default; +exports.Card = require('../dist/admin/components/elements/Card').default; +exports.Eyebrow = require('../dist/admin/components/elements/Eyebrow').default; +exports.Nav = require('../dist/admin/components/elements/Nav').default; +exports.Gutter = require('../dist/admin/components/elements/Gutter').Gutter; diff --git a/components/forms.ts b/components/forms.d.ts similarity index 100% rename from components/forms.ts rename to components/forms.d.ts diff --git a/components/forms.js b/components/forms.js new file mode 100644 index 0000000000..500f6ed392 --- /dev/null +++ b/components/forms.js @@ -0,0 +1,42 @@ +exports.useForm = require('../dist/admin/components/forms/Form/context').useForm; + +/** + * @deprecated useWatchForm is no longer preferred. If you need all form fields, prefer `useAllFormFields`. + */ +exports.useWatchForm = require('../dist/admin/components/forms/Form/context').useWatchForm; + +exports.useFormFields = require('../dist/admin/components/forms/Form/context').useFormFields; + +exports.useAllFormFields = require('../dist/admin/components/forms/Form/context').useAllFormFields; + +exports.useFormSubmitted = require('../dist/admin/components/forms/Form/context').useFormSubmitted; + +exports.useFormProcessing = require('../dist/admin/components/forms/Form/context').useFormProcessing; + +exports.useFormModified = require('../dist/admin/components/forms/Form/context').useFormModified; + +exports.useField = require('../dist/admin/components/forms/useField').default; + +/** + * @deprecated This method is now called useField. The useFieldType alias will be removed in an upcoming version. + */ +exports.useFieldType = require('../dist/admin/components/forms/useField').default; + +exports.Form = require('../dist/admin/components/forms/Form').default; + +exports.Text = require('../dist/admin/components/forms/field-types/Text').default; +exports.TextInput = require('../dist/admin/components/forms/field-types/Text/Input').default; + +exports.Group = require('../dist/admin/components/forms/field-types/Group').default; + +exports.Select = require('../dist/admin/components/forms/field-types/Select').default; +exports.SelectInput = require('../dist/admin/components/forms/field-types/Select/Input').default; + +exports.Checkbox = require('../dist/admin/components/forms/field-types/Checkbox').default; +exports.Submit = require('../dist/admin/components/forms/Submit').default; +exports.Label = require('../dist/admin/components/forms/Label').default; + +exports.reduceFieldsToValues = require('../dist/admin/components/forms/Form/reduceFieldsToValues').default; +exports.getSiblingData = require('../dist/admin/components/forms/Form/getSiblingData').default; + +exports.withCondition = require('../dist/admin/components/forms/withCondition').default; diff --git a/components/hooks.ts b/components/hooks.d.ts similarity index 100% rename from components/hooks.ts rename to components/hooks.d.ts diff --git a/components/hooks.js b/components/hooks.js new file mode 100644 index 0000000000..dca5507fac --- /dev/null +++ b/components/hooks.js @@ -0,0 +1 @@ +exports.useStepNav = require('../dist/admin/components/elements/StepNav').useStepNav; diff --git a/components/icons.d.ts b/components/icons.d.ts new file mode 100644 index 0000000000..cd0c56b272 --- /dev/null +++ b/components/icons.d.ts @@ -0,0 +1,2 @@ +export { default as Chevron } from '../dist/admin/components/icons/Chevron'; +export { default as X } from '../dist/admin/components/icons/X'; diff --git a/components/icons.js b/components/icons.js new file mode 100644 index 0000000000..8a671a5ed4 --- /dev/null +++ b/components/icons.js @@ -0,0 +1,2 @@ +exports.Chevron = require('../dist/admin/components/icons/Chevron').default; +exports.X = require('../dist/admin/components/icons/X').default; diff --git a/components/icons.ts b/components/icons.ts deleted file mode 100644 index a969a99d70..0000000000 --- a/components/icons.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as Chevron } from '../src/admin/components/icons/Chevron'; -export { default as X } from '../src/admin/components/icons/X'; diff --git a/components/preferences.ts b/components/preferences.d.ts similarity index 100% rename from components/preferences.ts rename to components/preferences.d.ts diff --git a/components/preferences.js b/components/preferences.js new file mode 100644 index 0000000000..533da4f880 --- /dev/null +++ b/components/preferences.js @@ -0,0 +1 @@ +exports.usePreferences = require('../dist/admin/components/utilities/Preferences').usePreferences; diff --git a/components/rich-text.ts b/components/rich-text.d.ts similarity index 100% rename from components/rich-text.ts rename to components/rich-text.d.ts diff --git a/components/rich-text.js b/components/rich-text.js new file mode 100644 index 0000000000..145e8608c2 --- /dev/null +++ b/components/rich-text.js @@ -0,0 +1,3 @@ +exports.LeafButton = require('../dist/admin/components/forms/field-types/RichText/leaves/Button').default; +exports.ElementButton = require('../dist/admin/components/forms/field-types/RichText/elements/Button').default; +exports.toggleElement = require('../dist/admin/components/forms/field-types/RichText/elements/toggle').default; diff --git a/components/templates.ts b/components/templates.d.ts similarity index 100% rename from components/templates.ts rename to components/templates.d.ts diff --git a/components/templates.js b/components/templates.js new file mode 100644 index 0000000000..11246d6f0a --- /dev/null +++ b/components/templates.js @@ -0,0 +1,2 @@ +exports.DefaultTemplate = require('../dist/admin/components/templates/Default').default; +exports.MinimalTemplate = require('../dist/admin/components/templates/Minimal').default; \ No newline at end of file diff --git a/components/utilities.ts b/components/utilities.d.ts similarity index 100% rename from components/utilities.ts rename to components/utilities.d.ts diff --git a/components/utilities.js b/components/utilities.js new file mode 100644 index 0000000000..f19df00f9f --- /dev/null +++ b/components/utilities.js @@ -0,0 +1,6 @@ +exports.Meta = require('../dist/admin/components/utilities/Meta').default; +exports.useLocale = require('../dist/admin/components/utilities/Locale').useLocale; +exports.useDocumentInfo = require('../dist/admin/components/utilities/DocumentInfo').useDocumentInfo; +exports.useConfig = require('../dist/admin/components/utilities/Config').useConfig; +exports.useAuth = require('../dist/admin/components/utilities/Auth').useAuth; +exports.useEditDepth = require('../dist/admin/components/utilities/EditDepth').useEditDepth; diff --git a/components/views/Cell.ts b/components/views/Cell.d.ts similarity index 100% rename from components/views/Cell.ts rename to components/views/Cell.d.ts diff --git a/components/views/Cell.js b/components/views/Cell.js new file mode 100644 index 0000000000..d2ee71c1de --- /dev/null +++ b/components/views/Cell.js @@ -0,0 +1 @@ +exports.Cell = require('../../dist/admin/components/views/collections/List/Cell').default; diff --git a/components/views/Dashboard.ts b/components/views/Dashboard.d.ts similarity index 100% rename from components/views/Dashboard.ts rename to components/views/Dashboard.d.ts diff --git a/components/views/Dashboard.js b/components/views/Dashboard.js new file mode 100644 index 0000000000..53693cf528 --- /dev/null +++ b/components/views/Dashboard.js @@ -0,0 +1 @@ +exports.Dashboard = required('../../dist/admin/components/views/Dashboard/Default').default; diff --git a/components/views/Edit.ts b/components/views/Edit.d.ts similarity index 100% rename from components/views/Edit.ts rename to components/views/Edit.d.ts diff --git a/components/views/Edit.js b/components/views/Edit.js new file mode 100644 index 0000000000..79350aa6e0 --- /dev/null +++ b/components/views/Edit.js @@ -0,0 +1 @@ +exports.Edit = require('../../dist/admin/components/views/collections/Edit/Default').default; diff --git a/components/views/List.ts b/components/views/List.d.ts similarity index 100% rename from components/views/List.ts rename to components/views/List.d.ts diff --git a/components/views/List.js b/components/views/List.js new file mode 100644 index 0000000000..6ec8ce8b7d --- /dev/null +++ b/components/views/List.js @@ -0,0 +1 @@ +exports.List = require('../../dist/admin/components/views/collections/List/Default').default; diff --git a/docs/graphql/extending.mdx b/docs/graphql/extending.mdx index e6c723e769..ae2a944ba6 100644 --- a/docs/graphql/extending.mdx +++ b/docs/graphql/extending.mdx @@ -53,13 +53,13 @@ export default buildConfig({ type: GraphQL.GraphQLFloat, }, }, - args: { - argNameHere: { - type: new GraphQL.GraphQLNonNull(GraphQLString), - } - }, - resolve: myCustomQueryResolver, - }) + }), + args: { + argNameHere: { + type: new GraphQL.GraphQLNonNull(GraphQLString), + } + }, + resolve: myCustomQueryResolver, } } } diff --git a/fields/validations.d.ts b/fields/validations.d.ts new file mode 100644 index 0000000000..b24ba908b1 --- /dev/null +++ b/fields/validations.d.ts @@ -0,0 +1 @@ +export * from '../dist/fields/validations'; diff --git a/fields/validations.js b/fields/validations.js index b24ba908b1..b4b8821198 100644 --- a/fields/validations.js +++ b/fields/validations.js @@ -1 +1 @@ -export * from '../dist/fields/validations'; +module.exports = require('../dist/fields/validations'); diff --git a/nodemon.json b/nodemon.json index 75486eb218..e88a0eb694 100644 --- a/nodemon.json +++ b/nodemon.json @@ -12,5 +12,5 @@ "test/" ], "ext": "ts,js,json", - "exec": "node ./test/dev.js" + "exec": "ts-node ./test/dev.ts" } diff --git a/package.json b/package.json index 6988fb38bc..78c553122e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "payload", - "version": "1.5.7", + "version": "1.5.12-canary.0", "description": "Node, React and MongoDB Headless CMS and Application Framework", "license": "MIT", "engines": { @@ -37,7 +37,7 @@ "build": "yarn copyfiles && yarn build:tsc && yarn build:components", "build:watch": "nodemon --watch 'src/**' --ext 'ts,tsx' --exec \"yarn build:tsc\"", "dev": "nodemon", - "dev:generate-types": "node ./test/generateTypes.js", + "dev:generate-types": "ts-node -T ./test/generateTypes.ts", "pretest": "yarn build", "test": "yarn test:int && yarn test:components && yarn test:e2e", "test:int": "cross-env DISABLE_LOGGING=true jest --forceExit --detectOpenHandles", @@ -51,7 +51,7 @@ "release:patch": "release-it patch", "release:minor": "release-it minor", "release:major": "release-it major", - "release:beta": "release-it prepatch --config .release-it.beta.json", + "release:canary": "release-it prepatch --config .release-it.canary.json", "fix": "eslint \"src/**/*.ts\" --fix", "lint": "eslint \"src/**/*.ts\"" }, @@ -134,6 +134,7 @@ "minimist": "^1.2.0", "mkdirp": "^1.0.4", "mongoose": "6.5.0", + "mongoose-aggregate-paginate-v2": "^1.0.6", "mongoose-paginate-v2": "^1.6.1", "nodemailer": "^6.4.2", "object-to-formdata": "^4.1.0", @@ -144,7 +145,7 @@ "passport-local": "^1.0.0", "passport-local-mongoose": "^7.0.0", "path-browserify": "^1.0.1", - "pino": "^6.4.1", + "pino": "^8.8.0", "pino-pretty": "^9.1.1", "pluralize": "^8.0.0", "postcss": "^8.4.6", @@ -191,7 +192,7 @@ "webpack-hot-middleware": "^2.25.0" }, "devDependencies": { - "@playwright/test": "^1.23.1", + "@playwright/test": "^1.29.2", "@release-it/conventional-changelog": "^5.1.1", "@swc/jest": "^0.2.24", "@testing-library/jest-dom": "^5.11.4", diff --git a/src/admin/components/elements/Autosave/index.tsx b/src/admin/components/elements/Autosave/index.tsx index e51cbb5fd4..71706806e4 100644 --- a/src/admin/components/elements/Autosave/index.tsx +++ b/src/admin/components/elements/Autosave/index.tsx @@ -44,7 +44,7 @@ const Autosave: React.FC = ({ collection, global, id, publishedDocUpdated modifiedRef.current = modified; const createCollectionDoc = useCallback(async () => { - const res = await fetch(`${serverURL}${api}/${collection.slug}?locale=${locale}&fallback-locale=null&depth=0&draft=true`, { + const res = await fetch(`${serverURL}${api}/${collection.slug}?locale=${locale}&fallback-locale=null&depth=0&draft=true&autosave=true`, { method: 'POST', credentials: 'include', headers: { @@ -95,13 +95,13 @@ const Autosave: React.FC = ({ collection, global, id, publishedDocUpdated } if (url) { - const body = { - ...reduceFieldsToValues(fieldRef.current, true), - _status: 'draft', - }; - setTimeout(async () => { if (modifiedRef.current) { + const body = { + ...reduceFieldsToValues(fieldRef.current, true), + _status: 'draft', + }; + const res = await fetch(url, { method, credentials: 'include', diff --git a/src/admin/components/elements/VersionsCount/index.tsx b/src/admin/components/elements/VersionsCount/index.tsx index f58731fd56..2ca490fa68 100644 --- a/src/admin/components/elements/VersionsCount/index.tsx +++ b/src/admin/components/elements/VersionsCount/index.tsx @@ -4,9 +4,6 @@ import { useConfig } from '../../utilities/Config'; import Button from '../Button'; import { Props } from './types'; import { useDocumentInfo } from '../../utilities/DocumentInfo'; -import { SanitizedCollectionConfig } from '../../../../collections/config/types'; -import { SanitizedGlobalConfig } from '../../../../globals/config/types'; -import { shouldIncrementVersionCount } from '../../../../versions/shouldIncrementVersionCount'; import './index.scss'; @@ -14,35 +11,20 @@ const baseClass = 'versions-count'; const VersionsCount: React.FC = ({ collection, global, id }) => { const { routes: { admin } } = useConfig(); - const { versions, publishedDoc, unpublishedVersions } = useDocumentInfo(); + const { versions } = useDocumentInfo(); const { t } = useTranslation('version'); - // Doc status could come from three places: - // 1. the newest unpublished version (a draft) - // 2. the published doc's status, in the event that the doc is published and there are no newer versions - // 3. if there is no published doc, it's a draft - const docStatus = unpublishedVersions?.docs?.[0]?.version?._status || publishedDoc?._status || 'draft'; - let versionsURL: string; - let entity: SanitizedCollectionConfig | SanitizedGlobalConfig; if (collection) { versionsURL = `${admin}/collections/${collection.slug}/${id}/versions`; - entity = collection; } if (global) { versionsURL = `${admin}/globals/${global.slug}/versions`; - entity = global; } - let initialVersionsCount = 0; - - if (shouldIncrementVersionCount({ entity, versions, docStatus })) { - initialVersionsCount = 1; - } - - const versionCount = (versions?.totalDocs || 0) + initialVersionsCount; + const versionCount = versions?.totalDocs || 0; return (
diff --git a/src/admin/components/forms/Form/buildStateFromSchema/addFieldStatePromise.ts b/src/admin/components/forms/Form/buildStateFromSchema/addFieldStatePromise.ts index b1572d9d26..dfc96a1c04 100644 --- a/src/admin/components/forms/Form/buildStateFromSchema/addFieldStatePromise.ts +++ b/src/admin/components/forms/Form/buildStateFromSchema/addFieldStatePromise.ts @@ -191,7 +191,7 @@ export const addFieldStatePromise = async ({ id, operation, fields: field.fields, - data: data?.[field.name], + data: data?.[field.name] || {}, fullData, parentPassesCondition: passesCondition, path: `${path}${field.name}.`, diff --git a/src/admin/components/views/Versions/index.tsx b/src/admin/components/views/Versions/index.tsx index 3c853b1bde..ccd31bf274 100644 --- a/src/admin/components/views/Versions/index.tsx +++ b/src/admin/components/views/Versions/index.tsx @@ -1,10 +1,10 @@ import React, { useEffect, useState } from 'react'; import { useRouteMatch } from 'react-router-dom'; -import format from 'date-fns/format'; import { useTranslation } from 'react-i18next'; import { useConfig } from '../../utilities/Config'; import usePayloadAPI from '../../../hooks/usePayloadAPI'; import Eyebrow from '../../elements/Eyebrow'; +import { LoadingOverlayToggle } from '../../elements/Loading'; import { useStepNav } from '../../elements/StepNav'; import { StepNavItem } from '../../elements/StepNav/types'; import Meta from '../../utilities/Meta'; @@ -15,20 +15,15 @@ import Table from '../../elements/Table'; import Paginator from '../../elements/Paginator'; import PerPage from '../../elements/PerPage'; import { useSearchParams } from '../../utilities/SearchParams'; -import { Banner, Pill } from '../..'; -import { SanitizedCollectionConfig } from '../../../../collections/config/types'; -import { SanitizedGlobalConfig } from '../../../../globals/config/types'; -import { shouldIncrementVersionCount } from '../../../../versions/shouldIncrementVersionCount'; import { Gutter } from '../../elements/Gutter'; import { getTranslation } from '../../../../utilities/getTranslation'; -import { LoadingOverlayToggle } from '../../elements/Loading'; import './index.scss'; const baseClass = 'versions'; const Versions: React.FC = ({ collection, global }) => { - const { serverURL, routes: { admin, api }, admin: { dateFormat } } = useConfig(); + const { serverURL, routes: { admin, api } } = useConfig(); const { setStepNav } = useStepNav(); const { params: { id } } = useRouteMatch<{ id: string }>(); const { t, i18n } = useTranslation('version'); @@ -39,14 +34,12 @@ const Versions: React.FC = ({ collection, global }) => { let docURL: string; let entityLabel: string; let slug: string; - let entity: SanitizedCollectionConfig | SanitizedGlobalConfig; let editURL: string; if (collection) { ({ slug } = collection); docURL = `${serverURL}${api}/${slug}/${id}`; entityLabel = getTranslation(collection.labels.singular, i18n); - entity = collection; editURL = `${admin}/collections/${collection.slug}/${id}`; } @@ -54,13 +47,12 @@ const Versions: React.FC = ({ collection, global }) => { ({ slug } = global); docURL = `${serverURL}${api}/globals/${slug}`; entityLabel = getTranslation(global.label, i18n); - entity = global; editURL = `${admin}/globals/${global.slug}`; } const useAsTitle = collection?.admin?.useAsTitle || 'id'; const [{ data: doc }] = usePayloadAPI(docURL, { initialParams: { draft: 'true' } }); - const [{ data: versionsData, isLoading: isLoadingData }, { setParams }] = usePayloadAPI(fetchURL); + const [{ data: versionsData, isLoading: isLoadingVersions }, { setParams }] = usePayloadAPI(fetchURL); useEffect(() => { let nav: StepNavItem[] = []; @@ -164,17 +156,12 @@ const Versions: React.FC = ({ collection, global }) => { useIDLabel = false; } - const docStatus = doc?._status; - const docUpdatedAt = doc?.updatedAt; - const showParentDoc = versionsData?.page === 1 && shouldIncrementVersionCount({ entity, docStatus, versions: versionsData }); - return ( -
= ({ collection, global }) => { )} - {showParentDoc && ( - - {t('currentDocumentStatus', { docStatus })} - - - {' '} - {format(new Date(docUpdatedAt), dateFormat)} -
-    - - {t('general:edit')} - -
-
- )} {versionsData?.totalDocs > 0 && ( { {values.map(({ relationTo, value }, i) => { const document = documents[relationTo][value]; const relatedCollection = collections.find(({ slug }) => slug === relationTo); + const label = document?.[relatedCollection.admin.useAsTitle] ? document[relatedCollection.admin.useAsTitle] : `${t('untitled')} - ID: ${value}`; + return ( {document === false && `${t('untitled')} - ID: ${value}`} {document === null && `${t('loading')}...`} - {document && ( - document[relatedCollection.admin.useAsTitle] ? document[relatedCollection.admin.useAsTitle] : `${t('untitled')} - ID: ${value}` - )} + {document && label} {values.length > i + 1 && ', '} ); diff --git a/src/auth/graphql/resolvers/access.ts b/src/auth/graphql/resolvers/access.ts index 6c06064017..1e90ce6e3e 100644 --- a/src/auth/graphql/resolvers/access.ts +++ b/src/auth/graphql/resolvers/access.ts @@ -1,6 +1,6 @@ import formatName from '../../../graphql/utilities/formatName'; import access from '../../operations/access'; -import { Payload } from '../../..'; +import { Payload } from '../../../payload'; const formatConfigNames = (results, configs) => { const formattedResults = { ...results }; diff --git a/src/auth/init.ts b/src/auth/init.ts index cd914bdd82..97c4b8f4c3 100644 --- a/src/auth/init.ts +++ b/src/auth/init.ts @@ -1,6 +1,6 @@ import passport from 'passport'; import AnonymousStrategy from 'passport-anonymous'; -import { Payload } from '../index'; +import { Payload } from '../payload'; import jwtStrategy from './strategies/jwt'; function initAuth(ctx: Payload): void { diff --git a/src/auth/operations/local/forgotPassword.ts b/src/auth/operations/local/forgotPassword.ts index eafb8331f5..40b4f75a35 100644 --- a/src/auth/operations/local/forgotPassword.ts +++ b/src/auth/operations/local/forgotPassword.ts @@ -1,12 +1,13 @@ +import { Config as GeneratedTypes } from 'payload/generated-types'; import { PayloadRequest } from '../../../express/types'; import forgotPassword, { Result } from '../forgotPassword'; -import { Payload } from '../../..'; +import { Payload } from '../../../payload'; import { getDataLoader } from '../../../collections/dataloader'; import i18n from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - collection: string +export type Options = { + collection: T data: { email: string } @@ -15,7 +16,10 @@ export type Options = { req?: PayloadRequest } -async function localForgotPassword(payload: Payload, options: Options): Promise { +async function localForgotPassword( + payload: Payload, + options: Options, +): Promise { const { collection: collectionSlug, data, @@ -27,7 +31,7 @@ async function localForgotPassword(payload: Payload, options: Options): Promise< const collection = payload.collections[collectionSlug]; if (!collection) { - throw new APIError(`The collection with slug ${collectionSlug} can't be found.`); + throw new APIError(`The collection with slug ${String(collectionSlug)} can't be found.`); } req.payloadAPI = 'local'; diff --git a/src/auth/operations/local/login.ts b/src/auth/operations/local/login.ts index f1921ea9ea..93ea46f9d0 100644 --- a/src/auth/operations/local/login.ts +++ b/src/auth/operations/local/login.ts @@ -1,15 +1,15 @@ import { Response } from 'express'; +import { Config as GeneratedTypes } from 'payload/generated-types'; import login, { Result } from '../login'; import { PayloadRequest } from '../../../express/types'; -import { TypeWithID } from '../../../collections/config/types'; -import { Payload } from '../../..'; +import { Payload } from '../../../payload'; import { getDataLoader } from '../../../collections/dataloader'; import i18n from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - collection: string - data: { +export type Options = { + collection: TSlug + data: Omit & { email: string password: string } @@ -22,7 +22,10 @@ export type Options = { showHiddenFields?: boolean } -async function localLogin(payload: Payload, options: Options): Promise { +async function localLogin( + payload: Payload, + options: Options, +): Promise { const { collection: collectionSlug, req = {} as PayloadRequest, @@ -38,7 +41,7 @@ async function localLogin(payload: Payload, options: const collection = payload.collections[collectionSlug]; if (!collection) { - throw new APIError(`The collection with slug ${collectionSlug} can't be found.`); + throw new APIError(`The collection with slug ${String(collectionSlug)} can't be found.`); } req.payloadAPI = 'local'; @@ -63,7 +66,7 @@ async function localLogin(payload: Payload, options: if (locale) args.req.locale = locale; if (fallbackLocale) args.req.fallbackLocale = fallbackLocale; - return login(args); + return login(args); } export default localLogin; diff --git a/src/auth/operations/local/resetPassword.ts b/src/auth/operations/local/resetPassword.ts index 969850d9de..1f6466ca28 100644 --- a/src/auth/operations/local/resetPassword.ts +++ b/src/auth/operations/local/resetPassword.ts @@ -1,12 +1,13 @@ -import { Payload } from '../../..'; +import { Config as GeneratedTypes } from 'payload/generated-types'; +import { Payload } from '../../../payload'; import resetPassword, { Result } from '../resetPassword'; import { PayloadRequest } from '../../../express/types'; import { getDataLoader } from '../../../collections/dataloader'; import i18n from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - collection: string +export type Options = { + collection: T data: { token: string password: string @@ -15,7 +16,10 @@ export type Options = { req?: PayloadRequest } -async function localResetPassword(payload: Payload, options: Options): Promise { +async function localResetPassword( + payload: Payload, + options: Options, +): Promise { const { collection: collectionSlug, data, @@ -26,7 +30,7 @@ async function localResetPassword(payload: Payload, options: Options): Promise = { + collection: T data: { email } @@ -14,7 +15,10 @@ export type Options = { overrideAccess: boolean } -async function localUnlock(payload: Payload, options: Options): Promise { +async function localUnlock( + payload: Payload, + options: Options, +): Promise { const { collection: collectionSlug, data, @@ -25,7 +29,7 @@ async function localUnlock(payload: Payload, options: Options): Promise const collection = payload.collections[collectionSlug]; if (!collection) { - throw new APIError(`The collection with slug ${collectionSlug} can't be found.`); + throw new APIError(`The collection with slug ${String(collectionSlug)} can't be found.`); } req.payload = payload; diff --git a/src/auth/operations/local/verifyEmail.ts b/src/auth/operations/local/verifyEmail.ts index c4466bbc95..17328df659 100644 --- a/src/auth/operations/local/verifyEmail.ts +++ b/src/auth/operations/local/verifyEmail.ts @@ -1,13 +1,17 @@ +import { Config as GeneratedTypes } from 'payload/generated-types'; import { APIError } from '../../../errors'; -import { Payload } from '../../../index'; +import { Payload } from '../../../payload'; import verifyEmail from '../verifyEmail'; -export type Options = { +export type Options = { token: string, - collection: string + collection: T } -async function localVerifyEmail(payload: Payload, options: Options): Promise { +async function localVerifyEmail( + payload: Payload, + options: Options, +): Promise { const { collection: collectionSlug, token, @@ -16,7 +20,7 @@ async function localVerifyEmail(payload: Payload, options: Options): Promise = { collection: Collection, - data: { + data: Omit & { email: string password: string } @@ -30,7 +31,9 @@ export type Arguments = { showHiddenFields?: boolean } -async function login(incomingArgs: Arguments): Promise { +async function login( + incomingArgs: Arguments, +): Promise { let args = incomingArgs; // ///////////////////////////////////// diff --git a/src/auth/operations/registerFirstUser.ts b/src/auth/operations/registerFirstUser.ts index 96e7b6aa6f..d085e91ff9 100644 --- a/src/auth/operations/registerFirstUser.ts +++ b/src/auth/operations/registerFirstUser.ts @@ -1,12 +1,12 @@ import { Response } from 'express'; -import { Document } from '../../types'; +import { Config as GeneratedTypes } from 'payload/generated-types'; import { Forbidden } from '../../errors'; import { PayloadRequest } from '../../express/types'; import { Collection, TypeWithID } from '../../collections/config/types'; export type Arguments = { collection: Collection - data: { + data: Omit & { email: string password: string } @@ -14,12 +14,14 @@ export type Arguments = { res: Response } -export type Result = { +export type Result = { message: string, - user: Document + user: T } -async function registerFirstUser(args: Arguments): Promise { +async function registerFirstUser( + args: Arguments, +): Promise> { const { collection: { Model, @@ -45,9 +47,9 @@ async function registerFirstUser(args: Arguments): Promise { // Register first user // ///////////////////////////////////// - const result = await payload.create({ + const result = await payload.create({ req, - collection: slug, + collection: slug as TSlug, data, overrideAccess: true, }); diff --git a/src/auth/operations/resetPassword.ts b/src/auth/operations/resetPassword.ts index 7bbe9c645b..2faadb62b6 100644 --- a/src/auth/operations/resetPassword.ts +++ b/src/auth/operations/resetPassword.ts @@ -9,7 +9,7 @@ import { PayloadRequest } from '../../express/types'; export type Result = { token: string - user: UserDocument + user: Record } export type Arguments = { diff --git a/src/auth/sendVerificationEmail.ts b/src/auth/sendVerificationEmail.ts index 77c972e1e0..871f5573fd 100644 --- a/src/auth/sendVerificationEmail.ts +++ b/src/auth/sendVerificationEmail.ts @@ -1,4 +1,4 @@ -import { Payload } from '..'; +import { Payload } from '../payload'; import { PayloadRequest } from '../express/types'; import { SanitizedConfig, EmailOptions } from '../config/types'; import { Collection } from '../collections/config/types'; diff --git a/src/auth/strategies/apiKey.ts b/src/auth/strategies/apiKey.ts index e6cb2b4a7c..b2e1a0fe12 100644 --- a/src/auth/strategies/apiKey.ts +++ b/src/auth/strategies/apiKey.ts @@ -1,7 +1,7 @@ import PassportAPIKey from 'passport-headerapikey'; import crypto from 'crypto'; import { PayloadRequest } from '../../express/types'; -import { Payload } from '../..'; +import { Payload } from '../../payload'; import find from '../../collections/operations/find'; export default (payload: Payload, { Model, config }): PassportAPIKey => { diff --git a/src/auth/strategies/jwt.ts b/src/auth/strategies/jwt.ts index 17b384e453..ecd32db9b0 100644 --- a/src/auth/strategies/jwt.ts +++ b/src/auth/strategies/jwt.ts @@ -1,7 +1,7 @@ import url from 'url'; import passportJwt, { StrategyOptions } from 'passport-jwt'; import { Strategy as PassportStrategy } from 'passport-strategy'; -import { Payload } from '../..'; +import { Payload } from '../../payload'; import getExtractJWT from '../getExtractJWT'; const JwtStrategy = passportJwt.Strategy; diff --git a/src/auth/types.ts b/src/auth/types.ts index 10cd92eacd..0d535c4578 100644 --- a/src/auth/types.ts +++ b/src/auth/types.ts @@ -2,7 +2,7 @@ import { Strategy } from 'passport'; import { DeepRequired } from 'ts-essentials'; import { PayloadRequest } from '../express/types'; import { Where, PayloadMongooseDocument } from '../types'; -import { Payload } from '..'; +import { Payload } from '../payload'; export type Permission = { permission: boolean diff --git a/src/bin/generateTypes.ts b/src/bin/generateTypes.ts index 8dc14fde72..eded842908 100644 --- a/src/bin/generateTypes.ts +++ b/src/bin/generateTypes.ts @@ -411,8 +411,30 @@ function entityToJsonSchema(config: SanitizedConfig, incomingEntity: SanitizedCo }; } +function generateEntityObject(config: SanitizedConfig, type: 'collections' | 'globals'): JSONSchema4 { + return { + type: 'object', + properties: Object.fromEntries(config[type].map(({ slug }) => [ + slug, + { + $ref: `#/definitions/${slug}`, + }, + ])), + required: config[type].map(({ slug }) => slug), + additionalProperties: false, + }; +} + function configToJsonSchema(config: SanitizedConfig): JSONSchema4 { return { + title: 'Config', + type: 'object', + additionalProperties: false, + properties: { + collections: generateEntityObject(config, 'collections'), + globals: generateEntityObject(config, 'globals'), + }, + required: ['collections', 'globals'], definitions: Object.fromEntries( [ ...config.globals.map((global) => [ @@ -425,7 +447,6 @@ function configToJsonSchema(config: SanitizedConfig): JSONSchema4 { ]), ], ), - additionalProperties: false, }; } @@ -439,7 +460,6 @@ export function generateTypes(): void { const jsonSchema = configToJsonSchema(config); compile(jsonSchema, 'Config', { - unreachableDefinitions: true, bannerComment: '/* tslint:disable */\n/**\n* This file was automatically generated by Payload CMS.\n* DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,\n* and re-run `payload generate:types` to regenerate this file.\n*/', style: { singleQuote: true, diff --git a/src/bin/index.ts b/src/bin/index.ts index bb6526e306..1dc9018680 100755 --- a/src/bin/index.ts +++ b/src/bin/index.ts @@ -1,8 +1,24 @@ /* eslint-disable @typescript-eslint/no-var-requires */ import minimist from 'minimist'; +import swcRegister from '@swc/register'; import { generateTypes } from './generateTypes'; import { generateGraphQLSchema } from './generateGraphQLSchema'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore - bad @swc/register types +swcRegister({ + sourceMaps: 'inline', + jsc: { + parser: { + syntax: 'typescript', + tsx: true, + }, + }, + module: { + type: 'commonjs', + }, +}); + const { build } = require('./build'); const args = minimist(process.argv.slice(2)); diff --git a/src/collections/config/types.ts b/src/collections/config/types.ts index e009faf427..2a36a4c271 100644 --- a/src/collections/config/types.ts +++ b/src/collections/config/types.ts @@ -323,10 +323,12 @@ export type AuthCollection = { export type TypeWithID = { id: string | number + [key: string]: unknown } export type TypeWithTimestamps = { id: string | number createdAt: string updatedAt: string + [key: string]: unknown } diff --git a/src/collections/dataloader.ts b/src/collections/dataloader.ts index b02e9bd7d4..4906b83a00 100644 --- a/src/collections/dataloader.ts +++ b/src/collections/dataloader.ts @@ -1,6 +1,6 @@ import DataLoader, { BatchLoadFn } from 'dataloader'; import { PayloadRequest } from '../express/types'; -import { TypeWithID } from '../globals/config/types'; +import { TypeWithID } from './config/types'; import { isValidID } from '../utilities/isValidID'; import { getIDType } from '../utilities/getIDType'; import { fieldAffectsData } from '../fields/config/types'; diff --git a/src/collections/graphql/init.ts b/src/collections/graphql/init.ts index b1140b015f..179fc19485 100644 --- a/src/collections/graphql/init.ts +++ b/src/collections/graphql/init.ts @@ -28,7 +28,7 @@ import resetPassword from '../../auth/graphql/resolvers/resetPassword'; import verifyEmail from '../../auth/graphql/resolvers/verifyEmail'; import unlock from '../../auth/graphql/resolvers/unlock'; import refresh from '../../auth/graphql/resolvers/refresh'; -import { Payload } from '../..'; +import { Payload } from '../../payload'; import { Field, fieldAffectsData } from '../../fields/config/types'; import buildObjectType, { ObjectTypeConfig } from '../../graphql/schema/buildObjectType'; import buildWhereInputType from '../../graphql/schema/buildWhereInputType'; diff --git a/src/collections/graphql/resolvers/create.ts b/src/collections/graphql/resolvers/create.ts index 7f3865e0e5..6ea7a46cab 100644 --- a/src/collections/graphql/resolvers/create.ts +++ b/src/collections/graphql/resolvers/create.ts @@ -1,11 +1,12 @@ /* eslint-disable no-param-reassign */ import { Response } from 'express'; +import { Config as GeneratedTypes } from 'payload/generated-types'; import { PayloadRequest } from '../../../express/types'; import { Collection } from '../../config/types'; import create from '../../operations/create'; -export type Resolver = (_: unknown, args: { - data: Record, +export type Resolver = (_: unknown, args: { + data: Omit, locale?: string draft: boolean }, @@ -13,9 +14,11 @@ export type Resolver = (_: unknown, args: { req: PayloadRequest, res: Response } -) => Promise +) => Promise -export default function createResolver(collection: Collection): Resolver { +export default function createResolver( + collection: Collection, +): Resolver { return async function resolver(_, args, context) { if (args.locale) { context.req.locale = args.locale; diff --git a/src/collections/graphql/resolvers/delete.ts b/src/collections/graphql/resolvers/delete.ts index 774b132e1f..09709ca912 100644 --- a/src/collections/graphql/resolvers/delete.ts +++ b/src/collections/graphql/resolvers/delete.ts @@ -1,10 +1,11 @@ /* eslint-disable no-param-reassign */ +import { Config as GeneratedTypes } from 'payload/generated-types'; import { Response } from 'express'; import { PayloadRequest } from '../../../express/types'; import { Collection } from '../../config/types'; import deleteOperation from '../../operations/delete'; -export type Resolver = ( +export type Resolver = ( _: unknown, args: { locale?: string @@ -14,9 +15,11 @@ export type Resolver = ( req: PayloadRequest, res: Response } -) => Promise +) => Promise -export default function getDeleteResolver(collection: Collection): Resolver { +export default function getDeleteResolver( + collection: Collection, +): Resolver { async function resolver(_, args, context) { if (args.locale) context.req.locale = args.locale; if (args.fallbackLocale) context.req.fallbackLocale = args.fallbackLocale; diff --git a/src/collections/graphql/resolvers/findByID.ts b/src/collections/graphql/resolvers/findByID.ts index 717bdd764a..55d2441496 100644 --- a/src/collections/graphql/resolvers/findByID.ts +++ b/src/collections/graphql/resolvers/findByID.ts @@ -1,8 +1,9 @@ +import { Config as SchemaConfig } from 'payload/generated-types'; import { PayloadRequest } from '../../../express/types'; import { Collection } from '../../config/types'; import findByID from '../../operations/findByID'; -export type Resolver = (_: unknown, args: { +export type Resolver = (_: unknown, args: { locale?: string draft: boolean id: string @@ -12,9 +13,9 @@ export type Resolver = (_: unknown, args: { req: PayloadRequest, res: Response } -) => Promise +) => Promise -export default function findByIDResolver(collection: Collection): Resolver { +export default function findByIDResolver(collection: Collection): Resolver { return async function resolver(_, args, context) { const { req } = context; if (args.locale) req.locale = args.locale; diff --git a/src/collections/graphql/resolvers/update.ts b/src/collections/graphql/resolvers/update.ts index b5ab48e4c3..2bf00a21a2 100644 --- a/src/collections/graphql/resolvers/update.ts +++ b/src/collections/graphql/resolvers/update.ts @@ -1,12 +1,13 @@ /* eslint-disable no-param-reassign */ import { Response } from 'express'; +import { Config as GeneratedTypes } from 'payload/generated-types'; import { Collection } from '../../config/types'; import update from '../../operations/update'; import { PayloadRequest } from '../../../express/types'; -export type Resolver = (_: unknown, args: { +export type Resolver = (_: unknown, args: { id: string | number - data: Record, + data: GeneratedTypes['collections'][TSlug] locale?: string draft: boolean autosave: boolean @@ -15,9 +16,11 @@ export type Resolver = (_: unknown, args: { req: PayloadRequest, res: Response } -) => Promise +) => Promise -export default function updateResolver(collection: Collection): Resolver { +export default function updateResolver( + collection: Collection, +): Resolver { async function resolver(_, args, context) { if (args.locale) context.req.locale = args.locale; if (args.fallbackLocale) context.req.fallbackLocale = args.fallbackLocale; @@ -32,7 +35,7 @@ export default function updateResolver(collection: Collection): Resolver { autosave: args.autosave, }; - const result = await update(options); + const result = await update(options); return result; } diff --git a/src/collections/initHTTP.ts b/src/collections/initHTTP.ts new file mode 100644 index 0000000000..8a3206ce11 --- /dev/null +++ b/src/collections/initHTTP.ts @@ -0,0 +1,41 @@ +import express from 'express'; +import passport from 'passport'; +import apiKeyStrategy from '../auth/strategies/apiKey'; +import bindCollectionMiddleware from './bindCollection'; +import { SanitizedCollectionConfig } from './config/types'; +import mountEndpoints from '../express/mountEndpoints'; +import buildEndpoints from './buildEndpoints'; +import { Payload } from '../payload'; + +export default function initCollectionsHTTP(ctx: Payload): void { + ctx.config.collections = ctx.config.collections.map((collection: SanitizedCollectionConfig) => { + const formattedCollection = collection; + + const router = express.Router(); + const { slug } = collection; + + router.all('*', bindCollectionMiddleware(ctx.collections[formattedCollection.slug])); + + if (collection.auth) { + const AuthCollection = ctx.collections[formattedCollection.slug]; + + if (collection.auth.useAPIKey) { + passport.use(`${AuthCollection.config.slug}-api-key`, apiKeyStrategy(ctx, AuthCollection)); + } + + if (Array.isArray(collection.auth.strategies)) { + collection.auth.strategies.forEach(({ name, strategy }, index) => { + const passportStrategy = typeof strategy === 'object' ? strategy : strategy(ctx); + passport.use(`${AuthCollection.config.slug}-${name ?? index}`, passportStrategy); + }); + } + } + + const endpoints = buildEndpoints(collection); + mountEndpoints(ctx.express, router, endpoints); + + ctx.router.use(`/${slug}`, router); + + return formattedCollection; + }); +} diff --git a/src/collections/init.ts b/src/collections/initLocal.ts similarity index 68% rename from src/collections/init.ts rename to src/collections/initLocal.ts index 00626d1252..006c733795 100644 --- a/src/collections/init.ts +++ b/src/collections/initLocal.ts @@ -1,21 +1,16 @@ import mongoose, { UpdateAggregationStage, UpdateQuery } from 'mongoose'; import paginate from 'mongoose-paginate-v2'; -import express from 'express'; -import passport from 'passport'; import passportLocalMongoose from 'passport-local-mongoose'; +import mongooseAggregatePaginate from 'mongoose-aggregate-paginate-v2'; import { buildVersionCollectionFields } from '../versions/buildCollectionFields'; import buildQueryPlugin from '../mongoose/buildQuery'; -import apiKeyStrategy from '../auth/strategies/apiKey'; import buildCollectionSchema from './buildSchema'; import buildSchema from '../mongoose/buildSchema'; -import bindCollectionMiddleware from './bindCollection'; import { CollectionModel, SanitizedCollectionConfig } from './config/types'; -import { Payload } from '../index'; +import { Payload } from '../payload'; import { getVersionsModelName } from '../versions/getVersionsModelName'; -import mountEndpoints from '../express/mountEndpoints'; -import buildEndpoints from './buildEndpoints'; -export default function registerCollections(ctx: Payload): void { +export default function initCollectionsLocal(ctx: Payload): void { ctx.config.collections = ctx.config.collections.map((collection: SanitizedCollectionConfig) => { const formattedCollection = collection; @@ -74,7 +69,7 @@ export default function registerCollections(ctx: Payload): void { disableUnique: true, draftsEnabled: true, options: { - timestamps: true, + timestamps: false, }, }, ); @@ -82,6 +77,10 @@ export default function registerCollections(ctx: Payload): void { versionSchema.plugin(paginate, { useEstimatedCount: true }) .plugin(buildQueryPlugin); + if (collection.versions?.drafts) { + versionSchema.plugin(mongooseAggregatePaginate); + } + ctx.versions[collection.slug] = mongoose.model(versionModelName, versionSchema) as CollectionModel; } @@ -91,34 +90,6 @@ export default function registerCollections(ctx: Payload): void { config: formattedCollection, }; - // If not local, open routes - if (!ctx.local) { - const router = express.Router(); - const { slug } = collection; - - router.all('*', bindCollectionMiddleware(ctx.collections[formattedCollection.slug])); - - if (collection.auth) { - const AuthCollection = ctx.collections[formattedCollection.slug]; - - if (collection.auth.useAPIKey) { - passport.use(`${AuthCollection.config.slug}-api-key`, apiKeyStrategy(ctx, AuthCollection)); - } - - if (Array.isArray(collection.auth.strategies)) { - collection.auth.strategies.forEach(({ name, strategy }, index) => { - const passportStrategy = typeof strategy === 'object' ? strategy : strategy(ctx); - passport.use(`${AuthCollection.config.slug}-${name ?? index}`, passportStrategy); - }); - } - } - - const endpoints = buildEndpoints(collection); - mountEndpoints(ctx.express, router, endpoints); - - ctx.router.use(`/${slug}`, router); - } - return formattedCollection; }); } diff --git a/src/collections/operations/create.ts b/src/collections/operations/create.ts index d51509823c..fce3004e05 100644 --- a/src/collections/operations/create.ts +++ b/src/collections/operations/create.ts @@ -1,5 +1,5 @@ import crypto from 'crypto'; - +import { Config as GeneratedTypes } from 'payload/generated-types'; import executeAccess from '../../auth/executeAccess'; import sanitizeInternalFields from '../../utilities/sanitizeInternalFields'; @@ -16,20 +16,24 @@ import { beforeValidate } from '../../fields/hooks/beforeValidate'; import { afterChange } from '../../fields/hooks/afterChange'; import { afterRead } from '../../fields/hooks/afterRead'; import { generateFileData } from '../../uploads/generateFileData'; +import { saveVersion } from '../../versions/saveVersion'; -export type Arguments = { +export type Arguments = { collection: Collection req: PayloadRequest depth?: number disableVerificationEmail?: boolean overrideAccess?: boolean showHiddenFields?: boolean - data: Record + data: Omit overwriteExistingFiles?: boolean draft?: boolean + autosave?: boolean } -async function create(incomingArgs: Arguments): Promise { +async function create( + incomingArgs: Arguments, +): Promise { let args = incomingArgs; // ///////////////////////////////////// @@ -65,6 +69,7 @@ async function create(incomingArgs: Arguments): Promise { showHiddenFields, overwriteExistingFiles = false, draft = false, + autosave = false, } = args; let { data } = args; @@ -159,7 +164,7 @@ async function create(incomingArgs: Arguments): Promise { // beforeChange - Fields // ///////////////////////////////////// - const resultWithLocales = await beforeChange({ + const resultWithLocales = await beforeChange>({ data, doc: {}, docWithLocales: {}, @@ -213,6 +218,23 @@ async function create(incomingArgs: Arguments): Promise { result = JSON.parse(result); result = sanitizeInternalFields(result); + // ///////////////////////////////////// + // Create version + // ///////////////////////////////////// + + if (collectionConfig.versions) { + await saveVersion({ + payload, + collection: collectionConfig, + req, + id: result.id, + docWithLocales: result, + autosave, + createdAt: result.createdAt, + onCreate: true, + }); + } + // ///////////////////////////////////// // Send verification email if applicable // ///////////////////////////////////// diff --git a/src/collections/operations/delete.ts b/src/collections/operations/delete.ts index e0454ec1dc..91ddc90651 100644 --- a/src/collections/operations/delete.ts +++ b/src/collections/operations/delete.ts @@ -1,6 +1,7 @@ import fs from 'fs'; import path from 'path'; +import { Config as GeneratedTypes } from 'payload/generated-types'; import { PayloadRequest } from '../../express/types'; import sanitizeInternalFields from '../../utilities/sanitizeInternalFields'; import { NotFound, Forbidden, ErrorDeletingFile } from '../../errors'; @@ -11,6 +12,7 @@ import { hasWhereAccessResult } from '../../auth/types'; import { FileData } from '../../uploads/types'; import fileExists from '../../uploads/fileExists'; import { afterRead } from '../../fields/hooks/afterRead'; +import { deleteCollectionVersions } from '../../versions/deleteCollectionVersions'; export type Arguments = { depth?: number @@ -21,7 +23,9 @@ export type Arguments = { showHiddenFields?: boolean } -async function deleteOperation(incomingArgs: Arguments): Promise { +async function deleteOperation( + incomingArgs: Arguments, +): Promise { let args = incomingArgs; // ///////////////////////////////////// @@ -48,6 +52,7 @@ async function deleteOperation(incomingArgs: Arguments): Promise { req: { t, locale, + payload, payload: { config, preferences, @@ -164,6 +169,18 @@ async function deleteOperation(incomingArgs: Arguments): Promise { } await preferences.Model.deleteMany({ key: `collection-${collectionConfig.slug}-${id}` }); + // ///////////////////////////////////// + // Delete versions + // ///////////////////////////////////// + + if (!collectionConfig.versions.retainDeleted) { + deleteCollectionVersions({ + payload, + id, + slug: collectionConfig.slug, + }); + } + // ///////////////////////////////////// // afterDelete - Collection // ///////////////////////////////////// @@ -174,7 +191,6 @@ async function deleteOperation(incomingArgs: Arguments): Promise { result = await hook({ req, id, doc: result }) || result; }, Promise.resolve()); - // ///////////////////////////////////// // afterRead - Fields // ///////////////////////////////////// diff --git a/src/collections/operations/find.ts b/src/collections/operations/find.ts index 46e5677bff..20b660f437 100644 --- a/src/collections/operations/find.ts +++ b/src/collections/operations/find.ts @@ -9,7 +9,7 @@ import flattenWhereConstraints from '../../utilities/flattenWhereConstraints'; import { buildSortParam } from '../../mongoose/buildSortParam'; import { AccessResult } from '../../config/types'; import { afterRead } from '../../fields/hooks/afterRead'; -import { mergeDrafts } from '../../versions/drafts/mergeDrafts'; +import { queryDrafts } from '../../versions/drafts/queryDrafts'; export type Arguments = { collection: Collection @@ -28,7 +28,9 @@ export type Arguments = { } // eslint-disable-next-line @typescript-eslint/no-explicit-any -async function find(incomingArgs: Arguments): Promise> { +async function find( + incomingArgs: Arguments, +): Promise> { let args = incomingArgs; // ///////////////////////////////////// @@ -160,13 +162,12 @@ async function find(incomingArgs: Arguments): Promis }; if (collectionConfig.versions?.drafts && draftsEnabled) { - result = await mergeDrafts({ + result = await queryDrafts({ accessResult, collection, locale, paginationOptions, payload, - query, where, }); } else { diff --git a/src/collections/operations/findByID.ts b/src/collections/operations/findByID.ts index 1412f0c6c4..3b4e5bc104 100644 --- a/src/collections/operations/findByID.ts +++ b/src/collections/operations/findByID.ts @@ -22,8 +22,9 @@ export type Arguments = { draft?: boolean } -// eslint-disable-next-line @typescript-eslint/no-explicit-any -async function findByID(incomingArgs: Arguments): Promise { +async function findByID( + incomingArgs: Arguments, +): Promise { let args = incomingArgs; // ///////////////////////////////////// diff --git a/src/collections/operations/findVersions.ts b/src/collections/operations/findVersions.ts index 4fb5842da6..3b8dabd2e5 100644 --- a/src/collections/operations/findVersions.ts +++ b/src/collections/operations/findVersions.ts @@ -23,7 +23,9 @@ export type Arguments = { showHiddenFields?: boolean } -async function findVersions = any>(args: Arguments): Promise> { +async function findVersions>( + args: Arguments, +): Promise> { const { where, page, diff --git a/src/collections/operations/local/create.ts b/src/collections/operations/local/create.ts index cab886b689..7718580976 100644 --- a/src/collections/operations/local/create.ts +++ b/src/collections/operations/local/create.ts @@ -1,5 +1,6 @@ +import { Config as GeneratedTypes } from 'payload/generated-types'; import { UploadedFile } from 'express-fileupload'; -import { Payload } from '../../..'; +import { Payload } from '../../../payload'; import { PayloadRequest } from '../../../express/types'; import { Document } from '../../../types'; import getFileByPath from '../../../uploads/getFileByPath'; @@ -9,9 +10,9 @@ import { File } from '../../../uploads/types'; import i18n from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - collection: string - data: Record +export type Options = { + collection: TSlug + data: Omit depth?: number locale?: string fallbackLocale?: string @@ -26,7 +27,10 @@ export type Options = { draft?: boolean } -export default async function createLocal(payload: Payload, options: Options): Promise { +export default async function createLocal( + payload: Payload, + options: Options, +): Promise { const { collection: collectionSlug, depth, @@ -48,7 +52,7 @@ export default async function createLocal(payload: Payload, options: Op const defaultLocale = payload?.config?.localization ? payload?.config?.localization?.defaultLocale : null; if (!collection) { - throw new APIError(`The collection with slug ${collectionSlug} can't be found.`); + throw new APIError(`The collection with slug ${String(collectionSlug)} can't be found.`); } req.payloadAPI = 'local'; @@ -65,7 +69,7 @@ export default async function createLocal(payload: Payload, options: Op if (!req.t) req.t = req.i18n.t; if (!req.payloadDataLoader) req.payloadDataLoader = getDataLoader(req); - return create({ + return create({ depth, data, collection, diff --git a/src/collections/operations/local/delete.ts b/src/collections/operations/local/delete.ts index 386c1e797e..9e80388e6e 100644 --- a/src/collections/operations/local/delete.ts +++ b/src/collections/operations/local/delete.ts @@ -1,14 +1,14 @@ -import { TypeWithID } from '../../config/types'; +import { Config as GeneratedTypes } from 'payload/generated-types'; import { Document } from '../../../types'; import { PayloadRequest } from '../../../express/types'; -import { Payload } from '../../../index'; +import { Payload } from '../../../payload'; import deleteOperation from '../delete'; import { getDataLoader } from '../../dataloader'; import i18n from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - collection: string +export type Options = { + collection: T id: string depth?: number locale?: string @@ -18,7 +18,10 @@ export type Options = { showHiddenFields?: boolean } -export default async function deleteLocal(payload: Payload, options: Options): Promise { +export default async function deleteLocal( + payload: Payload, + options: Options, +): Promise { const { collection: collectionSlug, depth, @@ -35,7 +38,7 @@ export default async function deleteLocal(payload: P if (!collection) { - throw new APIError(`The collection with slug ${collectionSlug} can't be found.`); + throw new APIError(`The collection with slug ${String(collectionSlug)} can't be found.`); } const req = { @@ -50,7 +53,7 @@ export default async function deleteLocal(payload: P if (!req.t) req.t = req.i18n.t; if (!req.payloadDataLoader) req.payloadDataLoader = getDataLoader(req); - return deleteOperation({ + return deleteOperation({ depth, id, collection, diff --git a/src/collections/operations/local/find.ts b/src/collections/operations/local/find.ts index cea2105c98..bb68d890b4 100644 --- a/src/collections/operations/local/find.ts +++ b/src/collections/operations/local/find.ts @@ -1,15 +1,15 @@ -import { TypeWithID } from '../../config/types'; +import { Config as GeneratedTypes } from 'payload/generated-types'; import { PaginatedDocs } from '../../../mongoose/types'; import { Document, Where } from '../../../types'; -import { Payload } from '../../..'; +import { Payload } from '../../../payload'; import { PayloadRequest } from '../../../express/types'; import find from '../find'; import { getDataLoader } from '../../dataloader'; import i18n from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - collection: string +export type Options = { + collection: T depth?: number currentDepth?: number page?: number @@ -27,8 +27,10 @@ export type Options = { req?: PayloadRequest } -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export default async function findLocal(payload: Payload, options: Options): Promise> { +export default async function findLocal( + payload: Payload, + options: Options, +): Promise> { const { collection: collectionSlug, depth, @@ -52,7 +54,7 @@ export default async function findLocal(payload: Pay const defaultLocale = payload?.config?.localization ? payload?.config?.localization?.defaultLocale : null; if (!collection) { - throw new APIError(`The collection with slug ${collectionSlug} can't be found.`); + throw new APIError(`The collection with slug ${String(collectionSlug)} can't be found.`); } req.payloadAPI = 'local'; @@ -66,7 +68,7 @@ export default async function findLocal(payload: Pay if (typeof user !== 'undefined') req.user = user; - return find({ + return find({ depth, currentDepth, sort, diff --git a/src/collections/operations/local/findByID.ts b/src/collections/operations/local/findByID.ts index 9f013b041a..1808e2e12d 100644 --- a/src/collections/operations/local/findByID.ts +++ b/src/collections/operations/local/findByID.ts @@ -1,14 +1,14 @@ -import { TypeWithID } from '../../config/types'; +import { Config as GeneratedTypes } from 'payload/generated-types'; import { PayloadRequest } from '../../../express/types'; import { Document } from '../../../types'; import findByID from '../findByID'; -import { Payload } from '../../..'; +import { Payload } from '../../../payload'; import { getDataLoader } from '../../dataloader'; import i18n from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - collection: string +export type Options = { + collection: T id: string depth?: number currentDepth?: number @@ -22,8 +22,10 @@ export type Options = { draft?: boolean } -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export default async function findByIDLocal(payload: Payload, options: Options): Promise { +export default async function findByIDLocal( + payload: Payload, + options: Options, +): Promise { const { collection: collectionSlug, depth, @@ -43,7 +45,7 @@ export default async function findByIDLocal(payload: const defaultLocale = payload?.config?.localization ? payload?.config?.localization?.defaultLocale : null; if (!collection) { - throw new APIError(`The collection with slug ${collectionSlug} can't be found.`); + throw new APIError(`The collection with slug ${String(collectionSlug)} can't be found.`); } req.payloadAPI = 'local'; @@ -57,7 +59,7 @@ export default async function findByIDLocal(payload: if (!req.t) req.t = req.i18n.t; if (!req.payloadDataLoader) req.payloadDataLoader = getDataLoader(req); - return findByID({ + return findByID({ depth, currentDepth, id, diff --git a/src/collections/operations/local/findVersionByID.ts b/src/collections/operations/local/findVersionByID.ts index e19eba9dd0..f682734c65 100644 --- a/src/collections/operations/local/findVersionByID.ts +++ b/src/collections/operations/local/findVersionByID.ts @@ -1,4 +1,5 @@ -import { Payload } from '../../..'; +import { Config as GeneratedTypes } from 'payload/generated-types'; +import { Payload } from '../../../payload'; import { Document } from '../../../types'; import { PayloadRequest } from '../../../express/types'; import { TypeWithVersion } from '../../../versions/types'; @@ -7,8 +8,8 @@ import { getDataLoader } from '../../dataloader'; import i18n from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - collection: string +export type Options = { + collection: T id: string depth?: number locale?: string @@ -20,7 +21,10 @@ export type Options = { req?: PayloadRequest } -export default async function findVersionByIDLocal = any>(payload: Payload, options: Options): Promise { +export default async function findVersionByIDLocal( + payload: Payload, + options: Options, +): Promise> { const { collection: collectionSlug, depth, @@ -37,7 +41,7 @@ export default async function findVersionByIDLocal const defaultLocale = payload?.config?.localization ? payload?.config?.localization?.defaultLocale : null; if (!collection) { - throw new APIError(`The collection with slug ${collectionSlug} can't be found.`); + throw new APIError(`The collection with slug ${String(collectionSlug)} can't be found.`); } req.payloadAPI = 'local'; diff --git a/src/collections/operations/local/findVersions.ts b/src/collections/operations/local/findVersions.ts index e7f1000218..54204ca873 100644 --- a/src/collections/operations/local/findVersions.ts +++ b/src/collections/operations/local/findVersions.ts @@ -1,4 +1,5 @@ -import { Payload } from '../../..'; +import { Config as GeneratedTypes } from 'payload/generated-types'; +import { Payload } from '../../../payload'; import { Document, Where } from '../../../types'; import { PaginatedDocs } from '../../../mongoose/types'; import { TypeWithVersion } from '../../../versions/types'; @@ -8,8 +9,8 @@ import { getDataLoader } from '../../dataloader'; import i18nInit from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - collection: string +export type Options = { + collection: T depth?: number page?: number limit?: number @@ -22,7 +23,10 @@ export type Options = { where?: Where } -export default async function findVersionsLocal = any>(payload: Payload, options: Options): Promise> { +export default async function findVersionsLocal( + payload: Payload, + options: Options, +): Promise>> { const { collection: collectionSlug, depth, @@ -41,7 +45,7 @@ export default async function findVersionsLocal = a const defaultLocale = payload?.config?.localization ? payload?.config?.localization?.defaultLocale : null; if (!collection) { - throw new APIError(`The collection with slug ${collectionSlug} can't be found.`); + throw new APIError(`The collection with slug ${String(collectionSlug)} can't be found.`); } const i18n = i18nInit(payload.config.i18n); diff --git a/src/collections/operations/local/restoreVersion.ts b/src/collections/operations/local/restoreVersion.ts index 67d3ee6bbc..c407953c13 100644 --- a/src/collections/operations/local/restoreVersion.ts +++ b/src/collections/operations/local/restoreVersion.ts @@ -1,14 +1,14 @@ -import { Payload } from '../../..'; +import { Config as GeneratedTypes } from 'payload/generated-types'; +import { Payload } from '../../../payload'; import { PayloadRequest } from '../../../express/types'; import { Document } from '../../../types'; -import { TypeWithVersion } from '../../../versions/types'; import { getDataLoader } from '../../dataloader'; import restoreVersion from '../restoreVersion'; import i18nInit from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - collection: string +export type Options = { + collection: T id: string depth?: number locale?: string @@ -18,7 +18,10 @@ export type Options = { showHiddenFields?: boolean } -export default async function restoreVersionLocal = any>(payload: Payload, options: Options): Promise { +export default async function restoreVersionLocal( + payload: Payload, + options: Options, +): Promise { const { collection: collectionSlug, depth, @@ -33,7 +36,7 @@ export default async function restoreVersionLocal = const collection = payload.collections[collectionSlug]; if (!collection) { - throw new APIError(`The collection with slug ${collectionSlug} can't be found.`); + throw new APIError(`The collection with slug ${String(collectionSlug)} can't be found.`); } const i18n = i18nInit(payload.config.i18n); diff --git a/src/collections/operations/local/update.ts b/src/collections/operations/local/update.ts index a4e86c80b6..c30dd170a9 100644 --- a/src/collections/operations/local/update.ts +++ b/src/collections/operations/local/update.ts @@ -1,4 +1,5 @@ -import { Payload } from '../../..'; +import { Config as GeneratedTypes } from 'payload/generated-types'; +import { Payload } from '../../../payload'; import { Document } from '../../../types'; import getFileByPath from '../../../uploads/getFileByPath'; import update from '../update'; @@ -8,10 +9,10 @@ import { File } from '../../../uploads/types'; import i18nInit from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - collection: string +export type Options = { + collection: TSlug id: string | number - data: Partial + data: Omit depth?: number locale?: string fallbackLocale?: string @@ -25,7 +26,10 @@ export type Options = { autosave?: boolean } -export default async function updateLocal(payload: Payload, options: Options): Promise { +export default async function updateLocal( + payload: Payload, + options: Options, +): Promise { const { collection: collectionSlug, depth, @@ -46,7 +50,7 @@ export default async function updateLocal(payload: Payload, options: Op const collection = payload.collections[collectionSlug]; if (!collection) { - throw new APIError(`The collection with slug ${collectionSlug} can't be found.`); + throw new APIError(`The collection with slug ${String(collectionSlug)} can't be found.`); } const i18n = i18nInit(payload.config.i18n); @@ -81,5 +85,5 @@ export default async function updateLocal(payload: Payload, options: Op req, }; - return update(args); + return update(args); } diff --git a/src/collections/operations/update.ts b/src/collections/operations/update.ts index 095081e3c7..efd25a546e 100644 --- a/src/collections/operations/update.ts +++ b/src/collections/operations/update.ts @@ -1,4 +1,5 @@ import httpStatus from 'http-status'; +import { Config as GeneratedTypes } from 'payload/generated-types'; import { Where, Document } from '../../types'; import { Collection } from '../config/types'; import sanitizeInternalFields from '../../utilities/sanitizeInternalFields'; @@ -6,11 +7,8 @@ import executeAccess from '../../auth/executeAccess'; import { NotFound, Forbidden, APIError, ValidationError } from '../../errors'; import { PayloadRequest } from '../../express/types'; import { hasWhereAccessResult } from '../../auth/types'; -import { saveCollectionDraft } from '../../versions/drafts/saveCollectionDraft'; -import { saveCollectionVersion } from '../../versions/saveCollectionVersion'; +import { saveVersion } from '../../versions/saveVersion'; import { uploadFiles } from '../../uploads/uploadFiles'; -import cleanUpFailedVersion from '../../versions/cleanUpFailedVersion'; -import { ensurePublishedCollectionVersion } from '../../versions/ensurePublishedCollectionVersion'; import { beforeChange } from '../../fields/hooks/beforeChange'; import { beforeValidate } from '../../fields/hooks/beforeValidate'; import { afterChange } from '../../fields/hooks/afterChange'; @@ -18,11 +16,11 @@ import { afterRead } from '../../fields/hooks/afterRead'; import { generateFileData } from '../../uploads/generateFileData'; import { getLatestCollectionVersion } from '../../versions/getLatestCollectionVersion'; -export type Arguments = { +export type Arguments = { collection: Collection req: PayloadRequest id: string | number - data: Record + data: Omit depth?: number disableVerificationEmail?: boolean overrideAccess?: boolean @@ -32,7 +30,9 @@ export type Arguments = { autosave?: boolean } -async function update(incomingArgs: Arguments): Promise { +async function update( + incomingArgs: Arguments, +): Promise { let args = incomingArgs; // ///////////////////////////////////// @@ -147,7 +147,7 @@ async function update(incomingArgs: Arguments): Promise { // beforeValidate - Fields // ///////////////////////////////////// - data = await beforeValidate({ + data = await beforeValidate({ data, doc: originalDoc, entityConfig: collectionConfig, @@ -199,7 +199,7 @@ async function update(incomingArgs: Arguments): Promise { // beforeChange - Fields // ///////////////////////////////////// - let result = await beforeChange({ + let result = await beforeChange({ data, doc: originalDoc, docWithLocales, @@ -215,50 +215,17 @@ async function update(incomingArgs: Arguments): Promise { // ///////////////////////////////////// if (shouldSavePassword) { - await doc.setPassword(password as string); + await doc.setPassword(password); await doc.save(); delete data.password; delete result.password; } - // ///////////////////////////////////// - // Create version from existing doc - // ///////////////////////////////////// - - let createdVersion; - - if (collectionConfig.versions && !shouldSaveDraft) { - createdVersion = await saveCollectionVersion({ - payload, - config: collectionConfig, - req, - docWithLocales, - id, - }); - } - // ///////////////////////////////////// // Update // ///////////////////////////////////// - if (shouldSaveDraft) { - await ensurePublishedCollectionVersion({ - payload, - config: collectionConfig, - req, - docWithLocales, - id, - }); - - result = await saveCollectionDraft({ - payload, - config: collectionConfig, - req, - data: result, - id, - autosave, - }); - } else { + if (!shouldSaveDraft) { try { result = await Model.findByIdAndUpdate( { _id: id }, @@ -266,27 +233,34 @@ async function update(incomingArgs: Arguments): Promise { { new: true }, ); } catch (error) { - cleanUpFailedVersion({ - payload, - entityConfig: collectionConfig, - version: createdVersion, - }); - // Handle uniqueness error from MongoDB throw error.code === 11000 && error.keyValue ? new ValidationError([{ message: 'Value must be unique', field: Object.keys(error.keyValue)[0] }], t) : error; } - - const resultString = JSON.stringify(result); - result = JSON.parse(resultString); - - // custom id type reset - result.id = result._id; } + result = JSON.parse(JSON.stringify(result)); + result.id = result._id as string | number; result = sanitizeInternalFields(result); + // ///////////////////////////////////// + // Create version + // ///////////////////////////////////// + + if (collectionConfig.versions) { + result = await saveVersion({ + payload, + collection: collectionConfig, + req, + docWithLocales: result, + id, + autosave, + draft: shouldSaveDraft, + createdAt: originalDoc.createdAt, + }); + } + // ///////////////////////////////////// // afterRead - Fields // ///////////////////////////////////// @@ -317,7 +291,7 @@ async function update(incomingArgs: Arguments): Promise { // afterChange - Fields // ///////////////////////////////////// - result = await afterChange({ + result = await afterChange({ data, doc: result, previousDoc: originalDoc, diff --git a/src/collections/requestHandlers/create.ts b/src/collections/requestHandlers/create.ts index 29b23aff6f..fc30fddc29 100644 --- a/src/collections/requestHandlers/create.ts +++ b/src/collections/requestHandlers/create.ts @@ -13,12 +13,16 @@ export type CreateResult = { export default async function createHandler(req: PayloadRequest, res: Response, next: NextFunction): Promise | void> { try { + const autosave = req.query.autosave === 'true'; + const draft = req.query.draft === 'true'; + const doc = await create({ req, collection: req.collection, data: req.body, depth: Number(req.query.depth), - draft: req.query.draft === 'true', + draft, + autosave, }); return res.status(httpStatus.CREATED).json({ diff --git a/src/config/load.ts b/src/config/load.ts index b5e62595c1..c55ba97710 100644 --- a/src/config/load.ts +++ b/src/config/load.ts @@ -1,7 +1,6 @@ /* eslint-disable import/no-dynamic-require */ /* eslint-disable global-require */ // eslint-disable-next-line import/no-extraneous-dependencies -import swcRegister from '@swc/register'; import path from 'path'; import pino from 'pino'; import Logger from '../utilities/logger'; @@ -15,24 +14,6 @@ const loadConfig = (logger?: pino.Logger): SanitizedConfig => { const configPath = findConfig(); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - swcRegister({ - sourceMaps: 'inline', - jsc: { - parser: { - syntax: 'typescript', - tsx: true, - }, - }, - ignore: [ - /node_modules[\\/](?!.pnpm[\\/].*[\\/]node_modules[\\/])(?!payload[\\/]dist[\\/]admin|payload[\\/]components).*/, - ], - module: { - type: 'commonjs', - }, - }); - clientFiles.forEach((ext) => { require.extensions[ext] = () => null; }); diff --git a/src/config/types.ts b/src/config/types.ts index 0b81ad5cfe..afbe5a1033 100644 --- a/src/config/types.ts +++ b/src/config/types.ts @@ -9,7 +9,7 @@ import { ConnectOptions } from 'mongoose'; import React from 'react'; import { LoggerOptions } from 'pino'; import type { InitOptions as i18nInitOptions } from 'i18next'; -import { Payload } from '..'; +import { Payload } from '../payload'; import { AfterErrorHook, CollectionConfig, diff --git a/src/email/sendEmail.ts b/src/email/sendEmail.ts index 912ecaff1e..59f4deae5c 100644 --- a/src/email/sendEmail.ts +++ b/src/email/sendEmail.ts @@ -1,7 +1,7 @@ -import { Message } from './types'; +import { SendMailOptions } from 'nodemailer'; import logger from '../utilities/logger'; -export default async function sendEmail(message: Message): Promise { +export default async function sendEmail(message: SendMailOptions): Promise { let result; try { const email = await this.email; diff --git a/src/express/admin.ts b/src/express/admin.ts index b997d11803..93b2307634 100644 --- a/src/express/admin.ts +++ b/src/express/admin.ts @@ -3,7 +3,7 @@ import compression from 'compression'; import history from 'connect-history-api-fallback'; import path from 'path'; import initWebpack from '../webpack/init'; -import { Payload } from '../index'; +import { Payload } from '../payload'; const router = express.Router(); diff --git a/src/express/middleware/index.ts b/src/express/middleware/index.ts index f213452b2a..8ae0ebc974 100644 --- a/src/express/middleware/index.ts +++ b/src/express/middleware/index.ts @@ -9,7 +9,7 @@ import rateLimit from 'express-rate-limit'; import localizationMiddleware from '../../localization/middleware'; import authenticate from './authenticate'; import identifyAPI from './identifyAPI'; -import { Payload } from '../..'; +import { Payload } from '../../payload'; import { PayloadRequest } from '../types'; import corsHeaders from './corsHeaders'; import convertPayload from './convertPayload'; diff --git a/src/express/static.ts b/src/express/static.ts index e73fa87e62..22744fe64c 100644 --- a/src/express/static.ts +++ b/src/express/static.ts @@ -3,7 +3,7 @@ import passport from 'passport'; import path from 'path'; import getExecuteStaticAccess from '../auth/getExecuteStaticAccess'; import authenticate from './middleware/authenticate'; -import { Payload } from '../index'; +import { Payload } from '../payload'; import corsHeaders from './middleware/corsHeaders'; function initStatic(ctx: Payload): void { diff --git a/src/express/types.ts b/src/express/types.ts index 8e363fcc60..9ce8569a2e 100644 --- a/src/express/types.ts +++ b/src/express/types.ts @@ -2,11 +2,10 @@ import { Request } from 'express'; import type { i18n as Ii18n, TFunction } from 'i18next'; import DataLoader from 'dataloader'; import { UploadedFile } from 'express-fileupload'; -import { Payload } from '../index'; -import { Collection } from '../collections/config/types'; +import { Payload } from '../payload'; +import { Collection, TypeWithID } from '../collections/config/types'; import { User } from '../auth/types'; import { Document } from '../types'; -import { TypeWithID } from '../globals/config/types'; /** Express request with some Payload related context added */ export declare type PayloadRequest = Request & { diff --git a/src/fields/config/types.ts b/src/fields/config/types.ts index 6bdc16d905..177f92f040 100644 --- a/src/fields/config/types.ts +++ b/src/fields/config/types.ts @@ -9,7 +9,7 @@ import { PayloadRequest } from '../../express/types'; import { ConditionalDateProps } from '../../admin/components/elements/DatePicker/types'; import { Description } from '../../admin/components/forms/FieldDescription/types'; import { User } from '../../auth'; -import { Payload } from '../..'; +import { Payload } from '../../payload'; import { RowLabel } from '../../admin/components/forms/RowLabel/types'; export type FieldHookArgs = { diff --git a/src/fields/hooks/afterChange/index.ts b/src/fields/hooks/afterChange/index.ts index e84aa75a47..afbba7964a 100644 --- a/src/fields/hooks/afterChange/index.ts +++ b/src/fields/hooks/afterChange/index.ts @@ -4,23 +4,23 @@ import { PayloadRequest } from '../../../express/types'; import { traverseFields } from './traverseFields'; import deepCopyObject from '../../../utilities/deepCopyObject'; -type Args = { - data: Record - doc: Record - previousDoc: Record +type Args = { + data: Omit + doc: T + previousDoc: T entityConfig: SanitizedCollectionConfig | SanitizedGlobalConfig operation: 'create' | 'update' req: PayloadRequest } -export const afterChange = async ({ +export const afterChange = async >({ data, doc: incomingDoc, previousDoc, entityConfig, operation, req, -}: Args): Promise> => { +}: Args): Promise => { const doc = deepCopyObject(incomingDoc); await traverseFields({ diff --git a/src/fields/hooks/beforeChange/index.ts b/src/fields/hooks/beforeChange/index.ts index c1d986d7b1..ccb3adc6ae 100644 --- a/src/fields/hooks/beforeChange/index.ts +++ b/src/fields/hooks/beforeChange/index.ts @@ -6,9 +6,9 @@ import { traverseFields } from './traverseFields'; import { ValidationError } from '../../../errors'; import deepCopyObject from '../../../utilities/deepCopyObject'; -type Args = { - data: Record - doc: Record +type Args = { + data: Omit + doc: T docWithLocales: Record entityConfig: SanitizedCollectionConfig | SanitizedGlobalConfig id?: string | number @@ -17,7 +17,7 @@ type Args = { skipValidation?: boolean } -export const beforeChange = async ({ +export const beforeChange = async >({ data: incomingData, doc, docWithLocales, @@ -26,7 +26,7 @@ export const beforeChange = async ({ operation, req, skipValidation, -}: Args): Promise> => { +}: Args): Promise => { const data = deepCopyObject(incomingData); const mergeLocaleActions = []; const errors: { message: string, field: string }[] = []; diff --git a/src/fields/hooks/beforeValidate/index.ts b/src/fields/hooks/beforeValidate/index.ts index 5fb02ef6e5..17653ab705 100644 --- a/src/fields/hooks/beforeValidate/index.ts +++ b/src/fields/hooks/beforeValidate/index.ts @@ -4,9 +4,9 @@ import { PayloadRequest } from '../../../express/types'; import { traverseFields } from './traverseFields'; import deepCopyObject from '../../../utilities/deepCopyObject'; -type Args = { - data: Record - doc: Record +type Args = { + data: Omit + doc?: T | Record entityConfig: SanitizedCollectionConfig | SanitizedGlobalConfig id?: string | number operation: 'create' | 'update' @@ -14,7 +14,7 @@ type Args = { req: PayloadRequest } -export const beforeValidate = async ({ +export const beforeValidate = async >({ data: incomingData, doc, entityConfig, @@ -22,7 +22,7 @@ export const beforeValidate = async ({ operation, overrideAccess, req, -}: Args): Promise> => { +}: Args): Promise => { const data = deepCopyObject(incomingData); await traverseFields({ diff --git a/src/fields/hooks/beforeValidate/promise.ts b/src/fields/hooks/beforeValidate/promise.ts index e70252f289..0d5d7cf816 100644 --- a/src/fields/hooks/beforeValidate/promise.ts +++ b/src/fields/hooks/beforeValidate/promise.ts @@ -3,9 +3,9 @@ import { PayloadRequest } from '../../../express/types'; import { Field, fieldAffectsData, TabAsField, tabHasName, valueIsValueWithRelation } from '../../config/types'; import { traverseFields } from './traverseFields'; -type Args = { - data: Record - doc: Record +type Args = { + data: T + doc: T field: Field | TabAsField id?: string | number operation: 'create' | 'update' @@ -20,7 +20,7 @@ type Args = { // - Execute field hooks // - Execute field access control -export const promise = async ({ +export const promise = async ({ data, doc, field, @@ -30,7 +30,7 @@ export const promise = async ({ req, siblingData, siblingDoc, -}: Args): Promise => { +}: Args): Promise => { if (fieldAffectsData(field)) { if (field.name === 'id') { if (field.type === 'number' && typeof siblingData[field.name] === 'string') { diff --git a/src/fields/hooks/beforeValidate/traverseFields.ts b/src/fields/hooks/beforeValidate/traverseFields.ts index 7bd6bc17a1..3e2174a821 100644 --- a/src/fields/hooks/beforeValidate/traverseFields.ts +++ b/src/fields/hooks/beforeValidate/traverseFields.ts @@ -2,9 +2,9 @@ import { PayloadRequest } from '../../../express/types'; import { Field, TabAsField } from '../../config/types'; import { promise } from './promise'; -type Args = { - data: Record - doc: Record +type Args = { + data: T + doc: T fields: (Field | TabAsField)[] id?: string | number operation: 'create' | 'update' @@ -14,7 +14,7 @@ type Args = { siblingDoc: Record } -export const traverseFields = async ({ +export const traverseFields = async ({ data, doc, fields, @@ -24,7 +24,7 @@ export const traverseFields = async ({ req, siblingData, siblingDoc, -}: Args): Promise => { +}: Args): Promise => { const promises = []; fields.forEach((field) => { promises.push(promise({ diff --git a/src/fields/validations.ts b/src/fields/validations.ts index c7de96192c..2d214c8ff7 100644 --- a/src/fields/validations.ts +++ b/src/fields/validations.ts @@ -212,7 +212,7 @@ const validateFilterOptions: Validate = async (value, { t, filterOptions, id, us } }); - const result = await payload.find({ + const result = await payload.find({ collection, depth: 0, where: { diff --git a/src/generated-types.ts b/src/generated-types.ts new file mode 100644 index 0000000000..5e685540e6 --- /dev/null +++ b/src/generated-types.ts @@ -0,0 +1,15 @@ +// This is a stub for Payload's generated types. +// It will not be used. +// Instead, configure a path within your `tsconfig.json`'s `compilerOptions.paths` to point to your generated types. + +import { TypeWithID } from './collections/config/types'; +import { TypeWithID as GlobalTypeWithID } from './globals/config/types'; + +export type Config = { + collections: { + [slug: string | number | symbol]: TypeWithID + } + globals: { + [slug: string | number | symbol]: GlobalTypeWithID + } +} diff --git a/src/globals/graphql/init.ts b/src/globals/graphql/init.ts index 05b931ad3f..87d1d431bf 100644 --- a/src/globals/graphql/init.ts +++ b/src/globals/graphql/init.ts @@ -9,7 +9,7 @@ import updateResolver from './resolvers/update'; import findVersionByIDResolver from './resolvers/findVersionByID'; import findVersionsResolver from './resolvers/findVersions'; import restoreVersionResolver from './resolvers/restoreVersion'; -import { Payload } from '../..'; +import { Payload } from '../../payload'; import buildObjectType from '../../graphql/schema/buildObjectType'; import buildMutationInputType from '../../graphql/schema/buildMutationInputType'; import buildWhereInputType from '../../graphql/schema/buildWhereInputType'; diff --git a/src/globals/graphql/resolvers/update.ts b/src/globals/graphql/resolvers/update.ts index 44bf5bb8e7..b5ebf20f26 100644 --- a/src/globals/graphql/resolvers/update.ts +++ b/src/globals/graphql/resolvers/update.ts @@ -1,24 +1,26 @@ /* eslint-disable no-param-reassign */ - +import { Config as GeneratedTypes } from 'payload/generated-types'; import { PayloadRequest } from '../../../express/types'; import { SanitizedGlobalConfig } from '../../config/types'; import update from '../../operations/update'; -type Resolver = ( +type Resolver = ( _: unknown, args: { locale?: string fallbackLocale?: string - data?: Record + data?: GeneratedTypes['globals'][TSlug] draft?: boolean }, context: { req: PayloadRequest, res: Response } -) => Promise +) => Promise -export default function updateResolver(globalConfig: SanitizedGlobalConfig): Resolver { +export default function updateResolver( + globalConfig: SanitizedGlobalConfig, +): Resolver { return async function resolver(_, args, context) { if (args.locale) context.req.locale = args.locale; if (args.fallbackLocale) context.req.fallbackLocale = args.fallbackLocale; @@ -34,7 +36,7 @@ export default function updateResolver(globalConfig: SanitizedGlobalConfig): Res draft: args.draft, }; - const result = await update(options); + const result = await update(options); return result; }; } diff --git a/src/globals/initHTTP.ts b/src/globals/initHTTP.ts new file mode 100644 index 0000000000..27cce6ef20 --- /dev/null +++ b/src/globals/initHTTP.ts @@ -0,0 +1,19 @@ +import express from 'express'; +import mountEndpoints from '../express/mountEndpoints'; +import buildEndpoints from './buildEndpoints'; +import { SanitizedGlobalConfig } from './config/types'; +import { Payload } from '../payload'; + +export default function initGlobals(ctx: Payload): void { + if (ctx.config.globals) { + ctx.config.globals.forEach((global: SanitizedGlobalConfig) => { + const router = express.Router(); + const { slug } = global; + + const endpoints = buildEndpoints(global); + mountEndpoints(ctx.express, router, endpoints); + + ctx.router.use(`/globals/${slug}`, router); + }); + } +} diff --git a/src/globals/init.ts b/src/globals/initLocal.ts similarity index 63% rename from src/globals/init.ts rename to src/globals/initLocal.ts index 8558aa2cbf..0cbf9ae04c 100644 --- a/src/globals/init.ts +++ b/src/globals/initLocal.ts @@ -1,18 +1,14 @@ -import express from 'express'; import mongoose from 'mongoose'; import paginate from 'mongoose-paginate-v2'; import buildQueryPlugin from '../mongoose/buildQuery'; import buildModel from './buildModel'; -import { Payload } from '../index'; +import { Payload } from '../payload'; import { getVersionsModelName } from '../versions/getVersionsModelName'; import { buildVersionGlobalFields } from '../versions/buildGlobalFields'; import buildSchema from '../mongoose/buildSchema'; import { CollectionModel } from '../collections/config/types'; -import mountEndpoints from '../express/mountEndpoints'; -import buildEndpoints from './buildEndpoints'; -import { SanitizedGlobalConfig } from './config/types'; -export default function initGlobals(ctx: Payload): void { +export default function initGlobalsLocal(ctx: Payload): void { if (ctx.config.globals) { ctx.globals = { Model: buildModel(ctx.config), @@ -30,7 +26,7 @@ export default function initGlobals(ctx: Payload): void { disableUnique: true, draftsEnabled: true, options: { - timestamps: true, + timestamps: false, }, }, ); @@ -41,18 +37,5 @@ export default function initGlobals(ctx: Payload): void { ctx.versions[global.slug] = mongoose.model(versionModelName, versionSchema) as CollectionModel; } }); - - // If not local, open routes - if (!ctx.local) { - ctx.config.globals.forEach((global: SanitizedGlobalConfig) => { - const router = express.Router(); - const { slug } = global; - - const endpoints = buildEndpoints(global); - mountEndpoints(ctx.express, router, endpoints); - - ctx.router.use(`/globals/${slug}`, router); - }); - } } } diff --git a/src/globals/operations/findOne.ts b/src/globals/operations/findOne.ts index e04ec672c8..1b3bec22dc 100644 --- a/src/globals/operations/findOne.ts +++ b/src/globals/operations/findOne.ts @@ -5,7 +5,7 @@ import { AccessResult } from '../../config/types'; import sanitizeInternalFields from '../../utilities/sanitizeInternalFields'; import replaceWithDraftIfAvailable from '../../versions/drafts/replaceWithDraftIfAvailable'; import { afterRead } from '../../fields/hooks/afterRead'; -import { SanitizedGlobalConfig, TypeWithID } from '../config/types'; +import { SanitizedGlobalConfig } from '../config/types'; import { PayloadRequest } from '../../express/types'; type Args = { @@ -19,7 +19,7 @@ type Args = { overrideAccess?: boolean } -async function findOne(args: Args): Promise { +async function findOne>(args: Args): Promise { const { globalConfig, locale, diff --git a/src/globals/operations/findVersions.ts b/src/globals/operations/findVersions.ts index f2bfce95f3..e6185699ab 100644 --- a/src/globals/operations/findVersions.ts +++ b/src/globals/operations/findVersions.ts @@ -6,10 +6,10 @@ import { PaginatedDocs } from '../../mongoose/types'; import { hasWhereAccessResult } from '../../auth/types'; import flattenWhereConstraints from '../../utilities/flattenWhereConstraints'; import { buildSortParam } from '../../mongoose/buildSortParam'; -import { TypeWithVersion } from '../../versions/types'; import { SanitizedGlobalConfig } from '../config/types'; import { afterRead } from '../../fields/hooks/afterRead'; import { buildVersionGlobalFields } from '../../versions/buildGlobalFields'; +import { TypeWithVersion } from '../../versions/types'; export type Arguments = { globalConfig: SanitizedGlobalConfig @@ -23,7 +23,9 @@ export type Arguments = { showHiddenFields?: boolean } -async function findVersions = any>(args: Arguments): Promise> { +async function findVersions>( + args: Arguments, +): Promise> { const { where, page, diff --git a/src/globals/operations/local/findOne.ts b/src/globals/operations/local/findOne.ts index 60f9d196e6..1f9abd953d 100644 --- a/src/globals/operations/local/findOne.ts +++ b/src/globals/operations/local/findOne.ts @@ -1,14 +1,14 @@ -import { Payload } from '../../..'; +import { Config as GeneratedTypes } from 'payload/generated-types'; +import { Payload } from '../../../payload'; import { getDataLoader } from '../../../collections/dataloader'; import { PayloadRequest } from '../../../express/types'; import { Document } from '../../../types'; -import { TypeWithID } from '../../config/types'; import findOne from '../findOne'; import i18nInit from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - slug: string +export type Options = { + slug: T depth?: number locale?: string fallbackLocale?: string @@ -18,7 +18,10 @@ export type Options = { draft?: boolean } -export default async function findOneLocal(payload: Payload, options: Options): Promise { +export default async function findOneLocal( + payload: Payload, + options: Options, +): Promise { const { slug: globalSlug, depth, @@ -35,7 +38,7 @@ export default async function findOneLocal(payload: if (!globalConfig) { - throw new APIError(`The global with slug ${globalSlug} can't be found.`); + throw new APIError(`The global with slug ${String(globalSlug)} can't be found.`); } const req = { @@ -51,7 +54,7 @@ export default async function findOneLocal(payload: if (!req.payloadDataLoader) req.payloadDataLoader = getDataLoader(req); return findOne({ - slug: globalSlug, + slug: globalSlug as string, depth, globalConfig, overrideAccess, diff --git a/src/globals/operations/local/findVersionByID.ts b/src/globals/operations/local/findVersionByID.ts index 6e14dd948e..03ebfe436f 100644 --- a/src/globals/operations/local/findVersionByID.ts +++ b/src/globals/operations/local/findVersionByID.ts @@ -1,4 +1,5 @@ -import { Payload } from '../../..'; +import { Config as GeneratedTypes } from 'payload/generated-types'; +import { Payload } from '../../../payload'; import { getDataLoader } from '../../../collections/dataloader'; import { PayloadRequest } from '../../../express/types'; import { Document } from '../../../types'; @@ -7,8 +8,8 @@ import findVersionByID from '../findVersionByID'; import i18nInit from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - slug: string +export type Options = { + slug: T id: string depth?: number locale?: string @@ -19,7 +20,10 @@ export type Options = { disableErrors?: boolean } -export default async function findVersionByIDLocal = any>(payload: Payload, options: Options): Promise { +export default async function findVersionByIDLocal( + payload: Payload, + options: Options, +): Promise> { const { slug: globalSlug, depth, @@ -36,7 +40,7 @@ export default async function findVersionByIDLocal const i18n = i18nInit(payload.config.i18n); if (!globalConfig) { - throw new APIError(`The global with slug ${globalSlug} can't be found.`); + throw new APIError(`The global with slug ${String(globalSlug)} can't be found.`); } const req = { diff --git a/src/globals/operations/local/findVersions.ts b/src/globals/operations/local/findVersions.ts index b53f334ddf..f5bd62a43e 100644 --- a/src/globals/operations/local/findVersions.ts +++ b/src/globals/operations/local/findVersions.ts @@ -1,15 +1,16 @@ +import { Config as GeneratedTypes } from 'payload/generated-types'; import { Document, Where } from '../../../types'; import { PaginatedDocs } from '../../../mongoose/types'; -import { TypeWithVersion } from '../../../versions/types'; -import { Payload } from '../../..'; +import { Payload } from '../../../payload'; import { PayloadRequest } from '../../../express/types'; import findVersions from '../findVersions'; import { getDataLoader } from '../../../collections/dataloader'; import i18nInit from '../../../translations/init'; import { APIError } from '../../../errors'; +import { TypeWithVersion } from '../../../versions/types'; -export type Options = { - slug: string +export type Options = { + slug: T depth?: number page?: number limit?: number @@ -22,7 +23,10 @@ export type Options = { where?: Where } -export default async function findVersionsLocal = any>(payload: Payload, options: Options): Promise> { +export default async function findVersionsLocal( + payload: Payload, + options: Options, +): Promise>> { const { slug: globalSlug, depth, @@ -41,7 +45,7 @@ export default async function findVersionsLocal = a const i18n = i18nInit(payload.config.i18n); if (!globalConfig) { - throw new APIError(`The global with slug ${globalSlug} can't be found.`); + throw new APIError(`The global with slug ${String(globalSlug)} can't be found.`); } const req = { diff --git a/src/globals/operations/local/restoreVersion.ts b/src/globals/operations/local/restoreVersion.ts index 4bd185d578..be91cbbefe 100644 --- a/src/globals/operations/local/restoreVersion.ts +++ b/src/globals/operations/local/restoreVersion.ts @@ -1,13 +1,13 @@ -import { Payload } from '../../..'; +import { Config as GeneratedTypes } from 'payload/generated-types'; +import { Payload } from '../../../payload'; import { getDataLoader } from '../../../collections/dataloader'; import { PayloadRequest } from '../../../express/types'; import { Document } from '../../../types'; -import { TypeWithVersion } from '../../../versions/types'; import restoreVersion from '../restoreVersion'; import i18nInit from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { +export type Options = { slug: string id: string depth?: number @@ -18,7 +18,10 @@ export type Options = { showHiddenFields?: boolean } -export default async function restoreVersionLocal = any>(payload: Payload, options: Options): Promise { +export default async function restoreVersionLocal( + payload: Payload, + options: Options, +): Promise { const { slug: globalSlug, depth, @@ -34,7 +37,7 @@ export default async function restoreVersionLocal = const i18n = i18nInit(payload.config.i18n); if (!globalConfig) { - throw new APIError(`The global with slug ${globalSlug} can't be found.`); + throw new APIError(`The global with slug ${String(globalSlug)} can't be found.`); } const req = { diff --git a/src/globals/operations/local/update.ts b/src/globals/operations/local/update.ts index 169f7d74c1..a4e312b785 100644 --- a/src/globals/operations/local/update.ts +++ b/src/globals/operations/local/update.ts @@ -1,25 +1,28 @@ -import { Payload } from '../../..'; +import { Config as GeneratedTypes } from 'payload/generated-types'; +import { Payload } from '../../../payload'; import { Document } from '../../../types'; import { PayloadRequest } from '../../../express/types'; -import { TypeWithID } from '../../config/types'; import update from '../update'; import { getDataLoader } from '../../../collections/dataloader'; import i18nInit from '../../../translations/init'; import { APIError } from '../../../errors'; -export type Options = { - slug: string +export type Options = { + slug: TSlug depth?: number locale?: string fallbackLocale?: string - data: Record + data: Omit user?: Document overrideAccess?: boolean showHiddenFields?: boolean draft?: boolean } -export default async function updateLocal(payload: Payload, options: Options): Promise { +export default async function updateLocal( + payload: Payload, + options: Options, +): Promise { const { slug: globalSlug, depth, @@ -36,7 +39,7 @@ export default async function updateLocal(payload: P const i18n = i18nInit(payload.config.i18n); if (!globalConfig) { - throw new APIError(`The global with slug ${globalSlug} can't be found.`); + throw new APIError(`The global with slug ${String(globalSlug)} can't be found.`); } const req = { @@ -51,7 +54,7 @@ export default async function updateLocal(payload: P if (!req.payloadDataLoader) req.payloadDataLoader = getDataLoader(req); - return update({ + return update({ slug: globalSlug, data, depth, diff --git a/src/globals/operations/update.ts b/src/globals/operations/update.ts index 7847effac7..70c933361a 100644 --- a/src/globals/operations/update.ts +++ b/src/globals/operations/update.ts @@ -1,31 +1,31 @@ +import { Config as GeneratedTypes } from 'payload/generated-types'; import { docHasTimestamps, Where } from '../../types'; -import { SanitizedGlobalConfig, TypeWithID } from '../config/types'; +import { SanitizedGlobalConfig } from '../config/types'; import executeAccess from '../../auth/executeAccess'; -import sanitizeInternalFields from '../../utilities/sanitizeInternalFields'; -import { saveGlobalVersion } from '../../versions/saveGlobalVersion'; -import { saveGlobalDraft } from '../../versions/drafts/saveGlobalDraft'; -import { ensurePublishedGlobalVersion } from '../../versions/ensurePublishedGlobalVersion'; -import cleanUpFailedVersion from '../../versions/cleanUpFailedVersion'; import { hasWhereAccessResult } from '../../auth'; import { beforeChange } from '../../fields/hooks/beforeChange'; import { beforeValidate } from '../../fields/hooks/beforeValidate'; import { afterChange } from '../../fields/hooks/afterChange'; import { afterRead } from '../../fields/hooks/afterRead'; import { PayloadRequest } from '../../express/types'; +import { saveVersion } from '../../versions/saveVersion'; +import sanitizeInternalFields from '../../utilities/sanitizeInternalFields'; -type Args = { +type Args = { globalConfig: SanitizedGlobalConfig - slug: string + slug: string | number | symbol req: PayloadRequest depth?: number overrideAccess?: boolean showHiddenFields?: boolean draft?: boolean autosave?: boolean - data: Record + data: Omit } -async function update(args: Args): Promise { +async function update( + args: Args, +): Promise { const { globalConfig, slug, @@ -182,57 +182,20 @@ async function update(args: Args): Promise { skipValidation: shouldSaveDraft, }); - // ///////////////////////////////////// - // Create version from existing doc - // ///////////////////////////////////// - - let createdVersion; - - if (globalConfig.versions && !shouldSaveDraft) { - createdVersion = await saveGlobalVersion({ - payload, - config: globalConfig, - req, - docWithLocales: result, - }); - } - // ///////////////////////////////////// // Update // ///////////////////////////////////// - if (shouldSaveDraft) { - await ensurePublishedGlobalVersion({ - payload, - config: globalConfig, - req, - docWithLocales: result, - }); - - global = await saveGlobalDraft({ - payload, - config: globalConfig, - data: result, - autosave, - }); - } else { - try { - if (existingGlobal) { - global = await Model.findOneAndUpdate( - { globalType: slug }, - result, - { new: true }, - ); - } else { - result.globalType = slug; - global = await Model.create(result); - } - } catch (error) { - cleanUpFailedVersion({ - payload, - entityConfig: globalConfig, - version: createdVersion, - }); + if (!shouldSaveDraft) { + if (existingGlobal) { + global = await Model.findOneAndUpdate( + { globalType: slug }, + result, + { new: true }, + ); + } else { + result.globalType = slug; + global = await Model.create(result); } } @@ -240,6 +203,22 @@ async function update(args: Args): Promise { global = JSON.parse(global); global = sanitizeInternalFields(global); + // ///////////////////////////////////// + // Create version + // ///////////////////////////////////// + + if (globalConfig.versions) { + global = await saveVersion({ + payload, + global: globalConfig, + req, + docWithLocales: result, + autosave, + draft: shouldSaveDraft, + createdAt: global.createdAt, + }); + } + // ///////////////////////////////////// // afterRead - Fields // ///////////////////////////////////// diff --git a/src/graphql/initPlayground.ts b/src/graphql/initPlayground.ts index ea606812ab..57305f389e 100644 --- a/src/graphql/initPlayground.ts +++ b/src/graphql/initPlayground.ts @@ -1,5 +1,5 @@ import graphQLPlayground from 'graphql-playground-middleware-express'; -import { Payload } from '../index'; +import { Payload } from '../payload'; function initPlayground(ctx: Payload): void { if ((!ctx.config.graphQL.disable && !ctx.config.graphQL.disablePlaygroundInProduction && process.env.NODE_ENV === 'production') || process.env.NODE_ENV !== 'production') { diff --git a/src/graphql/registerSchema.ts b/src/graphql/registerSchema.ts index d70ff09333..233c32a7fa 100644 --- a/src/graphql/registerSchema.ts +++ b/src/graphql/registerSchema.ts @@ -2,7 +2,7 @@ import * as GraphQL from 'graphql'; import { GraphQLObjectType, GraphQLSchema } from 'graphql'; import queryComplexity, { fieldExtensionsEstimator, simpleEstimator } from 'graphql-query-complexity'; -import { Payload } from '..'; +import { Payload } from '../payload'; import buildLocaleInputType from './schema/buildLocaleInputType'; import buildFallbackLocaleInputType from './schema/buildFallbackLocaleInputType'; import initCollections from '../collections/graphql/init'; diff --git a/src/graphql/schema/buildBlockType.ts b/src/graphql/schema/buildBlockType.ts index 512f6d6074..52ae1d4af2 100644 --- a/src/graphql/schema/buildBlockType.ts +++ b/src/graphql/schema/buildBlockType.ts @@ -1,5 +1,5 @@ /* eslint-disable no-param-reassign */ -import { Payload } from '../..'; +import { Payload } from '../../payload'; import { Block } from '../../fields/config/types'; import buildObjectType from './buildObjectType'; import { toWords } from '../../utilities/formatLabels'; diff --git a/src/graphql/schema/buildMutationInputType.ts b/src/graphql/schema/buildMutationInputType.ts index 5e07a2396c..3e0cab49ba 100644 --- a/src/graphql/schema/buildMutationInputType.ts +++ b/src/graphql/schema/buildMutationInputType.ts @@ -18,7 +18,7 @@ import formatName from '../utilities/formatName'; import combineParentName from '../utilities/combineParentName'; import { ArrayField, CodeField, JSONField, DateField, EmailField, Field, fieldAffectsData, GroupField, NumberField, PointField, RadioField, RelationshipField, RichTextField, RowField, SelectField, TextareaField, TextField, UploadField, CollapsibleField, TabsField, CheckboxField, BlockField, tabHasName } from '../../fields/config/types'; import { toWords } from '../../utilities/formatLabels'; -import { Payload } from '../../index'; +import { Payload } from '../../payload'; import { SanitizedCollectionConfig } from '../../collections/config/types'; import { groupOrTabHasRequiredSubfield } from '../../utilities/groupOrTabHasRequiredSubfield'; diff --git a/src/graphql/schema/buildObjectType.ts b/src/graphql/schema/buildObjectType.ts index f7addc253c..805701be25 100644 --- a/src/graphql/schema/buildObjectType.ts +++ b/src/graphql/schema/buildObjectType.ts @@ -46,7 +46,7 @@ import withNullableType from './withNullableType'; import { toWords } from '../../utilities/formatLabels'; import createRichTextRelationshipPromise from '../../fields/richText/richTextRelationshipPromise'; import formatOptions from '../utilities/formatOptions'; -import { Payload } from '../..'; +import { Payload } from '../../payload'; import buildWhereInputType from './buildWhereInputType'; import buildBlockType from './buildBlockType'; import isFieldNullable from './isFieldNullable'; diff --git a/src/graphql/schema/buildPoliciesType.ts b/src/graphql/schema/buildPoliciesType.ts index 6d4e576e54..e84ebe8cbd 100644 --- a/src/graphql/schema/buildPoliciesType.ts +++ b/src/graphql/schema/buildPoliciesType.ts @@ -5,7 +5,7 @@ import formatName from '../utilities/formatName'; import { CollectionConfig, SanitizedCollectionConfig } from '../../collections/config/types'; import { GlobalConfig, SanitizedGlobalConfig } from '../../globals/config/types'; import { Field } from '../../fields/config/types'; -import { Payload } from '../..'; +import { Payload } from '../../payload'; import { toWords } from '../../utilities/formatLabels'; type OperationType = 'create' | 'read' | 'update' | 'delete' | 'unlock' | 'readVersions'; diff --git a/src/index.ts b/src/index.ts index 319a5e9fc5..74d240f5dc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,280 +1,23 @@ -import { Express, Router } from 'express'; -import pino from 'pino'; -import { GraphQLError, GraphQLFormattedError, GraphQLSchema } from 'graphql'; +import { Config as GeneratedTypes } from 'payload/generated-types'; import { - TypeWithID, - Collection, - CollectionModel, -} from './collections/config/types'; -import { - SanitizedConfig, - EmailOptions, InitOptions, } from './config/types'; -import { TypeWithVersion } from './versions/types'; -import { PaginatedDocs } from './mongoose/types'; +import { initHTTP } from './initHTTP'; +import { Payload, BasePayload } from './payload'; -import { PayloadAuthenticate } from './express/middleware/authenticate'; -import { Globals, TypeWithID as GlobalTypeWithID } from './globals/config/types'; -import { ErrorHandler } from './express/middleware/errorHandler'; -import localOperations from './collections/operations/local'; -import localGlobalOperations from './globals/operations/local'; -import { encrypt, decrypt } from './auth/crypto'; -import { BuildEmailResult, Message } from './email/types'; -import { Preferences } from './preferences/types'; - -import { Options as CreateOptions } from './collections/operations/local/create'; -import { Options as FindOptions } from './collections/operations/local/find'; -import { Options as FindByIDOptions } from './collections/operations/local/findByID'; -import { Options as UpdateOptions } from './collections/operations/local/update'; -import { Options as DeleteOptions } from './collections/operations/local/delete'; -import { Options as FindVersionsOptions } from './collections/operations/local/findVersions'; -import { Options as FindVersionByIDOptions } from './collections/operations/local/findVersionByID'; -import { Options as RestoreVersionOptions } from './collections/operations/local/restoreVersion'; -import { Options as FindGlobalVersionsOptions } from './globals/operations/local/findVersions'; -import { Options as FindGlobalVersionByIDOptions } from './globals/operations/local/findVersionByID'; -import { Options as RestoreGlobalVersionOptions } from './globals/operations/local/restoreVersion'; -import { Options as ForgotPasswordOptions } from './auth/operations/local/forgotPassword'; -import { Options as LoginOptions } from './auth/operations/local/login'; -import { Options as ResetPasswordOptions } from './auth/operations/local/resetPassword'; -import { Options as UnlockOptions } from './auth/operations/local/unlock'; -import { Options as VerifyEmailOptions } from './auth/operations/local/verifyEmail'; -import { Result as ForgotPasswordResult } from './auth/operations/forgotPassword'; -import { Result as ResetPasswordResult } from './auth/operations/resetPassword'; -import { Result as LoginResult } from './auth/operations/login'; -import { Options as FindGlobalOptions } from './globals/operations/local/findOne'; -import { Options as UpdateGlobalOptions } from './globals/operations/local/update'; -import { initSync, initAsync } from './init'; +export { getPayload } from './payload'; require('isomorphic-fetch'); -/** - * @description Payload - */ -export class Payload { - config: SanitizedConfig; - - collections: { - [slug: string]: Collection; - } = {} - - versions: { - [slug: string]: CollectionModel; - } = {} - - preferences: Preferences; - - globals: Globals; - - logger: pino.Logger; - - express: Express - - router: Router; - - emailOptions: EmailOptions; - - email: BuildEmailResult; - - sendEmail: (message: Message) => Promise; - - secret: string; - - mongoURL: string | false; - - mongoMemoryServer: any - - local: boolean; - - encrypt = encrypt; - - decrypt = decrypt; - - errorHandler: ErrorHandler; - - authenticate: PayloadAuthenticate; - - types: { - blockTypes: any; - blockInputTypes: any; - localeInputType?: any; - fallbackLocaleInputType?: any; - }; - - Query: { name: string; fields: { [key: string]: any } } = { name: 'Query', fields: {} }; - - Mutation: { name: string; fields: { [key: string]: any } } = { name: 'Mutation', fields: {} }; - - schema: GraphQLSchema; - - extensions: (info: any) => Promise; - - customFormatErrorFn: (error: GraphQLError) => GraphQLFormattedError; - - validationRules: any; - - errorResponses: GraphQLFormattedError[] = []; - - errorIndex: number; - - /** - * @description Initializes Payload - * @param options - */ - init(options: InitOptions): void { - initSync(this, options); - } - - async initAsync(options: InitOptions): Promise { - await initAsync(this, options); - } - - getAdminURL = (): string => `${this.config.serverURL}${this.config.routes.admin}`; - - getAPIURL = (): string => `${this.config.serverURL}${this.config.routes.api}`; - - /** - * @description Performs create operation - * @param options - * @returns created document - */ - create = async (options: CreateOptions): Promise => { - const { create } = localOperations; - return create(this, options); - } - - /** - * @description Find documents with criteria - * @param options - * @returns documents satisfying query - */ - find = async (options: FindOptions): Promise> => { - const { find } = localOperations; - return find(this, options); - } - - findGlobal = async (options: FindGlobalOptions): Promise => { - const { findOne } = localGlobalOperations; - return findOne(this, options); - } - - updateGlobal = async (options: UpdateGlobalOptions): Promise => { - const { update } = localGlobalOperations; - return update(this, options); - } - - /** - * @description Find global versions with criteria - * @param options - * @returns versions satisfying query - */ - findGlobalVersions = async = any>(options: FindGlobalVersionsOptions): Promise> => { - const { findVersions } = localGlobalOperations; - return findVersions(this, options); - } - - /** - * @description Find global version by ID - * @param options - * @returns global version with specified ID - */ - findGlobalVersionByID = async = any>(options: FindGlobalVersionByIDOptions): Promise => { - const { findVersionByID } = localGlobalOperations; - return findVersionByID(this, options); - } - - /** - * @description Restore global version by ID - * @param options - * @returns version with specified ID - */ - restoreGlobalVersion = async = any>(options: RestoreGlobalVersionOptions): Promise => { - const { restoreVersion } = localGlobalOperations; - return restoreVersion(this, options); - } - - /** - * @description Find document by ID - * @param options - * @returns document with specified ID - */ - findByID = async (options: FindByIDOptions): Promise => { - const { findByID } = localOperations; - return findByID(this, options); - } - - /** - * @description Update document - * @param options - * @returns Updated document - */ - update = async (options: UpdateOptions): Promise => { - const { update } = localOperations; - return update(this, options); - } - - delete = async (options: DeleteOptions): Promise => { - const { localDelete } = localOperations; - return localDelete(this, options); - } - - /** - * @description Find versions with criteria - * @param options - * @returns versions satisfying query - */ - findVersions = async = any>(options: FindVersionsOptions): Promise> => { - const { findVersions } = localOperations; - return findVersions(this, options); - } - - /** - * @description Find version by ID - * @param options - * @returns version with specified ID - */ - findVersionByID = async = any>(options: FindVersionByIDOptions): Promise => { - const { findVersionByID } = localOperations; - return findVersionByID(this, options); - } - - /** - * @description Restore version by ID - * @param options - * @returns version with specified ID - */ - restoreVersion = async = any>(options: RestoreVersionOptions): Promise => { - const { restoreVersion } = localOperations; - return restoreVersion(this, options); - } - - login = async (options: LoginOptions): Promise => { - const { login } = localOperations.auth; - return login(this, options); - } - - forgotPassword = async (options: ForgotPasswordOptions): Promise => { - const { forgotPassword } = localOperations.auth; - return forgotPassword(this, options); - } - - resetPassword = async (options: ResetPasswordOptions): Promise => { - const { resetPassword } = localOperations.auth; - return resetPassword(this, options); - } - - unlock = async (options: UnlockOptions): Promise => { - const { unlock } = localOperations.auth; - return unlock(this, options); - } - - verifyEmail = async (options: VerifyEmailOptions): Promise => { - const { verifyEmail } = localOperations.auth; - return verifyEmail(this, options); +export class PayloadHTTP extends BasePayload { + async init(options: InitOptions): Promise { + const payload = await initHTTP(options); + Object.assign(this, payload); + return payload; } } -const payload = new Payload(); +const payload = new PayloadHTTP(); export default payload; module.exports = payload; diff --git a/src/init.ts b/src/init.ts deleted file mode 100644 index fb1f2e61e5..0000000000 --- a/src/init.ts +++ /dev/null @@ -1,178 +0,0 @@ -/* eslint-disable no-param-reassign */ -import express, { NextFunction, Response } from 'express'; -import crypto from 'crypto'; -import path from 'path'; -import mongoose from 'mongoose'; -import { InitOptions } from './config/types'; - -import authenticate from './express/middleware/authenticate'; -import connectMongoose from './mongoose/connect'; -import expressMiddleware from './express/middleware'; -import initAdmin from './express/admin'; -import initAuth from './auth/init'; -import access from './auth/requestHandlers/access'; -import initCollections from './collections/init'; -import initPreferences from './preferences/init'; -import initGlobals from './globals/init'; -import initGraphQLPlayground from './graphql/initPlayground'; -import initStatic from './express/static'; -import registerSchema from './graphql/registerSchema'; -import graphQLHandler from './graphql/graphQLHandler'; -import buildEmail from './email/build'; -import identifyAPI from './express/middleware/identifyAPI'; -import errorHandler from './express/middleware/errorHandler'; -import { PayloadRequest } from './express/types'; -import sendEmail from './email/sendEmail'; - -import { serverInit as serverInitTelemetry } from './utilities/telemetry/events/serverInit'; -import { Payload } from '.'; -import loadConfig from './config/load'; -import Logger from './utilities/logger'; -import { getDataLoader } from './collections/dataloader'; -import mountEndpoints from './express/mountEndpoints'; -import PreferencesModel from './preferences/model'; -import findConfig from './config/find'; - -export const init = (payload: Payload, options: InitOptions): void => { - payload.logger.info('Starting Payload...'); - if (!options.secret) { - throw new Error( - 'Error: missing secret key. A secret key is needed to secure Payload.', - ); - } - - if (options.mongoURL !== false && typeof options.mongoURL !== 'string') { - throw new Error('Error: missing MongoDB connection URL.'); - } - - payload.emailOptions = { ...(options.email) }; - payload.secret = crypto - .createHash('sha256') - .update(options.secret) - .digest('hex') - .slice(0, 32); - - payload.local = options.local; - - if (options.config) { - payload.config = options.config; - const configPath = findConfig(); - - payload.config = { - ...options.config, - paths: { - configDir: path.dirname(configPath), - config: configPath, - rawConfig: configPath, - }, - }; - } else { - payload.config = loadConfig(payload.logger); - } - - // If not initializing locally, scaffold router - if (!payload.local) { - payload.router = express.Router(); - payload.router.use(...expressMiddleware(payload)); - initAuth(payload); - } - - // Configure email service - payload.email = buildEmail(payload.emailOptions, payload.logger); - payload.sendEmail = sendEmail.bind(payload); - - // Initialize collections & globals - initCollections(payload); - initGlobals(payload); - - if (!payload.config.graphQL.disable) { - registerSchema(payload); - } - - payload.preferences = { Model: PreferencesModel }; - - // If not initializing locally, set up HTTP routing - if (!payload.local) { - options.express.use((req: PayloadRequest, res, next) => { - req.payload = payload; - next(); - }); - - options.express.use((req: PayloadRequest, res: Response, next: NextFunction): void => { - req.payloadDataLoader = getDataLoader(req); - return next(); - }); - - payload.express = options.express; - - if (payload.config.rateLimit.trustProxy) { - payload.express.set('trust proxy', 1); - } - - initAdmin(payload); - initPreferences(payload); - - payload.router.get('/access', access); - - if (!payload.config.graphQL.disable) { - payload.router.use( - payload.config.routes.graphQL, - (req, res, next): void => { - if (req.method === 'OPTIONS') { - res.sendStatus(204); - } else { - next(); - } - }, - identifyAPI('GraphQL'), - (req: PayloadRequest, res: Response) => graphQLHandler(req, res)(req, res), - ); - initGraphQLPlayground(payload); - } - - mountEndpoints(options.express, payload.router, payload.config.endpoints); - - // Bind router to API - payload.express.use(payload.config.routes.api, payload.router); - - // Enable static routes for all collections permitting upload - initStatic(payload); - - payload.errorHandler = errorHandler(payload.config, payload.logger); - payload.router.use(payload.errorHandler); - - payload.authenticate = authenticate(payload.config); - } - - serverInitTelemetry(payload); -}; - -export const initAsync = async (payload: Payload, options: InitOptions): Promise => { - payload.logger = Logger('payload', options.loggerOptions); - payload.mongoURL = options.mongoURL; - - if (payload.mongoURL) { - mongoose.set('strictQuery', false); - payload.mongoMemoryServer = await connectMongoose(payload.mongoURL, options.mongoOptions, payload.logger); - } - - init(payload, options); - - if (typeof options.onInit === 'function') await options.onInit(payload); - if (typeof payload.config.onInit === 'function') await payload.config.onInit(payload); -}; - -export const initSync = (payload: Payload, options: InitOptions): void => { - payload.logger = Logger('payload', options.loggerOptions); - payload.mongoURL = options.mongoURL; - - if (payload.mongoURL) { - mongoose.set('strictQuery', false); - connectMongoose(payload.mongoURL, options.mongoOptions, payload.logger); - } - - init(payload, options); - - if (typeof options.onInit === 'function') options.onInit(payload); - if (typeof payload.config.onInit === 'function') payload.config.onInit(payload); -}; diff --git a/src/initHTTP.ts b/src/initHTTP.ts new file mode 100644 index 0000000000..9a8ca3e2ad --- /dev/null +++ b/src/initHTTP.ts @@ -0,0 +1,87 @@ +/* eslint-disable no-param-reassign */ +import express, { NextFunction, Response } from 'express'; +import { Config as GeneratedTypes } from 'payload/generated-types'; +import { InitOptions } from './config/types'; + +import authenticate from './express/middleware/authenticate'; +import expressMiddleware from './express/middleware'; +import initAdmin from './express/admin'; +import initAuth from './auth/init'; +import access from './auth/requestHandlers/access'; +import initCollectionsHTTP from './collections/initHTTP'; +import initPreferences from './preferences/init'; +import initGlobalsHTTP from './globals/initHTTP'; +import initGraphQLPlayground from './graphql/initPlayground'; +import initStatic from './express/static'; +import graphQLHandler from './graphql/graphQLHandler'; +import identifyAPI from './express/middleware/identifyAPI'; +import errorHandler from './express/middleware/errorHandler'; +import { PayloadRequest } from './express/types'; +import { getDataLoader } from './collections/dataloader'; +import mountEndpoints from './express/mountEndpoints'; +import { Payload, getPayload } from './payload'; + +export const initHTTP = async (options: InitOptions): Promise => { + const payload = await getPayload(options); + + if (!options.local) { + payload.router = express.Router(); + payload.router.use(...expressMiddleware(payload)); + initAuth(payload); + + initCollectionsHTTP(payload); + initGlobalsHTTP(payload); + + options.express.use((req: PayloadRequest, res, next) => { + req.payload = payload; + next(); + }); + + options.express.use((req: PayloadRequest, res: Response, next: NextFunction): void => { + req.payloadDataLoader = getDataLoader(req); + return next(); + }); + + payload.express = options.express; + + if (payload.config.rateLimit.trustProxy) { + payload.express.set('trust proxy', 1); + } + + initAdmin(payload); + initPreferences(payload); + + payload.router.get('/access', access); + + if (!payload.config.graphQL.disable) { + payload.router.use( + payload.config.routes.graphQL, + (req, res, next): void => { + if (req.method === 'OPTIONS') { + res.sendStatus(204); + } else { + next(); + } + }, + identifyAPI('GraphQL'), + (req: PayloadRequest, res: Response) => graphQLHandler(req, res)(req, res), + ); + initGraphQLPlayground(payload); + } + + mountEndpoints(options.express, payload.router, payload.config.endpoints); + + // Bind router to API + payload.express.use(payload.config.routes.api, payload.router); + + // Enable static routes for all collections permitting upload + initStatic(payload); + + payload.errorHandler = errorHandler(payload.config, payload.logger); + payload.router.use(payload.errorHandler); + + payload.authenticate = authenticate(payload.config); + } + + return payload; +}; diff --git a/src/payload.ts b/src/payload.ts new file mode 100644 index 0000000000..022eb83052 --- /dev/null +++ b/src/payload.ts @@ -0,0 +1,412 @@ +import pino from 'pino'; +import type { Express, Router } from 'express'; +import { GraphQLError, GraphQLFormattedError, GraphQLSchema } from 'graphql'; +import crypto from 'crypto'; +import path from 'path'; +import mongoose from 'mongoose'; +import { Config as GeneratedTypes } from 'payload/generated-types'; +import { + Collection, + CollectionModel, +} from './collections/config/types'; +import { + SanitizedConfig, + EmailOptions, + InitOptions, +} from './config/types'; +import { TypeWithVersion } from './versions/types'; +import { PaginatedDocs } from './mongoose/types'; + +import { PayloadAuthenticate } from './express/middleware/authenticate'; +import { Globals } from './globals/config/types'; +import { ErrorHandler } from './express/middleware/errorHandler'; +import localOperations from './collections/operations/local'; +import localGlobalOperations from './globals/operations/local'; +import { encrypt, decrypt } from './auth/crypto'; +import { BuildEmailResult, Message } from './email/types'; +import { Preferences } from './preferences/types'; + +import { Options as CreateOptions } from './collections/operations/local/create'; +import { Options as FindOptions } from './collections/operations/local/find'; +import { Options as FindByIDOptions } from './collections/operations/local/findByID'; +import { Options as UpdateOptions } from './collections/operations/local/update'; +import { Options as DeleteOptions } from './collections/operations/local/delete'; +import { Options as FindVersionsOptions } from './collections/operations/local/findVersions'; +import { Options as FindVersionByIDOptions } from './collections/operations/local/findVersionByID'; +import { Options as RestoreVersionOptions } from './collections/operations/local/restoreVersion'; +import { Options as FindGlobalVersionsOptions } from './globals/operations/local/findVersions'; +import { Options as FindGlobalVersionByIDOptions } from './globals/operations/local/findVersionByID'; +import { Options as RestoreGlobalVersionOptions } from './globals/operations/local/restoreVersion'; +import { Options as ForgotPasswordOptions } from './auth/operations/local/forgotPassword'; +import { Options as LoginOptions } from './auth/operations/local/login'; +import { Options as ResetPasswordOptions } from './auth/operations/local/resetPassword'; +import { Options as UnlockOptions } from './auth/operations/local/unlock'; +import { Options as VerifyEmailOptions } from './auth/operations/local/verifyEmail'; +import { Result as ForgotPasswordResult } from './auth/operations/forgotPassword'; +import { Result as ResetPasswordResult } from './auth/operations/resetPassword'; +import { Result as LoginResult } from './auth/operations/login'; +import { Options as FindGlobalOptions } from './globals/operations/local/findOne'; +import { Options as UpdateGlobalOptions } from './globals/operations/local/update'; + +import connectMongoose from './mongoose/connect'; +import initCollections from './collections/initLocal'; +import initGlobals from './globals/initLocal'; +import registerSchema from './graphql/registerSchema'; +import buildEmail from './email/build'; +import sendEmail from './email/sendEmail'; + +import { serverInit as serverInitTelemetry } from './utilities/telemetry/events/serverInit'; +import loadConfig from './config/load'; +import Logger from './utilities/logger'; +import PreferencesModel from './preferences/model'; +import findConfig from './config/find'; + +/** + * @description Payload + */ +export class BasePayload { + config: SanitizedConfig; + + collections: { + [slug: string | number | symbol]: Collection; + } = {} + + versions: { + [slug: string]: CollectionModel; + } = {} + + preferences: Preferences; + + globals: Globals; + + logger: pino.Logger; + + emailOptions: EmailOptions; + + email: BuildEmailResult; + + sendEmail: (message: Message) => Promise; + + secret: string; + + mongoURL: string | false; + + mongoMemoryServer: any + + local: boolean; + + encrypt = encrypt; + + decrypt = decrypt; + + errorHandler: ErrorHandler; + + authenticate: PayloadAuthenticate; + + express?: Express + + router?: Router + + types: { + blockTypes: any; + blockInputTypes: any; + localeInputType?: any; + fallbackLocaleInputType?: any; + }; + + Query: { name: string; fields: { [key: string]: any } } = { name: 'Query', fields: {} }; + + Mutation: { name: string; fields: { [key: string]: any } } = { name: 'Mutation', fields: {} }; + + schema: GraphQLSchema; + + extensions: (info: any) => Promise; + + customFormatErrorFn: (error: GraphQLError) => GraphQLFormattedError; + + validationRules: any; + + errorResponses: GraphQLFormattedError[] = []; + + errorIndex: number; + + getAdminURL = (): string => `${this.config.serverURL}${this.config.routes.admin}`; + + getAPIURL = (): string => `${this.config.serverURL}${this.config.routes.api}`; + + /** + * @description Initializes Payload + * @param options + */ + async init(options: InitOptions): Promise { + this.logger = Logger('payload', options.loggerOptions); + this.mongoURL = options.mongoURL; + + if (this.mongoURL) { + mongoose.set('strictQuery', false); + this.mongoMemoryServer = await connectMongoose(this.mongoURL, options.mongoOptions, this.logger); + } + + this.logger.info('Starting Payload...'); + if (!options.secret) { + throw new Error( + 'Error: missing secret key. A secret key is needed to secure Payload.', + ); + } + + if (options.mongoURL !== false && typeof options.mongoURL !== 'string') { + throw new Error('Error: missing MongoDB connection URL.'); + } + + this.emailOptions = { ...(options.email) }; + this.secret = crypto + .createHash('sha256') + .update(options.secret) + .digest('hex') + .slice(0, 32); + + this.local = options.local; + + if (options.config) { + this.config = options.config; + const configPath = findConfig(); + + this.config = { + ...options.config, + paths: { + configDir: path.dirname(configPath), + config: configPath, + rawConfig: configPath, + }, + }; + } else { + this.config = loadConfig(this.logger); + } + + // Configure email service + this.email = buildEmail(this.emailOptions, this.logger); + this.sendEmail = sendEmail.bind(this); + + // Initialize collections & globals + initCollections(this); + initGlobals(this); + + if (!this.config.graphQL.disable) { + registerSchema(this); + } + + this.preferences = { Model: PreferencesModel }; + + serverInitTelemetry(this); + + if (typeof options.onInit === 'function') await options.onInit(this); + if (typeof this.config.onInit === 'function') await this.config.onInit(this); + + return this; + } + + /** + * @description Performs create operation + * @param options + * @returns created document + */ + create = async ( + options: CreateOptions, + ): Promise => { + const { create } = localOperations; + return create(this, options); + } + + /** + * @description Find documents with criteria + * @param options + * @returns documents satisfying query + */ + find = async ( + options: FindOptions, + ): Promise> => { + const { find } = localOperations; + return find(this, options); + } + + /** + * @description Find document by ID + * @param options + * @returns document with specified ID + */ + + findByID = async ( + options: FindByIDOptions, + ): Promise => { + const { findByID } = localOperations; + return findByID(this, options); + } + + /** + * @description Update document + * @param options + * @returns Updated document + */ + update = async ( + options: UpdateOptions, + ): Promise => { + const { update } = localOperations; + return update(this, options); + } + + delete = async ( + options: DeleteOptions, + ): Promise => { + const { localDelete } = localOperations; + return localDelete(this, options); + } + + /** + * @description Find versions with criteria + * @param options + * @returns versions satisfying query + */ + findVersions = async ( + options: FindVersionsOptions, + ): Promise>> => { + const { findVersions } = localOperations; + return findVersions(this, options); + } + + /** + * @description Find version by ID + * @param options + * @returns version with specified ID + */ + findVersionByID = async ( + options: FindVersionByIDOptions, + ): Promise> => { + const { findVersionByID } = localOperations; + return findVersionByID(this, options); + } + + /** + * @description Restore version by ID + * @param options + * @returns version with specified ID + */ + restoreVersion = async ( + options: RestoreVersionOptions, + ): Promise => { + const { restoreVersion } = localOperations; + return restoreVersion(this, options); + } + + login = async ( + options: LoginOptions, + ): Promise => { + const { login } = localOperations.auth; + return login(this, options); + } + + forgotPassword = async ( + options: ForgotPasswordOptions, + ): Promise => { + const { forgotPassword } = localOperations.auth; + return forgotPassword(this, options); + } + + resetPassword = async ( + options: ResetPasswordOptions, + ): Promise => { + const { resetPassword } = localOperations.auth; + return resetPassword(this, options); + } + + unlock = async ( + options: UnlockOptions, + ): Promise => { + const { unlock } = localOperations.auth; + return unlock(this, options); + } + + verifyEmail = async ( + options: VerifyEmailOptions, + ): Promise => { + const { verifyEmail } = localOperations.auth; + return verifyEmail(this, options); + } + + findGlobal = async ( + options: FindGlobalOptions, + ): Promise => { + const { findOne } = localGlobalOperations; + return findOne(this, options); + } + + updateGlobal = async ( + options: UpdateGlobalOptions, + ): Promise => { + const { update } = localGlobalOperations; + return update(this, options); + } + + /** + * @description Find global versions with criteria + * @param options + * @returns versions satisfying query + */ + findGlobalVersions = async ( + options: FindGlobalVersionsOptions, + ): Promise>> => { + const { findVersions } = localGlobalOperations; + return findVersions(this, options); + } + + /** + * @description Find global version by ID + * @param options + * @returns global version with specified ID + */ + findGlobalVersionByID = async ( + options: FindGlobalVersionByIDOptions, + ): Promise> => { + const { findVersionByID } = localGlobalOperations; + return findVersionByID(this, options); + } + + /** + * @description Restore global version by ID + * @param options + * @returns version with specified ID + */ + restoreGlobalVersion = async ( + options: RestoreGlobalVersionOptions, + ): Promise => { + const { restoreVersion } = localGlobalOperations; + return restoreVersion(this, options); + } +} + +export type Payload = BasePayload + +let cached = global._payload; + +if (!cached) { + // eslint-disable-next-line no-multi-assign + cached = global._payload = { payload: null, promise: null }; +} + +export const getPayload = async (options: InitOptions): Promise => { + if (cached.payload) { + return cached.payload; + } + + if (!cached.promise) { + cached.promise = new BasePayload().init(options); + } + + try { + cached.payload = await cached.promise; + } catch (e) { + cached.promise = null; + throw e; + } + + return cached.payload; +}; diff --git a/src/preferences/graphql/init.ts b/src/preferences/graphql/init.ts index eb7bcaa95e..071e553980 100644 --- a/src/preferences/graphql/init.ts +++ b/src/preferences/graphql/init.ts @@ -9,7 +9,7 @@ import { DateTimeResolver } from 'graphql-scalars'; import findOne from '../operations/findOne'; import update from '../operations/update'; import deleteOperation from '../operations/delete'; -import { Payload } from '../..'; +import { Payload } from '../../payload'; function initCollectionsGraphQL(payload: Payload): void { const valueType = GraphQLJSON; diff --git a/src/preferences/init.ts b/src/preferences/init.ts index 383b989ab2..022390fc1d 100644 --- a/src/preferences/init.ts +++ b/src/preferences/init.ts @@ -1,9 +1,8 @@ import express from 'express'; - -import { Payload } from '../index'; import findOne from './requestHandlers/findOne'; import update from './requestHandlers/update'; import deleteHandler from './requestHandlers/delete'; +import { Payload } from '../payload'; export default function initPreferences(ctx: Payload): void { if (!ctx.local) { diff --git a/src/translations/nl.json b/src/translations/nl.json index 658b5e1ea6..1354308057 100644 --- a/src/translations/nl.json +++ b/src/translations/nl.json @@ -93,7 +93,7 @@ "block": "blok", "blocks": "blokken", "addLabel": "Voeg {{label}} toe", - "addLink": "Voeg een link tsoe", + "addLink": "Voeg een link toe", "addNew": "Nieuw(e)", "addNewLabel": "Nieuw(e) {{label}} toevoegen", "addRelationship": "Nieuwe Relatie", @@ -112,7 +112,7 @@ "passwordsDoNotMatch": "Wachtwoorden komen niet overeen.", "relatedDocument": "Gerelateerd document", "relationTo": "Relatie tot", - "removeRelationship": "Relatie Vserwijderen", + "removeRelationship": "Relatie Verwijderen", "removeUpload": "Verwijder Upload", "saveChanges": "Bewaar aanpassingen", "searchForBlock": "Zoeken naar een blok", diff --git a/src/uploads/generateFileData.ts b/src/uploads/generateFileData.ts index e76e9b6acd..ed5a03e948 100644 --- a/src/uploads/generateFileData.ts +++ b/src/uploads/generateFileData.ts @@ -14,21 +14,21 @@ import { FileData, FileToSave } from './types'; import canResizeImage from './canResizeImage'; import isImage from './isImage'; -type Args = { +type Args = { config: SanitizedConfig, collection: Collection throwOnMissingFile?: boolean req: PayloadRequest - data: Record + data: T overwriteExistingFiles?: boolean } -type Result = Promise<{ - data: Record +type Result = Promise<{ + data: T files: FileToSave[] }> -export const generateFileData = async ({ +export const generateFileData = async ({ config, collection: { config: collectionConfig, @@ -38,7 +38,7 @@ export const generateFileData = async ({ data, throwOnMissingFile, overwriteExistingFiles, -}: Args): Result => { +}: Args): Result => { let newData = data; const filesToSave: FileToSave[] = []; diff --git a/src/uploads/uploadFiles.ts b/src/uploads/uploadFiles.ts index a72f579fbb..0205b0e9bd 100644 --- a/src/uploads/uploadFiles.ts +++ b/src/uploads/uploadFiles.ts @@ -2,7 +2,7 @@ import type { TFunction } from 'i18next'; import { FileUploadError } from '../errors'; import saveBufferToFile from './saveBufferToFile'; import { FileToSave } from './types'; -import { Payload } from '..'; +import { Payload } from '../payload'; export const uploadFiles = async (payload: Payload, files: FileToSave[], t: TFunction): Promise => { try { diff --git a/src/utilities/logger.ts b/src/utilities/logger.ts index 79bb970863..5b416120ff 100644 --- a/src/utilities/logger.ts +++ b/src/utilities/logger.ts @@ -3,10 +3,14 @@ import memoize from 'micro-memoize'; export type PayloadLogger = pino.Logger; -const defaultLoggerOptions = { - prettyPrint: { - ignore: 'pid,hostname', - translateTime: 'HH:MM:ss', +const defaultLoggerOptions: pino.LoggerOptions = { + transport: { + target: 'pino-pretty', + options: { + colorize: true, + ignore: 'pid,hostname', + translateTime: 'HH:MM:ss', + }, }, }; diff --git a/src/utilities/sanitizeInternalFields.ts b/src/utilities/sanitizeInternalFields.ts index 451337c927..ca57c1479f 100644 --- a/src/utilities/sanitizeInternalFields.ts +++ b/src/utilities/sanitizeInternalFields.ts @@ -1,8 +1,6 @@ -import { TypeWithID } from '../collections/config/types'; - const internalFields = ['__v', 'salt', 'hash']; -const sanitizeInternalFields = (incomingDoc): T => Object.entries(incomingDoc).reduce((newDoc, [key, val]): T => { +const sanitizeInternalFields = >(incomingDoc: T): T => Object.entries(incomingDoc).reduce((newDoc, [key, val]): T => { if (key === '_id') { return { ...newDoc, diff --git a/src/utilities/telemetry/events/serverInit.ts b/src/utilities/telemetry/events/serverInit.ts index 0109491221..ca86c06039 100644 --- a/src/utilities/telemetry/events/serverInit.ts +++ b/src/utilities/telemetry/events/serverInit.ts @@ -1,5 +1,5 @@ import { sendEvent } from '..'; -import { Payload } from '../../..'; +import { Payload } from '../../../payload'; export type ServerInitEvent = { type: 'server-init' diff --git a/src/utilities/telemetry/index.ts b/src/utilities/telemetry/index.ts index 533044f2db..3642cb3b0d 100644 --- a/src/utilities/telemetry/index.ts +++ b/src/utilities/telemetry/index.ts @@ -3,7 +3,7 @@ import Conf from 'conf'; import { randomBytes } from 'crypto'; import findUp from 'find-up'; import fs from 'fs'; -import { Payload } from '../../index'; +import { Payload } from '../../payload'; import { ServerInitEvent } from './events/serverInit'; import { AdminInitEvent } from './events/adminInit'; import { oneWayHash } from './oneWayHash'; @@ -28,7 +28,7 @@ type Args = { event: TelemetryEvent } -export const sendEvent = async ({ payload, event } : Args): Promise => { +export const sendEvent = async ({ payload, event }: Args): Promise => { if (payload.config.telemetry !== false) { try { const packageJSON = await getPackageJSON(); @@ -49,7 +49,7 @@ export const sendEvent = async ({ payload, event } : Args): Promise => { body: JSON.stringify({ ...baseEvent, ...event }), }); } catch (_) { - // Eat any errors in sending telemetry event + // Eat any errors in sending telemetry event } } }; diff --git a/src/versions/buildCollectionFields.ts b/src/versions/buildCollectionFields.ts index ff6b552758..69395e23e1 100644 --- a/src/versions/buildCollectionFields.ts +++ b/src/versions/buildCollectionFields.ts @@ -14,6 +14,20 @@ export const buildVersionCollectionFields = (collection: SanitizedCollectionConf type: 'group', fields: collection.fields, }, + { + name: 'createdAt', + type: 'date', + admin: { + disabled: true, + }, + }, + { + name: 'updatedAt', + type: 'date', + admin: { + disabled: true, + }, + }, ]; if (collection?.versions?.drafts && collection?.versions?.drafts?.autosave) { diff --git a/src/versions/buildGlobalFields.ts b/src/versions/buildGlobalFields.ts index 23102fec93..8afb8723c4 100644 --- a/src/versions/buildGlobalFields.ts +++ b/src/versions/buildGlobalFields.ts @@ -8,6 +8,20 @@ export const buildVersionGlobalFields = (global: SanitizedGlobalConfig): Field[] type: 'group', fields: global.fields, }, + { + name: 'createdAt', + type: 'date', + admin: { + disabled: true, + }, + }, + { + name: 'updatedAt', + type: 'date', + admin: { + disabled: true, + }, + }, ]; if (global?.versions?.drafts && global?.versions?.drafts?.autosave) { diff --git a/src/versions/cleanUpFailedVersion.ts b/src/versions/cleanUpFailedVersion.ts deleted file mode 100644 index 6767c02fa9..0000000000 --- a/src/versions/cleanUpFailedVersion.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Payload } from '..'; -import { SanitizedCollectionConfig } from '../collections/config/types'; -import { SanitizedGlobalConfig } from '../globals/config/types'; -import { TypeWithVersion } from './types'; - -type Args = { - payload: Payload, - entityConfig: SanitizedCollectionConfig | SanitizedGlobalConfig, - version: TypeWithVersion -} - -const cleanUpFailedVersion = (args: Args) => { - const { payload, entityConfig, version } = args; - - if (version) { - const VersionModel = payload.versions[entityConfig.slug]; - VersionModel.findOneAndDelete({ _id: version.id }); - } -}; - -export default cleanUpFailedVersion; diff --git a/src/versions/defaults.ts b/src/versions/defaults.ts index 3d8be612a6..826c0f0347 100644 --- a/src/versions/defaults.ts +++ b/src/versions/defaults.ts @@ -6,7 +6,7 @@ export const versionCollectionDefaults: IncomingCollectionVersions = { interval: 2000, // in milliseconds }, }, - retainDeleted: true, + retainDeleted: false, }; export const versionGlobalDefaults: IncomingGlobalVersions = { diff --git a/src/versions/deleteCollectionVersions.ts b/src/versions/deleteCollectionVersions.ts new file mode 100644 index 0000000000..3802fd6807 --- /dev/null +++ b/src/versions/deleteCollectionVersions.ts @@ -0,0 +1,25 @@ +import { Payload } from '../payload'; + +type Args = { + payload: Payload + slug: string + id?: string | number +} + +export const deleteCollectionVersions = async ({ + payload, + slug, + id, +}: Args): Promise => { + const VersionsModel = payload.versions[slug]; + + try { + await VersionsModel.deleteMany({ + parent: { + $eq: id, + }, + }); + } catch (err) { + payload.logger.error(`There was an error removing versions for the deleted ${slug} document with ID ${id}.`); + } +}; diff --git a/src/versions/drafts/mergeDrafts.ts b/src/versions/drafts/mergeDrafts.ts deleted file mode 100644 index 2ec040de5d..0000000000 --- a/src/versions/drafts/mergeDrafts.ts +++ /dev/null @@ -1,229 +0,0 @@ -import { AccessResult } from '../../config/types'; -import { Where } from '../../types'; -import { Payload } from '../..'; -import { PaginatedDocs } from '../../mongoose/types'; -import { Collection, CollectionModel, TypeWithID } from '../../collections/config/types'; -import { hasWhereAccessResult } from '../../auth'; -import { appendVersionToQueryKey } from './appendVersionToQueryKey'; -import replaceWithDraftIfAvailable from './replaceWithDraftIfAvailable'; - -type AggregateVersion = { - _id: string - version: T - updatedAt: string - createdAt: string -} - -type VersionCollectionMatchMap = { - [_id: string | number]: { - updatedAt: string - createdAt: string - version: T - } -} - -type Args = { - accessResult: AccessResult - collection: Collection - locale: string - paginationOptions: any - payload: Payload - query: Record - where: Where -} - -export const mergeDrafts = async ({ - accessResult, - collection, - locale, - payload, - paginationOptions, - query, - where: incomingWhere, -}: Args): Promise> => { - // Query the main collection for any IDs that match the query - // Create object "map" for performant lookup - const mainCollectionMatchMap = await collection.Model.find(query, { updatedAt: 1 }, { limit: paginationOptions.limit, sort: paginationOptions.sort }) - .lean().then((res) => res.reduce((map, { _id, updatedAt }) => { - const newMap = map; - newMap[_id] = updatedAt; - return newMap; - }, {})); - - // Query the versions collection with a version-specific query - const VersionModel = payload.versions[collection.config.slug] as CollectionModel; - - const where = appendVersionToQueryKey(incomingWhere || {}); - - const versionQueryToBuild: { where: Where } = { - where: { - ...where, - and: [ - ...where?.and || [], - { - 'version._status': { - equals: 'draft', - }, - }, - ], - }, - }; - - if (hasWhereAccessResult(accessResult)) { - const versionAccessResult = appendVersionToQueryKey(accessResult); - versionQueryToBuild.where.and.push(versionAccessResult); - } - - const versionQuery = await VersionModel.buildQuery(versionQueryToBuild, locale); - const includedParentIDs: (string | number)[] = []; - - // Create version "map" for performant lookup - // and in the same loop, check if there are matched versions without a matched parent - // This means that the newer version's parent should appear in the main query. - // To do so, add the version's parent ID into an explicit `includedIDs` array - const versionCollectionMatchMap = await VersionModel.aggregate>([ - { - $sort: Object.entries(paginationOptions.sort).reduce((sort, [key, order]) => { - return { - ...sort, - [key]: order === 'asc' ? 1 : -1, - }; - }, {}), - }, - { - $group: { - _id: '$parent', - versionID: { $first: '$_id' }, - version: { $first: '$version' }, - updatedAt: { $first: '$updatedAt' }, - createdAt: { $first: '$createdAt' }, - }, - }, - { - $addFields: { - id: { - $toObjectId: '$_id', - }, - }, - }, - { - $lookup: { - from: collection.config.slug, - localField: 'id', - foreignField: '_id', - as: 'parent', - }, - }, - { - $match: { - parent: { - $size: 1, - }, - }, - }, - { $match: versionQuery }, - { $limit: paginationOptions.limit }, - ]).then((res) => res.reduce>((map, { _id, updatedAt, createdAt, version }) => { - const newMap = map; - newMap[_id] = { version, updatedAt, createdAt }; - - const matchedParent = mainCollectionMatchMap[_id]; - if (!matchedParent) includedParentIDs.push(_id); - return newMap; - }, {})); - - // Now we need to explicitly exclude any parent matches that have newer versions - // which did NOT appear in the versions query - const excludedParentIDs = await Promise.all(Object.entries(mainCollectionMatchMap).map(async ([parentDocID, parentDocUpdatedAt]) => { - // If there is a matched version, and it's newer, this parent should remain - if (versionCollectionMatchMap[parentDocID] && versionCollectionMatchMap[parentDocID].updatedAt > parentDocUpdatedAt) { - return null; - } - - // Otherwise, we need to check if there are newer versions present - // that did not get returned from the versions query - const versionsQuery = await VersionModel.find({ - updatedAt: { - $gt: parentDocUpdatedAt, - }, - parent: { - $eq: parentDocID, - }, - }, {}, { limit: 1 }).lean(); - - // If there are, - // this says that the newest version does not match the incoming query, - // and the parent ID should be excluded - if (versionsQuery.length > 0) { - return parentDocID; - } - - return null; - })).then((res) => res.filter((result) => Boolean(result))); - - // Run a final query against the main collection, - // passing in any ids to exclude and include - // so that they appear properly paginated - const finalQueryToBuild: { where: Where } = { - where: { - and: [], - }, - }; - - finalQueryToBuild.where.and.push({ or: [] }); - - if (hasWhereAccessResult(accessResult)) { - finalQueryToBuild.where.and.push(accessResult); - } - - if (incomingWhere) { - finalQueryToBuild.where.and[0].or.push(incomingWhere); - } - - if (includedParentIDs.length > 0) { - finalQueryToBuild.where.and[0].or.push({ - id: { - in: includedParentIDs, - }, - }); - } - - if (excludedParentIDs.length > 0) { - finalQueryToBuild.where.and.push({ - id: { - not_in: excludedParentIDs, - }, - }); - } - - const finalQuery = await collection.Model.buildQuery(finalQueryToBuild, locale); - - let result = await collection.Model.paginate(finalQuery, paginationOptions); - - result = { - ...result, - docs: await Promise.all(result.docs.map(async (doc) => { - const matchedVersion = versionCollectionMatchMap[doc.id]; - - if (matchedVersion && matchedVersion.updatedAt > doc.updatedAt) { - return { - ...doc, - ...matchedVersion.version, - createdAt: matchedVersion.createdAt, - updatedAt: matchedVersion.updatedAt, - }; - } - - return replaceWithDraftIfAvailable({ - accessResult, - payload, - entity: collection.config, - entityType: 'collection', - doc, - locale, - }); - })), - }; - - return result; -}; diff --git a/src/versions/drafts/queryDrafts.ts b/src/versions/drafts/queryDrafts.ts new file mode 100644 index 0000000000..8d0e8480c2 --- /dev/null +++ b/src/versions/drafts/queryDrafts.ts @@ -0,0 +1,91 @@ +import { AccessResult } from '../../config/types'; +import { Where } from '../../types'; +import { Payload } from '../../payload'; +import { PaginatedDocs } from '../../mongoose/types'; +import { Collection, CollectionModel, TypeWithID } from '../../collections/config/types'; +import { hasWhereAccessResult } from '../../auth'; +import { appendVersionToQueryKey } from './appendVersionToQueryKey'; + +type AggregateVersion = { + _id: string + version: T + updatedAt: string + createdAt: string +} + +type Args = { + accessResult: AccessResult + collection: Collection + locale: string + paginationOptions: any + payload: Payload + where: Where +} + +export const queryDrafts = async ({ + accessResult, + collection, + locale, + payload, + paginationOptions, + where: incomingWhere, +}: Args): Promise> => { + const VersionModel = payload.versions[collection.config.slug] as CollectionModel; + + const where = appendVersionToQueryKey(incomingWhere || {}); + + const versionQueryToBuild: { where: Where } = { + where: { + ...where, + and: [ + ...where?.and || [], + ], + }, + }; + + if (hasWhereAccessResult(accessResult)) { + const versionAccessResult = appendVersionToQueryKey(accessResult); + versionQueryToBuild.where.and.push(versionAccessResult); + } + + const versionQuery = await VersionModel.buildQuery(versionQueryToBuild, locale); + + const aggregate = VersionModel.aggregate>([ + // Sort so that newest are first + { $sort: { updatedAt: -1 } }, + // Group by parent ID, and take the first of each + { + $group: { + _id: '$parent', + version: { $first: '$version' }, + updatedAt: { $first: '$updatedAt' }, + createdAt: { $first: '$createdAt' }, + }, + }, + // Filter based on incoming query + { $match: versionQuery }, + // Re-sort based on incoming sort + { + $sort: Object.entries(paginationOptions.sort).reduce((sort, [key, order]) => { + return { + ...sort, + [key]: order === 'asc' ? 1 : -1, + }; + }, {}), + }, + // Add pagination limit + { $limit: paginationOptions.limit }, + ]); + + const result = await VersionModel.aggregatePaginate(aggregate, paginationOptions); + + return { + ...result, + docs: result.docs.map((doc) => ({ + _id: doc._id, + ...doc.version, + updatedAt: doc.updatedAt, + createdAt: doc.createdAt, + })), + }; +}; diff --git a/src/versions/drafts/replaceWithDraftIfAvailable.ts b/src/versions/drafts/replaceWithDraftIfAvailable.ts index d8decffa7d..861bb0d4af 100644 --- a/src/versions/drafts/replaceWithDraftIfAvailable.ts +++ b/src/versions/drafts/replaceWithDraftIfAvailable.ts @@ -1,9 +1,8 @@ -import { Payload } from '../..'; +import { Payload } from '../../payload'; import { docHasTimestamps, Where } from '../../types'; import { hasWhereAccessResult } from '../../auth'; import { AccessResult } from '../../config/types'; import { CollectionModel, SanitizedCollectionConfig, TypeWithID } from '../../collections/config/types'; -import flattenWhereConstraints from '../../utilities/flattenWhereConstraints'; import sanitizeInternalFields from '../../utilities/sanitizeInternalFields'; import { appendVersionToQueryKey } from './appendVersionToQueryKey'; import { SanitizedGlobalConfig } from '../../globals/config/types'; diff --git a/src/versions/drafts/saveCollectionDraft.ts b/src/versions/drafts/saveCollectionDraft.ts deleted file mode 100644 index bab2678f20..0000000000 --- a/src/versions/drafts/saveCollectionDraft.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Payload } from '../..'; -import { SanitizedCollectionConfig } from '../../collections/config/types'; -import { enforceMaxVersions } from '../enforceMaxVersions'; -import { PayloadRequest } from '../../express/types'; - -type Args = { - payload: Payload - config?: SanitizedCollectionConfig - req: PayloadRequest - data: any - id: string | number - autosave: boolean -} - -export const saveCollectionDraft = async ({ - payload, - config, - id, - data, - autosave, -}: Args): Promise> => { - const VersionsModel = payload.versions[config.slug]; - - const dataAsDraft = { ...data, _status: 'draft' }; - - let existingAutosaveVersion; - - if (autosave) { - existingAutosaveVersion = await VersionsModel.findOne({ - parent: id, - }, {}, { sort: { updatedAt: 'desc' } }); - } - - let result; - - try { - // If there is an existing autosave document, - // Update it - if (autosave && existingAutosaveVersion?.autosave === true) { - result = await VersionsModel.findByIdAndUpdate( - { - _id: existingAutosaveVersion._id, - }, - { - version: dataAsDraft, - }, - { new: true, lean: true }, - ); - // Otherwise, create a new one - } else { - result = await VersionsModel.create({ - parent: id, - version: dataAsDraft, - autosave: Boolean(autosave), - }); - } - } catch (err) { - payload.logger.error(`There was an error while creating a draft ${config.labels.singular} with ID ${id}.`); - payload.logger.error(err); - } - - if (config.versions.maxPerDoc) { - enforceMaxVersions({ - id, - payload, - Model: VersionsModel, - slug: config.slug, - entityType: 'collection', - max: config.versions.maxPerDoc, - }); - } - - result = result.version; - result = JSON.stringify(result); - result = JSON.parse(result); - result.id = id; - - return result; -}; diff --git a/src/versions/drafts/saveGlobalDraft.ts b/src/versions/drafts/saveGlobalDraft.ts deleted file mode 100644 index de38a9aadc..0000000000 --- a/src/versions/drafts/saveGlobalDraft.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Payload } from '../..'; -import { enforceMaxVersions } from '../enforceMaxVersions'; -import { SanitizedGlobalConfig } from '../../globals/config/types'; - -type Args = { - payload: Payload - config?: SanitizedGlobalConfig - data: any - autosave: boolean -} - -export const saveGlobalDraft = async ({ - payload, - config, - data, - autosave, -}: Args): Promise => { - const VersionsModel = payload.versions[config.slug]; - - const dataAsDraft = { ...data, _status: 'draft' }; - - let existingAutosaveVersion; - - if (autosave) { - existingAutosaveVersion = await VersionsModel.findOne(); - } - - let result; - - try { - // If there is an existing autosave document, - // Update it - if (autosave && existingAutosaveVersion?.autosave === true) { - result = await VersionsModel.findByIdAndUpdate( - { - _id: existingAutosaveVersion._id, - }, - { - version: dataAsDraft, - }, - { new: true, lean: true }, - ); - // Otherwise, create a new one - } else { - result = await VersionsModel.create({ - version: dataAsDraft, - autosave: Boolean(autosave), - }); - } - } catch (err) { - payload.logger.error(`There was an error while saving a draft for the Global ${config.slug}.`); - payload.logger.error(err); - } - - if (config.versions.max) { - enforceMaxVersions({ - payload: this, - Model: VersionsModel, - slug: config.slug, - entityType: 'global', - max: config.versions.max, - }); - } - - result = result.version; - result = JSON.stringify(result); - result = JSON.parse(result); - - return result; -}; diff --git a/src/versions/enforceMaxVersions.ts b/src/versions/enforceMaxVersions.ts index c3bb3684f3..ffee2025c8 100644 --- a/src/versions/enforceMaxVersions.ts +++ b/src/versions/enforceMaxVersions.ts @@ -1,4 +1,4 @@ -import { Payload } from '..'; +import { Payload } from '../payload'; import { CollectionModel } from '../collections/config/types'; type Args = { diff --git a/src/versions/ensurePublishedCollectionVersion.ts b/src/versions/ensurePublishedCollectionVersion.ts deleted file mode 100644 index d440871a6a..0000000000 --- a/src/versions/ensurePublishedCollectionVersion.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Payload } from '..'; -import { SanitizedCollectionConfig } from '../collections/config/types'; -import { enforceMaxVersions } from './enforceMaxVersions'; -import { PayloadRequest } from '../express/types'; -import { afterRead } from '../fields/hooks/afterRead'; - -type Args = { - payload: Payload - config?: SanitizedCollectionConfig - req: PayloadRequest - docWithLocales: any - id: string | number -} - -export const ensurePublishedCollectionVersion = async ({ - payload, - config, - req, - id, - docWithLocales, -}: Args): Promise => { - // If there are no newer drafts, - // And the current doc is published, - // We need to keep a version of the published document - - if (docWithLocales?._status === 'published') { - const VersionModel = payload.versions[config.slug]; - - const moreRecentDrafts = await VersionModel.find({ - parent: { - $eq: docWithLocales.id, - }, - updatedAt: { - $gt: docWithLocales.updatedAt, - }, - }, - {}, - { - lean: true, - leanWithId: true, - sort: { - updatedAt: 'desc', - }, - }); - - if (moreRecentDrafts?.length === 0) { - const version = await afterRead({ - depth: 0, - doc: docWithLocales, - entityConfig: config, - req, - overrideAccess: true, - showHiddenFields: true, - flattenLocales: false, - }); - - try { - await VersionModel.create({ - parent: id, - version, - autosave: false, - }); - } catch (err) { - payload.logger.error(`There was an error while saving a version for the ${config.slug} with ID ${id}.`); - payload.logger.error(err); - } - - if (config.versions.maxPerDoc) { - enforceMaxVersions({ - id, - payload, - Model: VersionModel, - slug: config.slug, - entityType: 'collection', - max: config.versions.maxPerDoc, - }); - } - } - } -}; diff --git a/src/versions/ensurePublishedGlobalVersion.ts b/src/versions/ensurePublishedGlobalVersion.ts deleted file mode 100644 index c4b5b85a9a..0000000000 --- a/src/versions/ensurePublishedGlobalVersion.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Payload } from '..'; -import { enforceMaxVersions } from './enforceMaxVersions'; -import { PayloadRequest } from '../express/types'; -import { SanitizedGlobalConfig } from '../globals/config/types'; -import { afterRead } from '../fields/hooks/afterRead'; - -type Args = { - payload: Payload - config?: SanitizedGlobalConfig - req: PayloadRequest - docWithLocales: any -} - -export const ensurePublishedGlobalVersion = async ({ - payload, - config, - req, - docWithLocales, -}: Args): Promise => { - // If there are no newer drafts, - // And the current doc is published, - // We need to keep a version of the published document - - if (docWithLocales?._status === 'published') { - const VersionModel = payload.versions[config.slug]; - - const moreRecentDrafts = await VersionModel.find({ - updatedAt: { - $gt: docWithLocales.updatedAt, - }, - }, - {}, - { - lean: true, - leanWithId: true, - sort: { - updatedAt: 'desc', - }, - }); - - if (moreRecentDrafts?.length === 0) { - const version = await afterRead({ - depth: 0, - doc: docWithLocales, - entityConfig: config, - req, - overrideAccess: true, - showHiddenFields: true, - flattenLocales: false, - }); - - try { - await VersionModel.create({ - version, - autosave: false, - }); - } catch (err) { - payload.logger.error(`There was an error while saving a version for the Global ${config.label}.`); - payload.logger.error(err); - } - - if (config.versions.max) { - enforceMaxVersions({ - payload: this, - Model: VersionModel, - slug: config.slug, - entityType: 'global', - max: config.versions.max, - }); - } - } - } -}; diff --git a/src/versions/getLatestCollectionVersion.ts b/src/versions/getLatestCollectionVersion.ts index c5fd1f98c2..0560ed8800 100644 --- a/src/versions/getLatestCollectionVersion.ts +++ b/src/versions/getLatestCollectionVersion.ts @@ -1,5 +1,5 @@ import { Document } from '../types'; -import { Payload } from '..'; +import { Payload } from '../payload'; import { Collection, TypeWithID } from '../collections/config/types'; type Args = { diff --git a/src/versions/saveCollectionVersion.ts b/src/versions/saveCollectionVersion.ts deleted file mode 100644 index 5ac722896b..0000000000 --- a/src/versions/saveCollectionVersion.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { Payload } from '..'; -import { SanitizedCollectionConfig } from '../collections/config/types'; -import { enforceMaxVersions } from './enforceMaxVersions'; -import { PayloadRequest } from '../express/types'; -import sanitizeInternalFields from '../utilities/sanitizeInternalFields'; -import { afterRead } from '../fields/hooks/afterRead'; - -type Args = { - payload: Payload - config?: SanitizedCollectionConfig - req: PayloadRequest - docWithLocales: any - id: string | number -} - -export const saveCollectionVersion = async ({ - payload, - config, - req, - id, - docWithLocales, -}: Args): Promise => { - const VersionModel = payload.versions[config.slug]; - - let version = docWithLocales; - - if (config.versions?.drafts) { - const latestVersion = await VersionModel.findOne({ - parent: { - $eq: docWithLocales.id, - }, - updatedAt: { - $gt: docWithLocales.updatedAt, - }, - }, - {}, - { - lean: true, - leanWithId: true, - sort: { - updatedAt: 'desc', - }, - }); - - if (latestVersion) { - // If the latest version is a draft, no need to re-save it - // Example: when "promoting" a draft to published, the draft already exists. - // Instead, return null - if (latestVersion?.version?._status === 'draft') { - return null; - } - - version = latestVersion.version; - version = JSON.parse(JSON.stringify(version)); - version = sanitizeInternalFields(version); - } - } - - version = await afterRead({ - depth: 0, - doc: version, - entityConfig: config, - req, - overrideAccess: true, - showHiddenFields: true, - flattenLocales: false, - }); - - if (version._id) delete version._id; - - let createdVersion; - - try { - createdVersion = await VersionModel.create({ - parent: id, - version, - autosave: false, - }); - } catch (err) { - payload.logger.error(`There was an error while saving a version for the ${config.labels.singular} with ID ${id}.`); - payload.logger.error(err); - } - - if (config.versions.maxPerDoc) { - enforceMaxVersions({ - id, - payload, - Model: VersionModel, - slug: config.slug, - entityType: 'collection', - max: config.versions.maxPerDoc, - }); - } - - if (createdVersion) { - createdVersion = JSON.parse(JSON.stringify(createdVersion)); - createdVersion = sanitizeInternalFields(createdVersion); - } - - return createdVersion; -}; diff --git a/src/versions/saveGlobalVersion.ts b/src/versions/saveGlobalVersion.ts deleted file mode 100644 index 176a9a2bce..0000000000 --- a/src/versions/saveGlobalVersion.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { Payload } from '..'; -import { enforceMaxVersions } from './enforceMaxVersions'; -import { PayloadRequest } from '../express/types'; -import { SanitizedGlobalConfig } from '../globals/config/types'; -import sanitizeInternalFields from '../utilities/sanitizeInternalFields'; -import { afterRead } from '../fields/hooks/afterRead'; - -type Args = { - payload: Payload - config?: SanitizedGlobalConfig - req: PayloadRequest - docWithLocales: any -} - -export const saveGlobalVersion = async ({ - payload, - config, - req, - docWithLocales, -}: Args): Promise => { - const VersionModel = payload.versions[config.slug]; - - let version = docWithLocales; - - if (config.versions?.drafts) { - const latestVersion = await VersionModel.findOne({ - updatedAt: { - $gt: docWithLocales.updatedAt, - }, - }, - {}, - { - lean: true, - leanWithId: true, - sort: { - updatedAt: 'desc', - }, - }); - - if (latestVersion) { - // If the latest version is a draft, no need to re-save it - // Example: when "promoting" a draft to published, the draft already exists. - // Instead, return null - if (latestVersion?.version?._status === 'draft') { - return null; - } - - version = latestVersion.version; - version = JSON.parse(JSON.stringify(version)); - version = sanitizeInternalFields(version); - } - } - - version = await afterRead({ - depth: 0, - doc: version, - entityConfig: config, - flattenLocales: false, - overrideAccess: true, - req, - showHiddenFields: true, - }); - - if (version._id) delete version._id; - - let createdVersion; - - try { - createdVersion = await VersionModel.create({ - version, - autosave: false, - }); - } catch (err) { - payload.logger.error(`There was an error while saving a version for the Global ${config.slug}.`); - payload.logger.error(err); - } - - if (config.versions.max) { - enforceMaxVersions({ - payload: this, - Model: VersionModel, - slug: config.slug, - entityType: 'global', - max: config.versions.max, - }); - } - - if (createdVersion) { - createdVersion = JSON.parse(JSON.stringify(createdVersion)); - createdVersion = sanitizeInternalFields(createdVersion); - } - - return createdVersion; -}; diff --git a/src/versions/saveVersion.ts b/src/versions/saveVersion.ts new file mode 100644 index 0000000000..a63bb7810c --- /dev/null +++ b/src/versions/saveVersion.ts @@ -0,0 +1,124 @@ +import { FilterQuery } from 'mongoose'; +import { Payload } from '../payload'; +import { SanitizedCollectionConfig, TypeWithID } from '../collections/config/types'; +import { enforceMaxVersions } from './enforceMaxVersions'; +import { PayloadRequest } from '../express/types'; +import { SanitizedGlobalConfig } from '../globals/config/types'; +import sanitizeInternalFields from '../utilities/sanitizeInternalFields'; + +type Args = { + payload: Payload + global?: SanitizedGlobalConfig + collection?: SanitizedCollectionConfig + req: PayloadRequest + docWithLocales: any + id?: string | number + autosave?: boolean + draft?: boolean + createdAt: string + onCreate?: boolean +} + +export const saveVersion = async ({ + payload, + collection, + global, + id, + docWithLocales, + autosave, + draft, + createdAt, + onCreate = false, +}: Args): Promise => { + let entityConfig; + let entityType: 'global' | 'collection'; + + if (collection) { + entityConfig = collection; + entityType = 'collection'; + } + + if (global) { + entityConfig = global; + entityType = 'global'; + } + + const VersionModel = payload.versions[entityConfig.slug]; + + const versionData = { ...docWithLocales }; + if (draft) versionData._status = 'draft'; + if (versionData._id) delete versionData._id; + + let existingAutosaveVersion; + + if (autosave) { + const query: FilterQuery = {}; + if (collection) query.parent = id; + existingAutosaveVersion = await VersionModel.findOne(query, {}, { sort: { updatedAt: 'desc' } }); + } + + let result; + const now = new Date().toISOString(); + + try { + if (autosave && existingAutosaveVersion?.autosave === true) { + const data: Record = { + version: versionData, + createdAt, + updatedAt: now, + }; + + if (createdAt) data.updatedAt = createdAt; + + result = await VersionModel.findByIdAndUpdate( + { + _id: existingAutosaveVersion._id, + }, + data, + { new: true, lean: true }, + ); + // Otherwise, create a new one + } else { + const data: Record = { + version: versionData, + autosave: Boolean(autosave), + updatedAt: onCreate ? createdAt : now, + createdAt: createdAt || now, + }; + + if (collection) data.parent = id; + + result = await VersionModel.create(data); + } + } catch (err) { + let errorMessage: string; + + if (collection) errorMessage = `There was an error while saving a version for the ${collection.labels.singular} with ID ${id}.`; + if (global) errorMessage = `There was an error while saving a version for the global ${global.label}.`; + payload.logger.error(errorMessage); + payload.logger.error(err); + } + + let max: number; + + if (collection && typeof collection.versions.maxPerDoc === 'number') max = collection.versions.maxPerDoc; + if (global && typeof global.versions.max === 'number') max = global.versions.max; + + if (collection && collection.versions.maxPerDoc) { + enforceMaxVersions({ + id, + payload, + Model: VersionModel, + slug: entityConfig.slug, + entityType, + max, + }); + } + + result = result.version; + result = JSON.parse(JSON.stringify(result)); + result = sanitizeInternalFields(result); + result.id = id; + + return result; +}; diff --git a/src/versions/shouldIncrementVersionCount.ts b/src/versions/shouldIncrementVersionCount.ts deleted file mode 100644 index 4839c33430..0000000000 --- a/src/versions/shouldIncrementVersionCount.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { SanitizedCollectionConfig } from '../collections/config/types'; -import { SanitizedGlobalConfig } from '../globals/config/types'; -import { PaginatedDocs } from '../mongoose/types'; - -type ShouldIncrementVersionCount = (args: { - entity: SanitizedGlobalConfig | SanitizedCollectionConfig - versions: PaginatedDocs<{ version?: { _status: string} }> - docStatus: string -}) => boolean - -export const shouldIncrementVersionCount: ShouldIncrementVersionCount = ({ entity, docStatus, versions }) => { - return !(entity?.versions?.drafts && entity.versions.drafts?.autosave) - && (docStatus === 'published' || (docStatus === 'draft' && versions?.docs?.[0]?.version?._status !== 'draft')); -}; diff --git a/test/auth/custom-strategy/config.ts b/test/auth/custom-strategy/config.ts index 3c4d52e16b..8ecf33541d 100644 --- a/test/auth/custom-strategy/config.ts +++ b/test/auth/custom-strategy/config.ts @@ -1,13 +1,12 @@ import { Request } from 'express'; import { Strategy } from 'passport-strategy'; -import { Payload } from '../../../src'; +import { Payload } from '../../../src/payload'; import { buildConfig } from '../../buildConfig'; export const slug = 'users'; -export const strategyName = 'test-local' +export const strategyName = 'test-local'; export class CustomStrategy extends Strategy { - ctx: Payload; constructor(ctx: Payload) { @@ -16,29 +15,29 @@ export class CustomStrategy extends Strategy { } authenticate(req: Request, options?: any): void { - if(!req.headers.code && !req.headers.secret) { + if (!req.headers.code && !req.headers.secret) { return this.success(null); } this.ctx.find({ collection: slug, where: { code: { - equals: req.headers.code + equals: req.headers.code, }, secret: { - equals: req.headers.secret - } - } + equals: req.headers.secret, + }, + }, }).then((users) => { - if(users.docs && users.docs.length) { + if (users.docs && users.docs.length) { const user = users.docs[0]; user.collection = slug; user._strategy = `${slug}-${strategyName}`; - this.success(user) + this.success(user); } else { - this.error(null) + this.error(null); } - }) + }); } } @@ -54,12 +53,12 @@ export default buildConfig({ strategies: [ { name: strategyName, - strategy: (ctx) => new CustomStrategy(ctx) - } - ] + strategy: (ctx) => new CustomStrategy(ctx), + }, + ], }, access: { - create: () => true + create: () => true, }, fields: [ { diff --git a/test/dev.js b/test/dev.js deleted file mode 100644 index e45fa08cc8..0000000000 --- a/test/dev.js +++ /dev/null @@ -1,36 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const swcRegister = require('@swc/register'); - -const [testSuiteDir] = process.argv.slice(2); - -if (!testSuiteDir) { - console.error('ERROR: You must provide an argument for "testSuiteDir"'); - process.exit(1); -} - -const configPath = path.resolve(__dirname, testSuiteDir, 'config.ts'); - -if (!fs.existsSync(configPath)) { - console.error('ERROR: You must pass a valid directory under test/ that contains a config.ts'); - process.exit(1); -} - -process.env.PAYLOAD_CONFIG_PATH = configPath; - -process.env.PAYLOAD_DROP_DATABASE = 'true'; - -swcRegister({ - sourceMaps: 'inline', - jsc: { - parser: { - syntax: 'typescript', - tsx: true, - }, - }, - module: { - type: 'commonjs', - }, -}); - -require('./devServer'); diff --git a/test/devServer.ts b/test/dev.ts similarity index 58% rename from test/devServer.ts rename to test/dev.ts index 02c9b8778a..c276cb7c01 100644 --- a/test/devServer.ts +++ b/test/dev.ts @@ -1,12 +1,31 @@ - +import fs from 'fs'; +import path from 'path'; import express from 'express'; import { v4 as uuid } from 'uuid'; import payload from '../src'; +const [testSuiteDir] = process.argv.slice(2); + +if (!testSuiteDir) { + console.error('ERROR: You must provide an argument for "testSuiteDir"'); + process.exit(1); +} + +const configPath = path.resolve(__dirname, testSuiteDir, 'config.ts'); + +if (!fs.existsSync(configPath)) { + console.error('ERROR: You must pass a valid directory under test/ that contains a config.ts'); + process.exit(1); +} + +process.env.PAYLOAD_CONFIG_PATH = configPath; + +process.env.PAYLOAD_DROP_DATABASE = 'true'; + const expressApp = express(); -const init = async () => { - await payload.initAsync({ +const startDev = async () => { + await payload.init({ secret: uuid(), mongoURL: process.env.MONGO_URL || 'mongodb://localhost/payload', express: expressApp, @@ -35,4 +54,4 @@ const init = async () => { }); }; -init(); +startDev(); diff --git a/test/fields/config.ts b/test/fields/config.ts index 75285a0280..16737a27f7 100644 --- a/test/fields/config.ts +++ b/test/fields/config.ts @@ -102,8 +102,8 @@ export default buildConfig({ ...uploadsDoc, media: createdPNGDoc.id, }, - file: jpgFile - }); + file: jpgFile, + }); const richTextDocWithRelId = JSON.parse(JSON.stringify(richTextDoc).replace('{{ARRAY_DOC_ID}}', createdArrayDoc.id)); const richTextDocWithRelationship = { ...richTextDocWithRelId }; diff --git a/test/fields/payload-types.ts b/test/fields/payload-types.ts index 622484aa1a..bb6dc23599 100644 --- a/test/fields/payload-types.ts +++ b/test/fields/payload-types.ts @@ -5,11 +5,31 @@ * and re-run `payload generate:types` to regenerate this file. */ -export interface Config {} -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "array-fields". - */ +export interface Config { + collections: { + 'array-fields': ArrayField; + 'block-fields': BlockField; + 'code-fields': CodeField; + 'collapsible-fields': CollapsibleField; + 'conditional-logic': ConditionalLogic; + 'date-fields': DateField; + 'radio-fields': RadioField; + 'group-fields': GroupField; + 'indexed-fields': IndexedField; + 'json-fields': JsonField; + 'number-fields': NumberField; + 'point-fields': PointField; + 'relationship-fields': RelationshipField; + 'rich-text-fields': RichTextField; + 'select-fields': SelectField; + 'tabs-fields': TabsField; + 'text-fields': TextField; + uploads: Upload; + uploads2: Uploads2; + users: User; + }; + globals: {}; +} export interface ArrayField { id: string; items: { @@ -43,10 +63,6 @@ export interface ArrayField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "block-fields". - */ export interface BlockField { id: string; blocks: ( @@ -187,10 +203,6 @@ export interface BlockField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "code-fields". - */ export interface CodeField { id: string; javascript?: string; @@ -201,10 +213,6 @@ export interface CodeField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "collapsible-fields". - */ export interface CollapsibleField { id: string; text: string; @@ -225,10 +233,6 @@ export interface CollapsibleField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "conditional-logic". - */ export interface ConditionalLogic { id: string; text: string; @@ -237,10 +241,6 @@ export interface ConditionalLogic { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "date-fields". - */ export interface DateField { id: string; default: string; @@ -251,20 +251,12 @@ export interface DateField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "radio-fields". - */ export interface RadioField { id: string; radio?: 'one' | 'two' | 'three'; createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "group-fields". - */ export interface GroupField { id: string; group: { @@ -296,10 +288,6 @@ export interface GroupField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "indexed-fields". - */ export interface IndexedField { id: string; text: string; @@ -322,10 +310,6 @@ export interface IndexedField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "json-fields". - */ export interface JsonField { id: string; json?: { @@ -334,10 +318,6 @@ export interface JsonField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "number-fields". - */ export interface NumberField { id: string; number?: number; @@ -351,10 +331,6 @@ export interface NumberField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "point-fields". - */ export interface PointField { id: string; /** @@ -377,10 +353,6 @@ export interface PointField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "relationship-fields". - */ export interface RelationshipField { id: string; relationship: @@ -396,10 +368,6 @@ export interface RelationshipField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "text-fields". - */ export interface TextField { id: string; text: string; @@ -411,10 +379,6 @@ export interface TextField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "rich-text-fields". - */ export interface RichTextField { id: string; title: string; @@ -428,10 +392,6 @@ export interface RichTextField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "select-fields". - */ export interface SelectField { id: string; select?: 'one' | 'two' | 'three'; @@ -443,10 +403,6 @@ export interface SelectField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "tabs-fields". - */ export interface TabsField { id: string; array: { @@ -532,10 +488,6 @@ export interface TabsField { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "uploads". - */ export interface Upload { id: string; text?: string; @@ -549,10 +501,6 @@ export interface Upload { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "uploads2". - */ export interface Uploads2 { id: string; text?: string; @@ -566,10 +514,6 @@ export interface Uploads2 { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "users". - */ export interface User { id: string; email?: string; diff --git a/test/generateTypes.js b/test/generateTypes.ts similarity index 87% rename from test/generateTypes.js rename to test/generateTypes.ts index 8527a8056e..ce123ce313 100644 --- a/test/generateTypes.js +++ b/test/generateTypes.ts @@ -1,7 +1,6 @@ -const path = require('path'); -const fs = require('fs'); - -const { generateTypes } = require('../dist/bin/generateTypes'); +import path from 'path'; +import fs from 'fs'; +import { generateTypes } from '../src/bin/generateTypes'; const [testConfigDir] = process.argv.slice(2); diff --git a/test/helpers/configHelpers.ts b/test/helpers/configHelpers.ts index 3144a8921e..f8a5675833 100644 --- a/test/helpers/configHelpers.ts +++ b/test/helpers/configHelpers.ts @@ -1,4 +1,5 @@ import getPort from 'get-port'; +import swcRegister from '@swc/register'; import path from 'path'; import { v4 as uuid } from 'uuid'; import shelljs from 'shelljs'; @@ -40,7 +41,22 @@ export async function initPayloadTest(options: Options): Promise<{ serverURL: st initOptions.express = express(); } - await payload.initAsync(initOptions); + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore - bad @swc/register types + swcRegister({ + sourceMaps: 'inline', + jsc: { + parser: { + syntax: 'typescript', + tsx: true, + }, + }, + module: { + type: 'commonjs', + }, + }); + + await payload.init(initOptions); if (initOptions.express) { initOptions.express.listen(port); diff --git a/test/hooks/collections/Users/index.ts b/test/hooks/collections/Users/index.ts index 6b9b7c7018..1bb1e634ba 100644 --- a/test/hooks/collections/Users/index.ts +++ b/test/hooks/collections/Users/index.ts @@ -1,4 +1,4 @@ -import { Payload } from '../../../../src'; +import { Payload } from '../../../../src/payload'; import { BeforeLoginHook, CollectionConfig } from '../../../../src/collections/config/types'; import { AuthenticationError } from '../../../../src/errors'; import { devUser, regularUser } from '../../../credentials'; diff --git a/test/uploads/config.ts b/test/uploads/config.ts index 93cc7ce21b..c4a9f1c0b7 100644 --- a/test/uploads/config.ts +++ b/test/uploads/config.ts @@ -39,6 +39,7 @@ export default buildConfig({ upload: { staticURL: '/media', staticDir: './media', + mimeTypes: ['image/png', 'image/jpg', 'image/jpeg', 'image/svg+xml'], resizeOptions: { width: 1280, height: 720, diff --git a/test/versions/collections/Versions.ts b/test/versions/collections/Versions.ts new file mode 100644 index 0000000000..1d38c7ca29 --- /dev/null +++ b/test/versions/collections/Versions.ts @@ -0,0 +1,56 @@ +import type { CollectionConfig } from '../../../src/collections/config/types'; + +const VersionPosts: CollectionConfig = { + slug: 'version-posts', + admin: { + useAsTitle: 'title', + defaultColumns: ['title', 'description', 'createdAt'], + preview: () => 'https://payloadcms.com', + }, + versions: { + drafts: false, + maxPerDoc: 35, + retainDeleted: false, + }, + access: { + read: ({ req: { user } }) => { + if (user) { + return true; + } + + return { + or: [ + { + _status: { + equals: 'published', + }, + }, + { + _status: { + exists: false, + }, + }, + ], + }; + }, + readVersions: ({ req: { user } }) => Boolean(user), + }, + fields: [ + { + name: 'title', + label: 'Title', + type: 'text', + required: true, + unique: true, + localized: true, + }, + { + name: 'description', + label: 'Description', + type: 'textarea', + required: true, + }, + ], +}; + +export default VersionPosts; diff --git a/test/versions/config.ts b/test/versions/config.ts index 7711c9e2b5..9e0b4383d3 100644 --- a/test/versions/config.ts +++ b/test/versions/config.ts @@ -4,11 +4,13 @@ import DraftPosts from './collections/Drafts'; import AutosaveGlobal from './globals/Autosave'; import { devUser } from '../credentials'; import DraftGlobal from './globals/Draft'; +import VersionPosts from './collections/Versions'; export default buildConfig({ collections: [ AutosavePosts, DraftPosts, + VersionPosts, ], globals: [ AutosaveGlobal, diff --git a/test/versions/int.spec.ts b/test/versions/int.spec.ts index b54bad5f9f..d7689797e1 100644 --- a/test/versions/int.spec.ts +++ b/test/versions/int.spec.ts @@ -157,9 +157,14 @@ describe('Versions', () => { const versions = await payload.findVersions({ collection, locale: 'all', + where: { + parent: { + equals: collectionLocalPostID, + }, + }, }); - expect(versions.docs[0].version.title.en).toStrictEqual(englishTitle); + expect(versions.docs[0].version.title.en).toStrictEqual(newEnglishTitle); expect(versions.docs[0].version.title.es).toStrictEqual(spanishTitle); }); }); @@ -184,7 +189,7 @@ describe('Versions', () => { const restore = await payload.restoreVersion({ collection, - id: versions.docs[0].id, + id: versions.docs[1].id, }); expect(restore.title).toBeDefined(); @@ -195,7 +200,7 @@ describe('Versions', () => { draft: true, }); - expect(restoredPost.title).toBe(restore.title); + expect(restoredPost.title).toBe(versions.docs[1].version.title); }); }); @@ -226,13 +231,15 @@ describe('Versions', () => { draft: true, }); + const spanishTitle = 'es title'; + // second update to existing draft await payload.update({ id: collectionLocalPostID, collection, locale: 'es', data: { - title: updatedTitle, + title: spanishTitle, }, draft: true, }); @@ -251,7 +258,62 @@ describe('Versions', () => { expect(publishedPost.title).toBe(originalTitle); expect(draftPost.title.en).toBe(updatedTitle); - expect(draftPost.title.es).toBe(updatedTitle); + expect(draftPost.title.es).toBe(spanishTitle); + }); + }); + + describe('Draft Count', () => { + it('creates proper number of drafts', async () => { + const originalDraft = await payload.create({ + collection: 'draft-posts', + draft: true, + data: { + title: 'A', + description: 'A', + _status: 'draft', + }, + }); + + await payload.update({ + collection: 'draft-posts', + id: originalDraft.id, + draft: true, + data: { + title: 'B', + description: 'B', + _status: 'draft', + }, + }); + + await payload.update({ + collection: 'draft-posts', + id: originalDraft.id, + draft: true, + data: { + title: 'C', + description: 'C', + _status: 'draft', + }, + }); + + const mostRecentDraft = await payload.findByID({ + collection: 'draft-posts', + id: originalDraft.id, + draft: true, + }); + + expect(mostRecentDraft.title).toStrictEqual('C'); + + const versions = await payload.findVersions({ + collection: 'draft-posts', + where: { + parent: { + equals: originalDraft.id, + }, + }, + }); + + expect(versions.docs).toHaveLength(3); }); }); }); @@ -423,7 +485,7 @@ describe('Versions', () => { expect(data.id).toBeDefined(); expect(data.parent.id).toStrictEqual(collectionGraphQLPostID); - expect(data.version.title).toStrictEqual(collectionGraphQLOriginalTitle); + expect(data.version.title).toStrictEqual(updatedTitle); }); it('should allow read of versions by querying version content', async () => { diff --git a/test/versions/payload-types.ts b/test/versions/payload-types.ts index 0508755977..3b725acdc8 100644 --- a/test/versions/payload-types.ts +++ b/test/versions/payload-types.ts @@ -5,29 +5,17 @@ * and re-run `payload generate:types` to regenerate this file. */ -export interface Config {} -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "autosave-global". - */ -export interface AutosaveGlobal { - id: string; - title: string; - _status?: 'draft' | 'published'; +export interface Config { + collections: { + 'autosave-posts': AutosavePost; + 'draft-posts': DraftPost; + users: User; + }; + globals: { + 'autosave-global': AutosaveGlobal; + 'draft-global': DraftGlobal; + }; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "draft-global". - */ -export interface DraftGlobal { - id: string; - title: string; - _status?: 'draft' | 'published'; -} -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "autosave-posts". - */ export interface AutosavePost { id: string; title: string; @@ -36,10 +24,6 @@ export interface AutosavePost { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "draft-posts". - */ export interface DraftPost { id: string; title: string; @@ -50,10 +34,6 @@ export interface DraftPost { createdAt: string; updatedAt: string; } -/** - * This interface was referenced by `Config`'s JSON-Schema - * via the `definition` "users". - */ export interface User { id: string; email?: string; @@ -64,3 +44,13 @@ export interface User { createdAt: string; updatedAt: string; } +export interface AutosaveGlobal { + id: string; + title: string; + _status?: 'draft' | 'published'; +} +export interface DraftGlobal { + id: string; + title: string; + _status?: 'draft' | 'published'; +} diff --git a/tsconfig.json b/tsconfig.json index 9772585039..057265dff0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,9 @@ "strict": false, /* Enable all strict type-checking options. */ "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ "paths": { + "payload/generated-types": [ + "./src/generated-types.ts", + ], "payload/config": [ "./src/config/types.ts" ], @@ -30,6 +33,9 @@ "skipLibCheck": true, /* Skip type checking of declaration files. */ "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ }, + "ts-node": { + "swc": true, + }, "include": [ "src/" ], diff --git a/yarn.lock b/yarn.lock index 19baf9db06..18255acc9e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,9 +3,9 @@ "@adobe/css-tools@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.0.1.tgz#b38b444ad3aa5fedbb15f2f746dcd934226a12dd" - integrity sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g== + version "4.0.2" + resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.0.2.tgz#bd7d13543a186c3ff3eabb44bec2b22e8fb18ee0" + integrity sha512-Fx6tYjk2wKUgLi8uMANZr8GNZx05u44ArIJldn9VxLvolzlJVgHbTUCbwhMd6bcYky178+WUSxPHO3DAtGLWpw== "@ampproject/remapping@^2.1.0": version "2.2.0" @@ -78,16 +78,16 @@ "@aws-sdk/types" "3.226.0" tslib "^2.3.1" -"@aws-sdk/client-cognito-identity@3.245.0": - version "3.245.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.245.0.tgz#b0cd78ae73457aa1bd2a7146921e55c82ab344d6" - integrity sha512-c5briTS05rAioO5b84bVng9M1KyAXcxJtDHeuoeAAZBuU+Dd0Scg3vyXyAFlGI+TsNyxqHAqqRdAoG4WNxJo/Q== +"@aws-sdk/client-cognito-identity@3.252.0": + version "3.252.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.252.0.tgz#4792553e34adbd4c7ab11021ce48678d7d9d3a1c" + integrity sha512-IHdrzMUGEQcUP7vN/wbVbRCHBXhC0nyaRxnnoHbrJfh5fzPSnkwo7qNf0e8ox+GXq8xgM58dEXefA6/TMYQPFQ== dependencies: "@aws-crypto/sha256-browser" "2.0.0" "@aws-crypto/sha256-js" "2.0.0" - "@aws-sdk/client-sts" "3.245.0" + "@aws-sdk/client-sts" "3.252.0" "@aws-sdk/config-resolver" "3.234.0" - "@aws-sdk/credential-provider-node" "3.245.0" + "@aws-sdk/credential-provider-node" "3.252.0" "@aws-sdk/fetch-http-handler" "3.226.0" "@aws-sdk/hash-node" "3.226.0" "@aws-sdk/invalid-dependency" "3.226.0" @@ -120,10 +120,10 @@ "@aws-sdk/util-utf8-node" "3.208.0" tslib "^2.3.1" -"@aws-sdk/client-sso-oidc@3.245.0": - version "3.245.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.245.0.tgz#3235c856c7bd2ceddf9ac1bda6d599465b8e3dd7" - integrity sha512-0pGPA00kEsu2Yq1Ul+OwftHxws5YVllm4iZrPtGnqmXr7wmf6B9lOtrMQF44y7Tfw53po6+bKz08OKTEWkkjUA== +"@aws-sdk/client-sso-oidc@3.252.0": + version "3.252.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.252.0.tgz#cad2676c707c183f53e28400a29bfa9cbdeff8c7" + integrity sha512-OOwfEXFS+UliGZorEleARsXXUp3ObZSXo9/YY+8XF7/8froAqYjKCEi0tflghgYlh7d6qe7wzD7/6gDL1a/qgA== dependencies: "@aws-crypto/sha256-browser" "2.0.0" "@aws-crypto/sha256-js" "2.0.0" @@ -159,10 +159,10 @@ "@aws-sdk/util-utf8-node" "3.208.0" tslib "^2.3.1" -"@aws-sdk/client-sso@3.245.0": - version "3.245.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.245.0.tgz#91ee2973c9cc052cc3afcecd789cd53ffc9a1950" - integrity sha512-dxzRwRo55ZNQ4hQigC+cishxLSWlBrbr3iszG0FLviavLDOlnVG5UUxWpOIGvwr8pYiSfM4jnfMxiwYwiCLg1g== +"@aws-sdk/client-sso@3.252.0": + version "3.252.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.252.0.tgz#4a37d5bf931ffe9f0d258b8d8d842c6d7eca6233" + integrity sha512-VgBqJvvCU4y9zAHJwYj5nOeNGcCxKdCO4edUxWQVHcpLsVWu49maOVtWuteq9MOrHYeWfQi8bVWGt8MPvv9+bA== dependencies: "@aws-crypto/sha256-browser" "2.0.0" "@aws-crypto/sha256-js" "2.0.0" @@ -198,15 +198,15 @@ "@aws-sdk/util-utf8-node" "3.208.0" tslib "^2.3.1" -"@aws-sdk/client-sts@3.245.0": - version "3.245.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.245.0.tgz#c1c46ca94d11786cf67a5f5adb6a44cd35d73546" - integrity sha512-E+7v2sy34TLni/Dmz6bTU20NWvbHYH9sVUHKQ9kHhmFopUWrs4Nt77f85PbuiKJz/irjUh9ppT5q1odJNRKRVQ== +"@aws-sdk/client-sts@3.252.0": + version "3.252.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.252.0.tgz#735e71136f1e8d7dc954caa776c28154c41e53c0" + integrity sha512-wzfsWOlDFLdmeML8R7DUJWGl9wcRKf2uiunfB1aWzpdlgms0Z7FkHWgkDYHjCPyYHL6EBm84ajGl1UkE7AcmqQ== dependencies: "@aws-crypto/sha256-browser" "2.0.0" "@aws-crypto/sha256-js" "2.0.0" "@aws-sdk/config-resolver" "3.234.0" - "@aws-sdk/credential-provider-node" "3.245.0" + "@aws-sdk/credential-provider-node" "3.252.0" "@aws-sdk/fetch-http-handler" "3.226.0" "@aws-sdk/hash-node" "3.226.0" "@aws-sdk/invalid-dependency" "3.226.0" @@ -252,12 +252,12 @@ "@aws-sdk/util-middleware" "3.226.0" tslib "^2.3.1" -"@aws-sdk/credential-provider-cognito-identity@3.245.0": - version "3.245.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.245.0.tgz#420cbb3c682c7647ddf44d8eb02bb06a26ebe364" - integrity sha512-DkiPv7Yb9iw3yAzvWUAkXrI23F1+kV8grdXzlSzob5suqv/dVON5pFXK9Siz62WwWsa2FeCEpgEF7RA0mrWLtA== +"@aws-sdk/credential-provider-cognito-identity@3.252.0": + version "3.252.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.252.0.tgz#4b36732b54a058f82c305f10bf1611ad57df0943" + integrity sha512-QW3pBYetF06FOQ85FbsFjK6xpon8feF/UOHsL0lMGi4CxUZE6zshV/ectU7tACcc4QV8uMvN7OgcK947CMEEWA== dependencies: - "@aws-sdk/client-cognito-identity" "3.245.0" + "@aws-sdk/client-cognito-identity" "3.252.0" "@aws-sdk/property-provider" "3.226.0" "@aws-sdk/types" "3.226.0" tslib "^2.3.1" @@ -282,31 +282,31 @@ "@aws-sdk/url-parser" "3.226.0" tslib "^2.3.1" -"@aws-sdk/credential-provider-ini@3.245.0": - version "3.245.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.245.0.tgz#6d2b35603c831366cb66f7c651a75c3afd54ad24" - integrity sha512-1SjfVc5Wg0lLRUvwMrfjGgFkl+zfxn74gnkPr6by1QyMAoTzmeUkalPLAIqd+uHtFom9e3K633BQtX7zVPZ5XQ== +"@aws-sdk/credential-provider-ini@3.252.0": + version "3.252.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.252.0.tgz#b05e8ab6612c036073b32f4bb406cd5e5f5ad2d1" + integrity sha512-OfpU8xMYK7+6XQ2dUO4rN0gUhhb/ZLV7iwSL6Ji2pI9gglGhKdOSfmbn6fBfCB50kzWZRNoiQJVaBu/d0Kr0EQ== dependencies: "@aws-sdk/credential-provider-env" "3.226.0" "@aws-sdk/credential-provider-imds" "3.226.0" "@aws-sdk/credential-provider-process" "3.226.0" - "@aws-sdk/credential-provider-sso" "3.245.0" + "@aws-sdk/credential-provider-sso" "3.252.0" "@aws-sdk/credential-provider-web-identity" "3.226.0" "@aws-sdk/property-provider" "3.226.0" "@aws-sdk/shared-ini-file-loader" "3.226.0" "@aws-sdk/types" "3.226.0" tslib "^2.3.1" -"@aws-sdk/credential-provider-node@3.245.0": - version "3.245.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.245.0.tgz#3df89fa2668940902b4c16c28df3d4e30b907ad2" - integrity sha512-Dwv8zmRLTDLeEkGrK/sLNFZSC+ahXZxr07CuID054QKACIdUEvkqYlnalRiTeXngiHGQ54u8wU7f0D32R2oL0g== +"@aws-sdk/credential-provider-node@3.252.0": + version "3.252.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.252.0.tgz#1a67006d3409daf6d0615fc730ca3ac2e44d9d4c" + integrity sha512-Jt854JnB7izkJ/gb3S0hBFqAQPUNUP3eL8gXX2uqk9A9bQFQdS57/Ci0FXaEPwOXzJwAAPazD8dTf6HXMhnm3w== dependencies: "@aws-sdk/credential-provider-env" "3.226.0" "@aws-sdk/credential-provider-imds" "3.226.0" - "@aws-sdk/credential-provider-ini" "3.245.0" + "@aws-sdk/credential-provider-ini" "3.252.0" "@aws-sdk/credential-provider-process" "3.226.0" - "@aws-sdk/credential-provider-sso" "3.245.0" + "@aws-sdk/credential-provider-sso" "3.252.0" "@aws-sdk/credential-provider-web-identity" "3.226.0" "@aws-sdk/property-provider" "3.226.0" "@aws-sdk/shared-ini-file-loader" "3.226.0" @@ -323,15 +323,15 @@ "@aws-sdk/types" "3.226.0" tslib "^2.3.1" -"@aws-sdk/credential-provider-sso@3.245.0": - version "3.245.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.245.0.tgz#e5ea2db3d94e0bcc1af276c42363a9855294d812" - integrity sha512-txWrJc0WNBhXMi7q+twjx7cs/qzgTfbQ+vbag5idRmdoUeiR8rfLvihCab2NaGg50xhh+TaoUCXrgJp3E/XjYQ== +"@aws-sdk/credential-provider-sso@3.252.0": + version "3.252.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.252.0.tgz#0f71bcb8be0fc6606dcac79776f6fee36a872bb0" + integrity sha512-2JGoojMOBjG9/DenctEszjdPechq0uDTpH5nx+z1xxIAugA5+HYG/ncNfpwhmUBCrnOxpRaQViTNqXddEPHlAg== dependencies: - "@aws-sdk/client-sso" "3.245.0" + "@aws-sdk/client-sso" "3.252.0" "@aws-sdk/property-provider" "3.226.0" "@aws-sdk/shared-ini-file-loader" "3.226.0" - "@aws-sdk/token-providers" "3.245.0" + "@aws-sdk/token-providers" "3.252.0" "@aws-sdk/types" "3.226.0" tslib "^2.3.1" @@ -345,20 +345,20 @@ tslib "^2.3.1" "@aws-sdk/credential-providers@^3.186.0": - version "3.245.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-providers/-/credential-providers-3.245.0.tgz#5c2f8c1a1809daa98728bf8e1fac079656eed76b" - integrity sha512-6Uhsxk6MOuWplejhPJf7XDhegHmcZfj8hwnF4mXFJ6u4b2RxWPQCnqPcA0+VoAzIMUqbjqvkSzmVjQelGFtjNg== + version "3.252.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-providers/-/credential-providers-3.252.0.tgz#32d4686329e6ca693510b116404d3e158c304469" + integrity sha512-aA4kwbvSlEcS9QSSlUWoVyoMYEljhkubNxpRhRnObsl4iT9xS06c38lKyhz3m0XIbCVk0lgYTcpue0dlybKS7Q== dependencies: - "@aws-sdk/client-cognito-identity" "3.245.0" - "@aws-sdk/client-sso" "3.245.0" - "@aws-sdk/client-sts" "3.245.0" - "@aws-sdk/credential-provider-cognito-identity" "3.245.0" + "@aws-sdk/client-cognito-identity" "3.252.0" + "@aws-sdk/client-sso" "3.252.0" + "@aws-sdk/client-sts" "3.252.0" + "@aws-sdk/credential-provider-cognito-identity" "3.252.0" "@aws-sdk/credential-provider-env" "3.226.0" "@aws-sdk/credential-provider-imds" "3.226.0" - "@aws-sdk/credential-provider-ini" "3.245.0" - "@aws-sdk/credential-provider-node" "3.245.0" + "@aws-sdk/credential-provider-ini" "3.252.0" + "@aws-sdk/credential-provider-node" "3.252.0" "@aws-sdk/credential-provider-process" "3.226.0" - "@aws-sdk/credential-provider-sso" "3.245.0" + "@aws-sdk/credential-provider-sso" "3.252.0" "@aws-sdk/credential-provider-web-identity" "3.226.0" "@aws-sdk/property-provider" "3.226.0" "@aws-sdk/shared-ini-file-loader" "3.226.0" @@ -598,12 +598,12 @@ "@aws-sdk/types" "3.226.0" tslib "^2.3.1" -"@aws-sdk/token-providers@3.245.0": - version "3.245.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.245.0.tgz#7c675bd88c3fc2bd32e8d760d04472a51f0202fc" - integrity sha512-m/spXR/vEXGb+zMqRUMQYVMwFZSTdK5RkddYqamYkNhIoLm60EYeRu57JsMMs5djKi8dBRSKiXwVHx0l2rXMjg== +"@aws-sdk/token-providers@3.252.0": + version "3.252.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.252.0.tgz#d39e8cdcb86f1d497eefecc348f7b826d7ea4ed4" + integrity sha512-xi3pUP31tyKF4lJFCOgtkwSWESE9W1vE23Vybsq53wzXEYfnRql8RP+C9FFkUouAR6ixPHEcEYplB+l92CY49g== dependencies: - "@aws-sdk/client-sso-oidc" "3.245.0" + "@aws-sdk/client-sso-oidc" "3.252.0" "@aws-sdk/property-provider" "3.226.0" "@aws-sdk/shared-ini-file-loader" "3.226.0" "@aws-sdk/types" "3.226.0" @@ -1783,13 +1783,13 @@ "@octokit/plugin-rest-endpoint-methods" "^6.7.0" "@octokit/types@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-8.0.0.tgz#93f0b865786c4153f0f6924da067fe0bb7426a9f" - integrity sha512-65/TPpOJP1i3K4lBJMnWqPUJ6zuOtzhtagDvydAWbEXpbFYA0oMKKyLb95NFZZP0lSh/4b6K+DQlzvYQJQQePg== + version "8.1.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-8.1.1.tgz#92e304e0f00d563667dfdbe0ae6b52e70d5149bb" + integrity sha512-7tjk+6DyhYAmei8FOEwPfGKc0VE1x56CKPJ+eE44zhDbOyMT+9yan8apfQFxo8oEFsy+0O7PiBtH8w0Yo0Y9Kw== dependencies: "@octokit/openapi-types" "^14.0.0" -"@playwright/test@^1.23.1": +"@playwright/test@^1.29.2": version "1.29.2" resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.29.2.tgz#c48184721d0f0b7627a886e2ec42f1efb2be339d" integrity sha512-+3/GPwOgcoF0xLz/opTnahel1/y42PdcgZ4hs+BZGIUjtmEFSXGg+nFoaH3NSmuc7a6GSFwXDJ5L7VXpqzigNg== @@ -1868,71 +1868,71 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@swc/core-darwin-arm64@1.3.25": - version "1.3.25" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.25.tgz#01ce7b8a88b545a4fc5283ed6f96b22c5733d6c4" - integrity sha512-8PWAVcjTJyj2VrqPBFOIi2w2P0Z8kOCbzHW3+pe+bSXxfGMG0MKPl5U2IXhsEL0ovm4xSFlqW0yygpoP3MmRPw== +"@swc/core-darwin-arm64@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.27.tgz#247b275d505c2462ce08cca4e322becbca8e428a" + integrity sha512-IKlxkhEy99CnP9nduaf5IJWIFcr6D5cZCjYmCs7nWkjMV+aAieyDO9AX4LT8AcHy6CF7ByOX7SKoqk+gVMAaKw== -"@swc/core-darwin-x64@1.3.25": - version "1.3.25" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.25.tgz#9fad102c507011f42c5a5d1f84919b81ab96d7f8" - integrity sha512-5DHGiMYFEj5aa208tCjo7Sn5tiG4xPz+4gUiWVlglxqXFptkNim5xu/1G6VYm5Zk7dI5jJkjTU76GQG7IRvPug== +"@swc/core-darwin-x64@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.27.tgz#11090424c9bfd0d3e799abb06c1fa6a07abf5ed9" + integrity sha512-MtabZIhFf/dL3vs6UMbd+vJsjIkm2NaFqulGV0Jofy2bfVZPTj/b5pXeOlUsTWy7JcH1uixjdx4RvJRyvqJxQA== -"@swc/core-linux-arm-gnueabihf@1.3.25": - version "1.3.25" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.25.tgz#ecf3a34899fdbdc742523524caab29c0db97a6ad" - integrity sha512-YNfLxv9PhZk+jrJbpR1mMrYBUkufo0hiFv3S1OrX3l8edsIP4wPND5w9ZH0Oi898f6Jg9DBrY2zXJMQ+gWkbvA== +"@swc/core-linux-arm-gnueabihf@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.27.tgz#a41b40e056ed0887686e04a30b395521fe3f2d47" + integrity sha512-XELMoGcUTAkk+G4buwIIhu6AIr1U418Odt22HUW8+ZvV+Wty2ICgR/myOIhM3xMb6U2L8ay+evMqoVNMQ0RRTg== -"@swc/core-linux-arm64-gnu@1.3.25": - version "1.3.25" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.25.tgz#50524c9db2dbf874570e45f0a66e0283f02bc2d9" - integrity sha512-kS+spM5/xQ6QvWF1ms3byfjnhUlpjTfFwgCyHnIKgjvsYkDa+vkAIhKq6HuEdaTPaCRCjts0Zarhub1nClUU0g== +"@swc/core-linux-arm64-gnu@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.27.tgz#61705b0d534472a9dbde575594c61ef1377d0075" + integrity sha512-O6vtT6bnrVR9PzEIuA5U7tIfYo7bv97H9K9Vqy2oyHNeGN0H36DKwS4UqPreHtziXNF5+7ubdUYUkrG/j8UnUQ== -"@swc/core-linux-arm64-musl@1.3.25": - version "1.3.25" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.25.tgz#f04a3d3784cff14f96ad9901861485ec0fa14ebf" - integrity sha512-vM3D7LWmjotUAJ2D4F+L+dspFeWrcPNVh0o8TCoTOYCt8DPD5YsUKTpIgOsZ+gReeWUAnNTh0Btx5pGGVfajGA== +"@swc/core-linux-arm64-musl@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.27.tgz#4fb86dcf70b7fc1aba51d82bba00bb2c4134a980" + integrity sha512-Oa0E1i7dOTWpaEZumKoNbTE/Ap+da6nlhqKVUdYrFDrOBi25tz76SdxZIyvAszzmgY89b5yd1naourKmkPXpww== -"@swc/core-linux-x64-gnu@1.3.25": - version "1.3.25" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.25.tgz#761fb020b8a0130e4dccc9c8dce355fa06df63f4" - integrity sha512-xUCLLMDlYa/zB8BftVa4SrxuVpcDxkltCfmBg5r2pZPVskhC5ZJsQZ/AvWNChoAB11shRhjTaWDlmxJEsa7TIg== +"@swc/core-linux-x64-gnu@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.27.tgz#691cc341f8dd7f93a8e01044a2ad8b0e7111d65c" + integrity sha512-S3v9H8oL2a8Ur6AjQyhkC6HfBVPOxKMdBhcZmdNuVgEUHbHdbf/Lka85F9IOYXEarMn0FtQw3ywowS22O9L5Uw== -"@swc/core-linux-x64-musl@1.3.25": - version "1.3.25" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.25.tgz#f944ee48c972ebdcb3e6d6fd62d67eb98dbb1268" - integrity sha512-QzHU3BIaUVRSFNsUn3Qxx1vgtF/f5NqsFMAAPSq9Y8Yq5nrlc2t7cNuOROxHLbUqE+NPUp6+RglleJMoeWz5mA== +"@swc/core-linux-x64-musl@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.27.tgz#a3e1c98513d6e8594c612ab3a671f10e2644dc2e" + integrity sha512-6DDkdXlOADpwICFZTRphCR+cIeS8aEYh4NlyzBito0mOWwIIdfCgALzhkTQOzTOkcD42bP97CIoZ97hqV/puOg== -"@swc/core-win32-arm64-msvc@1.3.25": - version "1.3.25" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.25.tgz#af63ae850ef6e7322e8a5a0959529e96096239d2" - integrity sha512-77VSVtneVOAUL4zkRyQZ6pWVpTsVVdqwly/DKnRnloglGKxYuk5DG5MUBsL72Nnfv4OCHjZ27eI3NUrpLsUb2Q== +"@swc/core-win32-arm64-msvc@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.27.tgz#70c173f78d3dfd97a0d99374d8f6d55b6fa1c4ef" + integrity sha512-baxfH4AbEcaTNo08wxV0W6hiMXwVCxPS4qc0amHpXPti92unvSqeDR1W3C9GjHqzXlWtmCRsq8Ww1pal6ZVLrw== -"@swc/core-win32-ia32-msvc@1.3.25": - version "1.3.25" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.25.tgz#96a869aa4b4c41c44c9c9893ac4aad68d1233022" - integrity sha512-kz0v3K3H6OPEZR3ry72Ad/6C5GrZBRRUk69K58LORQ8tZXQD3UGl85pUbQqyHl8fR5NU76Muxgovj9CI9iTHGA== +"@swc/core-win32-ia32-msvc@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.27.tgz#f34d40710da7939ea32c9a3a4334581468ae09aa" + integrity sha512-7iLJnH71k5qCwxv9NcM/P7nIEzTsC7r1sIiQW6bu+CpC8qZvwl0PS+XvQRlLly2gCZM+Le98tksYG14MEh+Hrw== -"@swc/core-win32-x64-msvc@1.3.25": - version "1.3.25" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.25.tgz#9035c11626653322a404f3f44af11a02d989094c" - integrity sha512-nmQOAzIpNRRnupWzkenJmW4i+h1M76cVNUqEU2MjmtesEkRZEGqv//jefXiyCP2zcbeLNLKiB2ptVJhpd1BvRA== +"@swc/core-win32-x64-msvc@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.27.tgz#f3b131d952808569d99dd4851e95910667743bd5" + integrity sha512-mFM907PDw/jrQ44+TRjIVGEOy2Mu06mMMz0HPMFuRsBzl5t0Kajp3vmn8FkkpS9wH5982VPi6hPYVTb7QJo5Qg== "@swc/core@^1.3.24": - version "1.3.25" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.25.tgz#53786ea51fac319684d6822de1738eb55b73a4b7" - integrity sha512-wqzvM/wu6OsTVYPMStOpm7kIQcPX3GoZ0sC85qzDdsCxmJ1rmItLAD91sXPUmmdk0XqPYjLgT9MRDEIP5woz4g== + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.27.tgz#189da5fd132beba28106f5e5fcf43ce127c800dc" + integrity sha512-praRNgpeYGvwDIm/Cl6JU+yHMvwVraL0U6ejMgGyzvpcm1FVsZd1/EYXGqzbBJ0ALv7Gx4eK56h4GnwV6d4L0w== optionalDependencies: - "@swc/core-darwin-arm64" "1.3.25" - "@swc/core-darwin-x64" "1.3.25" - "@swc/core-linux-arm-gnueabihf" "1.3.25" - "@swc/core-linux-arm64-gnu" "1.3.25" - "@swc/core-linux-arm64-musl" "1.3.25" - "@swc/core-linux-x64-gnu" "1.3.25" - "@swc/core-linux-x64-musl" "1.3.25" - "@swc/core-win32-arm64-msvc" "1.3.25" - "@swc/core-win32-ia32-msvc" "1.3.25" - "@swc/core-win32-x64-msvc" "1.3.25" + "@swc/core-darwin-arm64" "1.3.27" + "@swc/core-darwin-x64" "1.3.27" + "@swc/core-linux-arm-gnueabihf" "1.3.27" + "@swc/core-linux-arm64-gnu" "1.3.27" + "@swc/core-linux-arm64-musl" "1.3.27" + "@swc/core-linux-x64-gnu" "1.3.27" + "@swc/core-linux-x64-musl" "1.3.27" + "@swc/core-win32-arm64-msvc" "1.3.27" + "@swc/core-win32-ia32-msvc" "1.3.27" + "@swc/core-win32-x64-msvc" "1.3.27" "@swc/jest@^0.2.24": version "0.2.24" @@ -1959,9 +1959,9 @@ defer-to-connect "^2.0.1" "@testing-library/dom@^8.11.1", "@testing-library/dom@^8.5.0": - version "8.19.1" - resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.19.1.tgz#0e2dafd281dedb930bb235eac1045470b4129d0e" - integrity sha512-P6iIPyYQ+qH8CvGauAqanhVnjrnRe0IZFSYCeGkSRW9q3u8bdVn2NPI+lasFyVsEQn1J/IFmp5Aax41+dAP9wg== + version "8.20.0" + resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.20.0.tgz#914aa862cef0f5e89b98cc48e3445c4c921010f6" + integrity sha512-d9ULIT+a4EXLX3UU8FBjauG9NnsZHkHztXoIcTsOKoOw030fyjheN9svkTULjJxtYag9DZz5Jz5qkWZDPxTFwA== dependencies: "@babel/code-frame" "^7.10.4" "@babel/runtime" "^7.12.5" @@ -2063,12 +2063,12 @@ integrity sha512-upIS0Gt9Mc8eEpCbYMZ1K8rhNosfKUtimNcINce+zLwJF5UpM3Vv7yz3S5l/1IX+DxTa8lTkUjqynvjRXyJzsg== "@types/babel__core@^7.1.14": - version "7.1.20" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.20.tgz#e168cdd612c92a2d335029ed62ac94c95b362359" - integrity sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ== + version "7.20.0" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.0.tgz#61bc5a4cae505ce98e1e36c5445e4bee060d8891" + integrity sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ== dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" "@types/babel__generator" "*" "@types/babel__template" "*" "@types/babel__traverse" "*" @@ -2342,9 +2342,9 @@ "@types/istanbul-lib-report" "*" "@types/jest@*": - version "29.2.5" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.2.5.tgz#c27f41a9d6253f288d1910d3c5f09484a56b73c0" - integrity sha512-H2cSxkKgVmqNHXP7TC2L/WUorrZu8ZigyRywfVzv6EyBlxj39n4C00hjXYQWsbwqgElaj/CiAeSRmk5GoaKTgw== + version "29.2.6" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.2.6.tgz#1d43c8e533463d0437edef30b2d45d5aa3d95b0a" + integrity sha512-XEUC/Tgw3uMh6Ho8GkUtQ2lPhY5Fmgyp3TdlkTJs1W9VgNxs+Ow/x3Elh8lHQKqCbZL0AubQuqWjHVT033Hhrw== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -2382,9 +2382,9 @@ integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/jsonwebtoken@*": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz#4db9bfaf276ef4fdc3608194fab8b8f2fd1c44f9" - integrity sha512-mM4TkDpA9oixqg1Fv2vVpOFyIVLJjm5x4k0V+K/rEsizfjD7Tk7LKk3GTtbB7KCfP0FEHQtsZqFxYA0+sijNVg== + version "9.0.1" + resolved "https://registry.yarnpkg.com/@types/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz#29b1369c4774200d6d6f63135bf3d1ba3ef997a4" + integrity sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw== dependencies: "@types/node" "*" @@ -2685,9 +2685,9 @@ "@types/react" "*" "@types/react@*", "@types/react@^18.0.5": - version "18.0.26" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.26.tgz#8ad59fc01fef8eaf5c74f4ea392621749f0b7917" - integrity sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug== + version "18.0.27" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.27.tgz#d9425abe187a00f8a5ec182b010d4fd9da703b71" + integrity sha512-3vtRKHgVxu3Jp9t718R9BuzoD4NcQ8YJ5XRzsSKxNDiDonD2MXIT1TmSkenxuCycZJoQT5d2vE8LwWJxBC1gmA== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -2889,9 +2889,9 @@ "@types/yargs-parser" "*" "@types/yargs@^17.0.8": - version "17.0.19" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.19.tgz#8dbecdc9ab48bee0cb74f6e3327de3fa0d0c98ae" - integrity sha512-cAx3qamwaYX9R0fzOIZAlFpo4A+1uBVCxqpKz9D26uTF4srRXaGTTsikQmaotCtNdbhzyUH7ft6p9ktz9s6UNQ== + version "17.0.20" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.20.tgz#107f0fcc13bd4a524e352b41c49fe88aab5c54d5" + integrity sha512-eknWrTHofQuPk2iuqDm1waA7V6xPlbgBoaaXEgYkClhLOnB0TtbW+srJaOToAgawPxPlHQzwypFA2bhZaUGP5A== dependencies: "@types/yargs-parser" "*" @@ -3278,7 +3278,7 @@ ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.6.3, ajv@^8.8.0: +ajv@^8.0.0, ajv@^8.12.0, ajv@^8.6.3, ajv@^8.8.0: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -3405,7 +3405,7 @@ array-ify@^1.0.0: resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng== -array-includes@^3.1.4, array-includes@^3.1.5, array-includes@^3.1.6: +array-includes@^3.1.5, array-includes@^3.1.6: version "3.1.6" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== @@ -3421,7 +3421,7 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array.prototype.flat@^1.2.5: +array.prototype.flat@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== @@ -3514,6 +3514,14 @@ atomically@^1.7.0: resolved "https://registry.yarnpkg.com/atomically/-/atomically-1.7.0.tgz#c07a0458432ea6dbc9a3506fffa424b48bccaafe" integrity sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w== +atomically@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/atomically/-/atomically-2.0.0.tgz#0026565bfdb4f12d8a5484f04e1387b29c14f2fe" + integrity sha512-KpioFPR6tOK/u3z1tFplHI9l2yK3Nu8cl47gAsTfPT6i2UClTXoqOk8dZqGIwWWopen4bSP5HnlaPUDWC7IfKw== + dependencies: + stubborn-fs "^1.2.1" + when-exit "^2.0.0" + autoprefixer@^10.4.13: version "10.4.13" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.13.tgz#b5136b59930209a321e9fa3dca2e7c4d223e83a8" @@ -3788,9 +3796,9 @@ bson-objectid@^2.0.1: integrity sha512-vgnKAUzcDoa+AeyYwXCoHyF2q6u/8H46dxu5JN+4/TZeq/Dlinn0K6GvxsCLb3LHUJl0m/TLiEK31kUwtgocMQ== bson@*, bson@^4.6.5, bson@^4.7.0: - version "4.7.1" - resolved "https://registry.yarnpkg.com/bson/-/bson-4.7.1.tgz#6bc4aa4ae5b4fbd1b03799b4fb3e0e4bdcfac38c" - integrity sha512-XkuFtlCzi0WSy8D6PMhvrQ/q8VlZHN/2bJ/shJglwuA6TPD2ZP/hHLB7iDxOEWVINHN/UVTxP4pqZqOKMXPIXg== + version "4.7.2" + resolved "https://registry.yarnpkg.com/bson/-/bson-4.7.2.tgz#320f4ad0eaf5312dd9b45dc369cc48945e2a5f2e" + integrity sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ== dependencies: buffer "^5.6.0" @@ -3926,9 +3934,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001426: - version "1.0.30001442" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001442.tgz#40337f1cf3be7c637b061e2f78582dc1daec0614" - integrity sha512-239m03Pqy0hwxYPYR5JwOIxRJfLTWtle9FV8zosfV5pHg+/51uD4nxcUlM8+mWWGfwKtt8lJNHnD3cWw9VZ6ow== + version "1.0.30001446" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001446.tgz#6d4ba828ab19f49f9bcd14a8430d30feebf1e0c5" + integrity sha512-fEoga4PrImGcwUUGEol/PoFCSBnSkA9drgdkxXkJLsUBOnJ8rs3zDv6ApqYXGQFOyMPsjh79naWhF4DAxbF8rw== chalk@5.1.2: version "5.1.2" @@ -4026,9 +4034,9 @@ classnames@^2.2.5, classnames@^2.2.6: integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw== clean-css@^5.2.2: - version "5.3.1" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.1.tgz#d0610b0b90d125196a2894d35366f734e5d7aa32" - integrity sha512-lCr8OHhiWCTw4v8POJovCoh4T7I9U11yVsPjMWWnnMmp9ZowCxyad1Pathle/9HjaDp+fdQKjO9fQydE6RHTZg== + version "5.3.2" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.2.tgz#70ecc7d4d4114921f5d298349ff86a31a9975224" + integrity sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww== dependencies: source-map "~0.6.0" @@ -4254,7 +4262,21 @@ concat-stream@^2.0.0: readable-stream "^3.0.2" typedarray "^0.0.6" -conf@*, conf@^10.1.2: +conf@*: + version "11.0.1" + resolved "https://registry.yarnpkg.com/conf/-/conf-11.0.1.tgz#0555825ae5e84f4c043597ed1c25caa028c5b2c1" + integrity sha512-WlLiQboEjKx0bYx2IIRGedBgNjLAxtwPaCSnsjWPST5xR0DB4q8lcsO/bEH9ZRYNcj63Y9vj/JG/5Fg6uWzI0Q== + dependencies: + ajv "^8.12.0" + ajv-formats "^2.1.1" + atomically "^2.0.0" + debounce-fn "^5.1.2" + dot-prop "^7.2.0" + env-paths "^3.0.0" + json-schema-typed "^8.0.1" + semver "^7.3.8" + +conf@^10.1.2: version "10.2.0" resolved "https://registry.yarnpkg.com/conf/-/conf-10.2.0.tgz#838e757be963f1a2386dfe048a98f8f69f7b55d6" integrity sha512-8fLl9F04EJqjSqH+QjITQfJF8BrOVaYr1jewVgSRAEWePfxT0sku4w2hrGQ60BC/TNLGQ2pgxNlTbWQmMPFvXg== @@ -4810,9 +4832,9 @@ data-uri-to-buffer@3: integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== data-uri-to-buffer@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz#b5db46aea50f6176428ac05b73be39a57701a64b" - integrity sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA== + version "4.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== data-urls@^3.0.2: version "3.0.2" @@ -4850,7 +4872,14 @@ debounce-fn@^4.0.0: dependencies: mimic-fn "^3.0.0" -debug@2, debug@2.6.9, debug@^2.6.9: +debounce-fn@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/debounce-fn/-/debounce-fn-5.1.2.tgz#c77bc447ef36828ecdd066df7de23f475e0a6281" + integrity sha512-Sr4SdOZ4vw6eQDvPYNxHogvrxmCIld/VenC5JbNrFwMiwd7lY/Z18ZFfo+EWNG4DD9nFlAujWAo/wGuOPHmy5A== + dependencies: + mimic-fn "^4.0.0" + +debug@2, debug@2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -5080,9 +5109,9 @@ doctrine@^3.0.0: esutils "^2.0.2" dom-accessibility-api@^0.5.6, dom-accessibility-api@^0.5.9: - version "0.5.15" - resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.15.tgz#357e74338704f36fada8b2e01a4bfc11ef436ac9" - integrity sha512-8o+oVqLQZoruQPYy3uAAQtc6YbtSiRq5aPJBhJ82YTJRHvI6ofhYAkC81WmjFTnfUbqg6T3aCglIpU9p/5e7Cw== + version "0.5.16" + resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz#5a7429e6066eb3664d911e33fb0e45de8eb08453" + integrity sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg== dom-converter@^0.2.0: version "0.2.0" @@ -5158,6 +5187,13 @@ dot-prop@^6.0.1: dependencies: is-obj "^2.0.0" +dot-prop@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-7.2.0.tgz#468172a3529779814d21a779c1ba2f6d76609809" + integrity sha512-Ol/IPXUARn9CSbkrdV4VJo7uCy1I3VuSiWCaFSg+8BdUOzF9n3jefIpcgAydvUZbTdEBZs2vEiTiS9m61ssiDA== + dependencies: + type-fest "^2.11.2" + dotenv@^8.2.0: version "8.6.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" @@ -5258,6 +5294,11 @@ env-paths@^2.2.1: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== +env-paths@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-3.0.0.tgz#2f1e89c2f6dbd3408e1b1711dd82d62e317f58da" + integrity sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A== + envinfo@^7.7.3: version "7.8.1" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" @@ -5271,12 +5312,13 @@ error-ex@^1.3.1: is-arrayish "^0.2.1" es-abstract@^1.19.0, es-abstract@^1.20.4: - version "1.21.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.0.tgz#dd1b69ea5bfc3c27199c9753efd4de015102c252" - integrity sha512-GUGtW7eXQay0c+PRq0sGIKSdaBorfVqsCMhGHo4elP7YVqZu9nCZS4UkK4gv71gOWNMra/PaSKD3ao1oWExO0g== + version "1.21.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.1.tgz#e6105a099967c08377830a0c9cb589d570dd86c6" + integrity sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg== dependencies: + available-typed-arrays "^1.0.5" call-bind "^1.0.2" - es-set-tostringtag "^2.0.0" + es-set-tostringtag "^2.0.1" es-to-primitive "^1.2.1" function-bind "^1.1.1" function.prototype.name "^1.1.5" @@ -5289,7 +5331,7 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: has-proto "^1.0.1" has-symbols "^1.0.3" internal-slot "^1.0.4" - is-array-buffer "^3.0.0" + is-array-buffer "^3.0.1" is-callable "^1.2.7" is-negative-zero "^2.0.2" is-regex "^1.1.4" @@ -5314,25 +5356,26 @@ es-array-method-boxes-properly@^1.0.0: integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== es-get-iterator@^1.0.2, es-get-iterator@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.2.tgz#9234c54aba713486d7ebde0220864af5e2b283f7" - integrity sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ== + version "1.1.3" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" + integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw== dependencies: call-bind "^1.0.2" - get-intrinsic "^1.1.0" - has-symbols "^1.0.1" - is-arguments "^1.1.0" + get-intrinsic "^1.1.3" + has-symbols "^1.0.3" + is-arguments "^1.1.1" is-map "^2.0.2" is-set "^2.0.2" - is-string "^1.0.5" + is-string "^1.0.7" isarray "^2.0.5" + stop-iteration-iterator "^1.0.0" es-module-lexer@^0.9.0: version "0.9.3" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== -es-set-tostringtag@^2.0.0: +es-set-tostringtag@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== @@ -5447,15 +5490,16 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-import-resolver-node@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" - integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== +eslint-import-resolver-node@^0.3.7: + version "0.3.7" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" + integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== dependencies: debug "^3.2.7" - resolve "^1.20.0" + is-core-module "^2.11.0" + resolve "^1.22.1" -eslint-module-utils@^2.7.3: +eslint-module-utils@^2.7.4: version "2.7.4" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== @@ -5463,22 +5507,24 @@ eslint-module-utils@^2.7.3: debug "^3.2.7" eslint-plugin-import@^2.20.0: - version "2.26.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" - integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== + version "2.27.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" + integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== dependencies: - array-includes "^3.1.4" - array.prototype.flat "^1.2.5" - debug "^2.6.9" + array-includes "^3.1.6" + array.prototype.flat "^1.3.1" + array.prototype.flatmap "^1.3.1" + debug "^3.2.7" doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.7.3" + eslint-import-resolver-node "^0.3.7" + eslint-module-utils "^2.7.4" has "^1.0.3" - is-core-module "^2.8.1" + is-core-module "^2.11.0" is-glob "^4.0.3" minimatch "^3.1.2" - object.values "^1.1.5" - resolve "^1.22.0" + object.values "^1.1.6" + resolve "^1.22.1" + semver "^6.3.0" tsconfig-paths "^3.14.1" eslint-plugin-jest-dom@^4.0.1: @@ -5498,9 +5544,9 @@ eslint-plugin-jest@^23.16.0: "@typescript-eslint/experimental-utils" "^2.5.0" eslint-plugin-jsx-a11y@^6.2.1: - version "6.7.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.0.tgz#b7a8ced4a427bb54eab050fc2a59e31938a16445" - integrity sha512-EGGRKhzejSzXKtjmEjWNtr4SK/DkMkSzkBH7g7e7moBDXZXrqaUIxkmD7uF93upMysc4dKYEJwupu7Dff+ShwA== + version "6.7.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz#fca5e02d115f48c9a597a6894d5bcec2f7a76976" + integrity sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA== dependencies: "@babel/runtime" "^7.20.7" aria-query "^5.1.3" @@ -5530,9 +5576,9 @@ eslint-plugin-react-hooks@^2.3.0: integrity sha512-Y2c4b55R+6ZzwtTppKwSmK/Kar8AdLiC2f9NADCuxbcTgPPg41Gyqa6b9GppgXSvCtkRw43ZE86CT5sejKC6/g== eslint-plugin-react@^7.18.0: - version "7.31.11" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.31.11.tgz#011521d2b16dcf95795df688a4770b4eaab364c8" - integrity sha512-TTvq5JsT5v56wPa9OYHzsrOlHzKZKjV+aLgS+55NJP/cuzdiQPC7PfYoUjMoxlffKtvijpk7vA/jmuqRb9nohw== + version "7.32.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.32.1.tgz#88cdeb4065da8ca0b64e1274404f53a0f9890200" + integrity sha512-vOjdgyd0ZHBXNsmvU+785xY8Bfe57EFbTYYk8XrROzWpr9QBvpjITvAXt9xqcE6+8cjR/g1+mfumPToxsl1www== dependencies: array-includes "^3.1.6" array.prototype.flatmap "^1.3.1" @@ -5546,7 +5592,7 @@ eslint-plugin-react@^7.18.0: object.hasown "^1.1.2" object.values "^1.1.6" prop-types "^15.8.1" - resolve "^2.0.0-next.3" + resolve "^2.0.0-next.4" semver "^6.3.0" string.prototype.matchall "^4.0.8" @@ -5873,12 +5919,12 @@ fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== -fast-redact@^3.0.0: +fast-redact@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.1.2.tgz#d58e69e9084ce9fa4c1a6fa98a3e1ecf5d7839aa" integrity sha512-+0em+Iya9fKGfEQGcd62Yv6onjBmmhV1uh86XVfOU8VwAe6kaFdQCWI9s0/Nnugx5Vd9tdbZ7e6gE2tR9dzXdw== -fast-safe-stringify@^2.0.8, fast-safe-stringify@^2.1.1: +fast-safe-stringify@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== @@ -6040,11 +6086,6 @@ flatley@^5.2.0: dependencies: is-buffer "^1.1.6" -flatstr@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/flatstr/-/flatstr-1.0.12.tgz#c2ba6a08173edbb6c9640e3055b95e287ceb5931" - integrity sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw== - flatted@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" @@ -6205,7 +6246,7 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== @@ -6350,9 +6391,9 @@ glob@^7.0.0, glob@^7.0.5, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: path-is-absolute "^1.0.0" glob@^8.0.0, glob@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" - integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -6541,7 +6582,7 @@ has-proto@^1.0.1: resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== -has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: +has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== @@ -6751,9 +6792,9 @@ i18next-browser-languagedetector@^6.1.8: "@babel/runtime" "^7.19.0" i18next-http-middleware@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/i18next-http-middleware/-/i18next-http-middleware-3.2.1.tgz#a0dff150de2273ec650da67336ad882eef58d179" - integrity sha512-zBwXxDChT0YLoTXIR6jRuqnUUhXW0Iw7egoTnNXyaDRtTbfWNXwU0a53ThyuRPQ+k+tXu3ZMNKRzfLuononaRw== + version "3.2.2" + resolved "https://registry.yarnpkg.com/i18next-http-middleware/-/i18next-http-middleware-3.2.2.tgz#7bc6e5d65397ededb30737b6ff4fe47ce81607fa" + integrity sha512-OW2sWnbns+PuLi77T+/ni4Mi+TNJ6Q6XNGdZicMv9FD+QfZrFrynBVqryHB/bfflszx2Zswg/kxtCildVLdhSA== i18next@^22.0.1: version "22.4.9" @@ -6802,9 +6843,9 @@ ignore@^5.1.8, ignore@^5.2.0: integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== immer@^9.0.6: - version "9.0.17" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.17.tgz#7cfe8fbb8b461096444e9da7a5ec4a67c6c4adf4" - integrity sha512-+hBruaLSQvkPfxRiTLK/mi4vLH+/VQS6z2KJahdoxlleFOI8ARqzOF17uy12eFDlqWmPoygwc5evgwcp+dlHhg== + version "9.0.18" + resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.18.tgz#d2faee58fd0e34f017f329b98cdab37826fa31b8" + integrity sha512-eAPNpsj7Ax1q6Y/3lm2PmlwRcFzpON7HSNQ3ru5WQH1/PSpnyed/HpNOELl2CxLKoj4r+bAHgdyKqW5gc2Se1A== immutable@^4.0.0: version "4.2.2" @@ -6939,7 +6980,7 @@ ipaddr.js@1.9.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-arguments@^1.0.4, is-arguments@^1.1.0, is-arguments@^1.1.1: +is-arguments@^1.0.4, is-arguments@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== @@ -6947,7 +6988,7 @@ is-arguments@^1.0.4, is-arguments@^1.1.0, is-arguments@^1.1.1: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-array-buffer@^3.0.0, is-array-buffer@^3.0.1: +is-array-buffer@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.1.tgz#deb1db4fcae48308d54ef2442706c0393997052a" integrity sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ== @@ -7005,7 +7046,7 @@ is-ci@3.0.1, is-ci@^3.0.1: dependencies: ci-info "^3.2.0" -is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== @@ -7859,6 +7900,11 @@ json-schema-typed@^7.0.3: resolved "https://registry.yarnpkg.com/json-schema-typed/-/json-schema-typed-7.0.3.tgz#23ff481b8b4eebcd2ca123b4fa0409e66469a2d9" integrity sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A== +json-schema-typed@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/json-schema-typed/-/json-schema-typed-8.0.1.tgz#826ee39e3b6cef536f85412ff048d3ff6f19dfa0" + integrity sha512-XQmWYj2Sm4kn4WeTYvmpKEbyPsL7nBsb647c7pMe6l02/yx2+Jfc4dT6UZkEXnIUb5LhD55r2HPsJ1milQ4rDg== + json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" @@ -7975,9 +8021,9 @@ kleur@^3.0.3: integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== klona@^2.0.4, klona@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.5.tgz#d166574d90076395d9963aa7a928fabb8d76afbc" - integrity sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ== + version "2.0.6" + resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" + integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== language-subtag-registry@~0.3.2: version "0.3.22" @@ -8389,9 +8435,9 @@ minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: brace-expansion "^1.1.7" minimatch@^5.0.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.2.tgz#0939d7d6f0898acbd1508abe534d1929368a8fff" - integrity sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg== + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== dependencies: brace-expansion "^2.0.1" @@ -8508,6 +8554,11 @@ mongodb@^3.7.3: optionalDependencies: saslprep "^1.0.0" +mongoose-aggregate-paginate-v2@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/mongoose-aggregate-paginate-v2/-/mongoose-aggregate-paginate-v2-1.0.6.tgz#fd2f2564d1bbf52f49a196f0b7b03675913dacca" + integrity sha512-UuALu+mjhQa1K9lMQvjLL3vm3iALvNw8PQNIh2gp1b+tO5hUa0NC0Wf6/8QrT9PSJVTihXaD8hQVy3J4e0jO0Q== + mongoose-paginate-v2@*, mongoose-paginate-v2@^1.6.1: version "1.7.1" resolved "https://registry.yarnpkg.com/mongoose-paginate-v2/-/mongoose-paginate-v2-1.7.1.tgz#0b390f5eb8e5dca55ffcb1fd7b4d8078636cb8f1" @@ -8527,9 +8578,9 @@ mongoose@6.5.0: sift "16.0.0" mongoose@^6.3.0: - version "6.8.3" - resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-6.8.3.tgz#6580b9846a9defbb0f0cff317443d4f87e9cce8e" - integrity sha512-qrVWefJK+wFNBH0ALV+oiyJ+FN42O/BqvHFmlFJJ2LKuNmQEOE0JV8FCxnZqtanwbHs4i+k/SkjhtC+C01haaw== + version "6.8.4" + resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-6.8.4.tgz#f27ec3eca6df3ebb2df1f43623f4cd88744ca9a8" + integrity sha512-19Jk2hbSAPcM4u6ErW0UPwaSO2YfP/cXfBS9YEiNgNzZfXd+jkyemqJ+t2aflaicXeU4VdTP33pZYxqjk2hUYw== dependencies: bson "^4.7.0" kareem "2.5.1" @@ -8665,16 +8716,23 @@ node-abi@^3.3.0: semver "^7.3.5" node-addon-api@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.0.0.tgz#7d7e6f9ef89043befdb20c1989c905ebde18c501" - integrity sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA== + version "5.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.1.0.tgz#49da1ca055e109a23d537e9de43c09cca21eb762" + integrity sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA== node-domexception@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== -node-fetch@2, node-fetch@2.6.7, node-fetch@^2.6.1, node-fetch@^2.6.7: +node-fetch@2, node-fetch@^2.6.1, node-fetch@^2.6.7: + version "2.6.8" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.8.tgz#a68d30b162bc1d8fd71a367e81b997e1f4d4937e" + integrity sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg== + dependencies: + whatwg-url "^5.0.0" + +node-fetch@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== @@ -8701,9 +8759,9 @@ node-releases@^2.0.6: integrity sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A== nodemailer@^6.4.2: - version "6.8.0" - resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.8.0.tgz#804bcc5256ee5523bc914506ee59f8de8f0b1cd5" - integrity sha512-EjYvSmHzekz6VNkNd12aUqAco+bOkRe3Of5jVhltqKhEsjw/y0PYPJfp83+s9Wzh1dspYAkUW/YNQ350NATbSQ== + version "6.9.0" + resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.9.0.tgz#a17488ff470ff9edf1bb31d9ec23079bc94f7dd3" + integrity sha512-jFaCEGTeT3E/m/5R2MHWiyQH3pSARECRUDM+1hokOYc3lQAAG7ASuy+2jIsYVf+RVa9zePopSQwKNVFH8DKUpA== nodemon@^2.0.6: version "2.0.20" @@ -8808,9 +8866,9 @@ object-assign@^4.0.1, object-assign@^4.1.1: integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== object-inspect@^1.12.2, object-inspect@^1.9.0: - version "1.12.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== object-is@^1.0.1, object-is@^1.1.5: version "1.1.5" @@ -8866,7 +8924,7 @@ object.hasown@^1.1.2: define-properties "^1.1.4" es-abstract "^1.20.4" -object.values@^1.1.5, object.values@^1.1.6: +object.values@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== @@ -9296,7 +9354,7 @@ pify@^3.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== -pino-abstract-transport@^1.0.0: +pino-abstract-transport@^1.0.0, pino-abstract-transport@v1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-1.0.0.tgz#cc0d6955fffcadb91b7b49ef220a6cc111d48bb3" integrity sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA== @@ -9324,28 +9382,27 @@ pino-pretty@*, pino-pretty@^9.1.1: sonic-boom "^3.0.0" strip-json-comments "^3.1.1" -pino-std-serializers@*: +pino-std-serializers@*, pino-std-serializers@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-6.1.0.tgz#307490fd426eefc95e06067e85d8558603e8e844" integrity sha512-KO0m2f1HkrPe9S0ldjx7za9BJjeHqBku5Ch8JyxETxT8dEFGz1PwgrHaOQupVYitpzbFSYm7nnljxD8dik2c+g== -pino-std-serializers@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-3.2.0.tgz#b56487c402d882eb96cd67c257868016b61ad671" - integrity sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg== - -pino@^6.4.1: - version "6.14.0" - resolved "https://registry.yarnpkg.com/pino/-/pino-6.14.0.tgz#b745ea87a99a6c4c9b374e4f29ca7910d4c69f78" - integrity sha512-iuhEDel3Z3hF9Jfe44DPXR8l07bhjuFY3GMHIXbjnY9XcafbyDDwl2sN2vw2GjMPf5Nkoe+OFao7ffn9SXaKDg== +pino@^8.8.0: + version "8.8.0" + resolved "https://registry.yarnpkg.com/pino/-/pino-8.8.0.tgz#1f0d6695a224aa06afc7ad60f2ccc4772d3b9233" + integrity sha512-cF8iGYeu2ODg2gIwgAHcPrtR63ILJz3f7gkogaHC/TXVVXxZgInmNYiIpDYEwgEkxZti2Se6P2W2DxlBIZe6eQ== dependencies: - fast-redact "^3.0.0" - fast-safe-stringify "^2.0.8" - flatstr "^1.0.12" - pino-std-serializers "^3.1.0" - process-warning "^1.0.0" + atomic-sleep "^1.0.0" + fast-redact "^3.1.1" + on-exit-leak-free "^2.1.0" + pino-abstract-transport v1.0.0 + pino-std-serializers "^6.0.0" + process-warning "^2.0.0" quick-format-unescaped "^4.0.3" - sonic-boom "^1.0.2" + real-require "^0.2.0" + safe-stable-stringify "^2.3.1" + sonic-boom "^3.1.0" + thread-stream "^2.0.0" pirates@^4.0.1, pirates@^4.0.4: version "4.0.5" @@ -9899,9 +9956,9 @@ prelude-ls@~1.1.2: integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== prettier@^2.6.2: - version "2.8.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.2.tgz#c4ea1b5b454d7c4b59966db2e06ed7eec5dfd160" - integrity sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw== + version "2.8.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632" + integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw== pretty-error@^4.0.0: version "4.0.0" @@ -9958,10 +10015,10 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process-warning@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-1.0.0.tgz#980a0b25dc38cd6034181be4b7726d89066b4616" - integrity sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q== +process-warning@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-2.1.0.tgz#1e60e3bfe8183033bbc1e702c2da74f099422d1a" + integrity sha512-9C20RLxrZU/rFnxWncDkuF6O999NdIf3E1ws4B0ZeY3sRVPzWBMsYDE2lxjxhiXxg464cQTgKUGm8/i6y2YGXg== process@^0.11.10: version "0.11.10" @@ -10472,6 +10529,11 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +real-require@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/real-require/-/real-require-0.2.0.tgz#209632dea1810be2ae063a6ac084fee7e33fba78" + integrity sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg== + rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" @@ -10640,11 +10702,11 @@ resolve-pathname@^3.0.0: integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== resolve.exports@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" - integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== + version "1.1.1" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999" + integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.9.0: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.9.0: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -10653,7 +10715,7 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.20.0, resolve@^1.22 path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^2.0.0-next.3: +resolve@^2.0.0-next.4: version "2.0.0-next.4" resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== @@ -10754,6 +10816,11 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" +safe-stable-stringify@^2.3.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.2.tgz#ec7b037768098bf65310d1d64370de0dc02353aa" + integrity sha512-gMxvPJYhP0O9n2pvcfYfIuYgbledAOJFcqRThtPRmjscaipiwcwPPKLytpVzMkG2HAN87Qmo2d4PtGiri1dSLA== + "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -10894,9 +10961,9 @@ send@0.18.0: statuses "2.0.1" serialize-javascript@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + version "6.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" + integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== dependencies: randombytes "^2.1.0" @@ -11113,14 +11180,6 @@ socks@^2.3.3, socks@^2.6.2, socks@^2.7.1: ip "^2.0.0" smart-buffer "^4.2.0" -sonic-boom@^1.0.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-1.4.1.tgz#d35d6a74076624f12e6f917ade7b9d75e918f53e" - integrity sha512-LRHh/A8tpW7ru89lrlkU4AszXt1dbwSjVWguGrmlxE7tawVmDBlI1PILMkXAxJTwqhgsEeTHzj36D5CmHgQmNg== - dependencies: - atomic-sleep "^1.0.0" - flatstr "^1.0.12" - sonic-boom@^2.1.0: version "2.8.0" resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-2.8.0.tgz#c1def62a77425090e6ad7516aad8eb402e047611" @@ -11128,7 +11187,7 @@ sonic-boom@^2.1.0: dependencies: atomic-sleep "^1.0.0" -sonic-boom@^3.0.0: +sonic-boom@^3.0.0, sonic-boom@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-3.2.1.tgz#972ceab831b5840a08a002fa95a672008bda1c38" integrity sha512-iITeTHxy3B9FGu8aVdiDXUVAcHMF9Ss0cCsAOo2HfCrmVGT3/DT5oYaeu0M/YKZDlKTvChEyPq0zI9Hf33EX6A== @@ -11281,6 +11340,13 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== +stop-iteration-iterator@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz#6a60be0b4ee757d1ed5254858ec66b10c49285e4" + integrity sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ== + dependencies: + internal-slot "^1.0.4" + stream-combiner@~0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" @@ -11457,6 +11523,11 @@ strtok3@^6.2.4: "@tokenizer/token" "^0.3.0" peek-readable "^4.1.0" +stubborn-fs@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/stubborn-fs/-/stubborn-fs-1.2.1.tgz#3758a8b2b9be9212d1af1a286de2f04836e5b41c" + integrity sha512-IgTveO0OGXMMi9iZtfPoYQY6IpeZR3ILtSsjMapFgLxofWaHG1sNlInV7yTRDV06YiNdwiKrK7505Fxq8ly+YA== + style-loader@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-2.0.0.tgz#9669602fd4690740eaaec137799a03addbbc393c" @@ -11622,6 +11693,13 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" +thread-stream@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-2.3.0.tgz#4fc07fb39eff32ae7bad803cb7dd9598349fed33" + integrity sha512-kaDqm1DET9pp3NXwR8382WHbnpXnRkN9xGN9dQt3B2+dmXiW8X1SOwmFOxAErEQ47ObhZ96J6yhZNXuyCOL7KA== + dependencies: + real-require "^0.2.0" + through2@^2.0.0, through2@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" @@ -11855,15 +11933,15 @@ type-fest@^1.0.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== -type-fest@^2.13.0, type-fest@^2.5.1: +type-fest@^2.11.2, type-fest@^2.13.0, type-fest@^2.5.1: version "2.19.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== type-fest@^3.0.0: - version "3.5.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.5.1.tgz#9555ae435f560c1b4447b70bdd195bb2c86c6c92" - integrity sha512-70T99cpILFk2fzwuljwWxmazSphFrdOe3gRHbp6bqs71pxFBbJwFqnmkLO2lQL6aLHxHmYAnP/sL+AJWpT70jA== + version "3.5.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.5.2.tgz#16ff97c5dc1fd6bd6d50ef3c6ba92cc9c1add859" + integrity sha512-Ph7S4EhXzWy0sbljEuZo0tTNoLl+K2tPauGrQpcwUWrOVneLePTuhVzcuzVJJ6RU5DsNwQZka+8YtkXXU4z9cA== type-is@~1.6.18: version "1.6.18" @@ -12313,6 +12391,11 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" +when-exit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/when-exit/-/when-exit-2.0.0.tgz#e5a4f30dbb8a6a8382490cd0718807357e7b98fe" + integrity sha512-17lB0PWIgOuil9dgC/vdQY0aq5lwT0umemaIsOTNDBsc1TwclvocXOvkwenwUXEawN5mW3F64X52xPkTFnihDw== + which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" @@ -12378,9 +12461,9 @@ wildcard@^2.0.0: integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== windows-release@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-5.0.1.tgz#d1f7cd1f25660ba05cac6359711844dce909a8ed" - integrity sha512-y1xFdFvdMiDXI3xiOhMbJwt1Y7dUxidha0CWPs1NgjZIjZANTcX7+7bMqNjuezhzb8s5JGEiBAbQjQQYYy7ulw== + version "5.1.0" + resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-5.1.0.tgz#fc56e8c53d970bd63ded965c85b2fbeacf7d80da" + integrity sha512-CddHecz5dt0ngTjGPP1uYr9Tjl4qq5rEKNk8UGb8XCdngNXI+GRYvqelD055FdiUgqODZz3R/5oZWYldPtXQpA== dependencies: execa "^5.1.1"