fix watchers closing. Closes GH-95. Bump v0.4.2

iterated array should never be modified during iteration
This commit is contained in:
Daniel Steigerwald 2013-05-09 23:34:01 +02:00 committed by Kyle Robinson Young
parent bd7ef7e6ae
commit 2f68b0567b
4 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,7 @@
v0.4.2:
date: 2013-05-09
changes:
- Fix for closing watchers.
v0.4.1:
date: 2013-05-09
changes:

View File

@ -321,6 +321,7 @@ Spawning does cause a performance hit (usually 500ms for most environments). It
## Release History
* 2013-05-09v0.4.2Fix for closing watchers.
* 2013-05-09v0.4.1Removed "beep" notification. Tasks now optional with livereload option. Reverted "run again" with interrupt off to fix infinite recursion issue. Watchers now close more properly on task run.
* 2013-05-03v0.4.0Option livereload to start live reload servers. Will reload a Gruntfile before running tasks if Gruntfile is modified. Option event to only trigger watch on certain events. Refactor watch task into separate task runs per target. Option forever to override grunt.fatal/warn to help keeping the watch alive with nospawn enabled. Emit a beep upon complete. Logs all watched files with verbose flag set. If interrupt is off, will run the tasks once more if watch triggered during a previous task run. tasks property is optional for use with watch event. Watchers properly closed when exiting.
* 2013-02-28v0.3.1Fix for top level options.
@ -339,4 +340,4 @@ Spawning does cause a performance hit (usually 500ms for most environments). It
Task submitted by [Kyle Robinson Young](http://dontkry.com)
*This file was generated on Thu May 09 2013 09:15:33.*
*This file was generated on Thu May 09 2013 14:54:44.*

View File

@ -1,7 +1,7 @@
{
"name": "grunt-contrib-watch",
"description": "Run predefined tasks whenever watched file patterns are added, changed or deleted.",
"version": "0.4.1",
"version": "0.4.2",
"homepage": "https://github.com/gruntjs/grunt-contrib-watch",
"author": {
"name": "Grunt Team",

View File

@ -66,8 +66,8 @@ module.exports = function(grunt) {
// Close any previously opened watchers
watchers.forEach(function(watcher, i) {
watcher.close();
watchers.splice(i, 1);
});
watchers = [];
// Never gonna give you up, never gonna let you down
if (grunt.config([name, 'options', 'forever']) !== false) {