Skip to content

Commit

Permalink
chore: add libc fields on linux platform packages
Browse files Browse the repository at this point in the history
Currently only [yarn 3.2+](yarnpkg/berry#3981) and [cnpm](cnpm/npminstall#387) are supported.
  • Loading branch information
yisibl committed Mar 20, 2022
1 parent 6d3539c commit aa2d6a6
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ This changelog also contains important changes in dependencies.

## [Unreleased]

### Changed

- chore: add libc fields on linux platform packages

With this update, you can avoid downloading both `gnu` and `musl` packages in Linux, since you can't accurately determine the C libraries that native modules depend on just from `os/cpu`.

Currently only [yarn 3.2+](https://github.com/yarnpkg/berry/pull/3981) and [cnpm](https://github.com/cnpm/npminstall/pull/387) are supported, the npm implementation is [still under discussion](https://github.com/npm/rfcs/pull/519).

## [2.0.0-alpha.5] - 2022-03-19

### Changed
Expand Down
5 changes: 4 additions & 1 deletion npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"cpu": [
"arm64"
],
"libc": [
"glibc"
],
"main": "resvgjs.linux-arm64-gnu.node",
"files": [
"resvgjs.linux-arm64-gnu.node"
Expand All @@ -32,4 +35,4 @@
"access": "public"
},
"repository": "git@github.com:yisibl/resvg-js.git"
}
}
5 changes: 4 additions & 1 deletion npm/linux-arm64-musl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"cpu": [
"arm64"
],
"libc": [
"musl"
],
"main": "resvgjs.linux-arm64-musl.node",
"files": [
"resvgjs.linux-arm64-musl.node"
Expand All @@ -32,4 +35,4 @@
"access": "public"
},
"repository": "git@github.com:yisibl/resvg-js.git"
}
}
5 changes: 4 additions & 1 deletion npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"cpu": [
"x64"
],
"libc": [
"glibc"
],
"main": "resvgjs.linux-x64-gnu.node",
"files": [
"resvgjs.linux-x64-gnu.node"
Expand All @@ -32,4 +35,4 @@
"access": "public"
},
"repository": "git@github.com:yisibl/resvg-js.git"
}
}
5 changes: 4 additions & 1 deletion npm/linux-x64-musl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"cpu": [
"x64"
],
"libc": [
"musl"
],
"main": "resvgjs.linux-x64-musl.node",
"files": [
"resvgjs.linux-x64-musl.node"
Expand All @@ -32,4 +35,4 @@
"access": "public"
},
"repository": "git@github.com:yisibl/resvg-js.git"
}
}

0 comments on commit aa2d6a6

Please sign in to comment.