Skip to content

Commit

Permalink
Merge pull request #409 from inikulin/master
Browse files Browse the repository at this point in the history
Don't modify package.json if we don't have greenkeeper ignore changes.
  • Loading branch information
AlexanderMoskovkin committed Mar 23, 2016
2 parents be26fb3 + 1a75318 commit 7a199e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var serveStatic = require('serve-static');
var Promise = require('pinkie');
var promisify = require('pify');
var markdownlint = require('markdownlint');
var isEqual = require('lodash').isEqual;


var readFile = promisify(fs.readFile, Promise);
Expand Down Expand Up @@ -285,13 +286,13 @@ gulp.task('update-greenkeeper', function () {
return !watchDepsRe.test(dep);
});

config.greenkeeper = {
ignore: ignoredDeps
};
if (!isEqual(config.greenkeeper.ignore, ignoredDeps)) {
config.greenkeeper.ignore = ignoredDeps;

// NOTE: We should write to the file synchronously to avoid collision
// with other tasks that may be reading from it asynchronously (GH-315)
fs.writeFileSync('package.json', JSON.stringify(config, null, 2) + '\n');
// NOTE: We should write to the file synchronously to avoid collision
// with other tasks that may be reading from it asynchronously (GH-315)
fs.writeFileSync('package.json', JSON.stringify(config, null, 2) + '\n');
}
});
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "testcafe",
"version": "0.0.12",
"version": "0.0.14",
"main": "lib/index",
"bin": {
"testcafe": "./bin/testcafe"
Expand Down

0 comments on commit 7a199e8

Please sign in to comment.