papandreou / node-cldr

node.js library for extracting data from CLDR (the Unicode Common Locale Data Repository)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Updating pegjs dependency

mwoc opened this issue · comments

pegjs v0.7.0 uses util.puts, which is deprecated in nodejs v0.12 and higher. They fixed that in pegjs/pegjs@de1704f which is part of v0.9.0, but between these versions many seemingly backward-incompatible changes were landed, specifically this one is breaking for us:
pegjs/pegjs@86769a6

e.g.:

  1. CldrPluralRule should encode some assorted test cases correctly:
    UnexpectedError:
    expected 'n is 4 or n is not 6' to encode to 'n === 4 || n !== 6'

-n === NaN || n !== NaN
+n === 4 || n !== 6
at Function. (test/CldrPluralRule.js:10:9)
at Context. (test/CldrPluralRule.js:14:9)

Let's investigate if we can easily fix this or have to report it to pegjs devs.

Thanks for narrowing it down. Based on that commit it was pretty easy to fix it in the grammar.

Released in 3.5.2.