Skip to content

Commit

Permalink
Merge pull request #165 from agracio/33
Browse files Browse the repository at this point in the history
Electron 33 support
  • Loading branch information
agracio authored Oct 24, 2024
2 parents 9b16077 + c9efa10 commit bdf10f1
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 26 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
29 changes: 28 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
name: Test

on:
pull_request:
paths-ignore:
- 'samples/*'
- 'stress/*'
- 'performance/*'
- '.github/FUNDING.YML'
- '.github/workflows/build.yml'
- '**/*.md'
- '**/*.d.ts'
- '**/*.bat'
- '.travis.yml'
- 'Dockerfile'
- '.gitconfig'
- '.gitignore'
- 'appveyor*.*'
- 'LICENSE*'
- '.idea/**'
- '.vscode/**'
- '*.bat'
- '*.nuspec'
- 'tools/nuget/*'
- '.npmignore'
- 'test/config.json'
- 'test/double'
- '.circleci'
- '.circleci/*'
- 'README.md'
push:
branches-ignore:
- 'circleci'
Expand Down Expand Up @@ -45,7 +72,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
Binary file added lib/native/win32/arm64/33.0.0/edge_coreclr.node
Binary file not shown.
Binary file not shown.
Binary file added lib/native/win32/ia32/33.0.0/edge_coreclr.node
Binary file not shown.
Binary file added lib/native/win32/ia32/33.0.0/edge_nativeclr.node
Binary file not shown.
Binary file added lib/native/win32/x64/33.0.0/edge_coreclr.node
Binary file not shown.
Binary file added lib/native/win32/x64/33.0.0/edge_nativeclr.node
Binary file not shown.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 bdf10f1

Please sign in to comment.