Repository navigation
feat: migrate test map to array schema - #21
Merged
Merged
Conversation
Replace the root test-map object with an array of entries and rename targets to dependsOn. Legacy manifests are auto-converted in place before Sniffler reads them.
Keep merged containment coverage aligned with the array-based test-map schema.
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.
What is this?
This PR replaces the test-map root object with a plain array of test entries and renames each entry's
targetsfield todependsOn. It keeps existing repos working by auto-converting the legacy{ "tests": [...] }manifest the first time Sniffler reads it.How does it work?
Sniffler now runs a small migration step right after config load and before it reads the manifest. If
.sniffler/test-map.jsonis already an array, nothing changes. If it is still in the legacy object shape, Sniffler rewrites it in place to the new array form, then loads that converted file for matching.The matcher and shared-target expansion now work against
dependsOn, and the benchmark helper still understands both shapes so older fixtures remain readable.Why is this useful?
testswrapper.origin/masterchanges: shared-root 57.8 Hz, deep-branch 95.9 Hz.