Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,42 @@ on: [push, pull_request]
name: CI

jobs:
test-posix:
name: Tests
test-node:
name: Node.js ${{ matrix.node-version }} / ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [12.4.0, 12.x, 14.x, 15.x]
exclude:
- os: windows-latest
node-version: 12.4.0 # The node-gyp shipped with this is too old
node-version: [22.x, 24.x, latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v6
with:
check-latest: true
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm install
- name: Test
run: npm test

test-electron:
name: Electron ${{ matrix.electron-version }} / ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
electron-version: ['37.10.3', '41.1.1', latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v6
- name: Use Node.js 24.x
uses: actions/setup-node@v6
with:
node-version: 24.x
- name: Install Dependencies
run: npm install
- name: Install Electron and @electron/rebuild
run: npm install --no-save electron@${{ matrix.electron-version }} @electron/rebuild
- name: Rebuild against Electron headers
run: npx electron-rebuild
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"import": "./.esm-wrapper.mjs"
},
"engines": {
"node": ">= 12.0.0"
"node": ">=22.0.0"
},
"scripts": {
"lint": "eslint {src,test}/**/*.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void RunInterruptible(const FunctionCallbackInfo<Value>& args) {
}

NODE_MODULE_INIT() {
Isolate* isolate = context->GetIsolate();
Isolate* isolate = Isolate::GetCurrent();
exports->Set(context,
String::NewFromUtf8(
isolate, "runInterruptible", NewStringType::kInternalized)
Expand Down