Skip to content

Commit

Permalink
Upgrade dependencies (wulkano#720)
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus authored Sep 14, 2019
1 parent ee6f0f5 commit e1b6a98
Show file tree
Hide file tree
Showing 9 changed files with 340 additions and 190 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"name": "Kap"
},
"dependencies": {
"@ffmpeg-installer/ffmpeg": "^1.0.19",
"@sentry/browser": "^5.6.0",
"@ffmpeg-installer/ffmpeg": "^1.0.20",
"@sentry/browser": "^5.6.3",
"@sentry/electron": "^0.17.3",
"@sindresorhus/do-not-disturb": "^1.1.0",
"@sindresorhus/to-milliseconds": "^1.2.0",
Expand All @@ -35,13 +35,13 @@
"base64-img": "^1.0.4",
"classnames": "^2.2.6",
"delay": "^4.3.0",
"electron-better-ipc": "^0.3.0",
"electron-better-ipc": "^0.5.0",
"electron-log": "^3.0.7",
"electron-next": "^3.1.5",
"electron-store": "^4.0.0",
"electron-store": "^5.0.0",
"electron-updater": "^4.1.2",
"electron-util": "^0.12.1",
"execa": "^2.0.3",
"execa": "2.0.3",
"file-icon": "^3.0.0",
"first-run": "^2.0.0",
"got": "^9.6.0",
Expand All @@ -56,16 +56,16 @@
"move-file": "^1.2.0",
"nearest-normal-aspect-ratio": "^1.2.1",
"node-mac-app-icon": "^1.4.0",
"npm": "^6.10.3",
"npm": "^6.11.3",
"p-cancelable": "^2.0.0",
"p-event": "^4.1.0",
"package-json": "^6.5.0",
"pify": "^4.0.1",
"plist": "^3.0.1",
"pretty-ms": "^5.0.0",
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-linkify": "^0.2.2",
"semver": "^6.3.0",
"tempy": "^0.3.0",
Expand All @@ -74,13 +74,13 @@
"unstated": "^1.2.0"
},
"devDependencies": {
"babel-eslint": "^10.0.2",
"electron": "6.0.1",
"babel-eslint": "^10.0.3",
"electron": "6.0.9",
"electron-builder": "^21.2.0",
"eslint-config-xo-react": "^0.20.0",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-hooks": "^1.6.1",
"husky": "^3.0.2",
"eslint-plugin-react-hooks": "^2.0.1",
"husky": "^3.0.5",
"next": "^8.1.0",
"xo": "^0.24.0"
},
Expand Down
8 changes: 1 addition & 7 deletions renderer/containers/editor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Container} from 'unstated';
import {ipcRenderer as ipc} from 'electron-better-ipc';
import {shake} from '../utils/inputs';

