Skip to content

Commit

Permalink
Merge pull request #5026 from Shopify/increase-localization-file-size…
Browse files Browse the repository at this point in the history
…-limit-stable

[stable] Increase extension locale file size limit
  • Loading branch information
isaacroldan authored Dec 4, 2024
2 parents 1312153 + 7516cbd commit 6d1c64e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-drinks-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/app': patch
---

Increase extension localization file size limit
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6d1c64e

Please sign in to comment.