Merged
Conversation
Breaking changes: Since Electron v9, BrowserWindow.webPreferences.enableRemoteModule is false in default. https://www.electronjs.org/docs/breaking-changes#default-changed-enableremotemodule-defaults-to-false Update to spectron to match Electron v11. spectron depends on webdriverio v6, which api is different with v4. (v4 => v5 has many command changes) https://github.com/webdriverio/webdriverio/blob/v5/CHANGELOG.md#v500-2018-12-20 Add "buffer/" to whitelist of webpack-node-externals. Thus avoids runtime error for integration test: "Uncaught Error: Cannot find module 'buffer/'" It might be resolved in latest webpack...? (I don't test yet) Update electron-log to v4. v3 causes UnhandledPromiseRejectionWarning.
mtgto
commented
Apr 6, 2021
| @@ -0,0 +1,324 @@ | |||
| // Type definitions for spectron v3.6.0 | |||
Collaborator
Author
There was a problem hiding this comment.
|
|
||
| app.on("ready", async () => { | ||
| // https://github.com/electron/electron/issues/13008#issuecomment-569363295 | ||
| electron.session.defaultSession.webRequest.onBeforeRequest((details, callback) => { |
Collaborator
Author
There was a problem hiding this comment.
It seems to be unnecessarily.
f8e7ee2 to
e597029
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #151
There are breaking changes:
Set
enableRemoteModuletotrueSince Electron v9, BrowserWindow.webPreferences.enableRemoteModule is false in default.
https://www.electronjs.org/docs/breaking-changes#default-changed-enableremotemodule-defaults-to-false
Another breaking change since v7 to v11 doesn't effect current code.
Update spectron (and webdriverio)
Spectron v13 depends on webdriverio v6, which api is different with v4.
(v4 => v5 has many command changes)
https://github.com/webdriverio/webdriverio/blob/v5/CHANGELOG.md#v500-2018-12-20
Spectron 13.0.0 contains wrong type definition.
electron-userland/spectron#897
For now, I add overwrote type definition to fix compile error.
QuickFix wrong webpacking
Add "buffer/" to whitelist of webpack-node-externals.
Thus avoids runtime error for integration test: "Uncaught Error: Cannot find module 'buffer/'"
It might be resolved in latest webpack...? (I don't test yet)
Fix
UnhandledPromiseRejectionWarningUpdate electron-log to v4. v3 causes UnhandledPromiseRejectionWarning.
Update electron-mocha
I don't find the reason old electron-mocha blocks CI.
But I find latest electron-mocha and mocha resolves it.