[Pkg-javascript-devel] node-strip-json-comments: a dirty patch

Julien Puydt julien.puydt at gmail.com
Fri Aug 27 14:17:50 BST 2021


Le vendredi 27 août 2021 à 12:20 +0200, Yadd a écrit :
> use `echo require > debian/tests/pkg-js/SKIP` for such modules.

That makes a node-something package not try to require itself as part
of the autopkgtest-ing ; but I don't think that answers my question.

The current upstream version of strip-json-comments declares it's a JS-
module -- hence it can't be require'd. With my dirty patch, I made it
possible again, so existing node-* packages work -- that was the goal:
don't break deps.

But of course, future packages (or future versions of existing ones)
will probably work différently. Let's assume in the near future we end
up with:
(1) node-foo wants to import node-strip-json-comments ;
(2) node-bar wants to require it.
If I understand well, without my dirty patch, node-bar has a problem,
and with it node-foo has a problem.

So my question is: is it possible to handle things cleanly and how?

[If not, I'll drop the patch and upload a breaking package immediately:
the sooner broken, the sooner fixed...]

Cheers,

J.Puydt




More information about the Pkg-javascript-devel mailing list