diff --git a/package.json b/package.json index 596a2d8..0ac95a0 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "scripts": { "start": "npm run test:watch", - "prebuild": "trash dist && mkdir dist", + "prebuild": "rimraf dist && mkdir dist", "build": "cd src && babel index.js -d ../dist && cd ..", "commit": "git-cz", "eslint": "eslint src/ -c other/src.eslintrc --ignore-path other/src.eslintignore && eslint src/*.test.js", @@ -47,10 +47,10 @@ "manage-path": "2.0.0", "mocha": "2.3.3", "proxyquire": "1.7.2", + "rimraf": "^2.5.2", "semantic-release": "4.3.5", "sinon": "1.17.1", "sinon-chai": "2.8.0", - "trash": "2.0.0", "validate-commit-msg": "1.0.0" }, "config": { @@ -62,7 +62,7 @@ } }, "dependencies": { - "cross-spawn-async": "2.0.0", + "cross-spawn": "^3.0.1", "lodash.assign": "^3.2.0" } } diff --git a/src/index.js b/src/index.js index 2520357..b5f2ac7 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -import {spawn} from 'cross-spawn-async'; +import {spawn} from 'cross-spawn'; import assign from 'lodash.assign'; export default crossEnv; diff --git a/src/index.test.js b/src/index.test.js index 0139cd5..8e6af02 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -9,7 +9,7 @@ chai.use(sinonChai); const {expect} = chai; const spawned = {on: sinon.spy()}; const proxied = { - 'cross-spawn-async': { + 'cross-spawn': { spawn: sinon.spy(() => spawned) } }; @@ -19,7 +19,7 @@ const crossEnv = proxyquire('./index', proxied); describe(`cross-env`, () => { beforeEach(() => { - proxied['cross-spawn-async'].spawn.reset(); + proxied['cross-spawn'].spawn.reset(); spawned.on.reset(); }); @@ -62,7 +62,7 @@ describe(`cross-env`, () => { it(`should do nothing given no command`, () => { crossEnv([]); - expect(proxied['cross-spawn-async'].spawn).to.have.not.been.called; + expect(proxied['cross-spawn'].spawn).to.have.not.been.called; }); function testEnvSetting(expected, ...envSettings) { @@ -72,8 +72,8 @@ describe(`cross-env`, () => { assign(env, expected); expect(ret, 'returns what spawn returns').to.equal(spawned); - expect(proxied['cross-spawn-async'].spawn).to.have.been.calledOnce; - expect(proxied['cross-spawn-async'].spawn).to.have.been.calledWith( + expect(proxied['cross-spawn'].spawn).to.have.been.calledOnce; + expect(proxied['cross-spawn'].spawn).to.have.been.calledWith( 'echo', ['hello world'], { stdio: 'inherit', env: assign({}, process.env, env)