Bug#930634: [Pkg-javascript-devel] Bug#930634: Bug#930634: Bug#930634: Build failures with rollup 0.56

2019-10-02 Thread Pirate Praveen
On Mon, 30 Sep 2019 19:49:38 +0530 Pirate Praveen
 wrote:
> The following fail (18/77 reverse build dependencies), but should work 
> after adding the required plugin as build dependency.
> 
> leaflet leaflet-markercluster node-d3 node-immutable-tuple 
> node-magic-string node-mocha node-react node-rollup-plugin-babel 
> node-rollup-plugin-commonjs node-rollup-plugin-json 
> node-rollup-plugin-node-resolve node-rollup-plugin-replace 
> node-rollup-plugin-string node-rollup-plugin-typescript node-tippex 
> node-uri-js popper.js rainbow.js twitter-bootstrap4
> 

Except the following packages, all have been fixed in unstable.

Patches in BTS: leaflet leaflet-markercluster

Not sure if it is worth fixing the unstable version as experimental has
a new version: node-mocha

Needs converting to proper uscan based components: node-react

Ready in experimental: node-rollup-plugin-commonjs

Already broken with rc bugs: node-rollup-plugin-typescript

Blocked by node-typescript regression: node-uri-js

Ready for review: popper.js twitter-bootstrap4

Someone working on it: rainbow.js

So once node-typescript regression is fixed, I will upload rolup 0.56.3
to unstable.



signature.asc
Description: OpenPGP digital signature


Bug#930634: [Pkg-javascript-devel] Bug#930634: Bug#930634: Bug#930634: Build failures with rollup 0.56

2019-09-30 Thread Pirate Praveen



On Mon, Sep 30, 2019 at 13:15, Pirate Praveen 
 wrote:

I will clean up the commits and upload this to experimental now.


I have uploaded to experimental now.

I have cleaned up the dependencies as well and now node-rollup-plugin-* 
should be added as explicit dependency to packages depending on rollup.


The following fail (18/77 reverse build dependencies), but should work 
after adding the required plugin as build dependency.


leaflet leaflet-markercluster node-d3 node-immutable-tuple 
node-magic-string node-mocha node-react node-rollup-plugin-babel 
node-rollup-plugin-commonjs node-rollup-plugin-json 
node-rollup-plugin-node-resolve node-rollup-plugin-replace 
node-rollup-plugin-string node-rollup-plugin-typescript node-tippex 
node-uri-js popper.js rainbow.js twitter-bootstrap4




Bug#930634: [Pkg-javascript-devel] Bug#930634: Bug#930634: Build failures with rollup 0.56

2019-09-30 Thread Pirate Praveen



On Sun, Sep 29, 2019 at 18:08, Pirate Praveen 
 wrote:

Fixed this by a sed command, and now we get

$ rollup --help
/usr/share/nodejs/rollup/bin/src/rollup:15
var command = minimist_1.default(process.argv.slice(2), {
^

TypeError: minimist_1.default is not a function
at /usr/share/nodejs/rollup/bin/src/rollup:15:33
at Object.defineProperty.value 
(/usr/share/nodejs/rollup/bin/src/rollup:3:65)
at Object. 
(/usr/share/nodejs/rollup/bin/src/rollup:6:2)

at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js 
(internal/modules/cjs/loader.js:789:10)

at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)



This is fixed by tsc --esModuleInterop

And now modified build to directly use the tsc output and there by 
removing the circular build dependency on rollup and its plugins 
(browser entry is still built by rollup but that could be fixed 
easily). I could now rebuild rollup using the built rollup. I will 
clean up the commits and upload this to experimental now.




Bug#930634: [Pkg-javascript-devel] Bug#930634: Build failures with rollup 0.56

2019-09-29 Thread Pirate Praveen



On Sun, Sep 29, 2019 at 17:19, Pirate Praveen 
 wrote:


Control: block -1 by 933091

On Sun, Sep 29, 2019 at 17:00, Pirate Praveen 
 wrote:

On Sat, 28 Sep 2019 23:16:06 +0530 Pirate Praveen
mailto:prav...@onenetbeyond.org>> wrote:



 On Sat, Sep 28, 2019 at 16:12, Xavier > wrote:

 > help.pm is probably filtered. Overwrite in debian/nodejs/files

 I think the root cause is incompatibility with rollup-plugin-string
 (they want 2.x and we already have 3.x).

 I did some ugly hacks to move forward and now I get

 $ rollup -c
 /usr/share/nodejs/rollup/dist/rollup.js:6030
 exports.__esModule = true;
^

 TypeError: Cannot assign to read only property '__esModule' of 
object

 '#'
 at Object.
 (/usr/share/nodejs/rollup/dist/rollup.js:6030:20)
 at Module._compile (internal/modules/cjs/loader.js:778:30)
 at Object.Module._extensions..js
 (internal/modules/cjs/loader.js:789:10)
 at Module.load (internal/modules/cjs/loader.js:653:32)
 at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
 at Function.Module._load (internal/modules/cjs/loader.js:585:3)
 at Module.require (internal/modules/cjs/loader.js:692:17)
 at require (internal/modules/cjs/helpers.js:25:18)
 at Object.
 (/usr/share/nodejs/rollup/bin/src/run/loadConfigFile.js:5:14)
 at Module._compile (internal/modules/cjs/loader.js:778:30)




These seems to be coming from node-vlq/node-magic-string, it should 
be

Object.defineProperty(exports, '__esModule', { value: true });


node-vlq is not using rollup in its build process, and I also 
noticed, rollup is run before tsc in upstream build process (that 
explains why I had to do many ugly hacks in the build process). So 
ideally we should fix node-rollup-plugin-typescript to move forward 
(to avoid even more hacks).




Fixed this by a sed command, and now we get

$ rollup --help
/usr/share/nodejs/rollup/bin/src/rollup:15
var command = minimist_1.default(process.argv.slice(2), {
   ^

TypeError: minimist_1.default is not a function
   at /usr/share/nodejs/rollup/bin/src/rollup:15:33
   at Object.defineProperty.value 
(/usr/share/nodejs/rollup/bin/src/rollup:3:65)

   at Object. (/usr/share/nodejs/rollup/bin/src/rollup:6:2)
   at Module._compile (internal/modules/cjs/loader.js:778:30)
   at Object.Module._extensions..js 
(internal/modules/cjs/loader.js:789:10)

   at Module.load (internal/modules/cjs/loader.js:653:32)
   at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
   at Function.Module._load (internal/modules/cjs/loader.js:585:3)
   at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
   at startup (internal/bootstrap/node.js:283:19)




Bug#930634: [Pkg-javascript-devel] Bug#930634: Build failures with rollup 0.56

2019-09-29 Thread Pirate Praveen


Control: block -1 by 933091

On Sun, Sep 29, 2019 at 17:00, Pirate Praveen 
 wrote:

On Sat, 28 Sep 2019 23:16:06 +0530 Pirate Praveen
mailto:prav...@onenetbeyond.org>> wrote:



 On Sat, Sep 28, 2019 at 16:12, Xavier > wrote:

 > help.pm is probably filtered. Overwrite in debian/nodejs/files

 I think the root cause is incompatibility with rollup-plugin-string
 (they want 2.x and we already have 3.x).

 I did some ugly hacks to move forward and now I get

 $ rollup -c
 /usr/share/nodejs/rollup/dist/rollup.js:6030
 exports.__esModule = true;
^

 TypeError: Cannot assign to read only property '__esModule' of 
object

 '#'
 at Object.
 (/usr/share/nodejs/rollup/dist/rollup.js:6030:20)
 at Module._compile (internal/modules/cjs/loader.js:778:30)
 at Object.Module._extensions..js
 (internal/modules/cjs/loader.js:789:10)
 at Module.load (internal/modules/cjs/loader.js:653:32)
 at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
 at Function.Module._load (internal/modules/cjs/loader.js:585:3)
 at Module.require (internal/modules/cjs/loader.js:692:17)
 at require (internal/modules/cjs/helpers.js:25:18)
 at Object.
 (/usr/share/nodejs/rollup/bin/src/run/loadConfigFile.js:5:14)
 at Module._compile (internal/modules/cjs/loader.js:778:30)




These seems to be coming from node-vlq/node-magic-string, it should be
Object.defineProperty(exports, '__esModule', { value: true });


node-vlq is not using rollup in its build process, and I also noticed, 
rollup is run before tsc in upstream build process (that explains why I 
had to do many ugly hacks in the build process). So ideally we should 
fix node-rollup-plugin-typescript to move forward (to avoid even more 
hacks).





Bug#930634: [Pkg-javascript-devel] Bug#930634: Build failures with rollup 0.56

2019-09-29 Thread Pirate Praveen
On Sat, 28 Sep 2019 23:16:06 +0530 Pirate Praveen
 wrote:
> 
> 
> On Sat, Sep 28, 2019 at 16:12, Xavier  wrote:
> > help.pm is probably filtered. Overwrite in debian/nodejs/files
> 
> I think the root cause is incompatibility with rollup-plugin-string 
> (they want 2.x and we already have 3.x).
> 
> I did some ugly hacks to move forward and now I get
> 
> $ rollup -c
> /usr/share/nodejs/rollup/dist/rollup.js:6030
> exports.__esModule = true;
>^
> 
> TypeError: Cannot assign to read only property '__esModule' of object 
> '#'
> at Object. 
> (/usr/share/nodejs/rollup/dist/rollup.js:6030:20)
> at Module._compile (internal/modules/cjs/loader.js:778:30)
> at Object.Module._extensions..js 
> (internal/modules/cjs/loader.js:789:10)
> at Module.load (internal/modules/cjs/loader.js:653:32)
> at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
> at Function.Module._load (internal/modules/cjs/loader.js:585:3)
> at Module.require (internal/modules/cjs/loader.js:692:17)
> at require (internal/modules/cjs/helpers.js:25:18)
> at Object. 
> (/usr/share/nodejs/rollup/bin/src/run/loadConfigFile.js:5:14)
> at Module._compile (internal/modules/cjs/loader.js:778:30)
> 
> 

These seems to be coming from node-vlq/node-magic-string, it should be
Object.defineProperty(exports, '__esModule', { value: true });



Bug#930634: [Pkg-javascript-devel] Bug#930634: Build failures with rollup 0.56

2019-09-28 Thread Pirate Praveen



On Sat, Sep 28, 2019 at 16:12, Xavier  wrote:

help.pm is probably filtered. Overwrite in debian/nodejs/files


I think the root cause is incompatibility with rollup-plugin-string 
(they want 2.x and we already have 3.x).


I did some ugly hacks to move forward and now I get

$ rollup -c
/usr/share/nodejs/rollup/dist/rollup.js:6030
exports.__esModule = true;
  ^

TypeError: Cannot assign to read only property '__esModule' of object 
'#'
   at Object. 
(/usr/share/nodejs/rollup/dist/rollup.js:6030:20)

   at Module._compile (internal/modules/cjs/loader.js:778:30)
   at Object.Module._extensions..js 
(internal/modules/cjs/loader.js:789:10)

   at Module.load (internal/modules/cjs/loader.js:653:32)
   at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
   at Function.Module._load (internal/modules/cjs/loader.js:585:3)
   at Module.require (internal/modules/cjs/loader.js:692:17)
   at require (internal/modules/cjs/helpers.js:25:18)
   at Object. 
(/usr/share/nodejs/rollup/bin/src/run/loadConfigFile.js:5:14)

   at Module._compile (internal/modules/cjs/loader.js:778:30)




Bug#930634: [Pkg-javascript-devel] Bug#930634: Build failures with rollup 0.56

2019-09-28 Thread Xavier
help.pm is probably filtered. Overwrite in debian/nodejs/files

Le 28 septembre 2019 15:53:02 GMT+02:00, Pirate Praveen 
 a écrit :
>On Sat, 28 Sep 2019 18:55:38 +0530 Pirate Praveen
> wrote:
>> Next error is,
>> 
>> src/node-entry.js → dist/rollup.js, dist/rollup.es.js...
>> [!] Error: Illegal reassignment to import 'commonjsHelpers'
>> ../../../../../../../usr/lib/nodejs/base/utils.js (5:0)
>> 3: var utils = require('lazy-cache')(require);
>> 4: var fn = require;
>> 5: require = utils; // eslint-disable-line
>>^
>> 6:
>> 7: /**
>
>Fixed by using node-snapdragon from experimental, which does not depend
>on node-base.
>
>Now rollup builds fine, but gives the following error when running,
>
>$ rollup --help
>internal/modules/cjs/loader.js:638
>throw err;
>^
>
>Error: Cannot find module 'help.md'
>at Function.Module._resolveFilename
>(internal/modules/cjs/loader.js:636:15)
>at Function.Module._load (internal/modules/cjs/loader.js:562:25)
>at Module.require (internal/modules/cjs/loader.js:692:17)
>at require (internal/modules/cjs/helpers.js:25:18)
>at Object. (/usr/share/nodejs/rollup/bin/rollup:6:17)
>at Module._compile (internal/modules/cjs/loader.js:778:30)
>at Object.Module._extensions..js
>(internal/modules/cjs/loader.js:789:10)
>at Module.load (internal/modules/cjs/loader.js:653:32)
>at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
>at Function.Module._load (internal/modules/cjs/loader.js:585:3)
>
>-- 
>Pkg-javascript-devel mailing list
>pkg-javascript-de...@alioth-lists.debian.net
>https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma 
brièveté.

Bug#930634: Build failures with rollup 0.56

2019-09-28 Thread Pirate Praveen
On Sat, 28 Sep 2019 18:55:38 +0530 Pirate Praveen
 wrote:
> Next error is,
> 
> src/node-entry.js → dist/rollup.js, dist/rollup.es.js...
> [!] Error: Illegal reassignment to import 'commonjsHelpers'
> ../../../../../../../usr/lib/nodejs/base/utils.js (5:0)
> 3: var utils = require('lazy-cache')(require);
> 4: var fn = require;
> 5: require = utils; // eslint-disable-line
>^
> 6:
> 7: /**

Fixed by using node-snapdragon from experimental, which does not depend
on node-base.

Now rollup builds fine, but gives the following error when running,

$ rollup --help
internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module 'help.md'
at Function.Module._resolveFilename
(internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/usr/share/nodejs/rollup/bin/rollup:6:17)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)



Bug#930634: Build failures with rollup 0.56

2019-09-28 Thread Pirate Praveen
On Sat, 28 Sep 2019 13:53:42 +0530 Pirate Praveen
 wrote:
> On Sat, 28 Sep 2019 13:02:49 +0530 Pirate Praveen
>  wrote:
> > These errors are now fixed with help from Jishnu.
> 
> Now rollup -c brings this error,
> 
> 
> $ rollup -c
> 
> src/node-entry.ts → dist/rollup.js, dist/rollup.es.js...
> [!] (commonjs plugin) SyntaxError: Unexpected token (44:51) in
> /usr/share/nodejs/micromatch/index.js
> ../../usr/share/nodejs/micromatch/index.js (44:51)
> 42:
> 43:   for (let i = 0; i < patterns.length; i++) {
> 44: let isMatch = picomatch(String(patterns[i]), { ...options,
> onResult }, true);
>^
> 45: let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
> 46: if (negated) negatives++;
> 
> 
> 

I was able to fix this by using
babel-plugin-transform-object-rest-spread, but I wonder why these are
present in these modules in the first place. Do debian's nodejs disable
these syntax?

Next error is,

src/node-entry.js → dist/rollup.js, dist/rollup.es.js...
[!] Error: Illegal reassignment to import 'commonjsHelpers'
../../../../../../../usr/lib/nodejs/base/utils.js (5:0)
3: var utils = require('lazy-cache')(require);
4: var fn = require;
5: require = utils; // eslint-disable-line
   ^
6:
7: /**



Bug#930634: Build failures with rollup 0.56

2019-09-28 Thread Pirate Praveen
On Sat, 28 Sep 2019 13:02:49 +0530 Pirate Praveen
 wrote:
> These errors are now fixed with help from Jishnu.

Now rollup -c brings this error,


$ rollup -c

src/node-entry.ts → dist/rollup.js, dist/rollup.es.js...
[!] (commonjs plugin) SyntaxError: Unexpected token (44:51) in
/usr/share/nodejs/micromatch/index.js
../../usr/share/nodejs/micromatch/index.js (44:51)
42:
43:   for (let i = 0; i < patterns.length; i++) {
44: let isMatch = picomatch(String(patterns[i]), { ...options,
onResult }, true);
   ^
45: let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
46: if (negated) negatives++;



Bug#930634: Build failures with rollup 0.56

2019-09-28 Thread Pirate Praveen
On Thu, 26 Sep 2019 23:59:45 +0530 Pirate Praveen
 wrote:
> 0.52 is in unstable now,
> 
> Current status on master-0.56 branch,
> 
> tsc
> src/Graph.ts:92:31 - error TS1345: An expression of type 'void' cannot
> be tested for truthiness
> 
> 92if (plugin.options) return plugin.options(acc) || acc;
>  ~~~
> 
> src/ast/ExecutionPathOptions.ts:1:23 - error TS7016: Could not find a
> declaration file for module 'immutable'.
> '/usr/share/nodejs/immutable/dist/immutable.js' implicitly has an 'any'
> type.
>   Try `npm install @types/immutable` if it exists or add a new
> declaration (.d.ts) file containing `declare module 'immutable';`
> 
> 1 import Immutable from 'immutable';
> ~~~
> 
> src/utils/callIfFunction.ts:2:39 - error TS2349: This expression is not
> callable.
>   Not all constituents of type '(() => T) | (T & Function)' are callable.
> Type 'T & Function' has no call signatures.
> 
> 2  return typeof thing === 'function' ? thing() : thing;
> ~
> 
> src/utils/collapseSourcemaps.ts:96:7 - error TS2322: Type 'number' is
> not assignable to type 'undefined'.
> 
> 96segment[4] = nameIndex;
>   ~~
> 
> src/utils/collapseSourcemaps.ts:96:15 - error TS2493: Tuple type
> '[number, number, number, number]' of length '4' has no element at index
> '4'.
> 
> 96segment[4] = nameIndex;
>   ~
> 
> src/watch/index.ts:216:5 - error TS2322: Type 'Set' is not
> assignable to type 'Set'.
>   Type 'unknown' is not assignable to type 'string'.
> 
> 216   this.watched = watched;
>   
> 
> 
> Found 12 errors.

These errors are now fixed with help from Jishnu.



Bug#930634: Build failures with rollup 0.56

2019-09-26 Thread Pirate Praveen
0.52 is in unstable now,

Current status on master-0.56 branch,

tsc
src/Graph.ts:92:31 - error TS1345: An expression of type 'void' cannot
be tested for truthiness

92  if (plugin.options) return plugin.options(acc) || acc;
   ~~~

src/ast/ExecutionPathOptions.ts:1:23 - error TS7016: Could not find a
declaration file for module 'immutable'.
'/usr/share/nodejs/immutable/dist/immutable.js' implicitly has an 'any'
type.
  Try `npm install @types/immutable` if it exists or add a new
declaration (.d.ts) file containing `declare module 'immutable';`

1 import Immutable from 'immutable';
~~~

src/utils/callIfFunction.ts:2:39 - error TS2349: This expression is not
callable.
  Not all constituents of type '(() => T) | (T & Function)' are callable.
Type 'T & Function' has no call signatures.

2  return typeof thing === 'function' ? thing() : thing;
~

src/utils/collapseSourcemaps.ts:96:7 - error TS2322: Type 'number' is
not assignable to type 'undefined'.

96  segment[4] = nameIndex;
~~

src/utils/collapseSourcemaps.ts:96:15 - error TS2493: Tuple type
'[number, number, number, number]' of length '4' has no element at index
'4'.

96  segment[4] = nameIndex;
~

src/watch/index.ts:216:5 - error TS2322: Type 'Set' is not
assignable to type 'Set'.
  Type 'unknown' is not assignable to type 'string'.

216 this.watched = watched;



Found 12 errors.

Files:   277
Lines:120117
Nodes:418097
Identifiers:  159915
Symbols:  104609
Types:  9282
Memory used: 169166K
I/O read:  0.09s
I/O write: 0.00s
Parse time:1.76s
Bind time: 0.85s
Check time:1.75s
Emit time: 0.00s
Total time:4.36s

node-immutable includes type definitions, but it seems to be not enough.

It has 'declare module Immutable' though this build is expecting it to
be 'declare module immutable' (i in small as opposed to I in caps).