Skip to content

Commit

Permalink
📦 Add prebuildify
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Apr 15, 2024
1 parent 67657f6 commit 5d49179
Show file tree
Hide file tree
Showing 5 changed files with 189 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
yarn
- name: Build
run: |
prebuildify --napi
yarn pack
env:
NODE_ENV: production
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/prebuilds/
/lib/
/result

Expand Down
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
!/lib/
*.map
!/prebuilds/
!/binding.gyp
!/rime-cli.c
!/binding.c
!/flake.nix
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"mkdirp": "^0.5.1",
"node-gyp": "^10.1.0",
"npm-run-all": "^4.1.5",
"prebuildify": "^6.0.0",
"prettier": "^2.2.0",
"rimraf": "^5.0.5",
"ts-loader": "^8.0.2",
Expand Down
189 changes: 184 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,31 @@ __metadata:
languageName: node
linkType: hard

"base64-js@npm:^1.3.1":
version: 1.5.1
resolution: "base64-js@npm:1.5.1"
checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf
languageName: node
linkType: hard

"big.js@npm:^5.2.2":
version: 5.2.2
resolution: "big.js@npm:5.2.2"
checksum: 10c0/230520f1ff920b2d2ce3e372d77a33faa4fa60d802fe01ca4ffbc321ee06023fe9a741ac02793ee778040a16b7e497f7d60c504d1c402b8fdab6f03bb785a25f
languageName: node
linkType: hard

"bl@npm:^4.0.3":
version: 4.1.0
resolution: "bl@npm:4.1.0"
dependencies:
buffer: "npm:^5.5.0"
inherits: "npm:^2.0.4"
readable-stream: "npm:^3.4.0"
checksum: 10c0/02847e1d2cb089c9dc6958add42e3cdeaf07d13f575973963335ac0fdece563a50ac770ac4c8fa06492d2dd276f6cc3b7f08c7cd9c7a7ad0f8d388b2a28def5f
languageName: node
linkType: hard

"brace-expansion@npm:^1.1.7":
version: 1.1.11
resolution: "brace-expansion@npm:1.1.11"
Expand Down Expand Up @@ -493,6 +511,16 @@ __metadata:
languageName: node
linkType: hard

"buffer@npm:^5.5.0":
version: 5.7.1
resolution: "buffer@npm:5.7.1"
dependencies:
base64-js: "npm:^1.3.1"
ieee754: "npm:^1.1.13"
checksum: 10c0/27cac81cff434ed2876058d72e7c4789d11ff1120ef32c9de48f59eab58179b66710c488987d295ae89a228f835fc66d088652dffeb8e3ba8659f80eb091d55e
languageName: node
linkType: hard

"cacache@npm:^18.0.0":
version: 18.0.2
resolution: "cacache@npm:18.0.2"
Expand Down Expand Up @@ -554,6 +582,13 @@ __metadata:
languageName: node
linkType: hard

"chownr@npm:^1.1.1":
version: 1.1.4
resolution: "chownr@npm:1.1.4"
checksum: 10c0/ed57952a84cc0c802af900cf7136de643d3aba2eecb59d29344bc2f3f9bf703a301b9d84cdc71f82c3ffc9ccde831b0d92f5b45f91727d6c9da62f23aef9d9db
languageName: node
linkType: hard

"chownr@npm:^2.0.0":
version: 2.0.0
resolution: "chownr@npm:2.0.0"
Expand Down Expand Up @@ -585,6 +620,7 @@ __metadata:
node-gyp: "npm:^10.1.0"
node-gyp-build: "npm:^4.8.0"
npm-run-all: "npm:^4.1.5"
prebuildify: "npm:^6.0.0"
prettier: "npm:^2.2.0"
rimraf: "npm:^5.0.5"
ts-loader: "npm:^8.0.2"
Expand Down Expand Up @@ -805,6 +841,15 @@ __metadata:
languageName: node
linkType: hard

