0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-08 17:53:55 +08:00
discourse/spec
David Taylor 368f2b1dfc DEV: Build server-side PrettyText bundle with Rolldown
Previously, lib/pretty_text.rb assembled the mini_racer context by transpiling and loading ~50 JS modules one-by-one at boot, with hand-written shims for their dependencies. This replaces that with a single Rolldown-built IIFE bundle, precompiled during assets:precompile and cached on disk under a digest of its inputs (via the new PrecompiledBundle, which AssetProcessor now shares).

The set of discourse-core modules allowed into the server bundle is defined once, as PrettyText::BUNDLED_DISCOURSE_MODULES. It is passed to build.mjs (where a resolver plugin fails the build for anything outside the list, since the discourse package's exports map would otherwise silently resolve it) and also derives the cache-digest globs, so list changes force a rebuild and upstream renames fail the precompile loudly.

The require() surface available to plugins' server-side markdown modules is preserved: the bundle re-registers the same loader modules the old context provided, including the vendored-dependency shims (markdown-it, xss, @embroider/macros, discourse/lib/loader-shim, etc.).

The whole Ruby -> JS interface now goes through mini_racer's `call` on a single `__PrettyText` object, passing options as structured arguments, rather than building JS source strings for `eval` on every invocation.
2026-08-05 17:26:09 +00:00
..
db FIX: Prevent backslash accumulation in upload markdown labels (#39461) 2026-06-03 18:10:38 +02:00
fabricators FIX: can_create_discourse_post_event? not checking user groups correctly (#42284) 2026-08-04 16:09:50 +10:00
fixtures DEV: Add image-processing regression coverage (#42117) 2026-07-30 15:28:07 +08:00
generator
helpers UX: Hide signup when the site is in read only or staff only mode (#42101) 2026-07-28 20:05:04 +02:00
import_export
initializers FIX: Do not notify new sites or plugins enabled of old upcoming changes (#42045) 2026-07-30 09:51:08 +10:00
integration FIX: store method in route matcher (#41512) 2026-07-07 11:49:56 -04:00
integrity DEV: hide and disable upcoming changes for disabled plugins (#41657) 2026-07-16 14:35:20 +04:00
jobs FEATURE: Reclassify likely crawlers in site traffic reporting (#42199) 2026-08-04 10:08:53 +08:00
lib DEV: Build server-side PrettyText bundle with Rolldown 2026-08-05 17:26:09 +00:00
mailers DEV: remove simple email subject upcoming change metadata (#41807) 2026-07-20 14:43:00 +04:00
migrations FIX: Ensure each flag gets a unique name_key (#40899) 2026-06-24 16:37:59 +02:00
models FIX: handle email aliases when normalize emails is enabled (#42344) 2026-08-05 18:21:48 +04:00
multisite
queries/reports FEATURE: Change default upcoming change promotion status to Beta (#41275) 2026-07-06 09:13:37 +10:00
requests PERF: parallelize report fetching in the dashboard Reports section (#42252) 2026-08-05 18:29:17 +03:00
script DEV: Fix UC status report when reverted files encountered (#41821) 2026-07-20 16:37:35 +10:00
serializers FIX: Reviewable Insights Metadata (#42145) 2026-08-05 10:02:27 -05:00
services FIX: Ignore pending reviewables when their target user is deleted (#42335) 2026-08-05 13:51:45 +08:00
support DEV: Add image-processing regression coverage (#42117) 2026-07-30 15:28:07 +08:00
system UX: composer redesign > adapt composer outlets (#42355) 2026-08-05 17:35:03 +02:00
tasks DEV: Build server-side PrettyText bundle with Rolldown 2026-08-05 17:26:09 +00:00
views
rails_helper.rb DEV: Prefer RSpec primitives for test setup (#42122) 2026-07-30 11:17:22 +08:00
regenerate_swagger_docs
swagger_helper.rb