-
Couldn't load subscription status.
- Fork 406
Substituted grunt-zip for grunt-contrib-compress #901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
The PR replaces the grunt-zip plugin with grunt-contrib-compress to fix corrupt bundle artifacts and improve cross-platform compatibility.
- Swaps out
grunt-zipforgrunt-contrib-compressin devDependencies - Renames and reconfigures the Grunt “zip” task to “compress” with updated options and file patterns
- Updates task loading and default task sequence to use the new “compress” plugin
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Removed grunt-zip and added grunt-contrib-compress dependency |
| Gruntfile.js | Renamed zip task to compress, added options.archive, mode, level, and files blocks; updated task loading and default sequence |
Comments suppressed due to low confidence (1)
Gruntfile.js:137
- [nitpick] The indentation for this
cwdproperty is misaligned compared to other entries; aligning it with the surrounding properties will improve readability.
cwd: 'build/dist',
| files: [ | ||
| { | ||
| expand: true, | ||
| src: ['images/**'] |
Copilot
AI
Jul 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] For consistency with the dist task and to ensure a predictable folder structure inside the archive, consider adding cwd: 'images' and changing src to ['**'] under the images files block.
| src: ['images/**'] | |
| cwd: 'images', | |
| src: ['**'] |
| options: { | ||
| archive: 'build/dist/images.zip', | ||
| mode: 'zip', | ||
| level: 9 |
Copilot
AI
Jul 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Using the maximum compression level (9) can slow down build times; consider using a lower level or the default setting if ultra-high compression isn’t required.
| level: 9 | |
| level: 6 |
Description of the Change
Substituted development dependency
grunt-zipforgrunt-contrib-compress.The latter is more actively maintained, has more robust binary data handling and better cross-platform compatibility.
https://github.com/twolfson/grunt-zip
https://github.com/gruntjs/grunt-contrib-compress
Note that
grunt-contrib-compressuses a different library for compressing (archiver) compared togrunt-zip, which usesjszip, which in its turn is also used as one of the few external dependencies within the engine itself. A review ofjszip's functionality within Web WorldWind is in order to consider its substitution.Why Should This Be In Core?
At some point,
grunt-zipbegan producing a corrupt bundle release artifact. See #900Benefits
Artifact .zip bundling now works OK.
Potential Drawbacks
None found.
Applicable Issues
Fixes #900