"end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1":
version: 1.4.4
resolution: "end-of-stream@npm:1.4.4"
dependencies:
once: "npm:^1.4.0"
checksum: 10c0/870b423afb2d54bb8d243c63e07c170409d41e20b47eeef0727547aea5740bd6717aca45597a9f2745525667a6b804c1e7bede41f856818faee5806dd9ff3975
languageName: node
linkType: hard

"enhanced-resolve@npm:^4.0.0":
version: 4.5.0
resolution: "enhanced-resolve@npm:4.5.0"
Expand Down Expand Up @@ -1164,6 +1209,15 @@ __metadata:
languageName: node
linkType: hard

"execspawn@npm:^1.0.1":
version: 1.0.1
resolution: "execspawn@npm:1.0.1"
dependencies:
util-extend: "npm:^1.0.1"
checksum: 10c0/5b168fe9f19cecdb9af46741d250503424a0ce5965d1181d1e74cbad6bf5bb4d51c9902212db2c226162b88e2bb6432f8a51c995ddd5004bd65b14f03a5bc4de
languageName: node
linkType: hard

"exponential-backoff@npm:^3.1.1":
version: 3.1.1
resolution: "exponential-backoff@npm:3.1.1"
Expand Down Expand Up @@ -1276,6 +1330,13 @@ __metadata:
languageName: node
linkType: hard

"fs-constants@npm:^1.0.0":
version: 1.0.0
resolution: "fs-constants@npm:1.0.0"
checksum: 10c0/a0cde99085f0872f4d244e83e03a46aa387b74f5a5af750896c6b05e9077fac00e9932fdf5aef84f2f16634cd473c63037d7a512576da7d5c2b9163d1909f3a8
languageName: node
linkType: hard

"fs-minipass@npm:^2.0.0":
version: 2.1.0
resolution: "fs-minipass@npm:2.1.0"
Expand Down Expand Up @@ -1549,6 +1610,13 @@ __metadata:
languageName: node
linkType: hard

"ieee754@npm:^1.1.13":
version: 1.2.1
resolution: "ieee754@npm:1.2.1"
checksum: 10c0/b0782ef5e0935b9f12883a2e2aa37baa75da6e66ce6515c168697b42160807d9330de9a32ec1ed73149aea02e0d822e572bca6f1e22bdcbd2149e13b050b17bb
languageName: node
linkType: hard

"ignore@npm:^4.0.6":
version: 4.0.6
resolution: "ignore@npm:4.0.6"
Expand Down Expand Up @@ -1597,7 +1665,7 @@ __metadata:
languageName: node
linkType: hard

"inherits@npm:2, inherits@npm:~2.0.3":
"inherits@npm:2, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3":
version: 2.0.4
resolution: "inherits@npm:2.0.4"
checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2
Expand Down Expand Up @@ -2057,7 +2125,7 @@ __metadata:
languageName: node
linkType: hard

"minimist@npm:^1.2.6":
"minimist@npm:^1.2.5, minimist@npm:^1.2.6":
version: 1.2.8
resolution: "minimist@npm:1.2.8"
checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6
Expand Down Expand Up @@ -2148,6 +2216,13 @@ __metadata:
languageName: node
linkType: hard

"mkdirp-classic@npm:^0.5.2, mkdirp-classic@npm:^0.5.3":
version: 0.5.3
resolution: "mkdirp-classic@npm:0.5.3"
checksum: 10c0/95371d831d196960ddc3833cc6907e6b8f67ac5501a6582f47dfae5eb0f092e9f8ce88e0d83afcae95d6e2b61a01741ba03714eeafb6f7a6e9dcc158ac85b168
languageName: node
linkType: hard

"mkdirp@npm:^0.5.1":
version: 0.5.6
resolution: "mkdirp@npm:0.5.6"
Expand Down Expand Up @@ -2196,6 +2271,15 @@ __metadata:
languageName: node
linkType: hard

