[Pkg-javascript-devel] Bug#1003601: libjs-marked: loading marked.js from the browser gives "export is not defined"

Thomas Viehmann tv at beamnet.de
Wed Jan 12 13:17:01 GMT 2022


Package: libjs-marked
Version: 4.0.5+ds-5
Severity: important
Tags: patch

Hi,

marked.js currently links to marked.cjs, which seems to cause problems, 
see https://github.com/markedjs/marked/issues/2284 for the related 
upstream bug.

The fix could be to ship the .umd.js and minified .umd.js, as the patch 
I'm using locally below shows. Thisis slightly different but should be 
equivalent to the upstream fix.

My interest in this is because Jupyter Notebook (package: 
python3-notebook) seems to hit an error upon loading. (Sadly, not the 
only one.)

Best regards

Thomas



diff -Nru node-marked-4.0.5+ds/debian/changelog 
node-marked-4.0.5+ds/debian/changelog
--- node-marked-4.0.5+ds/debian/changelog	2022-01-12 11:37:46.000000000 
+0100
+++ node-marked-4.0.5+ds/debian/changelog	2022-01-09 11:47:31.000000000 
+0100
@@ -1,10 +1,3 @@
-node-marked (4.0.5+ds-5.1) UNRELEASED; urgency=medium
-
-  * Non-maintainer upload.
-  * Fix browser use
-
- -- Thomas Viehmann <tv at beamnet.de>  Wed, 12 Jan 2022 11:37:46 +0100
-
  node-marked (4.0.5+ds-5) unstable; urgency=medium

    * Team upload
diff -Nru node-marked-4.0.5+ds/debian/libjs-marked.install 
node-marked-4.0.5+ds/debian/libjs-marked.install
--- node-marked-4.0.5+ds/debian/libjs-marked.install	2022-01-12 
11:37:46.000000000 +0100
+++ node-marked-4.0.5+ds/debian/libjs-marked.install	2022-01-09 
11:23:41.000000000 +0100
@@ -1,4 +1,2 @@
  lib/marked.cjs usr/share/javascript/marked/
-lib/marked.umd.js usr/share/javascript/marked/
-lib/marked.umd.min.js usr/share/javascript/marked/
  lib/marked.min.cjs usr/share/javascript/marked/
diff -Nru node-marked-4.0.5+ds/debian/libjs-marked.links 
node-marked-4.0.5+ds/debian/libjs-marked.links
--- node-marked-4.0.5+ds/debian/libjs-marked.links	2022-01-12 
11:37:46.000000000 +0100
+++ node-marked-4.0.5+ds/debian/libjs-marked.links	2022-01-09 
11:27:30.000000000 +0100
@@ -1,2 +1,2 @@
-usr/share/javascript/marked/marked.umd.js	 
usr/share/javascript/marked/marked.js
-usr/share/javascript/marked/marked.umd.min.js 
usr/share/javascript/marked/marked.min.js
+usr/share/javascript/marked/marked.cjs	 
usr/share/javascript/marked/marked.js
+usr/share/javascript/marked/marked.min.cjs 
usr/share/javascript/marked/marked.min.js
diff -Nru node-marked-4.0.5+ds/debian/rules 
node-marked-4.0.5+ds/debian/rules
--- node-marked-4.0.5+ds/debian/rules	2022-01-12 11:37:46.000000000 +0100
+++ node-marked-4.0.5+ds/debian/rules	2022-01-09 11:23:41.000000000 +0100
@@ -10,7 +10,6 @@
  override_dh_auto_build:
  	rollup -c rollup.config.js
  	cd lib && terser --comments '/\*[^\0]+?Copyright[^\0]+?\*/' -o 
marked.min.cjs marked.cjs
-	cd lib && terser --comments '/\*[^\0]+?Copyright[^\0]+?\*/' -o 
marked.umd.min.js marked.umd.js

  override_dh_fixperms:
  	dh_fixperms



More information about the Pkg-javascript-devel mailing list