Skip to content

Commit 7a199e8

Browse files
Merge pull request #409 from inikulin/master
Don't modify package.json if we don't have greenkeeper ignore changes.
2 parents be26fb3 + 1a75318 commit 7a199e8

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Gulpfile.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ var serveStatic = require('serve-static');
2626
var Promise = require('pinkie');
2727
var promisify = require('pify');
2828
var markdownlint = require('markdownlint');
29+
var isEqual = require('lodash').isEqual;
2930

3031

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

288-
config.greenkeeper = {
289-
ignore: ignoredDeps
290-
};
289+
if (!isEqual(config.greenkeeper.ignore, ignoredDeps)) {
290+
config.greenkeeper.ignore = ignoredDeps;
291291

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "testcafe",
3-
"version": "0.0.12",
3+
"version": "0.0.14",
44
"main": "lib/index",
55
"bin": {
66
"testcafe": "./bin/testcafe"

0 commit comments

Comments
 (0)