Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Commit

Permalink
fix: bump carafe version
Browse files Browse the repository at this point in the history
prevents replacing dependencies unless NODE_ENV is set to test
  • Loading branch information
w33ble committed Apr 19, 2018
1 parent 0b7eb1c commit 7ed7095
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"report-coverage": "nyc report --reporter=lcov > coverage.lcov && codecov",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"test": "npm run lint && npm run test:unit",
"test:unit": "nyc --require esm mocha -r esm test/index.mjs",
"test:unit": "NODE_ENV=test nyc --require esm mocha -r esm test/index.mjs",
"test:runner": "mocha -r esm test/runner.mjs",
"start": "node ."
},
Expand Down Expand Up @@ -48,7 +48,7 @@
]
},
"dependencies": {
"carafe": "^0.1.1",
"carafe": "^0.3.0",
"esm": "^3.0.17",
"sauce-connect-launcher": "^1.2.3",
"wadsworth": "^0.2.0",
Expand Down
3 changes: 2 additions & 1 deletion src/di.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Carafe from 'carafe';

const container = new Carafe();
const allowReplace = process.env.NODE_ENV === 'test';
const container = new Carafe(allowReplace);

export default container;
14 changes: 7 additions & 7 deletions src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import createRunner from './create_runner.mjs';
import remoteExec from './remote_exec.mjs';

// add dependencies to di service
di.add('getTunnel', getTunnel);
di.add('getBrowser', getBrowser);
di.add('openConnection', openConnection);
di.add('runnerHelpers', runnerHelpers);
di.add('remoteExec', remoteExec);
di.add('http', http);
di.add('wadsworth', wadsworth);
di.register('getTunnel', getTunnel);
di.register('getBrowser', getBrowser);
di.register('openConnection', openConnection);
di.register('runnerHelpers', runnerHelpers);
di.register('remoteExec', remoteExec);
di.register('http', http);
di.register('wadsworth', wadsworth);

export default createRunner;

0 comments on commit 7ed7095

Please sign in to comment.