Commit Graph

11666 Commits

Author SHA1 Message Date
Jacob Fletcher
57e9109f93 Merge branch 'beta' into feat/on-demand-rsc 2024-10-07 10:27:21 -04:00
Jacob Fletcher
515629b51d cleanup 2024-10-07 10:13:57 -04:00
Jacob Fletcher
6ec779fb6c Squashed commit of the following:
commit 7a0609ab57
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Mon Oct 7 10:00:34 2024 -0400

    wires abort controller into server fn provider

commit 633aaa721d
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Mon Oct 7 09:50:12 2024 -0400

    adjust err handling

commit 860b6cf2bf
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Mon Oct 7 09:26:01 2024 -0400

    safely accesses signal

commit 463e05d7b9
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Mon Oct 7 09:13:39 2024 -0400

    adds additional ac check prior to firing action

commit 231c4b3d1f
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Mon Oct 7 09:00:45 2024 -0400

    cleanup

commit 494c970b0a
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Mon Oct 7 08:46:28 2024 -0400

    more acs

commit 8dcb2eae17
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Sun Oct 6 23:33:53 2024 -0400

    adds abort controllers to docinfo and form actions

commit 0da4326e43
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Sun Oct 6 23:05:14 2024 -0400

    adds back remaining actions

commit 292d8b53e4
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Sun Oct 6 22:53:44 2024 -0400

    thrads abort controller to onchange

commit ca8629e5a6
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Sun Oct 6 22:02:20 2024 -0400

    reintroduces some actions

commit 5f001c0f52
Merge: 75dd030e2 2ba40f333
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Sat Oct 5 09:15:25 2024 -0400

    Merge branch 'beta' into feat/server-actions

