fix(deps): override esbuild to patched version#867
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #867 +/- ##
=======================================
Coverage 35.50% 35.50%
=======================================
Files 36 36
Lines 2152 2152
Branches 417 398 -19
=======================================
Hits 764 764
- Misses 1309 1367 +58
+ Partials 79 21 -58 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Greptile SummaryThis PR addresses a Dependabot security-update failure by forcing
Confidence Score: 5/5Safe to merge — a targeted security patch with no functional regressions identified and a clear exit path documented. The change is narrowly scoped: an npm overrides pin, a lockfile regeneration, and a single build.target knob added with an explicit removal tracker. CI is green on the current head, both previously raised concerns (build compatibility and removal tracking) were already resolved on this branch, and no new issues were found in the review. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["npm install / npm ci"] --> B{"Resolve esbuild version"}
B -->|"vite@6.4.2 requests ^0.25.0"| C["Would resolve to 0.25.12"]
B -->|"npm overrides: esbuild=0.28.1"| D["Forced to 0.28.1"]
C -->|"Security vulnerability present"| E["❌ Vulnerable build"]
D --> F["esbuild 0.28.1 installed"]
F --> G{"vite build"}
G -->|"Old default targets (es2020)"| H["❌ Destructuring transform fails"]
G -->|"build.target: 'es2022'"| I["✅ Build succeeds"]
I --> J["npm audit: no esbuild CVE"]
Reviews (2): Last reviewed commit: "docs(build): track temporary esbuild ove..." | Re-trigger Greptile |
CI Failure Analysis: esbuild 0.28.1 destructuring transform regressionThe Vite build fails because esbuild 0.28.1 cannot transpile destructuring patterns to the configured target browsers. ErrorThe failing code is the Vue 2 compiled template for Why this happenedesbuild 0.28.x changed how destructuring transforms work. In 0.25.x, this pattern was supported; in 0.28.x, it's not. The Options
RecommendationOption 1 is the cleanest. The current targets ( cc @ErikBjare for decision on browser compatibility policy. |
esbuild 0.28.x (required for the security patch) cannot transform destructuring patterns for the old default targets (chrome87, firefox78, safari14 + 2 vite internal overrides). Setting build.target to es2022 tells esbuild not to lower destructuring since all 2022+ browsers support it natively. ActivityWatch as a local web app has no requirement to support 2020-era browsers.
|
Update: Went ahead with Option 1 — waiting further risked leaving the security fix stalled indefinitely. Commit CI is now running on the updated branch. |
|
@greptileai review |
|
CI is green on the current head ( I attempted the merge from @ErikBjare can you merge when convenient? |
Fixes the current master Dependabot security-update failure for
esbuild.Root cause:
27456998062fails becausevite@6.4.2constrainsesbuildto^0.25.0, so the updater stops at0.25.12and reportssecurity_update_not_possiblefor the required patched version0.28.1.What this does:
overrides.esbuildpin to0.28.1.package-lock.jsonso the resolvedesbuildpackages move from0.25.12to0.28.1.Verification:
npm install --package-lock-onlynpm cinpm ls esbuildnow reportsvite@6.4.2->esbuild@0.28.1 overridden.npm audit --jsonno longer reports anesbuildvulnerability entry.