feat(filters): Add base64_encode and base64_decode filters for Shopify compatibility#828
Merged
harttle merged 4 commits intoharttle:masterfrom Oct 27, 2025
Merged
Conversation
Pull Request Test Coverage Report for Build 18834524874Details
💛 - Coveralls |
harttle
requested changes
Oct 26, 2025
Owner
|
atob doesn’t work for non alphabetic characters. Let’s stick with your original solution. |
Owner
|
@rosomri thanks for the effort! |
Contributor
Author
|
@harttle happy to contribute whenever needed! |
Owner
|
@all-contributors please add @rosomri for code |
Contributor
|
I've put up a pull request to add @rosomri! 🎉 |
github-actions bot
pushed a commit
that referenced
this pull request
Oct 27, 2025
# [10.24.0](v10.23.0...v10.24.0) (2025-10-27) ### Features * **filters:** Add base64_encode and base64_decode filters for Shopify compatibility ([#828](#828)) ([86fc135](86fc135))
|
🎉 This PR is included in version 10.24.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
rosomri
added a commit
to elastic/kibana
that referenced
this pull request
Oct 28, 2025
…JS implementation (#240862) ### PR Description We previously implemented custom base64 filters as a workaround when LiquidJS didn't have native base64 support. After [contributing these filters to the LiquidJS open source project](harttle/liquidjs#828), they are now available natively in v10.24.0, making our custom implementation redundant. ### Changes - Updated LiquidJS dependency from v10.22.0 to v10.24.0 - Removed custom base64 filters and related tests --------- Co-authored-by: kibanamachine <[email protected]>
qn895
pushed a commit
to qn895/kibana
that referenced
this pull request
Oct 30, 2025
…JS implementation (elastic#240862) ### PR Description We previously implemented custom base64 filters as a workaround when LiquidJS didn't have native base64 support. After [contributing these filters to the LiquidJS open source project](harttle/liquidjs#828), they are now available natively in v10.24.0, making our custom implementation redundant. ### Changes - Updated LiquidJS dependency from v10.22.0 to v10.24.0 - Removed custom base64 filters and related tests --------- Co-authored-by: kibanamachine <[email protected]>
ana-davydova
pushed a commit
to ana-davydova/kibana
that referenced
this pull request
Nov 3, 2025
…JS implementation (elastic#240862) ### PR Description We previously implemented custom base64 filters as a workaround when LiquidJS didn't have native base64 support. After [contributing these filters to the LiquidJS open source project](harttle/liquidjs#828), they are now available natively in v10.24.0, making our custom implementation redundant. ### Changes - Updated LiquidJS dependency from v10.22.0 to v10.24.0 - Removed custom base64 filters and related tests --------- Co-authored-by: kibanamachine <[email protected]>
albertoblaz
pushed a commit
to albertoblaz/kibana
that referenced
this pull request
Nov 4, 2025
…JS implementation (elastic#240862) ### PR Description We previously implemented custom base64 filters as a workaround when LiquidJS didn't have native base64 support. After [contributing these filters to the LiquidJS open source project](harttle/liquidjs#828), they are now available natively in v10.24.0, making our custom implementation redundant. ### Changes - Updated LiquidJS dependency from v10.22.0 to v10.24.0 - Removed custom base64 filters and related tests --------- Co-authored-by: kibanamachine <[email protected]>
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.
Summary
This PR adds two standard Shopify filters (
base64_encodeandbase64_decode) to LiquidJS core to improve Shopify compatibility. These filters are part of the standard Shopify Liquid filter set but were not previously implemented in LiquidJS.#827
Changes
base64_encodeandbase64_decodefilters with full Shopify compatibilityBuffer.from()for optimal performancebtoa/atobwith proper Unicode handlingImplementation Details
src/filters/base64.ts- Main filter implementationsrc/filters/base64-impl.ts- Node.js implementation using Buffersrc/build/base64-impl-browser.ts- Browser implementation using btoa/atobtest/integration/filters/base64.spec.ts- Integration testssrc/build/base64-impl-browser.spec.ts- Browser-specific unit testsrollup.config.mjswith platform-specific bundlingShopify Compatibility
{{ 'one two three' | base64_encode }}→b25lIHR3byB0aHJlZQ==Testing
Breaking Changes
None