Bug#745687: [Pkg-javascript-devel] Bug#745687: new upstream version (2.x series)
Quoting Jérémy Lal (2014-04-30 21:09:41) Le mercredi 30 avril 2014 à 14:34 +0200, Jonas Smedegaard a écrit : Quoting Jérémy Lal (2014-04-30 12:53:22) Le mercredi 30 avril 2014 à 12:35 +0200, Leo Iannacone a écrit : On 30 April 2014 02:10, Jonas Smedegaard d...@jones.dk wrote: Status of packaging is that these libraries needs packaging first: node-source-map node-uglify-to-browserify About node-uglify-to-browserify: You do not really need to package it, since it's only related to uglify2.x (it has no reverse-dependency) I think you can bundle it as a patch along with uglify v2.x. I am no fan of hiding upstream projects by maintaining as bundles in Debian. If in fact it makes best sense for node-uglify-to-browserify to be part of UglifyJS2 project, it makes more sense for me to have upstream merge those projects. Or did I perhaps misunderstand your suggestion? You understand correctly. I'm less strict about bundling... i'm using that workaround rarely, though. Anyway it doesn't matter here since in fact, uglify-to-browserify is A transform to make UglifyJS work in browserify. I propose we postpone packaging of this module and list it in Suggests for now. Agreed. About node-source-map: It build-depends on dryice (=0.4.8). You can find a pre-release package in pkg-javascript/node-dryice.git repository. Once it done/uploaded to unstable, we will be able to build source-map. I can help about that, Great! but could you find out about the dependency loop: dryice depends on uglify-js I suspect that such dependency would be only needed only for browser use, not for use in a Nodejs environment (which includes build environment for UglifyJS2). If that's true, I suggest to simply add hinting as documented here: https://wiki.debian.org/BuildProfileSpec I don't understand how that helps. In fact we have a simple uglify - sourcemap+dryice - uglify dependency loop. Sorry - I was thinking *build*-dependency loop. You are right, such hinting is of no help here. We could patch a little dryice so that it doesn't Depends uglify-js but only Recommends or Suggests it. Do i remember well ? would that be enough ? Sounds good. Seems the code already warns + returns uncompressed data if uglification fails, so possibly it is as simple as hacking the requires check. ...but I'd feel much safer leaving that in your hands :-D Related to the point above, it's interesting to note that dryice is a good example of what we could ask upstream to merge back into source-map. I'll leave that to you too. - Jonas -- * Jonas Smedegaard - idealist Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private signature.asc Description: signature
Bug#745687: [Pkg-javascript-devel] Bug#745687: new upstream version (2.x series)
Le jeudi 01 mai 2014 à 22:49 +0200, Jonas Smedegaard a écrit : Quoting Jérémy Lal (2014-05-01 21:57:48) About node-source-map: It build-depends on dryice (=0.4.8). You can find a pre-release package in pkg-javascript/node-dryice.git repository. Once it done/uploaded to unstable, we will be able to build source-map. We could patch a little dryice so that it doesn't Depends uglify-js but only Recommends or Suggests it. Do i remember well ? would that be enough ? Sounds good. My mistake, dryice is tied to uglify too much - it uses uglify's Abstract Syntax Tree to walk the code and find 'require(module)'. I cannot make that optional without cutting dryice legs. On the other hand, uglifyjs2 only needs source-map for the cases where one uses --source-map, something that is not used by source-map (pardon the tautology). I'll push this evening a patch on the master-experimental branch of uglifyjs, just tell me if that's not right. That's perfect :-) There. Jérémy. Description: break dependency loop by making source-map module optional Forwarded: https://github.com/mishoo/UglifyJS2/pull/477 Author: Jérémy Lal kapo...@melix.org Last-Update: 2014-05-02 --- a/package.json +++ b/package.json @@ -16,10 +16,12 @@ }, dependencies: { async : ~0.2.6, -source-map : ~0.1.33, optimist : ~0.3.5, uglify-to-browserify: ~1.0.0 }, +optionalDependencies: { +source-map : ~0.1.33 +}, browserify: { transform: [ uglify-to-browserify ] }, --- a/tools/node.js +++ b/tools/node.js @@ -2,11 +2,16 @@ var fs = require(fs); var vm = require(vm); var sys = require(util); +var sourceMap; +try { + sourceMap = require(source-map); +} catch(e) { +} var UglifyJS = vm.createContext({ sys : sys, console : console, -MOZ_SourceMap : require(source-map) +MOZ_SourceMap : sourceMap }); function load_global(file) { @@ -107,17 +112,21 @@ inMap = fs.readFileSync(options.inSourceMap, utf8); } if (options.outSourceMap) { -output.source_map = UglifyJS.SourceMap({ -file: options.outSourceMap, -orig: inMap, -root: options.sourceRoot -}); -if (options.sourceMapIncludeSources) { -for (var file in sourcesContent) { -if (sourcesContent.hasOwnProperty(file)) { -options.source_map.get().setSourceContent(file, sourcesContent[file]); +if (sourceMap) { +output.source_map = UglifyJS.SourceMap({ +file: options.outSourceMap, +orig: inMap, +root: options.sourceRoot +}); +if (options.sourceMapIncludeSources) { +for (var file in sourcesContent) { +if (sourcesContent.hasOwnProperty(file)) { +options.source_map.get().setSourceContent(file, sourcesContent[file]); +} } } +} else { +console.error(source-map module is missing and needed by outSourceMap option); } }
Bug#745687: [Pkg-javascript-devel] Bug#745687: new upstream version (2.x series)
Le mercredi 30 avril 2014 à 14:34 +0200, Jonas Smedegaard a écrit : [assuming all involved are subscribed: posting only to bugreport] Quoting Jérémy Lal (2014-04-30 12:53:22) Le mercredi 30 avril 2014 à 12:35 +0200, Leo Iannacone a écrit : On 30 April 2014 02:10, Jonas Smedegaard d...@jones.dk wrote: Status of packaging is that these libraries needs packaging first: node-source-map node-uglify-to-browserify About node-uglify-to-browserify: You do not really need to package it, since it's only related to uglify2.x (it has no reverse-dependency) I think you can bundle it as a patch along with uglify v2.x. I am no fan of hiding upstream projects by maintaining as bundles in Debian. If in fact it makes best sense for node-uglify-to-browserify to be part of UglifyJS2 project, it makes more sense for me to have upstream merge those projects. Or did I perhaps misunderstand your suggestion? You understand correctly. I'm less strict about bundling... i'm using that workaround rarely, though. Anyway it doesn't matter here since in fact, uglify-to-browserify is A transform to make UglifyJS work in browserify. I propose we postpone packaging of this module and list it in Suggests for now. About node-source-map: It build-depends on dryice (=0.4.8). You can find a pre-release package in pkg-javascript/node-dryice.git repository. Once it done/uploaded to unstable, we will be able to build source-map. I can help about that, Great! but could you find out about the dependency loop: dryice depends on uglify-js I suspect that such dependency would be only needed only for browser use, not for use in a Nodejs environment (which includes build environment for UglifyJS2). If that's true, I suggest to simply add hinting as documented here: https://wiki.debian.org/BuildProfileSpec I don't understand how that helps. In fact we have a simple uglify - sourcemap+dryice - uglify dependency loop. We could patch a little dryice so that it doesn't Depends uglify-js but only Recommends or Suggests it. Do i remember well ? would that be enough ? Related to the point above, it's interesting to note that dryice is a good example of what we could ask upstream to merge back into source-map. Jérémy. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#745687: [Pkg-javascript-devel] Bug#745687: new upstream version (2.x series)
On Wed, Apr 30, 2014, at 05:40 AM, Jonas Smedegaard wrote: Hi Ramakrishnan, Quoting Ramakrishnan Muthukrishnan (2014-04-24 04:00:58) I noticed that uglify has two series of releases and two upstream repositories maintained, one for 1.x versions and another for 2.x and Debian packages 1.x version. libjs-d3 upstream needs uglify version 2.4.0 but the debian package for libjs-d3 depends on 1.x series packaged on Debian. It will be great if the 2.x version of uglify is packaged and made available in the unstable. Thanks for filing this as a bugreport. Work is underway to package UglifyJS2 in the master-experimental branch of git://git.debian.org/git/pkg-javascript/uglifyjs.git . Status of packaging is that these libraries needs packaging first: node-source-map node-uglify-to-browserify Thank you, Jonas. -- Ramakrishnan -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#745687: [Pkg-javascript-devel] Bug#745687: new upstream version (2.x series)
Hi Ramakrishnan, Quoting Ramakrishnan Muthukrishnan (2014-04-24 04:00:58) I noticed that uglify has two series of releases and two upstream repositories maintained, one for 1.x versions and another for 2.x and Debian packages 1.x version. libjs-d3 upstream needs uglify version 2.4.0 but the debian package for libjs-d3 depends on 1.x series packaged on Debian. It will be great if the 2.x version of uglify is packaged and made available in the unstable. Thanks for filing this as a bugreport. Work is underway to package UglifyJS2 in the master-experimental branch of git://git.debian.org/git/pkg-javascript/uglifyjs.git . Status of packaging is that these libraries needs packaging first: node-source-map node-uglify-to-browserify Regards, - Jonas -- * Jonas Smedegaard - idealist Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private signature.asc Description: signature