fix: don't change text encoding on sources that may include binary files#503
Open
quagsirus wants to merge 2 commits intoTryGhost:mainfrom
Open
fix: don't change text encoding on sources that may include binary files#503quagsirus wants to merge 2 commits intoTryGhost:mainfrom
quagsirus wants to merge 2 commits intoTryGhost:mainfrom
Conversation
WalkthroughThe Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Author
|
looks like changes to other themes are mainly done via PRs to this monorepo, so will follow suit |
ed9dc12 to
30c4734
Compare
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.
fixes #502
i found the option in documentation here https://gulpjs.com/docs/en/api/src/#options
the output of text files seems binary-equivalent to before this change, tested with sha256sum on the Edge theme
the output of binary files different to before this change, but is now identical to their source form (and they arent corrupted as a result) :3
the fix here should probably be applied to every theme's
gulpfile.jsalongside the one in this monorepo - i'm not fully sure if that should be done through separate PRs to each theme's repository, or done in this one? if it's best done in this pr please let me knowi will not be reading the ai generated feedback, if they somehow give any useful information please could a sentient being let me know
Note
Low Risk
Low risk: this only tweaks Gulp
srcoptions for the zip packaging tasks, affecting how files are read during archive creation. Main risk is unintended changes in the generated zip contents if any tooling relied on text decoding behavior.Overview
Ensures theme zip builds don’t corrupt binary assets by updating all
zippertasks to read sources as raw bytes (encoding: false) instead of applying text encoding.This change is applied in the root
gulpfile.jstheme zipper (monorepo build) and across each theme’sgulpfile.js, so packaged.zipoutputs should now preserve binary files exactly as they exist on disk.Reviewed by Cursor Bugbot for commit 30c4734. Bugbot is set up for automated code reviews on this repo. Configure here.