commit 2ba40f3335
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Sat Oct 5 09:13:43 2024 -0400

    chore: removes duplicative join field test (#8558)

    There are two of the exact same e2e tests for the join field, which
    throws an error when running these tests locally because they have
    identical names.

commit 463490f670
Author: Elliot DeNolf <denolfe@users.noreply.github.com>
Date:   Fri Oct 4 18:38:27 2024 -0700

    fix(templates): await params/cookies properly (#8560)

commit d564cd44e9
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Fri Oct 4 17:29:38 2024 -0400

    chore: deflakes lexical e2e test (#8559)

    This has caused me great pain. The problem with this test is that the
    page was waiting for a URL which includes a search query that never
    arrives. This moves the check into a regex pattern for a more accurate
    catch.

commit 75dd030e24
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Fri Oct 4 16:26:19 2024 -0400

    reverts reset back to fetch to test

commit 7c62e2a327
Author: Paul <paul@payloadcms.com>
Date:   Fri Oct 4 13:02:56 2024 -0600

    feat(ui)!: scope all payload css to payload-default layer (#8545)

    All payload css is now encapsulated inside CSS layers under `@layer
    payload-default`

    Any custom css will now have the highest possible specificity.
    We have also provided a new layer `@layer payload` if you want to use
    layers and ensure that your styles are applied after payload.

    To override existing styles in a way that the existing rules of
    specificity would be respected you can use the default layer like so
    ```css
    @layer payload-default {
      // my styles within the payload specificity
    }
    ```

commit 400293b8ee
Author: Sasha <64744993+r1tsuu@users.noreply.github.com>
Date:   Fri Oct 4 21:46:41 2024 +0300

    fix: duplicate with upload collections (#8552)

    Fixes the duplicate operation with uploads
    Enables duplicate for upload collections by default

commit e4a413eb9a
Author: Elliot DeNolf <denolfe@gmail.com>
Date:   Fri Oct 4 11:31:06 2024 -0700

    chore(release): v3.0.0-beta.111 [skip ci]

commit b99590f477
Author: Sasha <64744993+r1tsuu@users.noreply.github.com>
Date:   Fri Oct 4 21:28:43 2024 +0300

    chore(templates): update templates with next.js promises (#8547)

    Updates templates according to this PR
    https://github.com/payloadcms/payload/pull/8489

commit a4704c1453
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Fri Oct 4 13:53:52 2024 -0400

    moves docinfo back to fetch to test

commit 0d3416c96d
Author: Alessio Gravili <alessio@gravili.de>
Date:   Fri Oct 4 13:39:03 2024 -0400

    fix(db-postgres): missing types for db.pool by moving @types/pg from devDependencies to dependencies (#8556)

    Fixes lack of types in installed project:

    ![CleanShot 2024-10-04 at 19 18
    58@2x](https://github.com/user-attachments/assets/e7c519ee-72fd-424b-8f6c-41032322fa5e)

    Since we expose stuff from @types/pg to the end user, we need it to be
    installed in the end users project => move to dependencies.

commit 2f6ee80a6a
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Fri Oct 4 12:54:45 2024 -0400

    changes addFieldRow back to fetch

commit 0128eedf70
Author: Sasha <64744993+r1tsuu@users.noreply.github.com>
Date:   Fri Oct 4 19:25:05 2024 +0300

    fix(drizzle)!: make radio and select column names to snake_case (#8439)

    Fixes https://github.com/payloadcms/payload/issues/8402 and
    https://github.com/payloadcms/payload/issues/8027

    Before DB column names were camelCase:

    ![image](https://github.com/user-attachments/assets/d2965bcf-290a-4f86-9bf4-dfe7e8613934)

    After this change, they are snake_case:
    ![Screenshot 2024-10-04
    114226](https://github.com/user-attachments/assets/bbc8c20b-6745-4dd3-b0c8-56263a4e37b1)

    #### Breaking SQLite / Postgres ⚠️
    If you had any select (not `hasMany: true`) or radio fields with the
    name in camelCase, for example:
    ```ts
    {
      name: 'selectReadOnly',
      type: 'select',
      admin: {
        readOnly: true,
      },
      options: [
        {
          label: 'Value One',
          value: 'one',
        },
        {
          label: 'Value Two',
          value: 'two',
        },
      ],
    },
    ```
    This previously was mapped to the db column name `"selectReadOnly"`. Now
    it's `select_read_only`.
    Generate a new migration to rename your columns.
    ```sh
    pnpm payload migrate:create
    ```
    Then select "rename column" for targeted columns and Drizzle will handle
    the migration.

    ---------

    Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>

commit 414030e1f1
Author: Sasha <64744993+r1tsuu@users.noreply.github.com>
Date:   Fri Oct 4 18:48:54 2024 +0300

    fix(drizzle): row / collapsible inside of localized fields (#8539)

    Fixes https://github.com/payloadcms/payload/issues/8405

commit 41efcbe4ac
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Fri Oct 4 10:02:48 2024 -0400

    build err

commit 2203d6046c
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Fri Oct 4 08:32:13 2024 -0400

    reverts default edit view onChange

commit 2cd9594f55
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Fri Oct 4 07:47:49 2024 -0400

    brings back actions for everything except lexical

commit cc2cad3140
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Fri Oct 4 00:58:35 2024 -0400

    more cleanup

commit 87e11bd6ad
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Fri Oct 4 00:20:02 2024 -0400

    remove website lockfile

commit caf4c4a0df
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Fri Oct 4 00:12:25 2024 -0400

    properly scopes effect cleanup return

commit 3ddd972de0
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Fri Oct 4 00:07:09 2024 -0400

    adjusts abort controllers

commit 6c95f0a658
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Fri Oct 4 00:00:00 2024 -0400

    fix api route

commit 9206adedee
Merge: 726f8b003 f6eb027f2
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 23:45:17 2024 -0400

    Merge branch 'beta' into feat/server-actions

commit 726f8b003d
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 23:11:53 2024 -0400

    again

commit 40e5571c0e
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 22:56:55 2024 -0400

    more

commit bdbe7dd41f
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 22:10:48 2024 -0400

    temprarily brings back fetch to debug

commit 08bd461d4b
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 19:43:59 2024 -0400

    properly aborts on unmount

commit cf617767e5
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 19:21:42 2024 -0400

    prevents signal sent from client to server

commit ee853234fd
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 18:35:23 2024 -0400

    temp debug

commit 23cd537a33
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 14:59:35 2024 -0400

    removes auto gen upload dirs from test

commit 0a950c0f0b
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 14:47:56 2024 -0400

    plz

commit f84822e7d9
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 13:48:10 2024 -0400

    returns errors instead of throws

commit ee577f53f2
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 13:34:36 2024 -0400

    increases test bodysizelimit

commit 6641bff085
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 13:25:44 2024 -0400

    removes default server action body size limit

commit 53a6dcf213
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 12:49:04 2024 -0400

    plz be it

commit 9e8e7c7c3d
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 11:48:11 2024 -0400

    creates shared callback for common server fns

commit b4d081db3f
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Thu Oct 3 09:39:40 2024 -0400

    some docs

commit bc36bf7984
Author: Jacob Fletcher <jacobsfletch@gmail.com>
Date:   Wed Oct 2 16:26:25 2024 -0400

    increases default serverActions.bodySizeLimit
2024-10-07 10:11:44 -04:00
Germán Jabloñski
6cb128aa60 fix(richtext-lexical): linkFeature doesn't respect admin.routes from payload.config.ts (#8513)
Fix #8452
2024-10-07 09:48:04 -04:00
Jacob Fletcher
84fd8d06f0 Merge feat/server-actions into feat/on-demand-rsc 2024-10-07 09:44:15 -04:00
Because789
bb3496d7b5 feat(plugin-seo): adds german translation (#8580)
Adds a a German translation to the SEO Plugin. Credits to @fsyntax, since he got it rolling.
2024-10-06 22:07:32 -04:00
Sasha
bf50716fc5 docs: updates array field admin.components.RowLabel example (#8548)
Fixes https://github.com/payloadcms/payload/issues/8536
2024-10-06 21:37:59 -04:00
Because789
c473db7879 docs: fix typo in array.mdx (#8561) 2024-10-06 21:34:23 -04:00
Elliot DeNolf
7aed0d7c2e chore(eslint): payload logger usage (#8578)
Payload uses `pino` for a logger. When using the error logger
`payload.logger.error` it is possible to pass any number of arguments
like this: `payload.logger.error('Some error ocurred', err)`. However,
in this scenario, the full error will not be serialized by `pino`. It
must be passed as the `err` property inside of an object in order to be
properly serialized.

This rule ensures that a user is using this function call to properly serialize the error.
2024-10-06 13:23:30 -07:00
Elliot DeNolf
d88e0617d6 chore: sort release note sections 2024-10-06 09:59:51 -07:00
Jacob Fletcher
2ba40f3335 chore: removes duplicative join field test (#8558)
There are two of the exact same e2e tests for the join field, which
throws an error when running these tests locally because they have
identical names.
2024-10-05 09:13:43 -04:00
Elliot DeNolf
463490f670 fix(templates): await params/cookies properly (#8560) 2024-10-04 18:38:27 -07:00
Jacob Fletcher
d564cd44e9 chore: deflakes lexical e2e test (#8559)
This has caused me great pain. The problem with this test is that the
page was waiting for a URL which includes a search query that never
arrives. This moves the check into a regex pattern for a more accurate
catch.
2024-10-04 21:29:38 +00:00
Paul
7c62e2a327 feat(ui)!: scope all payload css to payload-default layer (#8545)
All payload css is now encapsulated inside CSS layers under `@layer
payload-default`

Any custom css will now have the highest possible specificity.
We have also provided a new layer `@layer payload` if you want to use
layers and ensure that your styles are applied after payload.

To override existing styles in a way that the existing rules of
specificity would be respected you can use the default layer like so
```css
@layer payload-default {
  // my styles within the payload specificity
}
```
2024-10-04 13:02:56 -06:00
Sasha
400293b8ee fix: duplicate with upload collections (#8552)
Fixes the duplicate operation with uploads
Enables duplicate for upload collections by default
2024-10-04 21:46:41 +03:00
Elliot DeNolf
e4a413eb9a chore(release): v3.0.0-beta.111 [skip ci] v3.0.0-beta.111 2024-10-04 11:31:06 -07:00
Sasha
b99590f477 chore(templates): update templates with next.js promises (#8547)
Updates templates according to this PR
https://github.com/payloadcms/payload/pull/8489
2024-10-04 21:28:43 +03:00
Alessio Gravili
0d3416c96d fix(db-postgres): missing types for db.pool by moving @types/pg from devDependencies to dependencies (#8556)
Fixes lack of types in installed project:

![CleanShot 2024-10-04 at 19 18
58@2x](https://github.com/user-attachments/assets/e7c519ee-72fd-424b-8f6c-41032322fa5e)

Since we expose stuff from @types/pg to the end user, we need it to be
installed in the end users project => move to dependencies.
2024-10-04 17:39:03 +00:00
Jacob Fletcher
01b580cb24 cleanup 2024-10-04 12:37:04 -04:00
Sasha
0128eedf70 fix(drizzle)!: make radio and select column names to snake_case (#8439)
Fixes https://github.com/payloadcms/payload/issues/8402 and
https://github.com/payloadcms/payload/issues/8027

Before DB column names were camelCase:

![image](https://github.com/user-attachments/assets/d2965bcf-290a-4f86-9bf4-dfe7e8613934)

After this change, they are snake_case:
![Screenshot 2024-10-04
114226](https://github.com/user-attachments/assets/bbc8c20b-6745-4dd3-b0c8-56263a4e37b1)

#### Breaking SQLite / Postgres ⚠️  
If you had any select (not `hasMany: true`) or radio fields with the
name in camelCase, for example:
```ts
{
  name: 'selectReadOnly',
  type: 'select',
  admin: {
    readOnly: true,
  },
  options: [
    {
      label: 'Value One',
      value: 'one',
    },
    {
      label: 'Value Two',
      value: 'two',
    },
  ],
},
```
This previously was mapped to the db column name `"selectReadOnly"`. Now
it's `select_read_only`.
Generate a new migration to rename your columns.
```sh
pnpm payload migrate:create
```
Then select "rename column" for targeted columns and Drizzle will handle
the migration.

---------

Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2024-10-04 16:25:05 +00:00
Jacob Fletcher
4d60f9c7da Merge branch 'beta' into feat/on-demand-rsc 2024-10-04 12:16:00 -04:00
Jacob Fletcher
fde05840fe begins wiring array action 2024-10-04 12:05:59 -04:00
Sasha
414030e1f1 fix(drizzle): row / collapsible inside of localized fields (#8539)
Fixes https://github.com/payloadcms/payload/issues/8405
2024-10-04 11:48:54 -04:00
Jacob Fletcher
f6eb027f23 chore: repairs auto-generated file comments (#8549)
The comments injected into auto-generated files have gotten misformatted
due to linting. Here is the proper format, where both comments are
adjacent to one another:

```js
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
```

Some comments were also written with casing issues, here's an example:

```js
/* DO NOT MODIFY it because it could be re-written at any time. */
```
2024-10-03 23:37:08 -04:00
Sasha
cf8347f208 fix(ui): disableBulkEdit on ui fields, defaults to true (#8540)
Fixes https://github.com/payloadcms/payload/issues/8534

UI fields are now excluded by default from the bulk edit view fields
options.
If you need to have the UI field there, you can provide:
```ts
admin: {
  disableBulkEdit: false
}
```
2024-10-04 01:07:47 +00:00
Paul
157b1e13ac fix(plugin-seo): now respects serverURL and api routes configuration (#8546) 2024-10-04 00:04:20 +00:00
Sasha
a735f40310 docs: change req.params to req.routeParams (#8380)
`req.params` is an old notation, now we use `req.routeParams`
2024-10-04 02:59:05 +03:00
Alessio Gravili
e306c927a8 docs: fix broken link (#8543) 2024-10-03 18:46:23 +00:00
Paul
dffdb22a69 fix(templates): dark and light mode not correctly working on website template's header (#8542) 2024-10-03 17:42:20 +00:00
Alessio Gravili
8789b0b20d chore: enable databaseAdapter writing again for pnpm dev (#8532) 2024-10-02 23:08:49 +00:00
Paul
eb4e3711ac fix(templates): add no search results text to website template search page (#8531) 2024-10-02 22:16:29 +00:00
Paul
132131a4b9 fix(templates): static generation from incorrect params provided (#8530) 2024-10-02 21:36:46 +00:00
Jacob Fletcher
8ed1766d5c Merge branch 'feat/server-actions' into feat/on-demand-rsc 2024-10-02 15:44:40 -04:00
Dan Ribbens
9ef4fab65d fix: ui crashes editing doc with deleted upload (#8526)
fix #8133

UI of a deleted item (will need another iteration).

![clear-upload-state](https://github.com/user-attachments/assets/2d9baebe-9a12-4905-9449-457972f4505b)
2024-10-02 15:22:57 -04:00
Jacob Fletcher
6fa47bf854 fix missing id 2024-10-02 15:16:50 -04:00
Jacob Fletcher
362cd1712d fix error handling 2024-10-02 14:55:51 -04:00
Paul
65015aa750 fix(templates): add force-static to pages and posts (#8527) 2024-10-02 18:41:54 +00:00
Patrik
0f7d444e6d fix(next): safely checks user within useEffect (#8524) 2024-10-02 14:17:15 -04:00
Jacob Fletcher
e669368149 proper error handling and cleanup 2024-10-02 13:45:55 -04:00
Jacob Fletcher
068d7eec52 adds next-env.d.ts to tsconfig.include 2024-10-02 12:51:02 -04:00
Jacob Fletcher
fb861a53ec small docs 2024-10-02 12:50:48 -04:00
Jacob Fletcher
ca90d2b1c9 fix: properly resolves cjs withPayload export (#8521)
Importing `withPayload` as CommonJS using `require` does not properly
resolve. This was because the exported file path was using the `.cjs`
extension instead of `.js`.
2024-10-02 12:38:49 -04:00
Jacob Fletcher
f16e55fff2 fixes docinfo server fn 2024-10-02 12:08:46 -04:00
Jacob Fletcher
47c19224c2 Merge branch 'beta' into feat/server-actions 2024-10-02 11:17:17 -04:00
Jacob Fletcher
fd2444e614 properly formats errors and fixes imports in templates 2024-10-02 11:16:12 -04:00
Elliot DeNolf
ecfd90bc58 fix(templates): remove lock from website template (#8520)
Including this file was causing the dependency checker to error because
it was installing all `@lexical` packages on version 0.17.0, instead of
0.18.0.

![Uploading image.png…]()
2024-10-02 10:59:26 -04:00
Jacob Fletcher
31ffe3bc43 adds back missing css imports 2024-10-02 10:11:54 -04:00
Jacob Fletcher
4cd89cd5d7 fixes type imports 2024-10-02 10:06:24 -04:00
Jacob Fletcher
1d7bcb365d removes duplicate test 2024-10-02 09:39:03 -04:00
Jacob Fletcher
8ffc090cac Merge branch 'beta' into feat/server-actions 2024-10-02 09:35:02 -04:00