Repository navigation
Conversation
Fixes pixijs#187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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 #187
getHashconverts the crc32 to hex without padding. When the crc32 has leading zeros (about 1 in 16 inputs), the hex string has an odd length,Buffer.from(hex, 'hex')drops the last digit, and the hash comes out 4 characters long instead of 6. Below0x10the hash is empty.Changes
getHashpads the hex to 8 digits before decoding it.test/core/Utils.test.tscovers crc32 values with 1, 2 and 3 leading zero digits, and checks that hashes without a leading zero are unchanged. The test fails before the fix (expected 'n6td' to match /^[\w-]{6}$/) and passes after it.Hashes that were already 6 characters don't change. Only files whose crc32 starts with a zero get renamed, once. In the
Manifesttests this renamessprite-sDtC@0.5x.png,sprite-3CLG.webpand the spine textures.tps-Ktro9A-0@0.5x.png.json,dragon-VMxv5A@0.5x.atlasanddragon-672U@0.5x.webp.atlaschange too, because they reference renamed textures, so their expected names are updated.npm run test:lintandnpm run test:typespass.🤖 Generated with Claude Code