Repository navigation
Conversation
Allow TOML plugins to resolve version manifests that wrap their version list in a JSON object, such as Chrome for Testing.
|
@castrog What if we supported xpath-like notation instead? |
|
That makes sense. Were you thinking JSONPath, like |
|
Maybe whatever |
|
Thinking more about your suggestion, there are two options for a version query format. Either would replace the array-key setting in this PR, so we’d ship one way to extract versions from the ChromeDriver JSON index:
Both handle this lookup. On a synthetic index of 2,590 versions, both ran in under 2 ms, so performance doesn’t seem to decide it. I lean toward JMESPath for this narrow version lookup because of the size difference, but jq familiarity is a real benefit. Which tradeoff makes more sense for |
|
@castrog |
|
@milesj it represents all, |
|
Sure, works for me |
Summary
We use proto in our projects, and supporting Chrome for Testing's version feed would make a ChromeDriver TOML plugin possible for browser testing. Its
known-good-versions.jsonwraps versions in aversionsarray, while schema plugins currently expect the response itself to be an array.Add
manifest-array-key(v1) andindex_array_key(v2) to select the array:Top-level arrays continue to work. Missing keys and values that are not arrays return clear errors. The v2 setting also works in resolve overrides.
Addresses moonrepo/proto#948.
Verification
cargo build -p schema_tool --target wasm32-wasip1 --release --locked— passed.cargo nextest run -p schema_tool --no-default-features --no-fail-fast --no-tests=pass --locked— 85 passed.cargo clippy -p schema_tool --target wasm32-wasip1 --release --locked -- -D warnings— passed.cargo fmt --all --check— passed.Thanks for maintaining proto and its plugins—we use them regularly.