Bluesky app fork with some witchin' additions 💫

Fix Android startup perf regression (#4544)

authored by danabra.mov and committed by

GitHub e6213d7a 077da083

+59
+1
.eslintrc.js
··· 32 32 }, 33 33 ], 34 34 'bsky-internal/use-typed-gates': 'error', 35 + 'bsky-internal/keep-i18n-patch-in-sync': 'error', 35 36 'simple-import-sort/imports': [ 36 37 'warn', 37 38 {
+1
eslint/index.js
··· 2 2 3 3 module.exports = { 4 4 rules: { 5 + 'keep-i18n-patch-in-sync': require('./keep-i18n-patch-in-sync'), 5 6 'avoid-unwrapped-text': require('./avoid-unwrapped-text'), 6 7 'use-typed-gates': require('./use-typed-gates'), 7 8 },
+28
eslint/keep-i18n-patch-in-sync.js
··· 1 + /* eslint-disable bsky-internal/keep-i18n-patch-in-sync */ 2 + const LOCALE_DATA_FOLDER = '@formatjs/intl-pluralrules/locale-data/' 3 + const GEN_MODULE_PATH = 4 + '@formatjs/intl-pluralrules/supported-locales.generated.js' 5 + 6 + exports.create = function create(context) { 7 + delete require.cache[require.resolve(GEN_MODULE_PATH)] 8 + const {supportedLocales} = require(GEN_MODULE_PATH) 9 + return { 10 + Literal(node) { 11 + if (typeof node.value !== 'string') { 12 + return 13 + } 14 + if (!node.value.startsWith(LOCALE_DATA_FOLDER)) { 15 + return 16 + } 17 + const code = node.value.slice(LOCALE_DATA_FOLDER.length) 18 + if (!supportedLocales.includes(code)) { 19 + context.report({ 20 + node, 21 + message: 22 + 'Edit .patches/@formatjs+intl-pluralrules+XXX.patch to include ' + 23 + code, 24 + }) 25 + } 26 + }, 27 + } 28 + }
+29
patches/@formatjs+intl-pluralrules+5.2.10.patch
··· 1 + diff --git a/node_modules/@formatjs/intl-pluralrules/supported-locales.generated.js b/node_modules/@formatjs/intl-pluralrules/supported-locales.generated.js 2 + index 5e0692b..d11157a 100644 3 + --- a/node_modules/@formatjs/intl-pluralrules/supported-locales.generated.js 4 + +++ b/node_modules/@formatjs/intl-pluralrules/supported-locales.generated.js 5 + @@ -2,3 +2,24 @@ 6 + Object.defineProperty(exports, "__esModule", { value: true }); 7 + exports.supportedLocales = void 0; 8 + exports.supportedLocales = ["af", "ak", "am", "an", "ar", "ars", "as", "asa", "ast", "az", "bal", "be", "bem", "bez", "bg", "bho", "bm", "bn", "bo", "br", "brx", "bs", "ca", "ce", "ceb", "cgg", "chr", "ckb", "cs", "cy", "da", "de", "doi", "dsb", "dv", "dz", "ee", "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fil", "fo", "fr", "fur", "fy", "ga", "gd", "gl", "gsw", "gu", "guw", "gv", "ha", "haw", "he", "hi", "hnj", "hr", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "io", "is", "it", "iu", "ja", "jbo", "jgo", "jmc", "jv", "jw", "ka", "kab", "kaj", "kcg", "kde", "kea", "kk", "kkj", "kl", "km", "kn", "ko", "ks", "ksb", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lij", "lkt", "ln", "lo", "lt", "lv", "mas", "mg", "mgo", "mk", "ml", "mn", "mo", "mr", "ms", "mt", "my", "nah", "naq", "nb", "nd", "ne", "nl", "nn", "nnh", "no", "nqo", "nr", "nso", "ny", "nyn", "om", "or", "os", "osa", "pa", "pap", "pcm", "pl", "prg", "ps", "pt", "pt-PT", "rm", "ro", "rof", "ru", "rwk", "sah", "saq", "sat", "sc", "scn", "sd", "sdh", "se", "seh", "ses", "sg", "sh", "shi", "si", "sk", "sl", "sma", "smi", "smj", "smn", "sms", "sn", "so", "sq", "sr", "ss", "ssy", "st", "su", "sv", "sw", "syr", "ta", "te", "teo", "th", "ti", "tig", "tk", "tl", "tn", "to", "tpi", "tr", "ts", "tzm", "ug", "uk", "und", "ur", "uz", "ve", "vi", "vo", "vun", "wa", "wae", "wo", "xh", "xog", "yi", "yo", "yue", "zh", "zu"]; 9 + + 10 + +// PATCHED FOR ANDROID PERF. KEEP IN SYNC WITH i18n.ts -dan 11 + +exports.supportedLocales = [ 12 + + 'ca', 13 + + 'de', 14 + + 'en', 15 + + 'es', 16 + + 'fi', 17 + + 'fr', 18 + + 'ga', 19 + + 'hi', 20 + + 'id', 21 + + 'it', 22 + + 'ja', 23 + + 'ko', 24 + + 'pt', 25 + + 'tr', 26 + + 'uk', 27 + + 'zh' 28 + +]; 29 + +