[Pkg-javascript-devel] Bug#941601: rollup 0.56 transition: Add node-rollup-plugin-json to build depends and fix 'format is now output.format' error
Pirate Praveen
praveen at onenetbeyond.org
Wed Oct 2 16:46:33 BST 2019
Package: leaflet-markercluster
Version: 1.4.1~dfsg-6
Severity: important
Control: tags -1 patch
It needs the following changes,
diff --git a/debian/control b/debian/control
index 341cd23..09dc90e 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,7 @@ Build-Depends:
pigz,
rename,
rollup,
+ node-rollup-plugin-json,
sassc,
uglifyjs (>= 3),
Standards-Version: 4.3.0
and it still fails,
NODE_ENV=release rollup --config build/rollup-config.js
(!) Some options have been renamed
https://gist.github.com/Rich-Harris/d472c50732dab03efeb37472b08a3f32
entry is now input
moduleName is now output.name
sourceMap is now output.sourcemap
format is now output.format
banner is now output.banner
dest is now output.file
src/index.js → dist/leaflet.markercluster-src.js...
[!] Error: You must specify options.format, which can be one of 'amd',
'cjs', 'system', 'es', 'iife' or 'umd'
https://rollupjs.org/#format-f-output-format-
Error: You must specify options.format, which can be one of 'amd',
'cjs', 'system', 'es', 'iife' or 'umd'
at Object.error [as default]
(/usr/share/nodejs/rollup/src/utils/error.js:10:15)
at checkOutputOptions
(/usr/share/nodejs/rollup/src/rollup/index.js:37:24)
at normalizeOptions
(/usr/share/nodejs/rollup/src/rollup/index.js:95:21)
at generate (/usr/share/nodejs/rollup/src/rollup/index.js:99:41)
at Object.write
(/usr/share/nodejs/rollup/src/rollup/index.js:131:32)
at /usr/share/nodejs/rollup/bin/src/run/build.js:49:27
at next (/usr/share/nodejs/rollup/src/utils/promise.js:7:32)
at /usr/share/nodejs/rollup/src/utils/promise.js:10:53
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
After rollup configuration if fixed, I get an error with uglifyjs
uglifyjs --compress --mangle \
--source-map
"base='/<<PKGBUILDDIR>>/debian/js',content='dist/leaflet.markercluster-src.js.map',url='leaflet.markercluster.min.js.map'"
\
--output debian/js/leaflet.markercluster.min.js \
-- dist/leaflet.markercluster-src.js
ERROR: No element indexed by 0
at ArraySet_at [as at]
(/usr/share/nodejs/source-map/lib/array-set.js:109:9)
at BasicSourceMapConsumer.SourceMapConsumer_originalPositionFor [as
originalPositionFor]
(/usr/share/nodejs/source-map/lib/source-map-consumer.js:673:30)
at Object.add (eval at <anonymous>
(/usr/lib/nodejs/uglify-js/tools/node.js:20:1), <anonymous>:12216:32)
at eval (eval at <anonymous>
(/usr/lib/nodejs/uglify-js/tools/node.js:20:1), <anonymous>:3921:32)
at Array.forEach (<anonymous>)
at OutputStream.flush_mappings (eval at <anonymous>
(/usr/lib/nodejs/uglify-js/tools/node.js:20:1), <anonymous>:3920:18)
at Object.print (eval at <anonymous>
(/usr/lib/nodejs/uglify-js/tools/node.js:20:1), <anonymous>:4025:29)
at eval (eval at <anonymous>
(/usr/lib/nodejs/uglify-js/tools/node.js:20:1), <anonymous>:4847:16)
at doit (eval at <anonymous>
(/usr/lib/nodejs/uglify-js/tools/node.js:20:1), <anonymous>:4356:13)
at AST_Var.eval (eval at <anonymous>
(/usr/lib/nodejs/uglify-js/tools/node.js:20:1), <anonymous>:4363:13)
This was fixed by switching to uglifyjs.terser.
Entire change is here
https://salsa.debian.org/js-team/leaflet-markercluster/merge_requests/1
More information about the Pkg-javascript-devel
mailing list