Skip to content

ICU 68.1 upgrade changes currency formatting output in Node 14.17 #38897

Closed as not planned
@iansu

Description

@iansu
  • Version: 14.17
  • Platform: Darwin
  • Subsystem: ?

What steps will reproduce the bug?

Running this code in Node 14.16 and 14.17 produces different results:

console.log(123.45.toLocaleString('fr-CA', { style: 'currency', currency: 'CAD', currencyDisplay: 'symbol' }));

In Node 14.16 the output is 123,45 $
In Node 14.17 the output is 123,45 $ CA

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior?

There should be no change in output

What do you see instead?

Different output between minor Node versions (14.16 and 14.17)

Additional information

I'm not certain if this is an issue with Node or the ICU data library. All I know is this output has changed in a minor version release which is unexpected to me and maybe seems like a breaking change. This caused my tests to fail and likely would have caused a production issue if my tests hand't caught it.

The ICU data was upgraded to version 68.1 in Node 14.17 here: #36187

Metadata

Metadata

Assignees

Labels

i18n-apiIssues and PRs related to the i18n implementation.icuIssues and PRs related to the ICU dependency.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions