[Pkg-javascript-devel] Export both ESM and CommonJS modules

Julien Puydt julien.puydt at gmail.com
Mon Sep 13 09:05:57 BST 2021


Le dimanche 12 septembre 2021 à 20:30 +0200, Yadd a écrit :
> You'll notice that I didn't fault anyone, I just tried not to let
> other groups get stuck with our updates. I think I did something
> clean that avoids breaking other packages until nodejs is updated 
> and keeps the upstream format.

Well, I still felt blamed, and it's only partly justified.

In that particular case, I saw the problem, produced a -1 with a patch
to avoid breaking deps, but asked around because it was somehow not
satisfying, with mostly two questions:
1. if what I did was a good idea?
2. how to do something clean?

The summary of the answers is that it was a bad idea (don't diverge
from upstream unless you're ready to take matters on your shoulders),
but there was no clean solution.

I hence broke things with -2: that's just the first occurrence of an
emerging matter, so waiting won't make it go away. Bite the bullet
rather sooner than later, one may say.

Let's imagine a simple situation where we have three packages A, B and
C with B and C depending on A using 'require', then upstream A decides
it's now import and not require, B follows suit and C trails behind ;
there are mostly two solutions:

(1) do dirty things with A's packaging, so it allows both require and
import, with the three defects that:
   (i) the require part is on our shoulders;
  (ii) someone using A packaged by Debian might not realize their code
is subtly wrong ;
 (iii) the C package looks like its nice and clean... even though it's
the reason why A's is dirty and we have problems (i) and (ii)!

(2) let A and B go forward, and make C's package dirty -- as it
deserves.


> So now I will avoid fixing bugs other than what I generated.

I'm sorry if I offended you: you've always been very helpful, and much
more competent than me when it comes to JS (your solution here is an
example).

Cheers,

J.Puydt




More information about the Pkg-javascript-devel mailing list