Passing a value from my Gruntfile to an external Grunt task
Since file is an object, and it has a constructor, that can be use to store the file path:

grunt.event.on('watch', function (action, filepath, target) {
    if (target === 'releases') {
        grunt.file.constructor.filepath = filepath;
    }
});


References


Why Composition is Harder with Classes – JavaScript Scene – Medium
grunt/file.js at master · gruntjs/grunt