I've been working on a few updates for the nodejs-packaging tools which I plan to build in rawhide in the next few days.
The first change is to add a --move switch to %nodejs_fixdep which allows a dependency to be moved to a different section while preserving it's version. So, for example:
%nodejs_fixdep --dev --move nan
Will move the nan dependency to devDependencies - this is actually a real use case because we only need it for build but it will normally be in the main dependencies so that that npm can build a binary module when installing it.
You can also move things to/from optionalDependencies in the same way.
The second change is to add a --optional switch to %nodejs_symlink_deps to allow optional dependencies to be included.
The final planned changed, and the one that may be controversial, is to start generating Suggests dependencies for anything listed as optional in the package.json file.
There is actually a use case for that (BZ#1290781) and I personally think it's the right thing to do anyway, but I'm interested to hear what other people think before I go ahead with that.
Tom
On Thu, Jan 28, 2016 at 5:38 PM, Tom Hughes tom@compton.nu wrote:
The final planned changed, and the one that may be controversial, is to start generating Suggests dependencies for anything listed as optional in the package.json file.
I'm fine with this, as long as there's a way to remove optional dependencies as well :-) My brain isn't working too well today (I'm blaming the cold medicine), but I know I have a package that has an optional dependency where I wouldn't actually want to add a "Suggests" dependency for it, but I'm a little fuzzy on the details.
-- Jared Smith
On 29/01/16 01:46, Jared K. Smith wrote:
On Thu, Jan 28, 2016 at 5:38 PM, Tom Hughes <tom@compton.nu mailto:tom@compton.nu> wrote:
The final planned changed, and the one that may be controversial, is to start generating Suggests dependencies for anything listed as optional in the package.json file.
I'm fine with this, as long as there's a way to remove optional dependencies as well :-) My brain isn't working too well today (I'm blaming the cold medicine), but I know I have a package that has an optional dependency where I wouldn't actually want to add a "Suggests" dependency for it, but I'm a little fuzzy on the details.
Yes fixdep --optional --remove should already work to do that.
Tom
On 28/01/16 22:38, Tom Hughes wrote:
I've been working on a few updates for the nodejs-packaging tools which I plan to build in rawhide in the next few days.
I have now built nodejs-packaging-8 in rawhide with these changes.
Tom
nodejs@lists.fedoraproject.org