Skip to content

Commit

Permalink
Replace temp-write dependency with tempy (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
Richienb committed Mar 26, 2020
1 parent 889dd46 commit b1cb94e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cli.js
Expand Up @@ -3,7 +3,7 @@
const meow = require('meow');
const open = require('open');
const getStdin = require('get-stdin');
const tempWrite = require('temp-write');
const tempy = require('tempy');
const fileType = require('file-type');

// eslint-disable-next-line unicorn/string-content
Expand Down Expand Up @@ -56,6 +56,6 @@ if (!input && process.stdin.isTTY) {
const stdin = await getStdin.buffer();
const type = fileType.fromBuffer(stdin);
const extension = cli.flags.extension || (type && type.ext) || 'txt';
await open(tempWrite.sync(stdin, `open.${extension}`), cli.flags);
await open(await tempy.write(stdin, {extension}), cli.flags);
}
})();
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -53,7 +53,7 @@
"get-stdin": "^7.0.0",
"meow": "^6.1.0",
"open": "^7.0.3",
"temp-write": "^4.0.0"
"tempy": "^0.5.0"
},
"devDependencies": {
"ava": "^1.4.1",
Expand Down

0 comments on commit b1cb94e

Please sign in to comment.