Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Next 15, Payload to Beta 119 #207

Merged
merged 3 commits into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
},
"dependencies": {
"@cedx/akismet": "^16.2.0",
"@next/third-parties": "15.0.0-canary.173",
"@next/third-parties": "15.0.0",
"@octokit/rest": "^21.0.2",
"@payloadcms/db-postgres": "3.0.0-beta.113",
"@payloadcms/email-nodemailer": "3.0.0-beta.113",
"@payloadcms/next": "3.0.0-beta.113",
"@payloadcms/plugin-nested-docs": "3.0.0-beta.113",
"@payloadcms/plugin-redirects": "3.0.0-beta.113",
"@payloadcms/plugin-seo": "3.0.0-beta.113",
"@payloadcms/richtext-lexical": "3.0.0-beta.113",
"@payloadcms/db-postgres": "3.0.0-beta.119",
"@payloadcms/email-nodemailer": "3.0.0-beta.119",
"@payloadcms/next": "3.0.0-beta.119",
"@payloadcms/plugin-nested-docs": "3.0.0-beta.119",
"@payloadcms/plugin-redirects": "3.0.0-beta.119",
"@payloadcms/plugin-seo": "3.0.0-beta.119",
"@payloadcms/richtext-lexical": "3.0.0-beta.119",
"@react-email/components": "^0.0.25",
"@react-email/render": "^1.0.1",
"crawler-user-agents": "^1.0.150",
Expand All @@ -45,13 +45,13 @@
"highlight.js": "^11.10.0",
"holy-loader": "^2.3.8",
"lodash-es": "^4.17.21",
"next": "15.0.0-canary.173",
"next": "15.0.0",
"next-themes": "^0.3.0",
"node-cron": "^3.0.3",
"payload": "3.0.0-beta.113",
"payload": "3.0.0-beta.119",
"prism-react-renderer": "^2.4.0",
"react": "19.0.0-rc-3edc000d-20240926",
"react-dom": "19.0.0-rc-3edc000d-20240926",
"react": "19.0.0-rc-65a56d0e-20241020",
"react-dom": "19.0.0-rc-65a56d0e-20241020",
"react-spinners": "^0.14.1",
"react-toastify": "^10.0.5",
"react-toggle-dark-mode": "file:./packages/react-toggle-dark-mode-v2.0.0.tgz",
Expand Down
120 changes: 60 additions & 60 deletions app/src/app/(payload)/admin/importMap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions app/src/payload.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// storage-adapter-import-placeholder
import { postgresAdapter } from '@payloadcms/db-postgres';
import { lexicalEditor, HTMLConverterFeature, EXPERIMENTAL_TableFeature } from '@payloadcms/richtext-lexical';
import path from 'path';
import { buildConfig } from 'payload';
import { fileURLToPath } from 'url';
import path from 'path';
import sharp from 'sharp';
import cron from 'node-cron';
import { postgresAdapter } from '@payloadcms/db-postgres';
import { lexicalEditor, HTMLConverterFeature, EXPERIMENTAL_TableFeature } from '@payloadcms/richtext-lexical';
import { seoPlugin } from '@payloadcms/plugin-seo';
import { nestedDocsPlugin } from '@payloadcms/plugin-nested-docs';
import { redirectsPlugin } from '@payloadcms/plugin-redirects';
import { nodemailerAdapter } from '@payloadcms/email-nodemailer';
import cron from 'node-cron';
import { pruneViewsCache } from '@/payload/utils/viewCounter';

import { Users } from '@payload/collections/Users';
Expand All @@ -22,7 +22,7 @@ import { Comments } from '@/payload/collections/Comments';
import { Resume } from '@/payload/globals/Resume';

import { revalidateRedirects } from '@payload/hooks/revalidateRedirects';
import { requireEnvVar } from './utils/env';
import { requireEnvVar } from '@/utils/env';

const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);
Expand Down
14 changes: 10 additions & 4 deletions app/src/payload/utils/docs/getDocument.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
'use server';
// TODO: This does not need to be a server component.
// Instead, we need to find a way fix the client-side usages of serializeLexical which currently relies on server-side resolveUrl functionality.

import { getPayloadHMR } from '@payloadcms/next/utilities';
import { CollectionSlug } from 'payload';
import config from '@payload-config';
import { getPayloadHMR } from '@payloadcms/next/utilities';
import { CollectionSlug, DataFromCollectionSlug } from 'payload';
import { unstable_cache_safe } from '@/utils/next/unstable_cache_safe';

export const getDocumentById = async (relationTo: CollectionSlug, docId: number) => {
export const getDocumentById = async (
relationTo: CollectionSlug,
docId: number,
): Promise<DataFromCollectionSlug<CollectionSlug> | null> => {
const payload = await getPayloadHMR({
config,
});
Expand All @@ -16,7 +21,8 @@ export const getDocumentById = async (relationTo: CollectionSlug, docId: number)
});
};

export const getCachedDocumentById = (relationTo: CollectionSlug, docId: number) =>
// TODO: Remove async one todo at top of page is resolved
export const getCachedDocumentById = async (relationTo: CollectionSlug, docId: number) =>
unstable_cache_safe(
async () => getDocumentById(relationTo, docId),
[`payload-get-document-by-id-${relationTo}-${docId}`],
Expand Down
Loading