feat: accept declarative VRT matching options - #41
Merged
Merged
Conversation
longlho
marked this pull request as ready for review
September 17, 2026 14:48
longlho
pushed a commit
that referenced
this pull request
Sep 18, 2026
🤖 I have created a release *beep* *boop* --- ## 3.3.0 (2026-09-17) ## What's Changed * feat: accept declarative VRT matching options by @longlho in #41 **Full Changelog**: v3.2.0...v3.3.0 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Consumers currently need a compiled JavaScript policy module even when comparison tolerances are fixed per Bazel target. Component and page suites can end up maintaining separate adapters just to supply the same screenshot matching options.
Allow both
component_visual_testandvisual_testto accept:The rule generates an ESM policy in declared runfiles and uses the existing comparison validator. Values are JSON numeric strings because Starlark has no floats; they are parsed, never evaluated as code. This requires no ambient environment reads or consumer compilation target. Existing compiled-module labels remain supported, and defaults are unchanged.
Updated the documentation and React examples. Bazel tests pass for generated policies, numeric validation, compiled policies, and suite configuration (
matching_config_test,built_inputs_test,config_test). Both public macros' generated policy targets build, and their input descriptors analyze. Full browser execution was not run; the React example requires a separately suppliedruntime.tar.