Re: [GSoC][PATCH v2] Add a diff driver for JavaScript languages.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 16 Mar 2022 at 02:51, Glen Choo <chooglen@xxxxxxxxxx> wrote:
>
> Johannes Sixt <j6t@xxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux