On Thu, 08 Mar 2018 17:53:27 +0000 Ghislain Vaillant <ghisv...@gmail.com> wrote:
> > Source: node-xterm
> > Version: 2.7.0+ds1-1
> > Severity: serious
> > 
> > https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/no
> > de-xterm.html
> > 
> > ...
> >    debian/rules override_dh_auto_build
> > make[1]: Entering directory '/build/1st/node-xterm-2.7.0+ds1'
> > tsc --project .
> > src/utils/Mouse.ts(30,80): error TS2339: Property 'parentElement'
> > does not exist on type 'never'.
> > debian/rules:19: recipe for target 'override_dh_auto_build' failed
> > make[1]: *** [override_dh_auto_build] Error 2
> 
> No idea how to fix this. The package used to build fine.
> 
> Without further context, I am clueless about what to do about it.
> 

I had an attempt at this, but it is getting a bit hairy and I think it may be 
time to call it quits. My recommendation is for jupyter-notebook to patch out 
this functionality and not depend on node-xterm, and for this package to be RM 
from Debian.

Details:

The steps I am taking:

1. https://salsa.debian.org/js-team/typescript-types/tree/wip/node-xterm-fix

   - update typescript-types to include the missing modules
   - there is an issue with jsdom which can't use the newest parse5 so we have 
to forcibly use parse5 v4.0.0, which involves some extra tweaks to the 
typescript-types package.

2. apply this patch to node-xterm

diff --git a/debian/rules b/debian/rules
index a981410..eb56bcc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,7 +8,7 @@
 
 override_dh_auto_configure:
        mkdir -p node_modules/@types
-       set -e; for i in chai jquery jsdom mocha node; do \
+       set -e; for i in chai glob jquery jsdom minimatch mocha node parse5 
sizzle tough-cookie; do \
                ln -sf /usr/lib/nodejs/@types/$$i node_modules/@types/$$i; done
 
 COPY_AUX_FILES = \
@@ -16,7 +16,7 @@ COPY_AUX_FILES = \
        cd $(1) && find -name *.css -exec cp --parents '{}' ../$(2) \; \
 
 override_dh_auto_build:
-       tsc --project .
+       tsc --moduleResolution Classic --project .
        $(call COPY_AUX_FILES,src,lib)
 # Otherwise browserify-lite complains
        touch lib/addons/index.js

The next error is:

src/Terminal.integration.ts:13:22 - error TS2307: Cannot find module 'node-pty'.

13 import * as pty from 'node-pty';
                        ~~~~~~~~~~
which looks like this repo: https://github.com/Microsoft/node-pty

However, I really have no idea why this should be necessary, since we didn't 
need it in the previous version. Perhaps it used to be part of the standard 
nodejs distribution and then they split it off?

Anyways this is getting into the realms of JS crap that I wanted to leave 
behind forever.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git

Reply via email to