Commit b1d14e3
authored
Remove retired earmark and unused phoenix_storybook dependencies (#4886)
* Migrate off retired earmark markdown dependency (#4878)
Replace the direct earmark dependency with mdex for rendering AI
assistant message content. earmark is retired and unmaintained;
mix hex.audit flags it.
mdex node structs cannot hold arbitrary HTML attributes, so per-element
Tailwind classes are now injected into the rendered HTML instead of via
AST manipulation. Raw HTML passthrough and the raw-content fallback are
preserved, and the language- prefix on code blocks is stripped to keep
earmark's previous output.
earmark remains a dev-only transitive dependency of phoenix_storybook
0.9.2 until that is upgraded to 1.2+ (which requires Phoenix 1.8).
* Remove unused phoenix_storybook dependency (#4846)
phoenix_storybook 0.9.2 carried three open advisories flagged by
mix deps.audit (critical RCE, atom-table DoS, PubSub topic injection).
It was dev-only with no production exposure, and storybook was dormant:
only three demo stories existed and nothing had changed since the 2023
prototype. Remove the package rather than upgrade to 1.1.0.
Drop the dep and its dev routes, delete the backend module, stories, and
assets, and strip the esbuild/tailwind/live-reload config. Clear the
storybook advisory IDs from the CI deps.audit ignore list, leaving only
the cowlib advisory (no patch available yet). Remove now-orphaned lock
entries via mix deps.unlock --unused.
* update changelog
* Keep MDEx's native language- class on code blocks
MDEx emits the standard `<code class="language-javascript">` for fenced
code blocks. We were rewriting it back to Earmark's old bare
`<code class="javascript">`, but nothing consumes that class (no syntax
highlighter is wired up, and the markdown CSS targets `pre code` by
element), so keep MDEx's conventional output instead.
* Enable GFM extensions for MDEx markdown rendering
The earmark→mdex migration left MDEx running as plain CommonMark, which
silently dropped the GFM features earmark rendered by default. Assistant
replies containing markdown tables showed as raw pipe text, strikethrough
and bare-URL autolinks stopped working.
Enable the table, strikethrough, autolink, and tasklist extensions to
restore the prior rendering, and add a regression test covering them.1 parent 3c86ddf commit b1d14e3
20 files changed
Lines changed: 156 additions & 316 deletions
File tree
- .circleci
- assets
- css
- js
- config
- lib/lightning_web
- live/ai_assistant
- storybook
- common
- form
- test/lightning_web/live/workflow_live
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | 191 | | |
195 | | - | |
| 192 | + | |
196 | 193 | | |
197 | 194 | | |
198 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
187 | | - | |
| 186 | + | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
| |||
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 147 | | |
156 | 148 | | |
157 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
115 | | - | |
116 | | - | |
| 114 | + | |
117 | 115 | | |
118 | 116 | | |
119 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
0 commit comments