Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Upgrade to Electron 4 #19373

Merged
merged 29 commits into from
Jul 19, 2019
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5571a7c
⬆️ electron@4.2.0
rafeca May 9, 2019
eb2f091
⬆️ electron-chromedriver@4.0.0-beta.1
rafeca May 9, 2019
abaaf75
⬆️ electron-mksnapshot@4.2.0
rafeca May 9, 2019
a4c6f31
Merge branch 'master' into electron-4
50Wliu May 20, 2019
218657f
Use new attributeStyleMap for elements
daviwil Dec 13, 2018
4c47249
Use correct fontWeight value in ThemeManager spec
daviwil Jan 3, 2019
d988983
Forward-port chromedriver changes
50Wliu May 21, 2019
a1aa1bb
:arrow_up: apm prerelease for updated Node
50Wliu May 21, 2019
1483f4b
:arrow_up: @atom/nsfw, git-utils to allow loading on Windows
50Wliu May 21, 2019
906a106
:arrow_up: scandal to update nested git-utils dependency
50Wliu May 22, 2019
cfaca0a
Temporarily disable snapshotting
50Wliu May 22, 2019
7f5e639
Try updating @atom/nsfw to 1.0.23-1
50Wliu May 22, 2019
c2f1d65
Oops, package lock it
50Wliu May 22, 2019
a186961
Don't add menu items without labels
50Wliu May 22, 2019
10c1c97
Update Electron builtins
50Wliu May 22, 2019
00362cc
Investigate chromedriver failures
50Wliu May 22, 2019
1ebfcba
Merge branch 'master' into electron-4
50Wliu May 30, 2019
3e6d7cc
Re-enable snapshotting
50Wliu May 30, 2019
5f0aad2
Merge branch 'master' into electron-4
50Wliu May 31, 2019
6e90fbe
Back to manual debugging it is
50Wliu Jun 3, 2019
5ddb665
Merge branch 'master' into electron-4
rafeca Jun 15, 2019
8ad7aa0
⬆️ electron-chromedriver@4.2.0
rafeca Jun 17, 2019
60093e4
Revert "Back to manual debugging it is"
rafeca Jun 17, 2019
91b53d4
Use random port to initialize ChromeDriver
rafeca Jun 17, 2019
5b61fba
Merge branch 'master' into electron-4
rafeca Jun 24, 2019
9663c79
⬆️ electron@4.2.5
rafeca Jun 24, 2019
79a952b
⬆️ electron@4.2.6
rafeca Jul 16, 2019
f7f002f
Merge branch 'master' into electron-4
rafeca Jul 19, 2019
a8e2c83
⬆️ electron@4.2.7
rafeca Jul 19, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "https://github.com/atom/atom/issues"
},
"license": "MIT",
"electronVersion": "3.1.10",
"electronVersion": "4.2.5",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4.2.6 is also available

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and 4.2.7

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rafeca I guess the 4.2.7 assets were not live yet when you tried to push the update

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, I tried 4.2.7 and it didn't work well (the release notes were not even published). I'm gonna upgrade to 4.2.7 now

"dependencies": {
"@atom/nsfw": "1.0.25",
"@atom/source-map-support": "^0.3.4",
Expand Down
75 changes: 67 additions & 8 deletions script/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 script/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"coffeelint": "1.15.7",
"colors": "1.1.2",
"donna": "1.0.16",
"electron-chromedriver": "^3.0.0",
"electron-chromedriver": "^4.2.0",
"electron-link": "0.4.0",
"electron-mksnapshot": "^3.1.10",
"electron-mksnapshot": "^4.2.0",
"electron-packager": "12.2.0",
"@atom/electron-winstaller": "0.0.1",
"eslint": "^5.16.0",
Expand Down
13 changes: 12 additions & 1 deletion spec/integration/helpers/start-atom.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ const chromeDriverDown = done => {
};

const buildAtomClient = async (args, env) => {
// Since ChromeDriver v2.41, ChromeDriver will only connect if, either we precise a port
// for remote debugging, either the embedder (ie electron) made sure to pass `USER_DATA_DIR`
// to the remote debugging server.
// So, for now, we'll just use a random port (we don't care about its value since we're not
// connecting through it).
// (inspired by https://github.com/electron/spectron/pull/361/commits/737db138bd8a6daaf80f9c2bff710ce4a5fff39b).
// TodoElectronIssue: Remove the whole remote-debugging-port param once we upgrade
// to Electron v5, since this was fixes there (see electron/electron#17800).
const randomPort = Math.floor(Math.random() * (9999 - 9000) + 9000);

const userDataDir = temp.mkdirSync('atom-user-data-dir');
const client = await webdriverio.remote({
host: 'localhost',
Expand All @@ -69,7 +79,8 @@ const buildAtomClient = async (args, env) => {
.join(' ')}`,
'dev',
'safe',
`user-data-dir=${userDataDir}`
`user-data-dir=${userDataDir}`,
`remote-debugging-port=${randomPort}`
]
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/menu-manager.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ class MenuManager
# added menu items.
add: (items) ->
items = _.deepClone(items)
@merge(@template, item) for item in items

for item in items
continue unless item.label? # TODO: Should we emit a warning here?
@merge(@template, item)

@update()
new Disposable => @remove(items)

Expand Down
14 changes: 7 additions & 7 deletions src/module-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,18 +285,18 @@ function registerBuiltins(devMode) {
const electronAsarRoot = path.join(process.resourcesPath, 'electron.asar');

const commonRoot = path.join(electronAsarRoot, 'common', 'api');
const commonBuiltins = [
'callbacks-registry',
'clipboard',
'crash-reporter',
'shell'
];
const commonBuiltins = ['clipboard', 'shell'];
for (const builtin of commonBuiltins) {
cache.builtins[builtin] = path.join(commonRoot, `${builtin}.js`);
}

const rendererRoot = path.join(electronAsarRoot, 'renderer', 'api');
const rendererBuiltins = ['ipc-renderer', 'remote', 'screen'];
const rendererBuiltins = [
'crash-reporter',
'ipc-renderer',
'remote',
'screen'
];
for (const builtin of rendererBuiltins) {
cache.builtins[builtin] = path.join(rendererRoot, `${builtin}.js`);
}
Expand Down