2015-10-28 15:14 GMT+01:00 Antonio Terceiro <terce...@debian.org>:

> On Tue, Oct 27, 2015 at 10:32:06PM +0100, Jérémy Lal wrote:
> > 2015-10-27 22:09 GMT+01:00 Antonio Terceiro <terce...@debian.org>:
> >
> > > On Tue, Oct 27, 2015 at 06:09:00PM +0100, Jérémy Lal wrote:
> > > > Package: autodep8
> > > > Version: 0.2
> > > > Severity: normal
> > > >
> > > > Dear Maintainer,
> > > >
> > > > Please use this one-liner instead
> > > >
> > > > upstream_name=$(python -c "import json;
> > > print(json.load(open('package.json'))['name'])")
> > >
> > > this broke on the very first NodeJS package I went to try it
> (requirejs):
> > >
> > > $ pwd
> > > /tmp/requirejs-2.1.20
> > > $ python -c "import json;
> print(json.load(open('package.json'))['name'])"
> > > Traceback (most recent call last):
> > >   File "<string>", line 1, in <module>
> > >   KeyError: 'name'
> > >
> > > We probably want to fallback to looking at the source package name?
> >
> >
> > This is the first time i see this.
> > Yes, keeping existing code as fallback seems to be safer.
> >
> > Note that there is something odd with that module...
> >
> > https://github.com/jrburke/r.js
> > https://github.com/jrburke/r.js/commit/40fa066e
> >
> > https://github.com/jrburke/requirejs
> > https://github.com/jrburke/requirejs/commit/a2029ccd
> >
> > So the correct upstream source seems to be requirejs, not r.js.
> > In any case upstream is using a meta-packager (volo) so in this case
> > package.json cannot be trusted (the fact it is available in the git
> > repository is misleading - it shouldn't even be there).
>
> I improved the situation with this commit:
> http://anonscm.debian.org/cgit/collab-maint/autodep8.git/commit/
>
> However, even then the actual tests are still just a simple load test.
> It will make sure the dependency chain is ok, and that is it.
>

That's something !

Is there any way we can improve on that? Is `npm run test` a more or
> less standard practice in the Node community?
>

It's `npm test` but it wouldn't work because test are run using the
devDependencies listed in package.json, and many debian packages
have devDependencies that are not available in debian.


Jérémy

Reply via email to