Skip to content

Commit

Permalink
Merge pull request #249 from electron/update-dependencies
Browse files Browse the repository at this point in the history
chore: Update all dependencies
  • Loading branch information
felixrieseberg authored Aug 30, 2019
2 parents 1f9db42 + bd220d2 commit fae1ca3
Show file tree
Hide file tree
Showing 24 changed files with 2,433 additions and 4,336 deletions.
6,450 changes: 2,285 additions & 4,165 deletions package-lock.json

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
"forge": "./forge.config.js"
},
"dependencies": {
"@blueprintjs/core": "^3.17.1",
"@blueprintjs/select": "^3.9.0",
"@octokit/rest": "^16.28.2",
"@blueprintjs/core": "^3.18.0",
"@blueprintjs/select": "^3.10.0",
"@octokit/rest": "^16.28.7",
"builtin-modules": "^3.1.0",
"classnames": "^2.2.6",
"electron-default-menu": "^1.0.1",
Expand All @@ -48,61 +48,61 @@
"extract-zip": "^1.6.7",
"fix-path": "^2.1.0",
"fs-extra": "^8.1.0",
"mobx": "^5.11.0",
"mobx-react": "^6.1.1",
"mobx": "^5.13.0",
"mobx-react": "^6.1.3",
"monaco-editor": "^0.17.1",
"monaco-loader": "1.0.0",
"namor": "^1.1.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-mosaic-component": "^3.2.0",
"semver": "^6.2.0",
"semver": "^6.3.0",
"tmp": "0.1.0",
"tslib": "^1.10.0",
"update-electron-app": "^1.4.2"
"update-electron-app": "^1.5.0"
},
"devDependencies": {
"@babel/core": "^7.4.5",
"@electron-forge/cli": "^6.0.0-beta.42",
"@electron-forge/maker-deb": "^6.0.0-beta.42",
"@electron-forge/maker-rpm": "^6.0.0-beta.42",
"@electron-forge/maker-squirrel": "^6.0.0-beta.42",
"@electron-forge/maker-zip": "^6.0.0-beta.42",
"@electron-forge/publisher-github": "^6.0.0-beta.42",
"@electron-forge/cli": "^6.0.0-beta.44",
"@electron-forge/maker-deb": "^6.0.0-beta.44",
"@electron-forge/maker-rpm": "^6.0.0-beta.44",
"@electron-forge/maker-squirrel": "^6.0.0-beta.44",
"@electron-forge/maker-zip": "^6.0.0-beta.44",
"@electron-forge/publisher-github": "^6.0.0-beta.44",
"@types/builtin-modules": "^3.1.1",
"@types/classnames": "^2.2.9",
"@types/enzyme": "^3.10.0",
"@types/fs-extra": "^8.0.0",
"@types/jest": "^24.0.15",
"@types/log-symbols": "^3.0.0",
"@types/node": "^10.11.1",
"@types/react": "^16.8.17",
"@types/react-dom": "^16.8.4",
"@types/semver": "^6.0.0",
"@types/node": "^12.7.2",
"@types/react": "^16.9.2",
"@types/react-dom": "^16.9.0",
"@types/semver": "^6.0.1",
"@types/tmp": "0.1.0",
"chokidar": "^2.1.6",
"coveralls": "^3.0.4",
"electron": "5.0.6",
"electron": "6.0.6",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-to-json": "^3.3.5",
"jest": "^24.8.0",
"enzyme-to-json": "^3.4.0",
"jest": "^24.9.0",
"jest-fetch-mock": "^2.1.2",
"less": "^3.9.0",
"less": "^3.10.3",
"log-symbols": "^3.0.0",
"node-abi": "^2.9.0",
"node-abi": "^2.11.0",
"node-fetch": "^2.6.0",
"npm-run-all": "^4.1.5",
"parcel-bundler": "^1.12.3",
"react-test-renderer": "^16.8.6",
"rimraf": "^2.6.3",
"standard": "^12.0.1",
"react-test-renderer": "^16.9.0",
"rimraf": "^3.0.0",
"standard": "^14.1.0",
"stylelint": "^10.1.0",
"stylelint-config-standard": "^18.3.0",
"ts-jest": "^24.0.2",
"tslint": "^5.18.0",
"tslint": "^5.19.0",
"tslint-microsoft-contrib": "^6.2.0",
"tslint-react": "^4.0.0",
"typescript": "^3.5.2"
"typescript": "^3.6.2"
}
}
40 changes: 20 additions & 20 deletions src/main/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,41 +19,41 @@ export function setupFileListeners() {
* Shows the "Open Fiddle" dialog and forwards
* the path to the renderer
*/
export function showOpenDialog() {
dialog.showOpenDialog({
export async function showOpenDialog() {
const { filePaths } = await dialog.showOpenDialog({
title: 'Open Fiddle',
properties: ['openDirectory']
}, (filePaths) => {
if (!filePaths || filePaths.length < 1) {
return;
}

ipcMainManager.send(IpcEvents.FS_OPEN_FIDDLE, [ filePaths[0] ]);
});

if (!filePaths || filePaths.length < 1) {
return;
}

ipcMainManager.send(IpcEvents.FS_OPEN_FIDDLE, [ filePaths[0] ]);
}

/**
* Shows the "Save Fiddle" dialog and forwards
* the path to the renderer
*/
export function showSaveDialog(event?: IpcEvents, as?: string) {
export async function showSaveDialog(event?: IpcEvents, as?: string) {
// We want to save to a folder, so we'll use an open dialog here
dialog.showOpenDialog({
const { filePaths } = await dialog.showOpenDialog({
buttonLabel: 'Save here',
properties: ['openDirectory', 'createDirectory'],
title: `Save Fiddle${as ? ` as ${as}` : ''}`
}, async (filePaths) => {
if (!filePaths || filePaths.length < 1) {
return;
}
});

console.log(`Asked to save to ${filePaths[0]}`);
if (!filePaths || filePaths.length < 1) {
return;
}

// Let's confirm real quick if we want this
if (await ensureSaveTargetEmpty(filePaths[0])) {
ipcMainManager.send(event || IpcEvents.FS_SAVE_FIDDLE, [ filePaths[0] ]);
}
});
console.log(`Asked to save to ${filePaths[0]}`);

// Let's confirm real quick if we want this
if (await ensureSaveTargetEmpty(filePaths[0])) {
ipcMainManager.send(event || IpcEvents.FS_SAVE_FIDDLE, [ filePaths[0] ]);
}
}

/**
Expand Down
16 changes: 8 additions & 8 deletions src/main/first-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ import { isDevMode } from '../utils/devmode';
* Is this the first run of Fiddle? If so, perform
* tasks that we only want to do in this case.
*/
export function onFirstRunMaybe() {
export async function onFirstRunMaybe() {
if (isFirstRun()) {
promptMoveToApplicationsFolder();
await promptMoveToApplicationsFolder();
}
}

/**
* Ask the user if the app should be moved to the
* applications folder.
*/
function promptMoveToApplicationsFolder(): void {
async function promptMoveToApplicationsFolder(): Promise<void> {
if (process.platform !== 'darwin') return;
if (isDevMode() || app.isInApplicationsFolder()) return;

dialog.showMessageBox({
const { response } = await dialog.showMessageBox({
type: 'question',
buttons: ['Move to Applications Folder', 'Do Not Move'],
defaultId: 0,
message: 'Move to Applications Folder?',
}, (response) => {
if (response === 0) {
app.moveToApplicationsFolder();
}
});

if (response === 0) {
app.moveToApplicationsFolder();
}
}
4 changes: 3 additions & 1 deletion src/main/ipc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ipcMain } from 'electron';
import { EventEmitter } from 'events';

import { IpcEvents, ipcMainEvents, WEBCONTENTS_READY_FOR_IPC_SIGNAL } from '../ipc-events';
import { getOrCreateMainWindow } from './windows';

Expand All @@ -22,8 +23,9 @@ export class IpcMainManager extends EventEmitter {
ipcMain.on(name, (...args: Array<any>) => this.emit(name, ...args));
});

ipcMain.on(WEBCONTENTS_READY_FOR_IPC_SIGNAL, (event: Electron.Event) => {
ipcMain.on(WEBCONTENTS_READY_FOR_IPC_SIGNAL, (event: Electron.IpcMainEvent) => {
this.readyWebContents.add(event.sender);

const queue = this.messageQueue.get(event.sender);
this.messageQueue.delete(event.sender);
if (!queue) return;
Expand Down
2 changes: 1 addition & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { getOrCreateMainWindow } from './windows';
* the method that takes care of booting the application.
*/
export async function onReady() {
onFirstRunMaybe();
await onFirstRunMaybe();
if (!isDevMode()) process.env.NODE_ENV = 'production';

getOrCreateMainWindow();
Expand Down
2 changes: 1 addition & 1 deletion src/main/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export function setupMenu() {
// Tweak "View" menu
if (label === 'View' && isSubmenu(item.submenu)) {
item.submenu = item.submenu.filter((subItem) => subItem.label !== 'Toggle Developer Tools'); // Remove "Toggle Developer Tools"
item.submenu.push({ type: 'separator' }, { role: 'resetzoom' }, { role: 'zoomin' }, { role: 'zoomout' }); // Add zooming actions
item.submenu.push({ type: 'separator' }, { role: 'resetZoom' }, { role: 'zoomIn' }, { role: 'zoomOut' }); // Add zooming actions
item.submenu.push({ type: 'separator' }, {
label: 'Toggle Soft Wrap',
click: () => ipcMainManager.send(IpcEvents.MONACO_TOGGLE_OPTION, [ 'wordWrap' ]),
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ export class Runner {
this.appState.isRunning = true;
pushOutput(`Electron v${version} started.`);

this.child.stdout.on('data', (data) => pushOutput(data, { bypassBuffer: false }));
this.child.stderr.on('data', (data) => pushOutput(data, { bypassBuffer: false }));
this.child.stdout!.on('data', (data) => pushOutput(data, { bypassBuffer: false }));
this.child.stderr!.on('data', (data) => pushOutput(data, { bypassBuffer: false }));
this.child.on('close', async (code) => {
const withCode = typeof code === 'number'
? ` with code ${code.toString()}.`
Expand Down
2 changes: 1 addition & 1 deletion static/show-me/browserview/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ app.on('ready', () => {
win = null
})

let view = new BrowserView({
const view = new BrowserView({
webPreferences: {
nodeIntegration: false
}
Expand Down
2 changes: 1 addition & 1 deletion static/show-me/crashreporter/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ app.on('ready', () => {
mainWindow.loadFile('index.html')

mainWindow.webContents.on('crashed', () => {
console.log(`Window crashed!`)
console.log('Window crashed!')
})
})
6 changes: 3 additions & 3 deletions static/show-me/globalshortcut/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ app.on('ready', () => {
// CommandOrControl which represents Command on macOS and Control on
// Linux and Windows to define some accelerators.
globalShortcut.register('CommandOrControl+Y', () => {
console.log(`The global shortkey was pressed!`)
console.log('The global shortkey was pressed!')
})

// It supports "special names". Check out the API documentation for a full
// list.
globalShortcut.register('VolumeUp', () => console.log(`Turn it up!`))
globalShortcut.register('VolumeDown', () => console.log(`Turn it down!`))
globalShortcut.register('VolumeUp', () => console.log('Turn it up!'))
globalShortcut.register('VolumeDown', () => console.log('Turn it down!'))
})

app.on('will-quit', () => {
Expand Down
10 changes: 5 additions & 5 deletions static/show-me/notification/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ app.on('ready', () => {
if (Notification.isSupported()) {
const notification = new Notification({
title: 'Hello World!',
subtitle: `Nice to see you`,
subtitle: 'Nice to see you',
body: 'Are you having a good day?',
hasReply: true
})

notification.on('show', () => console.log(`Notification shown`))
notification.on('click', () => console.log(`Notification clicked`))
notification.on('close', () => console.log(`Notification closed`))
notification.on('show', () => console.log('Notification shown'))
notification.on('click', () => console.log('Notification clicked'))
notification.on('close', () => console.log('Notification closed'))
notification.on('reply', (event, reply) => {
console.log(`Reply: ${reply}`)
})

notification.show()
} else {
console.log(`Hm, are notifications supported on this system?`)
console.log('Hm, are notifications supported on this system?')
}

mainWindow.loadFile('index.html')
Expand Down
4 changes: 2 additions & 2 deletions static/show-me/powermonitor/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ app.on('ready', () => {
})

powerMonitor.on('on-ac', () => {
console.log(`We're on AC power`)
console.log('We\'re on AC power')
})

powerMonitor.on('on-battery', () => {
console.log(`We're on battery power`)
console.log('We\'re on battery power')
})
})
Loading

0 comments on commit fae1ca3

Please sign in to comment.