feat(versions)!: make localizeStatus true by default#16890
feat(versions)!: make localizeStatus true by default#16890JarrodMFlesch wants to merge 3 commits into
Conversation
|
Pull Request titles must follow the Conventional Commits specification and have valid scopes. Unknown scope "versions" found in pull request title "feat(versions)!: make localizeStatus true by default". Scope must match one of: cpa, claude, codemod, db-*, db-d1-sqlite, db-mongodb, db-postgres, db-vercel-postgres, db-sqlite, db-d1-sqlite, drizzle, email-*, email-nodemailer, email-resend, eslint, evals, graphql, kv, kv-redis, live-preview, live-preview-react, live-preview-vue, next, payload-cloud, plugin-cloud, plugin-cloud-storage, plugin-ecommerce, plugin-form-builder, plugin-import-export, plugin-mcp, plugin-multi-tenant, plugin-nested-docs, plugin-redirects, plugin-search, plugin-sentry, plugin-seo, plugin-stripe, richtext-*, richtext-lexical, sdk, skills, storage-*, storage-azure, storage-gcs, storage-r2, storage-uploadthing, storage-vercel-blob, storage-s3, translations, ui, templates, examples(/(\w|-)+)?, deps. |
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖
Largest pathsThese visualization shows top 20 largest paths in the bundle.Meta file: packages/next/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_shared.json, Out file: esbuild/exports/shared.js
Meta file: packages/richtext-lexical/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_shared.json, Out file: esbuild/exports/shared_optimized/index.js
DetailsNext to the size is how much the size has increased or decreased compared with the base branch of this PR.
|
- Remove experimental.localizeStatus guard from collection and global sanitize — localizeStatus now defaults to true for any localized collection/global with drafts enabled - Restore experimental?: Record<string, never> in PayloadConfig as an empty placeholder for future flags - Update JSDoc on IncomingDrafts/SanitizedDrafts: @default true, remove @experimental - Fix PG migration bug: all db.execute calls used the wrong signature db.execute({ drizzle: db.drizzle, sql }) — db IS the Drizzle instance, correct call is db.execute(sql`...`) - Fix inserted.length -> inserted.rows.length in sql/up.ts - Add codemod migrate-localize-status: removes experimental.localizeStatus from user configs (drops experimental block if it becomes empty) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…llection The collection needs to explicitly opt out now that the default is true. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…led test Instead of relying on LocalizedDrafts implicitly not having localizeStatus configured, add LocalizedDraftsNoLocaleStatus with localizeStatus: false explicitly set. Also remove the now-unnecessary experimental.localizeStatus flag from the localization test config. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e39761d to
f0a97e2
Compare
Makes
localizeStatusdefault totruefor any localized collection or global with drafts enabled. The experimental flag that previously gated the feature is removed — users can now opt out per-collection/global by settingversions.drafts.localizeStatus: false.Also fixes a broken Postgres migration that shipped with the original feature (#14667): all
db.executecalls used the wrong signature (db.execute({ drizzle: db.drizzle, sql })) whendbis the raw Drizzle instance — correct call isdb.execute(sql\...`). Fixesinserted.length→inserted.rows.length` in the same file.Breaking Changes
Any localized collection or global with drafts enabled will now have
localizeStatus: trueby default. Users who opted in viaexperimental.localizeStatusneed to remove that flag. Users who do not want per-locale status must explicitly opt out.export default buildConfig({ - experimental: { - localizeStatus: true, - }, collections: [ { slug: 'posts', versions: { drafts: true }, + // localizeStatus is now true by default — opt out if needed: + // versions: { drafts: { localizeStatus: false } }, }, ], })Codemod
To remove
experimental.localizeStatusautomatically:Related: #16889 (PG migration bug fix back-ported to 3.x)