ci: work around attw crash by pinning fflate to 0.8.2#32
Open
itssimon wants to merge 1 commit into
Open
Conversation
@arethetypeswrong/cli 0.18.2 crashes with "Cannot read properties of undefined (reading 'filename')" when fflate resolves to 0.8.3, which changed the streaming Gunzip callback to emit multiple chunks. ATTW only keeps the last (empty flush) chunk, producing an empty tar array. Tracked upstream in arethetypeswrong#262. Install attw as a devDependency so the npm override actually applies, and call the local binary in CI. Disable Renovate updates for fflate so the workaround sticks until the upstream fix lands.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #32 +/- ##
=======================================
Coverage 88.50% 88.50%
=======================================
Files 11 11
Lines 261 261
Branches 66 66
=======================================
Hits 231 231
Misses 12 12
Partials 18 18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
check-attwjob has been failing on all recent renovate PRs with:Root cause
@arethetypeswrong/cli@0.18.2depends on@arethetypeswrong/core@0.18.2, which declaresfflate: ^0.8.2. On fresh installs that now resolves tofflate@0.8.3, which changed the streamingGunzipcallback to fire multiple times (the last being an empty flush chunk). ATTW's tarball extractor overwritesunzippedon every callback instead of accumulating chunks, so only the empty final chunk survives,untar()returns[], anddata[0].filenamethrows.Tracked upstream as arethetypeswrong/arethetypeswrong.github.io#262. Same fix already merged in apitally/apitally-js#257.
Fix
fflateto0.8.2via an npmoverridesblock scoped to@arethetypeswrong/cli.@arethetypeswrong/clias a devDependency so the override actually applies (overrides don't reachnpx -p <pkg>since that installs into a separate temp tree).npx -p @arethetypeswrong/cli attw --pack --profile esm-only .tonpx attw --pack --profile esm-only .to use the locally installed, pinned version.fflateso the workaround sticks until the upstream fix lands.Verified locally — attw now reports green for all entrypoints.
Test plan
npm ci && npm run build && npx attw --pack --profile esm-only .passes locallycheck-attwjob passes on this PRSummary by cubic
Fixes
check-attwCI crashes by pinningfflateto 0.8.2 for@arethetypeswrong/cliand switching CI to use the locally installed binary. Restores ATTW checks on fresh installs until the upstream fix lands.fflateto0.8.2viaoverridesscoped to@arethetypeswrong/cli.@arethetypeswrong/clias a devDependency and runnpx attwin CI to use the pinned version.fflateto keep the pin in place.Written for commit 720de42. Summary will update on new commits. Review in cubic