Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Aug 9, 2020
1 parent 24db353 commit 3e82a99
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.
17 changes: 10 additions & 7 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ const cli = meow(`
Use the up/down keys during live search to change the skin tone
Use the left/right or 1..9 keys during live search to select the emoji
`, {
boolean: [
'copy'
],
alias: {
c: 'copy',
s: 'skinTone'
flags: {
copy: {
type: 'boolean',
alias: 'c'
},
skinTone: {
type: 'number',
alias: 's'
}
}
});

Expand All @@ -44,7 +47,7 @@ const config = new Conf({
});

if (cli.flags.skinTone !== undefined) {
config.set('skinNumber', Math.max(0, Math.min(5, Number(cli.flags.skinTone) || 0)));
config.set('skinNumber', Math.max(0, Math.min(5, cli.flags.skinTone || 0)));
}

const skinNumber = config.get('skinNumber');
Expand Down
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ module.exports = async input => {
for (const emoji of await getGetdangoEmojis(input)) {
set.add(emoji);
}
} catch (_) {
}
} catch {}

return [...set];
};
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@
],
"dependencies": {
"clipboardy": "^2.2.0",
"conf": "^6.2.1",
"conf": "^7.1.1",
"emojilib": "^2.4.0",
"got": "^10.6.0",
"import-jsx": "^3.1.0",
"got": "^11.5.2",
"import-jsx": "^4.0.0",
"ink": "^3.0.3",
"ink-text-input": "^4.0.0",
"mem": "^6.0.1",
"meow": "^6.0.1",
"meow": "^7.0.1",
"react": "^16.5.2",
"skin-tone": "^1.0.0"
},
"devDependencies": {
"ava": "^1.4.0",
"eslint-config-xo-react": "^0.23.0",
"eslint-plugin-react": "^7.1.0",
"eslint-plugin-react-hooks": "^2.4.0",
"xo": "^0.26.1"
"eslint-plugin-react": "^7.20.5",
"eslint-plugin-react-hooks": "^4.0.8",
"xo": "^0.32.1"
},
"xo": {
"extends": [
Expand Down
8 changes: 4 additions & 4 deletions ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ const Emoj = ({skinNumber: initialSkinNumber, onSelectEmoji}) => {
// Select emoji by typing a number
// Catch all 10 keys, but handle only the same amount of keys
// as there are currently emojis
const numKey = Number(input);
if (numKey >= 0 && numKey <= 9) {
if (numKey >= 1 && numKey <= emojis.length) {
setSelectedEmoji(skinTone(emojis[numKey - 1], skinNumber));
const numberKey = Number(input);
if (numberKey >= 0 && numberKey <= 9) {
if (numberKey >= 1 && numberKey <= emojis.length) {
setSelectedEmoji(skinTone(emojis[numberKey - 1], skinNumber));
setStage(STAGE_COPIED);
}

Expand Down

0 comments on commit 3e82a99

Please sign in to comment.