-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for the libc field in package.json #3981
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arcanis
commented
Jan 14, 2022
arcanis
force-pushed
the
mael/libc-field
branch
from
January 18, 2022 19:19
f81b99e
to
90fe8b3
Compare
4 tasks
This was referenced Mar 16, 2022
styfle
pushed a commit
to vercel/next.js
that referenced
this pull request
Mar 16, 2022
Related: yarnpkg/berry#3981 With `yarn 3.2` +, developers will install one less package on the Linux platform
npm registry won't return the |
yisibl
added a commit
to thx/resvg-js
that referenced
this pull request
Mar 20, 2022
Currently only [yarn 3.2+](yarnpkg/berry#3981) and [cnpm](cnpm/npminstall#387) are supported.
yisibl
added a commit
to thx/resvg-js
that referenced
this pull request
Mar 20, 2022
On Linux, it is not possible to tell exactly what kind of C library a native modules depends on just by os/cpu, so yarn 3.2 and cnpm added libc fields to further distinguish this case. This avoids downloading both `gnu` and `musl` packages at the same time. Currently only [yarn 3.2+](yarnpkg/berry#3981) and [cnpm](cnpm/npminstall#387) are supported, the npm implementation is [still under discussion](npm/rfcs#519).
1 task
yisibl
added a commit
to thx/resvg-js
that referenced
this pull request
Mar 20, 2022
On Linux, it is not possible to tell exactly what kind of C library a native modules depends on just by os/cpu, so yarn 3.2 and cnpm added libc fields to further distinguish this case. This avoids downloading both `gnu` and `musl` packages at the same time. Currently only [yarn 3.2+](yarnpkg/berry#3981) and [cnpm](cnpm/npminstall#387) are supported, the npm implementation is [still under discussion](npm/rfcs#519).
@fengmk2 Yarn doesn't use that header since it slows down requests due to the lack of compression so it doesn't affect us, you can open an issue with npm and ask them to include it. |
13 tasks
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's the problem this PR addresses?
Some packages (SWC, sharp) publish native packages for both glibc and musl. At the moment users need to install both versions, as there is no conditional differentiator as for
os
andcpu
.How did you fix it?
This PR adds support for a new
libc
field in thepackage.json
file, which will be taken into account when filtering conditional packages. We currently support two values,glibc
andmusl
, which are both obtained from looking at the Node report (Node 14+ only).Checklist