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

Migrate localization validations to Core #5165

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cameronbarker
Copy link
Contributor

@cameronbarker cameronbarker commented Jan 7, 2025

See for context on why we are removing this: https://github.com/Shopify/shopify/pull/566161#issue-2780703768

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@cameronbarker cameronbarker requested a review from a team as a code owner January 7, 2025 19:52

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Jan 7, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
75.24% (-0% 🔻)
8872/11792
🟡 Branches
70.43% (+0.03% 🔼)
4326/6142
🟡 Functions
75.03% (-0.02% 🔻)
2323/3096
🟡 Lines
75.8% (+0.01% 🔼)
8388/11066
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / app-event-watcher.ts
93.83% (-1.23% 🔻)
86.49% 90.48% 98.61%

Test suite run success

2000 tests passing in 904 suites.

Report generated by 🧪jest coverage report action from f80ea94

@cameronbarker cameronbarker force-pushed the remove-localization-file-limits branch from eb1175a to 19173f7 Compare January 10, 2025 17:14
@cameronbarker cameronbarker changed the title [WIP] Migrate localization validations to Core Migrate localization validations to Core Jan 10, 2025
Copy link
Contributor

@amcaplan amcaplan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously pending the other PR, this looks good to me! There is no code like no code 😁

Please be sure to add a changeset before merging.

@cameronbarker cameronbarker requested a review from a team as a code owner January 16, 2025 17:45
// Locale validations
for (const locale of localesPaths) {
const size = fs.statSync(locale).size
if (size > L10N_FILE_SIZE_LIMIT)
throw new AbortError(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will users continue to see a validation error if it's too big? Essentially we're just moving the validation from pre to post-upload attempt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes exactly, users will still see the validation, but now they will be coming the post-upload system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants