Intl.js icon indicating copy to clipboard operation
Intl.js copied to clipboard

[plan] release 2.0

Open caridy opened this issue 8 years ago • 0 comments

We have plans to revamp this polyfill now that the ECMA 402 4th Edition - 2017 draft was cut, and it is pending to be approved. This issue covers most of the things we want to do.

NOTE: WE NEED HELP, IF YOU CAN HELP US TO ACHIEVE THIS PLAN, JUST LET US KNOW.

Rational

ECMA402 keeps involving (and growing in features), while all major browsers already implement Intl. At the same time, this polyfill has been optimized to squeeze the data (~100kb gzip for all locales), which means that most users (+80% globally) will not really need to load the polyfill.

With that in mind, splitting this polyfill is now a possibility, and a must, if we consider the amount of new features that will be added incrementally in some browsers but not all with the same cadence of faster than ECMA 262 does it to the language. So better to be prepare for that.

Plan

  • Make this repo a multi-package repo (we can use lerna or something similar)
  • Split the existing polyfill into different independent packages
  • Each polyfill contains its own data, and builds with the data inside its bundle (custom builds should be possible)
  • Two flavors of each polyfill should be build, the default one (which includes all data for all locales), and narrow version (which includes the minimum amount of data needed for the polyfill to function, usually only the root locale or en)

Related Issues

  • break Intl.js into a set of polyfills #242
  • Dynamic Require Polyfill #222
  • Requirejs and polyfill service #218
  • Implement require('intl').polyfill(['en', 'fr', 'pt']) #89

caridy avatar Feb 28 '17 21:02 caridy