Skip to content

Commit 4666f83

Browse files
committed
chore: add libc fields on linux platform packages
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 parent 6d3539c commit 4666f83

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ This changelog also contains important changes in dependencies.
99

1010
## [Unreleased]
1111

12+
### Changed
13+
14+
- chore: add libc fields on linux platform packages
15+
16+
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.
17+
18+
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).
19+
1220
## [2.0.0-alpha.5] - 2022-03-19
1321

1422
### Changed

npm/linux-arm64-gnu/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"cpu": [
88
"arm64"
99
],
10+
"libc": [
11+
"glibc"
12+
],
1013
"main": "resvgjs.linux-arm64-gnu.node",
1114
"files": [
1215
"resvgjs.linux-arm64-gnu.node"
@@ -32,4 +35,4 @@
3235
"access": "public"
3336
},
3437
"repository": "[email protected]:yisibl/resvg-js.git"
35-
}
38+
}

npm/linux-arm64-musl/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"cpu": [
88
"arm64"
99
],
10+
"libc": [
11+
"musl"
12+
],
1013
"main": "resvgjs.linux-arm64-musl.node",
1114
"files": [
1215
"resvgjs.linux-arm64-musl.node"
@@ -32,4 +35,4 @@
3235
"access": "public"
3336
},
3437
"repository": "[email protected]:yisibl/resvg-js.git"
35-
}
38+
}

npm/linux-x64-gnu/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"cpu": [
88
"x64"
99
],
10+
"libc": [
11+
"glibc"
12+
],
1013
"main": "resvgjs.linux-x64-gnu.node",
1114
"files": [
1215
"resvgjs.linux-x64-gnu.node"
@@ -32,4 +35,4 @@
3235
"access": "public"
3336
},
3437
"repository": "[email protected]:yisibl/resvg-js.git"
35-
}
38+
}

npm/linux-x64-musl/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"cpu": [
88
"x64"
99
],
10+
"libc": [
11+
"musl"
12+
],
1013
"main": "resvgjs.linux-x64-musl.node",
1114
"files": [
1215
"resvgjs.linux-x64-musl.node"
@@ -32,4 +35,4 @@
3235
"access": "public"
3336
},
3437
"repository": "[email protected]:yisibl/resvg-js.git"
35-
}
38+
}

0 commit comments

Comments
 (0)