Skip to content

fix: avoid errors when files are removed during build#2343

Merged
aklinker1 merged 2 commits into
wxt-dev:mainfrom
howlettt:printFileList
May 10, 2026
Merged

fix: avoid errors when files are removed during build#2343
aklinker1 merged 2 commits into
wxt-dev:mainfrom
howlettt:printFileList

Conversation

@howlettt

@howlettt howlettt commented May 9, 2026

Copy link
Copy Markdown
Contributor

Overview

Added a try catch around the lstat call in printFileList to avoid the build failing when files are deleted during the build

Manual Testing

Tested a build of the new package using the @sentry/vite-plugin with the filesToDeleteAfterUpload option. You can see the new warnings & missing file sizes for the map files in the screenshot below

{3B7A6420-5ABA-49A3-90ED-951A31049DFE}

Related Issue

This PR closes #1735

@howlettt howlettt requested a review from aklinker1 as a code owner May 9, 2026 04:26
@netlify

netlify Bot commented May 9, 2026

Copy link
Copy Markdown

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit fbead30
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6a00ab150fc1290008898d25
😎 Deploy Preview https://deploy-preview-2343--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@github-actions github-actions Bot added the pkg/wxt Includes changes to the `packages/wxt` directory label May 9, 2026

@aklinker1 aklinker1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, looks like checks will fail, type error probably.

Edit: I'll resolve it.

@pkg-pr-new

pkg-pr-new Bot commented May 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@2343

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@2343

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@2343

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@2343

@wxt-dev/is-background

npm i https://pkg.pr.new/@wxt-dev/is-background@2343

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@2343

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@2343

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@2343

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@2343

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@2343

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@2343

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@2343

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@2343

wxt

npm i https://pkg.pr.new/wxt@2343

commit: fbead30

@aklinker1 aklinker1 enabled auto-merge (squash) May 10, 2026 16:16
@codecov

codecov Bot commented May 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 80.03%. Comparing base (5d89a40) to head (fbead30).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
packages/wxt/src/core/utils/log/printFileList.ts 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2343      +/-   ##
==========================================
+ Coverage   79.86%   80.03%   +0.17%     
==========================================
  Files         131      131              
  Lines        3804     3807       +3     
  Branches      861      861              
==========================================
+ Hits         3038     3047       +9     
+ Misses        683      678       -5     
+ Partials       83       82       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aklinker1 aklinker1 merged commit 4f86143 into wxt-dev:main May 10, 2026
18 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for helping make WXT better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/wxt Includes changes to the `packages/wxt` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

printFileList causes the build to fail if files are deleted before it runs

2 participants