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.)

Paul

[1] https://github.com/lwindolf/liferea/issues/1414#issuecomment-2816632636
[2] https://salsa.debian.org/debian/liferea/-/blob/116bb3e537eabc4f1cabda275822e1cb8fd05ace/js/htmlview.js#L23 [3] https://salsa.debian.org/debian/liferea/-/blob/116bb3e537eabc4f1cabda275822e1cb8fd05ace/js/helpers/render.js#L3 [4] https://salsa.debian.org/debian/liferea/-/blob/116bb3e537eabc4f1cabda275822e1cb8fd05ace/js/node.xml.in#L4

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to