Skip to content

fix(richtext-lexical): use copy of @lexical/markdown that does not install @lexical/code - #9382

Merged
AlessioGr merged 2 commits into
mainfrom
fix/use-lexical-markdown-without-lexical-code
Nov 20, 2024
Merged

AlessioGr merged 2 commits into
mainfrom
fix/use-lexical-markdown-without-lexical-code

Conversation

@AlessioGr

@AlessioGr AlessioGr commented Nov 20, 2024 •

Copy link
Copy Markdown
Member

Fixes #9378

We’ve found out that @lexical/markdown imports cannot be reliably dynamically imported by Node.js for an unknown reason. Frequently, Node.js simply exits before the dynamic import is done.

We’re suspecting the reason for this to be its dependency on @lexical/code that installs prism.

This will not only (hopefully) fix the import issue, but also reduce the bundle size & compilation speed of richtext-lexical.

@AlessioGr
AlessioGr merged commit 5db7e1e into main Nov 20, 2024
@AlessioGr
AlessioGr deleted the fix/use-lexical-markdown-without-lexical-code branch November 20, 2024 20:03
@github-actions

Copy link
Copy Markdown
Contributor

🚀 This is included in version v3.0.2

kendelljoseph pushed a commit that referenced this pull request Feb 21, 2025
…stall @lexical/code (#9382)

Fixes #9378

We’ve found out that @lexical/markdown imports cannot be reliably
dynamically imported by Node.js for an unknown reason. Frequently,
Node.js simply exits before the dynamic import is done.

We’re suspecting the reason for this to be its dependency on
@lexical/code that installs prism.

This will not only (hopefully) fix the import issue, but also reduce the
bundle size & compilation speed of richtext-lexical.
mitoperni pushed a commit to Vizzuality/amazonia-360 that referenced this pull request Sep 24, 2026
…404)

* fix(client): stop payload's cli reporting a no-op migrate as success

The payload CLI loads payload.config.ts through a dynamic import(). With
prismjs in the graph that import intermittently never settles and node
exits 0 with no output, having done nothing. Payload described the
mechanism in payloadcms/payload#9382 and shipped a fix, but
richtext-lexical -> @lexical/react -> @lexical/markdown -> @lexical/code
puts prismjs straight back in. The open report is #17757.

It is the single largest source of e2e failures: eight of the last eight
red runs migrated nothing, then failed either at the catalogue gate or
much later as specs that each read as a product bug. entrypoint.sh runs
the same command, so production could boot on an unmigrated database.

Both steps are idempotent, so db:migrate and db:seed now insist on the
completion line each one prints and run it again when it is missing. A
non-zero exit is a real failure and passes straight through.

Seeding also gets PAYLOAD_MIGRATING=true. Without it `payload run`
connects as a dev server and pushes the schema, and the batch -1 row
that leaves makes the next migrate wait on a stdin prompt forever.

Claude-Session: https://claude.ai/code/session_01LwRe3woDJL4JZFxbpupkzg

* chore(client): drop the unguarded seed:data script

Nothing called it once db:seed took over the workflow and the playwright
chain. Keeping it left one path that skips the no-op check and connects
the way a dev server does, so running it out of habit writes the batch -1
row that makes the next migrate wait on a prompt forever.

Claude-Session: https://claude.ai/code/session_01LwRe3woDJL4JZFxbpupkzg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

generate:types works occasionally

1 participant