Skip to content

docs: add libc option to package.json documentation #1256

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

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions content/cli/v10/configuring-npm/package-json.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,26 @@ Like the `os` option, you can also block architectures:

The host architecture is determined by `process.arch`

### libc

If your package only supports certain libc implementations, you can specify which ones. When running on non-Linux systems, any specified value for libc will fail the check.

```json
{
"libc": ["glibc", "musl"]
}
```

Similarly as with `os` and `cpu`, you can also block certain libc implementations:

```json
{
"libc": ["!glibc"]
}
```

Libc implementations is inferred by inspecting `process.report.glibcVersionRuntime` in the case of glibc or `process.report.sharedObjects` in the case of musl.

### private

If you set `"private": true` in your package.json, then npm will refuse to publish it.
Expand Down