Skip to content
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

Use encoding: false when copying files using gulp. #7340

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Conversation

na9da
Copy link
Collaborator

@na9da na9da commented Nov 29, 2024

What this PR does

Assets we copy from third party libs include binary files like images, wasm builds etc. Gulp5 by default re-encodes files as utf-8 which breaks copying of binary files. By, setting encoding: false gulp treats all copied files as binary, reverting to the previous behaviour.

Requires terriamap PR - TerriaJS/TerriaMap#713

Test me

  • Open main.
  • You'll see that thumbnails in map settings and the cesium icon in the bottom bar are broken (so are some wasm files used for draco decoding etc.)
  • Now open CI for this branch.
  • Observe that these thumbnails are now fixed.

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

Assets we copy from third party libs include binary files like images, wasm builds etc.
Gulp5 by default re-encodes copied files as utf-8 which breaks copying of binary files.
By, setting `encoding: false` gulp treats all copied files as binary,
reverting to the previous behaviour.
Copy link
Contributor

@nf-s nf-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just missing a CHANGES log

@na9da
Copy link
Collaborator Author

na9da commented Nov 29, 2024

Thanks @nf-s. Didn't add it because there's already a line for gulp 5 for next release.

@na9da
Copy link
Collaborator Author

na9da commented Nov 29, 2024

Update CHANGES.md.

@na9da na9da merged commit fc8c764 into main Nov 29, 2024
9 checks passed
@na9da na9da deleted the gulp5-fix-bin-copy branch November 29, 2024 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants