[Pkg-javascript-devel] The (long) way to update rollup

Pirate Praveen praveen at onenetbeyond.org
Thu Sep 26 19:26:16 BST 2019



On Thu, Sep 26, 2019 at 16:44, Pirate Praveen 
<praveen at onenetbeyond.org> wrote:
> 
> 
> On Thu, Sep 26, 2019 at 15:57, Pirate Praveen 
> <praveen at onenetbeyond.org> wrote:
>> With 0.52.0 in the archive, I think we can jump to 0.56.3 now.
> 
> I have imported 0.56.3 to master-0.56 branch but it is not building. 
> There is one good and one bad news with this update.
> 
> Good news, they no longer use buble in the build process (it is only 
> used in tests). Bad news, they switched to typescript and 
> node-rollup-plugin is broken, see https://bugs.debian.org/cgi-bin/
>  bugreport.cgi?bug=933091
> 
>> 
> So we either need to fix that or manually run typescript.

When manually running tsc, (in 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<unknown>' is not 
assignable to type 'Set<string>'.
  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).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20190926/088d08e6/attachment.html>


More information about the Pkg-javascript-devel mailing list