"node-abi@npm:^3.3.0":
version: 3.57.0
resolution: "node-abi@npm:3.57.0"
dependencies:
semver: "npm:^7.3.5"
checksum: 10c0/8d78542e39a3c49ac476d12c70ef0366f26a40a215af44498656e75fc85e5646309765a3277e1cbb2ec40283a9e86f7aefcdd699e30576c582f6bb931e6c802b
languageName: node
linkType: hard

"node-gyp-build@npm:^4.8.0":
version: 4.8.0
resolution: "node-gyp-build@npm:4.8.0"
Expand Down Expand Up @@ -2271,6 +2355,15 @@ __metadata:
languageName: node
linkType: hard

"npm-run-path@npm:^3.1.0":
version: 3.1.0
resolution: "npm-run-path@npm:3.1.0"
dependencies:
path-key: "npm:^3.0.0"
checksum: 10c0/8399f01239e9a5bf5a10bddbc71ecac97e0b7890e5b78abe9731fc759db48865b0686cc86ec079cd254a98ba119a3fa08f1b23f9de1a5428c19007bbc7b5a728
languageName: node
linkType: hard

"object-inspect@npm:^1.13.1":
version: 1.13.1
resolution: "object-inspect@npm:1.13.1"
Expand All @@ -2297,7 +2390,7 @@ __metadata:
languageName: node
linkType: hard

"once@npm:^1.3.0":
"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0":
version: 1.4.0
resolution: "once@npm:1.4.0"
dependencies:
Expand Down Expand Up @@ -2362,7 +2455,7 @@ __metadata:
languageName: node
linkType: hard

"path-key@npm:^3.1.0":
"path-key@npm:^3.0.0, path-key@npm:^3.1.0":
version: 3.1.1
resolution: "path-key@npm:3.1.1"
checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c
Expand Down Expand Up @@ -2439,6 +2532,23 @@ __metadata:
languageName: node
linkType: hard

"prebuildify@npm:^6.0.0":
version: 6.0.0
resolution: "prebuildify@npm:6.0.0"
dependencies:
execspawn: "npm:^1.0.1"
minimist: "npm:^1.2.5"
mkdirp-classic: "npm:^0.5.3"
node-abi: "npm:^3.3.0"
npm-run-path: "npm:^3.1.0"
pump: "npm:^3.0.0"
tar-fs: "npm:^2.1.0"
bin:
prebuildify: bin.js
checksum: 10c0/4dfaefd1465afc2211caa11423c5e10e72c527b22c48cd3e4b5833537cc1d26105e62888bd6f37e632e22fc26df3c9e6dfb097cfbf08d61edd8113d6369130a8
languageName: node
linkType: hard

"prelude-ls@npm:^1.2.1":
version: 1.2.1
resolution: "prelude-ls@npm:1.2.1"
Expand Down Expand Up @@ -2502,6 +2612,16 @@ __metadata:
languageName: node
linkType: hard

"pump@npm:^3.0.0":
version: 3.0.0
resolution: "pump@npm:3.0.0"
dependencies:
end-of-stream: "npm:^1.1.0"
once: "npm:^1.3.1"
checksum: 10c0/bbdeda4f747cdf47db97428f3a135728669e56a0ae5f354a9ac5b74556556f5446a46f720a8f14ca2ece5be9b4d5d23c346db02b555f46739934cc6c093a5478
languageName: node
linkType: hard

"punycode@npm:^2.1.0":
version: 2.3.1
resolution: "punycode@npm:2.3.1"
Expand Down Expand Up @@ -2542,6 +2662,17 @@ __metadata:
languageName: node
linkType: hard

"readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0":
version: 3.6.2
resolution: "readable-stream@npm:3.6.2"
dependencies:
inherits: "npm:^2.0.3"
string_decoder: "npm:^1.1.1"
util-deprecate: "npm:^1.0.1"
checksum: 10c0/e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7
languageName: node
linkType: hard

