<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-10-28 15:14 GMT+01:00 Antonio Terceiro <span dir="ltr"><<a href="mailto:terceiro@debian.org" target="_blank">terceiro@debian.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Oct 27, 2015 at 10:32:06PM +0100, Jérémy Lal wrote:<br>
> 2015-10-27 22:09 GMT+01:00 Antonio Terceiro <<a href="mailto:terceiro@debian.org">terceiro@debian.org</a>>:<br>
><br>
> > On Tue, Oct 27, 2015 at 06:09:00PM +0100, Jérémy Lal wrote:<br>
> > > Package: autodep8<br>
> > > Version: 0.2<br>
> > > Severity: normal<br>
> > ><br>
> > > Dear Maintainer,<br>
> > ><br>
> > > Please use this one-liner instead<br>
> > ><br>
> > > upstream_name=$(python -c "import json;<br>
> > print(json.load(open('package.json'))['name'])")<br>
> ><br>
> > this broke on the very first NodeJS package I went to try it (requirejs):<br>
> ><br>
> > $ pwd<br>
> > /tmp/requirejs-2.1.20<br>
> > $ python -c "import json; print(json.load(open('package.json'))['name'])"<br>
> > Traceback (most recent call last):<br>
> >   File "<string>", line 1, in <module><br>
> >   KeyError: 'name'<br>
> ><br>
> > We probably want to fallback to looking at the source package name?<br>
><br>
><br>
> This is the first time i see this.<br>
> Yes, keeping existing code as fallback seems to be safer.<br>
><br>
> Note that there is something odd with that module...<br>
><br>
> <a href="https://github.com/jrburke/r.js" rel="noreferrer" target="_blank">https://github.com/jrburke/r.js</a><br>
> <a href="https://github.com/jrburke/r.js/commit/40fa066e" rel="noreferrer" target="_blank">https://github.com/jrburke/r.js/commit/40fa066e</a><br>
><br>
> <a href="https://github.com/jrburke/requirejs" rel="noreferrer" target="_blank">https://github.com/jrburke/requirejs</a><br>
> <a href="https://github.com/jrburke/requirejs/commit/a2029ccd" rel="noreferrer" target="_blank">https://github.com/jrburke/requirejs/commit/a2029ccd</a><br>
><br>
> So the correct upstream source seems to be requirejs, not r.js.<br>
> In any case upstream is using a meta-packager (volo) so in this case<br>
> package.json cannot be trusted (the fact it is available in the git<br>
> repository is misleading - it shouldn't even be there).<br>
<br>
</div></div>I improved the situation with this commit:<br>
<a href="http://anonscm.debian.org/cgit/collab-maint/autodep8.git/commit/" rel="noreferrer" target="_blank">http://anonscm.debian.org/cgit/collab-maint/autodep8.git/commit/</a><br>
<br>
However, even then the actual tests are still just a simple load test.<br>
It will make sure the dependency chain is ok, and that is it.<br></blockquote><div><br></div><div>That's something ! </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there any way we can improve on that? Is `npm run test` a more or<br>
less standard practice in the Node community?<br></blockquote><div><br></div><div>It's `npm test` but it wouldn't work because test are run using the</div><div>devDependencies listed in package.json, and many debian packages</div><div>have devDependencies that are not available in debian.</div><div><br></div><div><br></div><div>Jérémy</div><div><br></div><div><br></div><div><br></div></div></div></div>