[Pkg-javascript-devel] Bug#887497: Update node-base to latest upstream release

Pirate Praveen praveen at debian.org
Mon Mar 12 15:55:21 UTC 2018


Control: block 892753 by -1
Control: affects node-snapdragon node-braces node-expand-brackets
Control: tag help

On Wed, 17 Jan 2018 18:26:18 +0530 Pirate Praveen <praveen at debian.org>
wrote:
> This is fixed in latest version of node-base (1.0.1) and git repo
> already has the latest version. But updating node-base will break
> node-snapdragon. New version of snapdragon does not depend on node-base,
> but will break node-braces.
> 

We are hitting this issue again for node-rollup-plugin-typescript (which
is needed to update rollup to 0.56).

https://salsa.debian.org/js-team/node-rollup-plugin-typescript

pravi at nishumbha:~/forge/debian/git/pkg-javascript/node-rollup-plugin-typescript$
rollup -c
(!) Some options have been renamed
https://gist.github.com/Rich-Harris/d472c50732dab03efeb37472b08a3f32
options.entry is now options.input
options.targets is now options.output
output.dest is now output.file

src/index.js → dist/rollup-plugin-typescript.cjs.js,
dist/rollup-plugin-typescript.es.js...
created dist/rollup-plugin-typescript.cjs.js,
dist/rollup-plugin-typescript.es.js in 123ms
pravi at nishumbha:~/forge/debian/git/pkg-javascript/node-rollup-plugin-typescript$
mocha --compilers js:buble/register


(node:25424) DeprecationWarning: "--compilers" will be removed in a
future version of Mocha; see https://git.io/vdcSr for more info
  rollup-plugin-typescript
    1) runs code through typescript
    2) ignores the declaration option
    3) handles async functions
    4) does not duplicate helpers
    5) transpiles `export class A` correctly
    6) transpiles ES6 features to ES5 with source maps
    7) reports diagnostics and throws if errors occur during transpilation
    8) works with named exports for abstract classes
    9) should use named exports for classes
    10) supports overriding the TypeScript version
    11) should not resolve .d.ts files
    12) should transpile JSX if enabled
    13) should throw on bad options
    14) prevents errors due to conflicting `sourceMap`/`inlineSourceMap`
options
    15) should not fail if source maps are off
    16) does not include helpers in source maps
    strictNullChecks
      17) is enabled for versions >= 1.9.0
      18) is disabled with a warning < 1.9.0


  0 passing (26ms)
  18 failing

  1) rollup-plugin-typescript
       runs code through typescript:
     TypeError: Class constructor Cache cannot be invoked without 'new'
      at Snapdragon.Base (/usr/lib/nodejs/base/index.js:43:11)
      at new Snapdragon (/usr/lib/nodejs/snapdragon/index.js:24:8)
      at new Extglob (/usr/lib/nodejs/extglob/lib/extglob.js:27:48)
      at create (/usr/lib/nodejs/extglob/index.js:233:15)
      at Object.utils.memoize (/usr/lib/nodejs/extglob/lib/utils.js:32:13)
      at Function.extglob.create (/usr/lib/nodejs/extglob/index.js:238:16)
      at Object.extglob (/usr/lib/nodejs/extglob/index.js:40:21)
      at Glob.extglob (/usr/lib/nodejs/micromatch/lib/glob.js:101:26)
      at expand (/usr/lib/nodejs/micromatch/lib/expand.js:111:10)
      at toRegex (/usr/lib/nodejs/micromatch/index.js:337:16)
      at Object.regexCache [as cache]
(/usr/lib/nodejs/regex-cache/index.js:45:42)
      at makeRe (/usr/lib/nodejs/micromatch/index.js:390:16)
      at Function.matcher (/usr/lib/nodejs/micromatch/index.js:304:12)
      at getMatcher
(/usr/lib/nodejs/rollup-pluginutils/createFilter.js:6:72)
      at Array.map (<anonymous>)
      at Object.createFilter
(/usr/lib/nodejs/rollup-pluginutils/createFilter.js:7:56)
      at typescript (dist/rollup-plugin-typescript.cjs.js:191:33)
      at bundle (test/test.js:22:14)
      at Context.it (test/test.js:30:10)
      at callFn (/usr/lib/nodejs/mocha/lib/runnable.js:354:21)
      at Test.Runnable.run (/usr/lib/nodejs/mocha/lib/runnable.js:346:7)
      at Runner.runTest (/usr/lib/nodejs/mocha/lib/runner.js:442:10)
      at /usr/lib/nodejs/mocha/lib/runner.js:560:12
      at next (/usr/lib/nodejs/mocha/lib/runner.js:356:14)
      at /usr/lib/nodejs/mocha/lib/runner.js:366:7
      at next (/usr/lib/nodejs/mocha/lib/runner.js:290:14)
      at Immediate.<anonymous> (/usr/lib/nodejs/mocha/lib/runner.js:334:5)

(same error repeats for all tests)

This error goes away with node-base 1.0.1, but that brings another error

pravi at nishumbha:~/forge/debian/git/pkg-javascript/node-rollup-plugin-typescript$
mocha --compilers js:buble/register
/usr/lib/nodejs/snapdragon/index.js:52
Base.extend(Snapdragon);
     ^

TypeError: Base.extend is not a function
    at Object.<anonymous> (/usr/lib/nodejs/snapdragon/index.js:52:6)
    at Module._compile (module.js:635:30)

and when node-snapdragon is updated to 0.11, we get another error

1) rollup-plugin-typescript
       runs code through typescript:
     TypeError: brackets.parser.capture is not a function
      at Snapdragon.parsers
(/usr/lib/nodejs/expand-brackets/lib/parsers.js:23:6)

So node-expand-brackets should be made compatible with snapdragon 0.11

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 862 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-javascript-devel/attachments/20180312/3c0b01b6/attachment.sig>


More information about the Pkg-javascript-devel mailing list