"regexp.prototype.flags@npm:^1.5.2":
version: 1.5.2
resolution: "regexp.prototype.flags@npm:1.5.2"
Expand Down Expand Up @@ -2665,6 +2796,13 @@ __metadata:
languageName: node
linkType: hard

"safe-buffer@npm:~5.2.0":
version: 5.2.1
resolution: "safe-buffer@npm:5.2.1"
checksum: 10c0/6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3
languageName: node
linkType: hard

"safe-regex-test@npm:^1.0.3":
version: 1.0.3
resolution: "safe-regex-test@npm:1.0.3"
Expand Down Expand Up @@ -2958,6 +3096,15 @@ __metadata:
languageName: node
linkType: hard

"string_decoder@npm:^1.1.1":
version: 1.3.0
resolution: "string_decoder@npm:1.3.0"
dependencies:
safe-buffer: "npm:~5.2.0"
checksum: 10c0/810614ddb030e271cd591935dcd5956b2410dd079d64ff92a1844d6b7588bf992b3e1b69b0f4d34a3e06e0bd73046ac646b5264c1987b20d0601f81ef35d731d
languageName: node
linkType: hard

"string_decoder@npm:~1.1.1":
version: 1.1.1
resolution: "string_decoder@npm:1.1.1"
Expand Down Expand Up @@ -3044,6 +3191,31 @@ __metadata:
languageName: node
linkType: hard

"tar-fs@npm:^2.1.0":
version: 2.1.1
resolution: "tar-fs@npm:2.1.1"
dependencies:
chownr: "npm:^1.1.1"
mkdirp-classic: "npm:^0.5.2"
pump: "npm:^3.0.0"
tar-stream: "npm:^2.1.4"
checksum: 10c0/871d26a934bfb7beeae4c4d8a09689f530b565f79bd0cf489823ff0efa3705da01278160da10bb006d1a793fa0425cf316cec029b32a9159eacbeaff4965fb6d
languageName: node
linkType: hard

"tar-stream@npm:^2.1.4":
version: 2.2.0
resolution: "tar-stream@npm:2.2.0"
dependencies:
bl: "npm:^4.0.3"
end-of-stream: "npm:^1.4.1"
fs-constants: "npm:^1.0.0"
inherits: "npm:^2.0.3"
readable-stream: "npm:^3.1.1"
checksum: 10c0/2f4c910b3ee7196502e1ff015a7ba321ec6ea837667220d7bcb8d0852d51cb04b87f7ae471008a6fb8f5b1a1b5078f62f3a82d30c706f20ada1238ac797e7692
languageName: node
linkType: hard

"tar@npm:^6.1.11, tar@npm:^6.1.2":
version: 6.2.1
resolution: "tar@npm:6.2.1"
Expand Down Expand Up @@ -3256,13 +3428,20 @@ __metadata:
languageName: node
linkType: hard

"util-deprecate@npm:~1.0.1":
"util-deprecate@npm:^1.0.1, util-deprecate@npm:~1.0.1":
version: 1.0.2
resolution: "util-deprecate@npm:1.0.2"
checksum: 10c0/41a5bdd214df2f6c3ecf8622745e4a366c4adced864bc3c833739791aeeeb1838119af7daed4ba36428114b5c67dcda034a79c882e97e43c03e66a4dd7389942
languageName: node
linkType: hard

"util-extend@npm:^1.0.1":
version: 1.0.3
resolution: "util-extend@npm:1.0.3"
checksum: 10c0/93d5a4faec6ce92d6976fc421ed716888054291602fed8067134867a37226738a557e4785f47b8a5ecde60837e0c694da73895f66badbd4bc8d57ec9d4799bfd
languageName: node
linkType: hard

"v8-compile-cache@npm:^2.0.3":
version: 2.4.0
resolution: "v8-compile-cache@npm:2.4.0"
Expand Down

0 comments on commit 5d49179

Please sign in to comment.