Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Prevent app crashes from parse errors due to incomplete file saves #1114

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

breadgrocery
Copy link
Contributor

@breadgrocery breadgrocery commented Oct 26, 2024

Editor autosave (triggered by delays or loss of focus) may save incomplete files if a user pauses to think or switches tabs, leading to parse failures in updateLocalizations during HMR. Uncaught errors in updateLocalizations then cause the whole app to crash, which is undesirable.

Error handling has now been added to prevent this.

Closes #1115

Copy link

netlify bot commented Oct 26, 2024

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 8e17084
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/671cbfd8079a7000086c0767
😎 Deploy Preview https://deploy-preview-1114--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@aklinker1 aklinker1 left a comment

Choose a reason for hiding this comment

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

Thanks for the report and fix! I'm a manual saver, so I miss things like this lol

@aklinker1 aklinker1 changed the title fix(i18n): prevent app crashes from parse errors due to incomplete file saves fix: Prevent app crashes from parse errors due to incomplete file saves Oct 28, 2024
Copy link

pkg-pr-new bot commented Oct 28, 2024

Open in Stackblitz

@wxt-dev/auto-icons

pnpm add https://pkg.pr.new/@wxt-dev/auto-icons@1114

@wxt-dev/module-react

pnpm add https://pkg.pr.new/@wxt-dev/module-react@1114

@wxt-dev/i18n

pnpm add https://pkg.pr.new/@wxt-dev/i18n@1114

@wxt-dev/module-solid

pnpm add https://pkg.pr.new/@wxt-dev/module-solid@1114

@wxt-dev/module-svelte

pnpm add https://pkg.pr.new/@wxt-dev/module-svelte@1114

@wxt-dev/module-vue

pnpm add https://pkg.pr.new/@wxt-dev/module-vue@1114

@wxt-dev/unocss

pnpm add https://pkg.pr.new/@wxt-dev/unocss@1114

wxt

pnpm add https://pkg.pr.new/wxt@1114

commit: 8e17084

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.96%. Comparing base (4304f71) to head (8e17084).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1114      +/-   ##
==========================================
- Coverage   82.14%   81.96%   -0.18%     
==========================================
  Files         127      127              
  Lines        6670     6670              
  Branches     1110     1111       +1     
==========================================
- Hits         5479     5467      -12     
- Misses       1177     1189      +12     
  Partials       14       14              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aklinker1 aklinker1 merged commit c17ce34 into wxt-dev:main Oct 28, 2024
18 checks passed
@breadgrocery breadgrocery deleted the i18n branch October 29, 2024 04:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[i18n] App crashes from parse errors due to incomplete file saves
2 participants