From d80c4022fd8eee4af91c2f57a4f041608c631a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isaac=20Rold=C3=A1n?= Date: Wed, 4 Dec 2024 17:11:59 +0100 Subject: [PATCH 1/2] Increase file size limits for localization files --- .../app/src/cli/utilities/extensions/locales-configuration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/src/cli/utilities/extensions/locales-configuration.ts b/packages/app/src/cli/utilities/extensions/locales-configuration.ts index 2cfb707bed5..7ff92dc83a9 100644 --- a/packages/app/src/cli/utilities/extensions/locales-configuration.ts +++ b/packages/app/src/cli/utilities/extensions/locales-configuration.ts @@ -3,7 +3,7 @@ import {glob} from '@shopify/cli-kit/node/fs' import {AbortError, BugError} from '@shopify/cli-kit/node/error' import fs from 'fs' -const L10N_FILE_SIZE_LIMIT = 16 * 1024 +const L10N_FILE_SIZE_LIMIT = 20 * 1024 const L10N_BUNDLE_SIZE_LIMIT = 256 * 1024 export async function loadLocalesConfig(extensionPath: string, extensionIdentifier: string) { From a4e15e1edd21e188b46eb8d6ed0a7e6fe8f0b524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isaac=20Rold=C3=A1n?= Date: Wed, 4 Dec 2024 17:19:35 +0100 Subject: [PATCH 2/2] Update tests --- .../cli/utilities/extensions/locales-configuration.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/src/cli/utilities/extensions/locales-configuration.test.ts b/packages/app/src/cli/utilities/extensions/locales-configuration.test.ts index bdc33cb9f99..2e261d3c2c2 100644 --- a/packages/app/src/cli/utilities/extensions/locales-configuration.test.ts +++ b/packages/app/src/cli/utilities/extensions/locales-configuration.test.ts @@ -50,7 +50,7 @@ describe('loadLocalesConfig', () => { await mkdir(localesPath) await writeFile(enDefault, JSON.stringify({hello: 'Hello'})) - const bigArray = new Array(5000).fill('a') + const bigArray = new Array(6000).fill('a') await writeFile(es, JSON.stringify(bigArray)) // When @@ -101,7 +101,7 @@ describe('loadLocalesConfig', () => { const es = joinPath(localesPath, 'es.json') await mkdir(localesPath) - const bigArray = JSON.stringify(new Array(3000).fill('a')) + const bigArray = JSON.stringify(new Array(4000).fill('a')) await writeFile(en, JSON.stringify(bigArray)) await writeFile(es, JSON.stringify(bigArray))