On Wed, Sep 7, 2022 at 1:36 PM Ewoud Kohl van Wijngaarden
<ewoud+fed...@kohlvanwijngaarden.nl> wrote:

> But what if $package a.b only supports node 16 and $package x.y only
> supports node 20. Looking at /usr/lib/node_modules/npm/node_modules I
> don't see any version numbers in directories so they can't be
> coinstalled. Does it mean you drop the node 16 package once node 20 is
> packaged? It will still be in the load path for node 16 so it could
> accidentally load incompatible code.

So, some of this is going to be resolved by policy. Currently, our
official policy[1] on Node.js packages in Fedora allows packaging:

* The interpreter, development headers/libraries, and the assorted
tools to manage project-level installations. Examples: nodejs, npm,
yarn
* Packages that provide applications that users would want to use in
their shell. Examples: uglify

Note that we *expressly* do not list NPM "libraries". We only package
applications. Further down on the guidelines page you will see that
our packaging approach involves bundling the necessary dependencies
into the application. This is in line with Node.js's own
recommendations.

For developers working on Node.js software, they will be npm to
install their dependencies into a node_modules subdirectory in their
working directory. Those will be preferred over anything in the system
path.


For the case of individual applications requiring a particular Node.js
version, they should be packaged to run using the versioned
/usr/bin/nodejs-X interpreter (and of course Requires: nodejs-X)


[1] 
https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/#_what_to_package


> >> What will the new RPM provides be? today it's simply npm($package) but I
> >> can imagine you want to change that to something versioned too.
> >
> >See above; I don't think that will be needed in the vast majority of cases.
>
> That you say vast majority of cases means there are edge cases. I think
> a proposal needs to address those, even if it's saying that it becomes
> unsupported.
> _______________________________________________
> devel mailing list -- devel@lists.fedoraproject.org
> To unsubscribe send an email to devel-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
> Do not reply to spam, report it: 
> https://pagure.io/fedora-infrastructure/new_issue
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to