From: xing zhi jiang Date: Sun, 03 Apr 2022 13:20:11 GMT Subject: Re: [GSoC][PATCH v2] Add a diff driver for JavaScript languages. Message-ID: In-Reply-To: On Wed, 16 Mar 2022 at 02:51, Glen Choo wrote: > > Johannes Sixt writes: > So the question becomes "Is there a significant amount of code that uses > this pattern?" Probably - this is a fairly common pattern in Node.js > after all. But in my experience, > > module.exports.RIGHT = function(document) { > > return ChangeMe; > } > > is even more common. The difference between 'module.exports' and > 'exports' isn't worth going into (StackOverflow has all the answers, for > the curious), but if we're taking the approach of supporting CommonJS, > I'd like to be consistent and also support 'module.exports', i.e. > perhaps change: > > "^(exports\\.[$_[:alpha:]][$_[:alnum:]]*[\t ]*=[\t ]*(\\(.*\\)|[$_[:alpha:]][$_[:alnum:]]*)[\t ]*=>.*)\n" > > to something like: > > "^((module.)?exports\\.[$_[:alpha:]][$_[:alnum:]]*[\t ]*=[\t ]*(\\(.*\\)|[$_[:alpha:]][$_[:alnum:]]*)[\t ]*=>.*)\n" I agree on also support the "module.exports". This will be applied on the v3 patch