Bug#990458: [Pkg-javascript-devel] Bug#990458: Bug#990458: Bug#990458: Attaching the files from buster vs bullseye

2021-06-30 Thread Pirate Praveen




On Wed, Jun 30, 2021 at 9:44 pm, Pirate Praveen 
 wrote:



On Wed, Jun 30, 2021 at 9:38 pm, Pirate Praveen 
 wrote:
Looks like we are already using the dist tarballs and does not 
involve any build, we can just take the latest 1.0.4 from npmjs.com.


Scratch that, the new versions use babel to build, so I think using 
https://github.com/lijunle/babel-plugin-add-module-exports/ is the 
best option, though the latest version tagged is 1.0.2 and latest npm 
release is 1.0.4 (basically completely messed up release workflow).


With babel-plugin-add-module-exports 1.0.4 from the above repo,

$ diff -u autosize-current.js autosize.js
--- autosize-current.js 2021-06-30 22:30:00.391798535 +0530
+++ autosize.js 2020-12-14 17:42:45.0 +0530
@@ -284,5 +284,5 @@

  var _default = autosize;
  _exports["default"] = _default;
-  module.exports = exports["default"];
+  module.exports = exports.default;
});
\ No newline at end of file

and this is working with diaspora. Thanks again for tracking down the 
issue.




Bug#990458: [Pkg-javascript-devel] Bug#990458: Bug#990458: Attaching the files from buster vs bullseye

2021-06-30 Thread Pirate Praveen




On Wed, Jun 30, 2021 at 9:38 pm, Pirate Praveen 
 wrote:
Looks like we are already using the dist tarballs and does not 
involve any build, we can just take the latest 1.0.4 from npmjs.com.


Scratch that, the new versions use babel to build, so I think using 
https://github.com/lijunle/babel-plugin-add-module-exports/ is the best 
option, though the latest version tagged is 1.0.2 and latest npm 
release is 1.0.4 (basically completely messed up release workflow).




Bug#990458: [Pkg-javascript-devel] Bug#990458: Attaching the files from buster vs bullseye

2021-06-30 Thread Pirate Praveen




On Wed, Jun 30, 2021 at 9:30 pm, Pirate Praveen 
 wrote:



On Wed, Jun 30, 2021 at 8:27 pm, Akshay S Dinesh 
 wrote:
Either, update this plugin in Debian to the fork that's pushed only 
to npm (or switch to 
https://github.com/lijunle/babel-plugin-add-module-exports/ I guess)




I think we can take the last tagged version 1.0.0 and apply a patch 
to make it 1.0.2.


Looks like we are already using the dist tarballs and does not involve 
any build, we can just take the latest 1.0.4 from npmjs.com.




Bug#990458: Attaching the files from buster vs bullseye

2021-06-30 Thread Pirate Praveen




On Wed, Jun 30, 2021 at 8:27 pm, Akshay S Dinesh  
wrote:
This is most likely due to babel-plugin-add-module-exports being 
broken.


See 
https://github.com/59naga/babel-plugin-add-module-exports/issues/72


and 
https://github.com/59naga/babel-plugin-add-module-exports/issues/80


and 
https://github.com/59naga/babel-plugin-add-module-exports/issues/73



That 73 points to a new version that's put only on npm and not on 
github. I'm not exactly sure how it works with fakeupstream at 
https://salsa.debian.org/js-team/node-babel-plugin-add-module-exports/-/tree/master/


Either way, the version in salsa seems to be 0.2.1 which is 
definitely outdated (as per the github description of 
babel-plugin-add-module-exports



Two ways I see are:

Either, update this plugin in Debian to the fork that's pushed only 
to npm (or switch to 
https://github.com/lijunle/babel-plugin-add-module-exports/ I guess)




I think we can take the last tagged version 1.0.0 and apply a patch to 
make it 1.0.2.




OR

Try removing this plugin altogether and changing the
"export default autosize" statement in the last line of autosize.js to
"module.exports = autosize"



It looks like many packages build depend on this module and those are 
also likely broken. I opened 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990493 to track this.



I'm NOT sure whether either of these will work.


Thanks for the pointers, at least we know what is broken and what the 
fix is. We just have to figure out the best way to include it.




Bug#990458: Attaching the files from buster vs bullseye

2021-06-30 Thread Akshay S Dinesh

This is most likely due to babel-plugin-add-module-exports being broken.

See https://github.com/59naga/babel-plugin-add-module-exports/issues/72

and https://github.com/59naga/babel-plugin-add-module-exports/issues/80

and https://github.com/59naga/babel-plugin-add-module-exports/issues/73


That 73 points to a new version that's put only on npm and not on 
github. I'm not exactly sure how it works with fakeupstream at 
https://salsa.debian.org/js-team/node-babel-plugin-add-module-exports/-/tree/master/


Either way, the version in salsa seems to be 0.2.1 which is definitely 
outdated (as per the github description of babel-plugin-add-module-exports



Two ways I see are:

Either, update this plugin in Debian to the fork that's pushed only to 
npm (or switch to 
https://github.com/lijunle/babel-plugin-add-module-exports/ I guess)



OR

Try removing this plugin altogether and changing the
"export default autosize" statement in the last line of autosize.js to
"module.exports = autosize"

I'm NOT sure whether either of these will work.



Bug#990458: Attaching the files from buster vs bullseye

2021-06-30 Thread Pirate Praveen
On Tue, 29 Jun 2021 23:54:30 +0530 Pirate Praveen 
 wrote:

> I can confirm libjs-autosize from buster works fine with diaspora.

So workaround is to install the buster version from snapshot.debian.org

http://snapshot.debian.org/archive/debian/20190209T090056Z/pool/main/a/autosize.js/libjs-autosize_4.0.2~dfsg1-3_all.deb



Bug#990458: Attaching the files from buster vs bullseye

2021-06-30 Thread Pirate Praveen
On Tue, 29 Jun 2021 23:54:30 +0530 Pirate Praveen 
 wrote:

> I can confirm libjs-autosize from buster works fine with diaspora.
>
> Buster version has this,
>
> (function (global, factory) {
> if (typeof define === "function" && define.amd) {
>   define(['module', 'exports'], factory);
>
> But bullseye version is missing definition for module,
>
> (function (global, factory) {
> if (typeof define === "function" && define.amd) {
>   define(["exports"], factory);

Akshay,

Any ideas about this? Basically it is a behavior change from babel 6 to 
babel 7 and we'd like to restore the babel 6 behavior.