Skip to content

Commit

Permalink
fix(npm): upgrade to breaking dep versions and fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos García committed May 14, 2018
1 parent d8136e4 commit 4b0412c
Show file tree
Hide file tree
Showing 4 changed files with 769 additions and 256 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ const uut = testquire('folder1/folder2/file');
If you run `npm test`, `testquire()` will require your source file at
`lib/folder1/folder2/file.js`.

If you run `npm run test:coverage`, `testquire` will require your instrumented
If you run `npm run test:coverage`, `testquire()` will require your instrumented
file at `coverage/.instrumented/folder1/folder2/file.js` (assuming that you're
using the default options for `nyc` and `atom-coverage`).

Expand Down Expand Up @@ -335,16 +335,16 @@ $ cd ./atom-coverage
$ git remote add upstream https://github.com/cgalvarez/atom-coverage
# 04. Create a new topic branch off the master branch that describe
# what your PR does and use it.
$ git checkout -m 'your-pr-topic'
$ git checkout -b 'your-pr-topic'
# 05. Choose on command to install the package dependencies based on
# your package manager.
$ (yarn|npm) install
# 06. Make your changes and write specs to test them.
# 07. Ensure that your changes pass the project requirements
# (linting, tests, coverage...).
$ npm run check
$ (yarn|npm) run check
# 08. Once you've finished, commit your changes with commitizen.
$ npm run semantic-commit
$ (yarn|npm) run semantic-commit
# 09. Send a pull request describing what you have done.
```

Expand Down
15 changes: 9 additions & 6 deletions lib/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const schema = {
}).allow(null).required(),
};
const cwd = process.cwd();
const moduleName = 'atom-coverage';
const defaults = {
config: {
instrumenter: 'nyc',
Expand All @@ -38,13 +39,15 @@ const defaults = {
},
cosmiconfig: {
cache: true,
js: false,
packageProp: 'atomCoverage',
rc: '.atom-coverage',
rcExtensions: true,
rcStrictJson: false,
stopDir: cwd,
sync: true,
searchPlaces: [
`.${moduleName}.yaml`,
`.${moduleName}.yml`,
`.${moduleName}.json`,
`.${moduleName}`,
'package.json',
],
},
};
const instrumentedFolder = '.instrumented';
Expand All @@ -67,7 +70,7 @@ const manager = {
readConfig(saveOnChange = false) {
// Search for configuration file and parse its contents.
const explorer = cosmiconfig('atom-coverage', defaults.cosmiconfig);
const settings = explorer.load();
const settings = explorer.searchSync();
const config = (settings === null) ? null : settings.config;

// Validate and sanitize.
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"lib": "lib"
},
"dependencies": {
"cosmiconfig": "^4.0.0",
"fs-extra": "^5.0.0",
"cosmiconfig": "^5.0.2",
"fs-extra": "^6.0.1",
"glob": "^7.1.2",
"is-glob": "^4.0.0",
"joi": "^13.1.3",
Expand Down Expand Up @@ -60,12 +60,12 @@
"jsonlint": "^1.6.3",
"mocha": "^5.0.0",
"mochawesome": "^3.0.2",
"mock-fs": "^4.4.2",
"mock-fs": "^4.5.0",
"npm-run-all": "^4.1.2",
"nyc": "^11.4.1",
"proxyquire": "^2.0.0",
"semantic-release": "^12.4.1",
"sinon": "^4.3.0",
"semantic-release": "^15.4.1",
"sinon": "^5.0.7",
"sinon-chai": "^3.0.0"
},
"peerDependencies": {
Expand Down

0 comments on commit 4b0412c

Please sign in to comment.