Skip to content

feat: migrate test map to array schema - #21

Merged
V3RON merged 3 commits into
masterfrom
feat/test-map-array-schema
Jun 30, 2026
Merged

V3RON merged 3 commits into
masterfrom
feat/test-map-array-schema

Conversation

@V3RON

@V3RON V3RON commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

What is this?

This PR replaces the test-map root object with a plain array of test entries and renames each entry's targets field to dependsOn. 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.json is 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?

  • The manifest is easier to scan and edit without the extra tests wrapper.
  • The schema matches the actual data Sniffler consumes, which keeps the config simpler.
  • Older projects keep working because the migration is automatic and in-place.
  • Merged branch stayed in the same throughput band after latest origin/master changes: shared-root 57.8 Hz, deep-branch 95.9 Hz.

V3RON added 3 commits June 30, 2026 08:47
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.
@V3RON
V3RON merged commit 1c8d26e into master Jun 30, 2026
6 checks passed
@V3RON
V3RON deleted the feat/test-map-array-schema branch June 30, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant