fix: restore file content extraction — release v4.2.1#27
Merged
Conversation
The v4.2 release was flagged "DON'T USE, IT WON'T WORK": the extraction
pipeline produced an output file containing only the directory tree, with
every file wrongly reported as empty ("Processed 0 files"). The working
extraction logic is already on main; this bumps the version so a fixed
release can be published.
- Bump version to 4.2.1 in header, main() banner and package.json
- Document the regression fixes in CHANGELOG.md
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2XJw3TXS1EuWdgmnGD4ts
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.
Context
The published v4.2 release is flagged on GitHub as "DON'T USE, IT WON'T WORK !!". Reproducing it confirms the regression: codepack generated an output file containing only the directory tree, and every file was wrongly reported as empty:
No file contents were ever written to the output — making the tool useless for its core purpose (feeding code to an AI).
Root cause
The content-extraction pipeline in the v4.2 tag was broken (corrupted
sedstep in the file reader, fragile file-listing, andmapfileusage incompatible with macOS's default Bash). The working extraction logic was already restored onmainthrough the follow-up fixes (PRs #14–#19), but no new release was ever cut, so users installing@w3spi5/codepackstill get the broken v4.2.What this PR does
This is the release cut: it bumps the version so a fixed package can be published. No behavioural code changes beyond the version string — the extraction fixes are already on
main.4.2→4.2.1in the script header, themain()banner, andpackage.jsonCHANGELOG.md(new[4.2.1]section)Verification
test/test_basic.sh✅ andtest/test_features.sh✅ passbash -n codepack.shsyntax check ✅--include,--excludeand--minifymodes (e.g. 17/18 files processed with real content vs. 0/5 on the broken v4.2)After merge to
main, theTest & Publishworkflow publishes the fixed package to GitHub Packages.🤖 Generated with Claude Code
Generated by Claude Code