Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 3fabacc

Browse files
authored
require('shell') --> require('electron').shell (#1096)
Requiring 'shell' is deprecated in Electron; It should be `require('electron').shell` now.
1 parent 5267091 commit 3fabacc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/autocomplete-manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class AutocompleteManager {
227227
let descriptionContainer = suggestionListView.querySelector('.suggestion-description')
228228
if (descriptionContainer !== null && descriptionContainer.style.display === 'block') {
229229
let descriptionMoreLink = descriptionContainer.querySelector('.suggestion-description-more-link')
230-
require('shell').openExternal(descriptionMoreLink.href)
230+
require('electron').shell.openExternal(descriptionMoreLink.href)
231231
}
232232
}
233233
}))

spec/autocomplete-manager-integration-spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,7 +1990,7 @@ defm`
19901990
describe('Keybind to navigate to descriptionMoreLink', () => {
19911991
it('triggers openExternal on keybind if there is a description', async () => {
19921992
spyOn(provider, 'getSuggestions').andCallFake(() => [{text: 'ab', description: 'it is ab'}])
1993-
let shell = require('shell')
1993+
let shell = require('electron').shell
19941994
spyOn(shell, 'openExternal')
19951995

19961996
triggerAutocompletion(editor, true, 'a')
@@ -2003,7 +2003,7 @@ defm`
20032003

20042004
it('does not trigger openExternal on keybind if there is not a description', async () => {
20052005
spyOn(provider, 'getSuggestions').andCallFake(() => [{text: 'ab'}])
2006-
let shell = require('shell')
2006+
let shell = require('electron').shell
20072007
spyOn(shell, 'openExternal')
20082008

20092009
triggerAutocompletion(editor, true, 'a')

0 commit comments

Comments
 (0)