Skip to content

Commit

Permalink
Update dependencies (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Mar 5, 2023
1 parent e7d5e1a commit 6a3b036
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 27 deletions.
6 changes: 5 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,8 @@ async function init() {
}
}

init().catch(errorHandler);
try {
await init();
} catch (error) {
errorHandler(error);
}
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
"object-curly-spacing": [
"error",
"always"
],
"camelcase": "off",
"unicorn/no-process-exit": "off"
]
},
"space": 4
"space": 4,
"ignore": [
"test/fixtures"
]
},
"ava": {
"files": [
Expand All @@ -45,18 +46,18 @@
]
},
"dependencies": {
"chrome-webstore-upload": "^0.5.0",
"chrome-webstore-upload": "^1.0.0",
"junk": "^4.0.0",
"meow": "^10.1.1",
"ora": "^6.0.1",
"recursive-readdir": "^2.2.2",
"meow": "^11.0.0",
"ora": "^6.1.2",
"recursive-readdir": "^2.2.3",
"yazl": "^2.5.1"
},
"devDependencies": {
"ava": "^3.15.0",
"execa": "^5.1.1",
"ava": "^5.2.0",
"execa": "^7.0.0",
"is-stream": "^3.0.0",
"xo": "^0.44.0"
"xo": "^0.53.1"
},
"engines": {
"node": "^14.13.1 || >=16.0.0"
Expand Down
2 changes: 1 addition & 1 deletion test/cli.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import execa from 'execa';
import { execa } from 'execa';

function env(vars = {}) {
return {
Expand Down
18 changes: 4 additions & 14 deletions wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,11 @@ import zipdir from './zipdir.js';
const isZip = filepath => path.extname(filepath) === '.zip';

export async function upload({ apiConfig, zipPath, token }) {
let client;
try {
client = getClient(apiConfig);
} catch (error) {
return Promise.reject(error);
}

const client = getClient(apiConfig);
const fullPath = path.join(process.cwd(), zipPath);

if (isZip(fullPath)) {
const zipStream = fs.createReadStream(fullPath);
return client.uploadExisting(zipStream, token);
}

const zipStream = await zipdir(zipPath);
const zipStream = isZip(fullPath)
? fs.createReadStream(fullPath)
: await zipdir(zipPath);
return client.uploadExisting(zipStream, token);
}

Expand Down

0 comments on commit 6a3b036

Please sign in to comment.