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

[NoQA][Audit][Implementation] - Remove Intl Polyfills which are supported by Hermes on native platforms #38228

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/libs/IntlPolyfill/index.native.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import polyfillDateTimeFormat from './polyfillDateTimeFormat';
import polyfillListFormat from './polyfillListFormat';
import polyfillNumberFormat from './polyfillNumberFormat';
import type IntlPolyfill from './types';

/**
* Polyfill the Intl API, always performed for native devices.
*/
const intlPolyfill: IntlPolyfill = () => {
// Native devices require extra polyfills
require('@formatjs/intl-getcanonicallocales/polyfill');
// Native devices require extra polyfills which are
// not yet implemented in hermes.
// see support: https://hermesengine.dev/docs/intl/

require('@formatjs/intl-locale/polyfill');
require('@formatjs/intl-pluralrules/polyfill');
polyfillNumberFormat();
polyfillDateTimeFormat();

polyfillListFormat();
};

Expand Down
Loading