From 0aab2d025718d7238d81391fd0cd58b2a4ecb1e1 Mon Sep 17 00:00:00 2001 From: killagu Date: Sat, 1 Feb 2025 20:36:13 +0800 Subject: [PATCH 1/3] feat: add register.js --- Cargo.toml | 1 - README.md | 8 ++++++++ register.js | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 register.js diff --git a/Cargo.toml b/Cargo.toml index a819022..fc6894b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,6 @@ crate-type = ["cdylib"] napi = { version = "2.12.2", default-features = false, features = ["napi4"] } napi-derive = "2.12.2" nix = { version = "0.29.0", features = ["signal"] } -v8 = "130.0.7" cc = "1.2.10" bitflags = "2.8.0" diff --git a/README.md b/README.md index 24ec06d..980e9bf 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,20 @@ npm i --save node-segfault-handler-rs ``` +Manually register. + ```js const { register } = require('node-segfault-handler-rs'); register(); ``` +Use node `-r` option + +```shell +node -r node-segfault-handler-rs/register +``` + ## Log ```shell rust backtrace start diff --git a/register.js b/register.js new file mode 100644 index 0000000..49d7975 --- /dev/null +++ b/register.js @@ -0,0 +1,3 @@ +const { register } = require('./index'); + +register(); From 34f1c20af18dad0df3a58304941c9bb780ad7e74 Mon Sep 17 00:00:00 2001 From: killagu Date: Sat, 1 Feb 2025 20:40:51 +0800 Subject: [PATCH 2/3] f --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7e86e9c..3ace50a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,6 +14,7 @@ permissions: - '**' paths-ignore: - '**/*.md' + - '!History.md' - LICENSE - '**/*.gitignore' - .editorconfig From 2c5e2ae3785cc3eefc052ae5c3dc5ce3a1b1464a Mon Sep 17 00:00:00 2001 From: killagu Date: Sat, 1 Feb 2025 20:42:12 +0800 Subject: [PATCH 3/3] f --- .eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintignore b/.eslintignore index dacb55c..2580caa 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,3 +3,4 @@ examples/**/app/public logs run docs/node_modules +register.js