On Fri, Sep 18, 2020 at 12:56 PM Troy Dawson <tdawson(a)redhat.com> wrote:
>
> On Fri, Sep 18, 2020 at 8:47 AM Stephen Gallagher <sgallagh(a)redhat.com> wrote:
...
> > Frankly, I think we should probably get out of the business
of
> > shipping library NPMs entirely. Upstream's stance on global vs. local
> > NPM installations is this [1]:
> >
> > """
> > Just like how global variables are kind of gross, but also necessary
> > in some cases, global packages are important, but best avoided if not
> > needed.
> >
> > In general, the rule of thumb is:
> >
> > * If you’re installing something that you want to use in your program,
> > using require('whatever'), then install it locally, at the root of
> > your project.
> > * If you’re installing something that you want to use in your shell,
> > on the command line or something, install it globally, so that its
> > binaries end up in your PATH environment variable.
> > """
> >
> > So, as a shorthand, I think Fedora should only package:
> >
> > 1) The interpreter, development headers/libraries, and the assorted
> > tools to manage project-level installations (NPM, yarn, etc.).
> > 2) Packages that provide binaries that users would want to use in their shell.
> >
> > I'm not sure when bundling their dependencies would be impossible. Can
> > you provide an example? The whole ecosystem is designed around
> > bundling as the preferred approach.
> >
> >
> > [1]
https://nodejs.org/en/blog/npm/npm-1-0-global-vs-local-installation/
>
> I can't provide an example of when bundling would be impossible. I
> just assumed there would be one.
> Part of me thinks this will be alot of work, and another part of me
> thinks it will be less work than what I was proposing above.
>
> I like your proposal over mine. It's more clear, and clean. And
> after the initial set of work, the packaging workload drops.
>
> Does anyone have any major objections before I look at how to do a
> Fedora change proposal?
>
> Troy
>
At least for the short term, I'd suggest adding (3): compiled/binary
nodejs modules; there aren't very many of these in the ecosystem
anyway, as I understand it (there certainly aren't very many in
Fedora) so I don't think it would be too much work to package them
separately.
Otherwise, this sounds good to me!
Sounds like a reasonable approach. +1