Skip to content

Implement "output.hashCharacters" option to define character set for file hashes#5371

Merged
lukastaegert merged 4 commits intomasterfrom
gh-5362_hash_characters
Feb 9, 2024
Merged

Implement "output.hashCharacters" option to define character set for file hashes#5371
lukastaegert merged 4 commits intomasterfrom
gh-5362_hash_characters

Conversation

@lukastaegert
Copy link
Copy Markdown
Member

@lukastaegert lukastaegert commented Feb 2, 2024

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

This adds a new option output.hashCharacters that can take one of "hex", "base36" and "base64".

  • The default is "base64" and corresponds to the current hashes.
  • "base36" only uses lower-case letters and numbers.
  • "hex" only uses hexadecimal hashes as in Rollup <= 3

This should mainly help people who struggle with the use of upper- and lower-case letters.

Note that this changes all current file hashes as the base64 conversion is done in a slightly different way.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 0:26am

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 2, 2024

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#gh-5362_hash_characters

Notice: Ensure you have installed Rust nightly. If you haven't installed it yet, please first see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust, then see https://rust-lang.github.io/rustup/concepts/channels.html to learn how to install Rust nightly.

or load it into the REPL:
https://rollup-2ytnesdsb-rollup-js.vercel.app/repl/?pr=5371

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (14425f9) 98.81% compared to head (9e5dd8e) 98.81%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5371   +/-   ##
=======================================
  Coverage   98.81%   98.81%           
=======================================
  Files         232      232           
  Lines        8997     9007   +10     
  Branches     2347     2350    +3     
=======================================
+ Hits         8890     8900   +10     
  Misses         46       46           
  Partials       61       61           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lukastaegert lukastaegert force-pushed the gh-5362_hash_characters branch from 7b05882 to 9e5dd8e Compare February 2, 2024 12:25
@lukastaegert lukastaegert merged commit 57277bf into master Feb 9, 2024
@lukastaegert lukastaegert deleted the gh-5362_hash_characters branch February 9, 2024 05:01
@github-actions
Copy link
Copy Markdown

This PR has been released as part of rollup@4.10.0. You can test it via npm install rollup.

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.

Expose code in entryFileNames, chunkFileNames, and assetFileNames

1 participant