feat(www): shorter repl shareables#6088
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lukastaegert
left a comment
There was a problem hiding this comment.
Good thinking! To be honest, I never considered looking into optimizations here, it has probably been like this forever.
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install cyyynthia/rollup#shorter-shareablesNotice: Ensure you have installed the latest nightly Rust toolchain. If you haven't installed it yet, please see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust. or load it into the REPL: |
Performance report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6088 +/- ##
=======================================
Coverage 98.79% 98.79%
=======================================
Files 271 271
Lines 10622 10622
Branches 2840 2840
=======================================
Hits 10494 10494
Misses 88 88
Partials 40 40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This PR has been released as part of rollup@4.50.1. You can test it via |
|
This PR contains:
Are tests included?
Breaking Changes?
Description
This PR tweaks the way shareable URLs are being generated and parsed, to make the "shareable" data parameter smaller. Taking the shareable used in #6065, the URL is ~5.4kB without this change and ~3.7kB with the change.
Reduction is achieved by not URI-encoding the JSON object, instead opting to turn the base64 string into the base64url variant. There is a check to detect URI-encoded shareables to make the change fully backwards compatible with all the REPL links in the wild.