[One Workflow] Update liquidjs to version 10.26.0 and add sha256 and hmac_sha256 filters (#269989)#271967
Merged
VladimirFilonov merged 1 commit intoMay 30, 2026
Conversation
…hmac_sha256 filters (elastic#269989) ## Summary Adopts Shopify-compatible `sha256` and `hmac_sha256` Liquid filters for Workflows by upgrading [liquidjs to 10.26.0](https://github.com/harttle/liquidjs/releases/tag/v10.26.0) ([harttle/liquidjs#889](harttle/liquidjs#889)). Filter behavior comes from liquidjs core—no custom server-side implementations. - **Execution (server):** Built-in filters work via `createWorkflowLiquidEngine()` with existing `renderSync` / `evalValueSync` (Node `crypto`). - **Editor autocomplete:** Added `sha256` and `hmac_sha256` entries with Shopify reference examples. - **Hover preview (browser):** Switched `evaluateExpression` to async `evalValue` so crypto filters resolve correctly in the browser bundle (Web Crypto is async-only). Hover only shows evaluated filter output when viewing an execution on the **Executions** tab and hovering on the filter segment inside `{{ }}`. ## Changes | Area | Change | |------|--------| | `package.json` / `yarn.lock` | `liquidjs` `10.25.7` → `10.26.0` | | `liquid_completions.ts` | Autocomplete for `sha256`, `hmac_sha256` | | `templating_engine.test.ts` | Server tests (Shopify reference vectors) | | `liquid_parse_cache.test.ts` | Parse/validation tests for built-in crypto filters | | `evaluate_expression.ts` | `evalValueSync` → `await evalValue` for browser crypto | | `unified_hover_provider.ts` | `await evaluateExpression(...)` | | `evaluate_expression.test.ts` | Async tests + crypto filter coverage | **Not changed:** `templating_engine.ts`, `liquid_parse_cache.ts` — no `registerFilter` stubs needed for built-in filters. ## Examples: ```yaml name: Crypto filters enabled: true triggers: - type: manual inputs: - name: message type: string default: "hello world" consts: secret: "secret" steps: - name: hmac_sha256 type: console with: message: "{{ inputs.message | hmac_sha256: consts.secret }}" - name: sha256 type: console with: message: "{{ inputs.message | sha256 }}" ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 79909d5) # Conflicts: # package.json # src/platform/plugins/shared/workflows_execution_engine/server/templating_engine.test.ts # yarn.lock
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
|
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
Adopts Shopify-compatible
sha256andhmac_sha256Liquid filters for Workflows by upgrading liquidjs to10.26.0 (harttle/liquidjs#889). Filter behavior comes from liquidjs core—no custom server-side implementations.
createWorkflowLiquidEngine()with existingrenderSync/evalValueSync(Nodecrypto).sha256andhmac_sha256entries with Shopify reference examples.evaluateExpressionto asyncevalValueso crypto filters resolve correctly in the browser bundle (Web Crypto is async-only). Hover only shows evaluated filter output when viewing an execution on the Executions tab and hovering on the filter segment inside{{ }}.Changes
package.json/yarn.lockliquidjs10.25.7→10.26.0liquid_parse_cache.test.tsevaluate_expression.tsevalValueSync→await evalValuefor browser cryptounified_hover_provider.tsawait evaluateExpression(...)Not changed:
templating_engine.ts,liquid_parse_cache.ts— noregisterFilterstubs needed for built-in filters.Examples: