[DRE-maint] Bug#1017609: ruby-terser: Test fails with node-terser >= 5
Yadd
yadd at debian.org
Tue Sep 6 09:38:29 BST 2022
> Le 28 août 2022 19:29:33 GMT+02:00, Mohd Bilal <mdbilal at disroot.org> a
> écrit :
>
> Hi Yadd :)
>
> On Thu, 25 Aug 2022 10:58:21 +0200 Yadd <yadd at debian.org> wrote:
>
> ruby-terser uses a patched terser.js (see
> https://github.com/ahorek/terser-ruby/blob/master/patches/terser-sync.patch) <https://github.com/ahorek/terser-ruby/blob/master/patches/terser-sync.patch)>
>
> So this issue is simple to fix: copy node-terser files into
> vendor/terser and patch it using upstream patch.
>
>
>
> I had a look at this and tried doing what you suggested, but copying and patching had zero effect on the tests. They are still failing.
>
> According to [1] I think terser bin has to be generated from the source with the patches applied.
>
> I tried your approach and tried generating the minfied terser.js but the autopkgtest error[2] suggests that the patched function(minifySync) aren't seen in the minified lib/terser.js
>
> Can you maybe use this upstream patch onto node-terser and also generate a min file that can be used with ruby-terser? Is it possible?
>
> Or do you have any other alternative to suggest ?
>
> [1] -https://github.com/ahorek/terser-ruby/blob/master/Rakefile#L55 <https://github.com/ahorek/terser-ruby/blob/master/Rakefile#L55>#L66
> [2] -http://paste.debian.net/1251967/ <http://paste.debian.net/1251967/>
>
> Thanks
Hi,
the Ruby patch can't be applied to node-terser because it provides a
wrong JavaScript: await call in a non-async function (maybe Ruby has its
own JS engine which accepts this?).
So I don't see any way to do what you proposed on JS side.
Cheers,
Yadd
More information about the Pkg-ruby-extras-maintainers
mailing list