Skip to content

Commit

Permalink
fix(npm): update npm dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMason committed Sep 15, 2019
1 parent 8a25ef9 commit b492ad2
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 267 deletions.
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,26 @@
],
"dependencies": {
"chalk": "2.4.2",
"commander": "2.20.0",
"execa": "1.0.0",
"fs-extra": "7.0.1",
"globby": "9.2.0",
"pretty-bytes": "5.2.0"
"commander": "3.0.1",
"execa": "2.0.4",

This comment has been minimized.

Copy link
@jamesstout

jamesstout Sep 15, 2019

Contributor

execa v2.0.4 also increases the maxBuffer default value from 10 MB to 100 MB which might help in addition to the batching you've implemented.

sindresorhus/execa@76c2e07

This comment has been minimized.

Copy link
@JamieMason

JamieMason Sep 15, 2019

Author Owner

Brilliant! Nice find, that will certainly help.

"fs-extra": "8.1.0",
"globby": "10.0.1",
"pretty-bytes": "5.3.0"
},
"devDependencies": {
"@types/execa": "0.9.0",
"@types/fs-extra": "7.0.0",
"@types/execa": "2.0.0",
"@types/fs-extra": "8.0.0",
"@types/globby": "9.1.0",
"@types/node": "12.0.8",
"@types/node": "12.7.5",
"nexe": "2.0.0-rc.34",
"prettier": "1.18.2",
"rimraf": "2.6.3",
"tslint": "5.17.0",
"typescript": "3.5.2"
"rimraf": "3.0.0",
"tslint": "5.20.0",
"typescript": "3.6.3"
},
"engines": {
"node": ">=8.0.0"
},
"resolutions": {
"lodash": "4.17.13",
"ws": "3.3.1"
},
"files": [
"dist",
"osascript"
Expand Down Expand Up @@ -80,6 +76,10 @@
],
"license": "MIT",
"repository": "JamieMason/ImageOptim-CLI",
"resolutions": {
"lodash": "4.17.13",
"ws": "3.3.1"
},
"scripts": {
"build": "npm run build:ts && npm run build:bin",
"build:bin": "nexe --target 'mac-x64-10.13.0' --input dist/imageoptim.js --output dist/imageoptim",
Expand Down
6 changes: 3 additions & 3 deletions src/osascript.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { stdout, sync } from 'execa';
import * as execa from 'execa';

export const osascript = (filePath: string, ...args: string[]): Promise<string> =>
stdout('osascript', [filePath, ...args]);
execa('osascript', [filePath, ...args]).then(({ stdout }) => stdout);

export const osascriptSync = (filePath: string, ...args: string[]): string =>
sync('osascript', [filePath, ...args]).stdout;
execa.sync('osascript', [filePath, ...args]).stdout;
4 changes: 2 additions & 2 deletions src/run-imageoptim.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { stdout } from 'execa';
import * as execa from 'execa';
import { pathExists } from 'fs-extra';
import { AppRunner } from '.';
import { IMAGEOPTIM, IMAGEOPTIM_BIN_PATH, IMAGEOPTIM_URL } from './constants';
Expand All @@ -9,6 +9,6 @@ export const runImageOptim: AppRunner = async (options) => {
if (!(await pathExists(IMAGEOPTIM_BIN_PATH))) {
return warning(`ImageOptim.app is not installed (${IMAGEOPTIM_URL})`);
}
await stdout(IMAGEOPTIM_BIN_PATH, [options.tmpDir]);
await execa(IMAGEOPTIM_BIN_PATH, [options.tmpDir]);
verbose(`${IMAGEOPTIM.name} has finished`);
};
Loading

0 comments on commit b492ad2

Please sign in to comment.