Closed patrickhulce closed 5 years ago
It looks like this was due to module/build changes? The failure starts here:
getSelector('en')
returns undefined
(and the exception is thrown trying to call the return value).
It appears this was due to a change in the Plurals
object there. In 1.0.3 it has all the locales directly on it, so Plurals is
{af: ..., ak: ..., am: ...}
and Plurals.en
exists, but with the new module setup it's nesting within default
, so Plurals is
{default: {af: ..., ak: ..., am: ...}}
)
so it looks like no locale lookups will succeed.
The actual problem was a bit deeper, in make-plural
. The shape of the exports of that package changed to support tree-shaking, and I had not taken into account how code that is Babel-transpiled from ES modules to CommonJS wraps the package when importing e.g. make-plural/plurals.js
as intl-pluralrules/plural-rules.js
does.
To fix, I've added the missing __esModules: true
property upstream, which should fix the issue. I've also released a patch version 1.1.1 of intl-pluralrules
that requires at least the patched version 6.0.1 of make-plural
.
thanks for the quick fix!
thanks very much @eemeli !
Howdy and thanks for the great package!
When using intl-messageformat from node in Lighthouse we get a fatal error since 1.1.0, lots of users started reporting this in the past few hours and we didn't have this issue in 1.0.3 (reverting fixes our users' bug).
Any chance a quick fix or revert of 1.1.0 in the meantime would be possible? :)