[Pkg-javascript-devel] Bug#980406: Bug#980406: This is confirmed as a bug in debian package

Pirate Praveen praveen at onenetbeyond.org
Tue Jan 19 14:04:30 GMT 2021



On Tue, Jan 19, 2021 at 2:24 pm, Pirate Praveen 
<praveen at onenetbeyond.org> wrote:
> Control: severity -1 serious
> 
> I was able to use xterm 3.8.1 from nmpjs.com with gitlab without any 
> issues. So this is a bug in node-xterm debian build.

Trying to switch to rollup instead of browserify-lite, but tsc itself 
is failing now.

diff --git a/debian/control b/debian/control
index 6bc5004..f70533d 100644
--- a/debian/control
+++ b/debian/control
@@ -7,9 +7,12 @@ Priority: optional
 Build-Depends: chai <!nocheck>,
                debhelper-compat (= 12),
                mocha <!nocheck>,
-               node-browserify-lite,
+               rollup,
                node-typescript,
                node-typescript-types (>= 20190609~),
+               node-types-jquery,
+               node-types-jsdom,
+               node-types-mocha,
                nodejs,
                pkg-js-tools
 Standards-Version: 4.5.0
diff --git a/debian/rules b/debian/rules
index d8dcc53..72fc167 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,17 +17,8 @@ override_dh_auto_build:
 # Otherwise browserify-lite complains
 	touch lib/addons/index.js
 	mkdir -p dist
-	cd dist && browserify-lite ../lib/xterm.js --outfile xterm.js 
--standalone Terminal
-	cd dist && for addon in $(ADDONS); do mkdir -p addons/$$addon && 
browserify-lite ../lib/addons/$$addon/$$addon.js --outfile 
addons/$$addon/$$addon.js --standalone $$addon; done
-# Undo browserify-lite workarounds
-	sed -i -e 's/REQUIRE_NO_BROWSERIFY/require/g' dist/xterm.js 
dist/addons/*/*.js
-# browserify-lite seems to generate a module map with indexes starting 
from zero, then tests
-# the truth of the module ID when loading sub-parts - which then fails 
for whatever ends up
-# as sub-module 0; not convinced I fully understand what is happening 
here, because it seems
-# like this should break everything browserify-life produces; dropping 
this check makes it load;
-	sed -i -e '/if [(]!id[)] throw new Error/d' dist/xterm.js 
dist/addons/*/*.js
-
-	rm -f dist/addons/index.js
+	cd dist && rollup ../lib/xterm.js -o xterm.js -f umd -name Terminal
+	cd dist && for addon in $(ADDONS); do mkdir -p addons/$$addon && 
rollup ../lib/addons/$$addon/$$addon.js -o addons/$$addon/$$addon.js -f 
umd -name $$addon; done
 	cd src && find . -name '*.css' -exec cp -v --parents '{}' ../lib \;
 	cd src && find . -name '*.css' -exec cp -v --parents '{}' ../dist \;



More information about the Pkg-javascript-devel mailing list