const isMuted = format => ['gif', 'apng'].includes(format);
Expand Down Expand Up @@ -104,7 +105,6 @@ export default class EditorContainer extends Container {

saveOriginal = () => {
const {filePath, originalFilePath} = this.state;
const {ipcRenderer: ipc} = require('electron-better-ipc');
ipc.callMain('save-original', {inputPath: originalFilePath || filePath});
}

Expand All @@ -127,8 +127,6 @@ export default class EditorContainer extends Container {

selectPlugin = plugin => {
if (plugin === 'open-plugins') {
const {ipcRenderer: ipc} = require('electron-better-ipc');

ipc.callMain('open-preferences', {category: 'plugins', tab: 'discover'});
} else {
this.setState({plugin, openWithApp: null});
Expand Down Expand Up @@ -177,8 +175,6 @@ export default class EditorContainer extends Container {
const time = this.videoContainer.state.currentTime;
const {filePath} = this.state;

const {ipcRenderer: ipc} = require('electron-better-ipc');

ipc.callMain('export-snapshot', {
inputPath: filePath,
time
Expand Down Expand Up @@ -210,8 +206,6 @@ export default class EditorContainer extends Container {
openWithApp
};

const {ipcRenderer: ipc} = require('electron-better-ipc');

ipc.callMain('export', data);
ipc.callMain('update-usage', {format, plugin: plugin.name});
}
Expand Down
4 changes: 1 addition & 3 deletions renderer/containers/exports.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import {Container} from 'unstated';

let ipc;
import {ipcRenderer as ipc} from 'electron-better-ipc';

export default class ExportsContainer extends Container {
state = {
exports: []
}

mount = async () => {
ipc = require('electron-better-ipc').ipcRenderer;
const exports = await ipc.callMain('get-exports');

this.setState({
Expand Down
6 changes: 3 additions & 3 deletions renderer/containers/preferences.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import electron from 'electron';
import {Container} from 'unstated';
import delay from 'delay';
import {ipcRenderer as ipc} from 'electron-better-ipc';

const SETTINGS_ANALYTICS_BLACKLIST = ['kapturesDir'];

Expand All @@ -18,7 +19,6 @@ export default class PreferencesContainer extends Container {
this.systemPermissions = this.remote.require('./common/system-permissions');
this.plugins = this.remote.require('./common/plugins');
this.track = this.remote.require('./common/analytics').track;
this.ipc = require('electron-better-ipc').ipcRenderer;

const pluginsInstalled = this.plugins.getInstalled().sort((a, b) => a.prettyName.localeCompare(b.prettyName));

Expand Down Expand Up @@ -160,12 +160,12 @@ export default class PreferencesContainer extends Container {
const setting = 'recordKeyboardShortcut';
const newVal = !this.state[setting];
this.toggleSetting(setting, newVal);
await this.ipc.callMain('toggle-shortcuts', {enabled: newVal});
await ipc.callMain('toggle-shortcuts', {enabled: newVal});
}

updateShortcut = async (setting, shortcut) => {
try {
await this.ipc.callMain('update-shortcut', {setting, shortcut});
await ipc.callMain('update-shortcut', {setting, shortcut});
this.setState({[setting]: shortcut});
} catch (error) {
console.warn('Error updating shortcut', error);
Expand Down
2 changes: 1 addition & 1 deletion renderer/pages/about.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import electron from 'electron';
import React from 'react';
import {ipcRenderer as ipc} from 'electron-better-ipc';

export default class AboutPage extends React.Component {
state = {}
Expand All @@ -18,7 +19,6 @@ export default class AboutPage extends React.Component {
}

componentDidUpdate() {
const {ipcRenderer: ipc} = require('electron-better-ipc');
ipc.callMain('about-ready');
}

Expand Down
3 changes: 1 addition & 2 deletions renderer/pages/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import {Provider} from 'unstated';
import {ipcRenderer as ipc} from 'electron-better-ipc';

import {ConfigContainer} from '../containers';
import Config from '../components/config';
Expand All @@ -11,8 +12,6 @@ export default class ConfigPage extends React.Component {
state = {pluginName: ''}

componentDidMount() {
const {ipcRenderer: ipc} = require('electron-better-ipc');

ipc.answerMain('plugin', pluginName => {
configContainer.setPlugin(pluginName);
this.setState({pluginName: pluginName.replace(/^kap-/, '')});
Expand Down
3 changes: 1 addition & 2 deletions renderer/pages/editor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import Head from 'next/head';
import {Provider} from 'unstated';
import {ipcRenderer as ipc} from 'electron-better-ipc';

import Editor from '../components/editor';
import Options from '../components/editor/options';
Expand All @@ -16,8 +17,6 @@ export default class EditorPage extends React.Component {
wasPaused = false;

componentDidMount() {
const {ipcRenderer: ipc} = require('electron-better-ipc');

ipc.answerMain('file', async ({filePath, fps, originalFilePath, isNewRecording}) => {
await new Promise((resolve, reject) => {
editorContainer.mount(filePath, parseInt(fps, 10), originalFilePath, isNewRecording, resolve, reject);
Expand Down
2 changes: 1 addition & 1 deletion renderer/pages/preferences.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import {Provider} from 'unstated';
import classNames from 'classnames';
import {ipcRenderer as ipc} from 'electron-better-ipc';

import PreferencesNavigation from '../components/preferences/navigation';
import WindowHeader from '../components/window-header';
Expand All @@ -14,7 +15,6 @@ export default class PreferencesPage extends React.Component {
state = {overlay: false}

componentDidMount() {
const {ipcRenderer: ipc} = require('electron-better-ipc');
ipc.answerMain('open-plugin-config', preferencesContainer.openPluginsConfig);
ipc.answerMain('options', preferencesContainer.setNavigation);
ipc.answerMain('mount', () => preferencesContainer.mount(this.setOverlay));
Expand Down
Loading

0 comments on commit e1b6a98

Please sign in to comment.