Skip to content

Commit

Permalink
support for Electron 33, removing support for Electron 26-28
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Oct 24, 2024
1 parent 9b16077 commit 00b7270
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 24 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- 30
- 31
- 32
- 33
# test-version:
# description: 'Electron version to test build'
# required: true
Expand Down Expand Up @@ -55,11 +56,11 @@ jobs:
elif [[ ${{ inputs.build-version }} == '30' ]]; then
echo "test-version=30.5.1" >> $GITHUB_OUTPUT
elif [[ ${{ inputs.build-version }} == '31' ]]; then
echo "test-version=31.6.0" >> $GITHUB_OUTPUT
echo "test-version=31.7.2" >> $GITHUB_OUTPUT
elif [[ ${{ inputs.build-version }} == '32' ]]; then
echo "test-version=32.2.0" >> $GITHUB_OUTPUT
echo "test-version=32.2.2" >> $GITHUB_OUTPUT
elif [[ ${{ inputs.build-version }} == '33' ]]; then
echo "test-version=33.0.0" >> $GITHUB_OUTPUT
echo "test-version=33.0.2" >> $GITHUB_OUTPUT
fi
- name: Setup env
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
os: [macos-13, macos-14, ubuntu-22.04, windows-2022]
# os: [ macos-14, ubuntu-22.04]
# electron: [32.1.2]
electron: [29.4.6, 30.5.1, 31.6.0, 32.2.0]
electron: [29.4.6, 30.5.1, 31.7.2, 32.2.2, 33.0.2]
# electron: [31.6.0, 32.1.0]

name: test-${{ matrix.os }}-v${{ matrix.electron }}
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@

| Electron | Node.Js | x86/x64 | arm64 |
| --------------- | ---------------- | ------------------ | ------------------ |
| Electron 26.x | v18.16.1 | :heavy_check_mark: | :x: |
| Electron 27.x | v18.17.1 | :heavy_check_mark: | :x: |
| Electron 28.x | v18.18.2 | :heavy_check_mark: | :x: |
| Electron 29.x | v20.9.0 | :heavy_check_mark: | :heavy_check_mark: |
| Electron 29.x | v20.x | :heavy_check_mark: | :heavy_check_mark: |
| Electron 30.x | v20.x | :heavy_check_mark: | :heavy_check_mark: |
| Electron 31.x | v20.x | :heavy_check_mark: | :heavy_check_mark: |
| Electron 32.x | v20.x | :heavy_check_mark: | :heavy_check_mark: |
| Electron 33.x | v20.x | :heavy_check_mark: | :heavy_check_mark: |

- You do not need to use the same version of Node.js in your project as Electron Node.js version
- On Linux and macOS `npm install` will compile binaries with correct Node.Js headers for a given Electron version.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"url": "http://tomasz.janczuk.org",
"twitter": "tjanczuk"
},
"version": "32.0.1",
"version": "33.0.0",
"description": "Edge.js: run .NET and Node.js in-process on Electron",
"tags": [
"owin",
Expand Down Expand Up @@ -61,7 +61,7 @@
"url": "http://github.com/agracio/electron-edge-js/issues"
},
"scripts": {
"install": "node tools/install.js",
"install": "node tools/updatenan.js && node tools/install.js",
"test": "node tools/test.js"
}
}
18 changes: 4 additions & 14 deletions tools/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,16 @@ exit /b 0

:build

if "%3" equ "23.0.0" (
SET target=18.12.1
) else if "%3" equ "24.0.0" (
SET target=18.14.0
) else if "%3" equ "25.0.0" (
SET target=18.15.0
) else if "%3" equ "26.0.0" (
SET target=18.16.1
) else if "%3" equ "27.0.0" (
SET target=18.17.1
) else if "%3" equ "28.0.0" (
SET target=18.18.2
) else if "%3" equ "29.0.0" (
if "%3" equ "29.0.0" (
SET target=20.9.0
) else if "%3" equ "30.0.0" (
SET target=20.16.0
) else if "%3" equ "31.0.0" (
SET target=20.17.0
SET target=20.18.0
) else if "%3" equ "32.0.0" (
SET target=20.18.0
) else if "%3" equ "33.0.0" (
SET target=20.18.0
) else (
echo edge-electron-js does not support Electron %3.
exit /b -1
Expand Down
9 changes: 9 additions & 0 deletions tools/updatenan.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const spawn = require('child_process').spawn

if (process.platform === 'win32') {
spawn('powershell', ['-Command', "(Get-Content -Raw ./node_modules/nan/nan.h) -replace '#include \"nan_scriptorigin.h\"', '// #include \"nan_scriptorigin.h\"' | Out-File -Encoding Utf8 ./node_modules/nan/nan.h"], { stdio: 'inherit'})
}else{
spawn('sed', ['-i', '-e', 's/^#include .nan_scriptorigin\\.h./\\/\\/ #include nan_scriptorigin.h/', './node_modules/nan/nan.h'], { stdio: 'inherit'})
}


0 comments on commit 00b7270

Please sign in to comment.