Skip to content

Commit ab6e046

Browse files
committed
feat(libc): include libc version and napi
1 parent 9feec74 commit ab6e046

File tree

5 files changed

+118
-182
lines changed

5 files changed

+118
-182
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pids
1515
.vscode/
1616
.tmp/
1717
build/
18+
build-tmp*/
1819
include/
1920
!deps/opus/include
2021
prebuild/

binding.gyp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"POSIX," "__STDC_FORMAT_MACROS",
3333
"DYNAMIC_ANNOTATIONS_ENABLED=0",
3434
"NAPI_DISABLE_CPP_EXCEPTIONS",
35-
"NAPI_VERSION=3",
35+
"NAPI_VERSION=<(napi_build_version)",
3636
],
3737
"include_dirs": ["<!@(node -p \"require('node-addon-api').include\")"],
3838
"sources": ["src/node-opus.cc"],

package-lock.json

+95-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+21-5
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,26 @@
88
"license": "MIT",
99
"scripts": {
1010
"install": "patch-package && node-pre-gyp install --fallback-to-build",
11-
"build": "node-pre-gyp build package",
11+
"build": "node-pre-gyp install build package",
1212
"lint": "eslint lib",
1313
"lint:fix": "eslint lib --fix"
1414
},
15+
"keywords": [
16+
"native",
17+
"opus",
18+
"module",
19+
"c",
20+
"c++",
21+
"bindings",
22+
"binary"
23+
],
24+
"repository": {
25+
"type": "git",
26+
"url": "https://github.com/discordjs/opus.git"
27+
},
1528
"dependencies": {
29+
"@discordjs/node-pre-gyp": "^0.1.0",
1630
"node-addon-api": "^2.0.0",
17-
"node-pre-gyp": "^0.14.0",
1831
"patch-package": "^6.2.2",
1932
"postinstall-postinstall": "^2.1.0"
2033
},
@@ -30,9 +43,12 @@
3043
},
3144
"binary": {
3245
"module_name": "opus",
33-
"module_path": "./prebuild/{node_abi}-{platform}-{arch}-{libc}/",
46+
"module_path": "./prebuild/{node_abi}-napi-v{napi_build_version}-{platform}-{arch}-{libc}-{libc_version}/",
3447
"remote_path": "v{version}",
35-
"package_name": "{module_name}-v{version}-{node_abi}-{platform}-{arch}-{libc}.tar.gz",
36-
"host": "https://github.com/discordjs/opus/releases/download/"
48+
"package_name": "{module_name}-v{version}-{node_abi}-napi-v{napi_build_version}-{platform}-{arch}-{libc}-{libc_version}.tar.gz",
49+
"host": "https://github.com/discordjs/opus/releases/download/",
50+
"napi_versions": [
51+
3
52+
]
3753
}
3854
}

patches/node-pre-gyp+0.14.0.patch

-157
This file was deleted.

0 commit comments

Comments
 (0)