Skip to content

Commit

Permalink
Update electron to the latest version 🚀 (#81)
Browse files Browse the repository at this point in the history
* 2.0.0

* chore(package): update electron to version 3.0.0

* chore(package): update lockfile yarn.lock

* chore: update lock

* chore(test): Update snapshot add testUrl

* chore: bump updater version
  • Loading branch information
greenkeeper[bot] authored and ryanSN committed Sep 26, 2018
1 parent 93a6c1e commit adcf2db
Show file tree
Hide file tree
Showing 8 changed files with 3,032 additions and 3,040 deletions.
939 changes: 787 additions & 152 deletions __tests__/app/containers/__snapshots__/Root.test.js.snap

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/components/Results.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

const Results = ({filteredContent, onEmojiClick}) => {
const Results = ({ filteredContent, onEmojiClick }) => {
return (
<ul>
{
Expand Down
2 changes: 1 addition & 1 deletion app/components/Search.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

const Search = ({onChange, inputRef}) => {
const Search = ({ onChange, inputRef }) => {
return (
<input type='text'
autoFocus
Expand Down
12 changes: 6 additions & 6 deletions app/containers/Root.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, {Component} from 'react'
import React, { Component } from 'react'
import Search from '../components/Search'
import Results from '../components/Results'
import emojilib from 'emojilib'
import lev from 'fast-levenshtein'
import {clipboard, ipcRenderer} from 'electron'
import { clipboard, ipcRenderer } from 'electron'

const similarity = (() => {
const mem = {}
Expand All @@ -23,11 +23,11 @@ const emojiList = (search) => {
.map(([name, details]) => {
const searchSim = similarity(search)
const sims = [searchSim(name)].concat(details.keywords.map(searchSim))
return {name, sim: Math.max.apply(null, sims)}
return { name, sim: Math.max.apply(null, sims) }
})
.filter(({name, sim}) => sim >= 0.5)
.filter(({ name, sim }) => sim >= 0.5)
.sort((a, b) => b.sim - a.sim)
.map(({name}) => emojilib.lib[name])
.map(({ name }) => emojilib.lib[name])

return emojis.length === 0
? Object.values(emojilib.lib)
Expand All @@ -52,7 +52,7 @@ export default class Root extends Component {
}

onChange (event) {
this.setState({search: event.target.value})
this.setState({ search: event.target.value })
}

onEmojiClick (e, emoji) {
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {app,
const { app,
BrowserWindow,
globalShortcut
} = require('electron')
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "winmoji",
"productName": "winMoji",
"version": "1.2.2",
"version": "2.0.0",
"description": "Emoji Search for Windows",
"main": "main.js",
"author": "ryanSn <[email protected]>",
Expand All @@ -22,7 +22,7 @@
"electron-config": "^1.0.0",
"electron-is-dev": "^1.0.1",
"electron-localshortcut": "^3.0.4",
"electron-updater": "^3.0.1",
"electron-updater": "^3.0.3",
"emojilib": "^2.2.0",
"fast-levenshtein": "^2.0.6",
"react": "^16.0.0",
Expand All @@ -37,7 +37,7 @@
"babel-jest": "^23.0.1",
"babel-loader": "^8.0.0-beta",
"coveralls": "^3.0.0",
"electron": "^2.0.0",
"electron": "^3.0.0",
"electron-builder": "^20.0.5",
"jest": "^22.4.2",
"pre-commit": "^1.2.2",
Expand Down Expand Up @@ -66,6 +66,7 @@
]
},
"jest": {
"testURL": "http://localhost/",
"collectCoverage": true,
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
Expand Down
2 changes: 1 addition & 1 deletion updater.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {dialog} = require('electron')
const { dialog } = require('electron')
const { autoUpdater } = require('electron-updater')

autoUpdater.on('error', (ev, err) => {
Expand Down
Loading

0 comments on commit adcf2db

Please sign in to comment.