Skip to content

Commit

Permalink
fix: update dependencies, support Electron 22 (#142)
Browse files Browse the repository at this point in the history
* fix: update dependencies, support Electron 22

* build: add CI jobs for new electron versions

* build: update ci images
  • Loading branch information
MarshallOfSound authored Dec 5, 2022
1 parent 0aa49bd commit df4ecc0
Show file tree
Hide file tree
Showing 5 changed files with 1,668 additions and 3,878 deletions.
73 changes: 59 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,81 +15,126 @@ steps-test: &steps-test
key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
- run: if [[ -n "${ELECTRON_VERSION}" ]]; then yarn add "electron@${ELECTRON_VERSION}"; fi
- run: yarn tsc
- run: yarn test:ci
- run: yarn test:ci $EXTRA_ELECTRON_FLAGS
- store_test_results:
path: test-results

version: 2.1
jobs:
test-electron-13:
test-electron-12:
docker:
- image: circleci/node:14-browsers
- image: cimg/node:18.12.1-browsers
environment:
ELECTRON_VERSION: 12.x
EXTRA_ELECTRON_FLAGS: --in-process-gpu
<<: *steps-test

test-electron-12:
test-electron-13:
docker:
- image: circleci/node:14-browsers
- image: cimg/node:18.12.1-browsers
environment:
ELECTRON_VERSION: 12.x
ELECTRON_VERSION: 13.x
<<: *steps-test

test-electron-14:
docker:
- image: circleci/node:14-browsers
- image: cimg/node:18.12.1-browsers
environment:
ELECTRON_VERSION: 14.x
<<: *steps-test

test-electron-15:
docker:
- image: circleci/node:14-browsers
- image: cimg/node:18.12.1-browsers
environment:
ELECTRON_VERSION: 15.x
<<: *steps-test

test-electron-16:
docker:
- image: circleci/node:14-browsers
- image: cimg/node:18.12.1-browsers
environment:
ELECTRON_VERSION: 16.x
<<: *steps-test

test-electron-17:
docker:
- image: circleci/node:14-browsers
- image: cimg/node:18.12.1-browsers
environment:
ELECTRON_VERSION: 17.x
<<: *steps-test

test-electron-18:
docker:
- image: circleci/node:14-browsers
- image: cimg/node:18.12.1-browsers
environment:
ELECTRON_VERSION: 18.x
<<: *steps-test

test-electron-19:
docker:
- image: cimg/node:18.12.1-browsers
environment:
ELECTRON_VERSION: 19.x
<<: *steps-test

test-electron-20:
docker:
- image: cimg/node:18.12.1-browsers
environment:
ELECTRON_VERSION: 20.x
<<: *steps-test

test-electron-21:
docker:
- image: cimg/node:18.12.1-browsers
environment:
ELECTRON_VERSION: 21.x
<<: *steps-test

test-electron-22:
docker:
- image: cimg/node:18.12.1-browsers
environment:
ELECTRON_VERSION: 22.x
<<: *steps-test

release:
docker:
- image: circleci/node:14-browsers
- image: cimg/node:18.12.1-browsers
steps:
- checkout
- *step-restore-cache
- run: yarn
- run: npx semantic-release
- run: npx semantic-release@17.4.5
workflows:
version: 2
test_and_release:
jobs:
- test-electron-13
- test-electron-12
- test-electron-13
- test-electron-14
- test-electron-15
- test-electron-16
- test-electron-17
- test-electron-18
- test-electron-19
- test-electron-20
- test-electron-21
- test-electron-22
- release:
requires:
- test-electron-12
- test-electron-13
- test-electron-14
- test-electron-15
- test-electron-16
- test-electron-17
- test-electron-18
- test-electron-19
- test-electron-20
- test-electron-21
- test-electron-22
filters:
branches:
only:
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"electron": ">= 13.0.0"
},
"devDependencies": {
"@continuous-auth/semantic-release-npm": "^2.0.0",
"@continuous-auth/semantic-release-npm": "^3.0.0",
"@types/chai": "^4.2.11",
"@types/chai-as-promised": "^7.1.2",
"@types/dirty-chai": "^2.0.2",
Expand All @@ -20,11 +20,10 @@
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"dirty-chai": "^2.0.1",
"electron": "13.x",
"mocha": "^7.0.2",
"electron": "22.x",
"mocha": "^10.1.0",
"mocha-junit-reporter": "^1.23.3",
"mocha-multi-reporters": "^1.1.7",
"semantic-release": "^17.2.3",
"ts-node": "^8.10.2",
"typescript": "^4.1.3",
"walkdir": "^0.4.1",
Expand Down
2 changes: 2 additions & 0 deletions src/common/module-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const browserModuleNames = [
'powerMonitor',
'powerSaveBlocker',
'protocol',
'pushNotifications',
'safeStorage',
'screen',
'session',
Expand All @@ -36,6 +37,7 @@ export const browserModuleNames = [
'TopLevelWindow',
'TouchBar',
'Tray',
'utilityProcess',
'View',
'webContents',
'WebContentsView',
Expand Down
3 changes: 2 additions & 1 deletion test/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ describe('remote module', () => {
const w = new BrowserWindow({
show: false,
webPreferences: {
preload
preload,
sandbox: false
}
})
enable(w.webContents)
Expand Down
Loading

0 comments on commit df4ecc0

Please sign in to comment.