From 470d02dbfd141e328bfd040c6c691e7bf875952c Mon Sep 17 00:00:00 2001 From: Nathan White Date: Mon, 9 Jan 2017 19:37:46 -0700 Subject: [PATCH] Nw/pty fixes (#1353) * changed pty package and update references * fixed linting issues * added npm clean script --- app/package.json | 2 +- app/session.js | 4 ++-- package.json | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/package.json b/app/package.json index 74a1f38c..e10f4f51 100644 --- a/app/package.json +++ b/app/package.json @@ -23,7 +23,7 @@ "mkdirp": "0.5.1", "ms": "0.7.1", "node-fetch": "1.6.3", - "pty.js": "https://github.com/Tyriar/pty.js/tarball/c75c2dcb6dcad83b0cb3ef2ae42d0448fb912642", + "node-pty": "0.4.1", "semver": "5.3.0", "shell-env": "0.2.0", "uuid": "3.0.0", diff --git a/app/session.js b/app/session.js index 58dbf629..9a07ed80 100644 --- a/app/session.js +++ b/app/session.js @@ -8,11 +8,11 @@ const {getDecoratedEnv} = require('./plugins'); const {productName, version} = require('./package'); const config = require('./config'); -const createPtyJsError = () => new Error('`pty.js` failed to load. Typically this means that it was built incorrectly. Please check the `README.me` to more info.'); +const createPtyJsError = () => new Error('`node-pty` failed to load. Typically this means that it was built incorrectly. Please check the `README.me` to more info.'); let spawn; try { - spawn = require('pty.js').spawn; + spawn = require('node-pty').spawn; } catch (err) { throw createPtyJsError(); } diff --git a/package.json b/package.json index 5edf1f79..aa6bbd31 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "prepush": "npm test", "postinstall": "install-app-deps", "pack": "npm run build && build --dir && cross-env BABEL_ENV=production babel --out-file app/dist/bundle.js --no-comments --minified app/dist/bundle.js", - "dist": "npm run build && build" + "dist": "npm run build && build", + "clean": "npm cache clear && rm -rf node_modules && rm -rf app/node_modules && rm -rf app/dist" }, "xo": { "extends": "xo-react",