Skip to content
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

Add libc field #25

Merged
merged 1 commit into from
Oct 29, 2022
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
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ See also [npm documentation](https://docs.npmjs.com/files/package.json), [std-pk
* [`engines`](#engines)
* [`os`](#os)
* [`cpu`](#cpu)
* [`libc`](#libc)
- [Publishing](#publishing)
* [`private`](#private)
* [`publishConfig`](#publishconfig)
Expand Down Expand Up @@ -533,9 +534,23 @@ This specifies operating system compatibility for your package. It checks agains
"cpu": ["!arm", "!mips"]
}
```

Use this to specify your package will only run on certain CPU architectures. This checks against `process.arch`.

### `libc`

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

Use this to specify your package only runs on a specific flavor of libc. This checks against the result from [`detect-libc`](https://www.npmjs.com/package/detect-libc).

- [pnpm support](https://github.com/pnpm/pnpm/pull/4605)
- [yarn support](https://github.com/yarnpkg/berry/pull/3981)
- [npm support TBD](https://github.com/npm/rfcs/issues/438)

## Publishing

### `private`
Expand Down