Hi,
On Sat, 19 Apr 2025 19:28:11 +0200 Paul Gevers <elbrus@debian.org> wrote:
I was struggling to package the latest version of `liferea` because I didn't want to use the upstream vendored purify (and handlebars). It
turns out that the Debian version of node-dompurify is too old. Is it reasonable to upgrade?
For the purpose of liferea, it might be relevant to say that apparently
it's using an ESM version of dompurify (and handlebars). As I'm all new
to this, upstream pointed me at [1] which explains a bit. I have no idea
if it's reasonably feasible for the Debian node ecosystem to provide
both flavors (by means of a ESM wrapper around the CJS flavor if I
understand correctly).
I guess for now I need to consider my options for liferea and I'm nearly convinced the best is to not try to ship the latest upstream version at
this stage of trixie and leave that to forky.
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
Hi Jérémy,
Thanks for the reply.
On 20-04-2025 13:21, Jérémy Lal wrote:
Good question ! The answer is that it's not needed:
nodejs 20.19.0 can "require(esm)" [1] so a CJS module is no longer
locked out using ESM modules.
The other way around (import a CJS module form an ES module) has always been possible.
As I understand it, liferea is already ESM and my problem is that the
code apparently assumes that node-dompurify (and handlebars) is ESM too.
So far, I have never needed to fix javascript in a more than trivial
manner, so I don't know where to start here. My fundamental question is
what do I have to do to build liferea with the Debain shipped
node-dompurity (and handlebars) instead of the vendored version? liferea
uses the file during the build and embeds it in the executable, but as
can be seen from my discussion in the upstream bug tracker [1], using
the current versions in Debian doesn't work and upstream suggested that node-dompurify needs the change. I understand you say it should be
trivial to fix on the liferea side? (The include happens here [2], for handlebars it's here [3]. I tried commenting them out and adding a
<script> here [4] but that seems to be too simple.)
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 497 |
Nodes: | 16 (2 / 14) |
Uptime: | 03:00:40 |
Calls: | 9,771 |
Calls today: | 12 |
Files: | 13,748 |
Messages: | 6,186,525 |