Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.5 Intl changes overview #45646

Closed
orta opened this issue Aug 30, 2021 · 5 comments
Closed

4.5 Intl changes overview #45646

orta opened this issue Aug 30, 2021 · 5 comments
Labels
Discussion Issues which may not have code impact

Comments

@orta
Copy link
Contributor

orta commented Aug 30, 2021

To make release notes easier further down the line. The PR which brought most of the changes in is #45647

@orta
Copy link
Contributor Author

orta commented Aug 30, 2021

#44006 is a breaking change. We previously accidentally had Intl attributes for currencyDisplay and currencySign on a formatter in es5 which meant they would show up in environments where it wasn't necessarily supported as they were added to browsers in 2020. To fix it, update your target to es2020 (or use lib to set up your environment)

@orta
Copy link
Contributor Author

orta commented Aug 30, 2021

#39662 is a breaking change. To re-use an identifier we brought it back to when it was first introduced in the specs. If someone has a target of es2015 but used es2020.intl in lib and used the type Intl.UnicodeBCP47LocaleIdentifier then it is now available back in es2016.intl.

@andrewbranch andrewbranch added the Discussion Issues which may not have code impact label Aug 31, 2021
@longlho
Copy link
Contributor

longlho commented Sep 4, 2021

Overall what's the tolerance for breaking changes for this type of fixes? I haven't gone through all the type defs for ecma402 but tbh I suspect there will be quite a few breaking changes since it hasn't been very accurate?

@orta
Copy link
Contributor Author

orta commented Sep 8, 2021

Kinda tough to give an exact opinion, my somewhat biased view on breakages is roughly "would it break code in the TypeScript website" which doesn't do anything too clever with the Intl APIs and I think generally can be used as an internal metric for what an average web project using the Intl APIs looks like. ( E.g. a quick search show I use mostly APIs for ListFormat/DateTimeFormat/RelativeTimeFormat )

If it's tightening from string to "a" | "b" those are pretty much always OK for me

@Alexsey
Copy link

Alexsey commented Nov 6, 2021

I'm sorry, but what is the reason not to include Intl.ListFormat? It's already been on Stage 4 for almost a year and a half yet the latest TS doesn't recognises it :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Issues which may not have code impact
Projects
None yet
Development

No branches or pull requests

5 participants