refactor(data): split @adobe/data-testing into its own package - #167
Merged
Conversation
Installing @adobe/data pulled in a vitest peer dependency for everyone, even consumers who never use the conformance-testing helpers — the peerDependencies field applies to the whole package, not just the /testing subpath, so a downstream project with strict peer-dependency resolution could hit a vitest version conflict just from depending on @adobe/data. Move src/testing/** (the Match + Conformance namespaces) into a new @adobe/data-testing package that carries the vitest peer dependency itself. @adobe/data now has zero vitest footprint outside its own devDependency; only the 7 sample packages that actually author conformance tests add @adobe/data-testing + vitest as devDependencies. Note: pnpm-lock.yaml's format bump (v6 -> v9) is a side effect of running `pnpm install` with the CI-pinned pnpm 9 against a lockfile last written by pnpm 8 — unrelated to this change but unavoidable once the lockfile is touched. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Includes the new @adobe/data-testing package in the version bump. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
@adobe/data'speerDependenciesfield applied to the whole package, not just the/testingsubpath — so any project depending on@adobe/datapicked up avitestpeer requirement even if it never touches conformance-testing helpers. Under strict peer-dependency resolution this could surface as avitestversion conflict for a consumer that has nothing to do with testing.vitestdependency is real, not accidental:src/testing/conformance/*.tscallsdescribe/itfromvitestat module scope, and those calls must resolve to the same vitest instance running the consumer's own test suite (module-identity requirement for test registration) — a plaindependencywould risk a duplicate/mismatched vitest instance, and adevDependencywouldn't install at all for downstream consumers.src/testing/**(theMatchandConformancenamespaces) out of@adobe/datainto a new workspace package,@adobe/data-testing, which now carries thevitestpeer dependency itself.@adobe/datano longer mentionsvitestoutside its owndevDependencies.data-lit-todo,data-lit-tictactoe,data-lit-space-rock-game,data-gpu-hopper,data-p2p-tictactoe,data-react-pixie,data-solid-dashboard) to import from@adobe/data-testingand depend on it directly.@adobe/data-aiAI-guidance rule docs (state.md,conformance.md,computed.md) that referenced the old@adobe/data/testingimport path.Note on the lockfile diff
pnpm-lock.yaml's format bump (lockfileVersion6.0→9.0) is a side effect of runningpnpm installwith the CI-pinned pnpm major version (9) against a lockfile last written by pnpm 8 — any real (non-frozen) install with pnpm 9 upgrades the format on first write. It's unrelated to this change in substance but unavoidable once the lockfile needs updating for the new package.Test plan
pnpm -r run typecheck— all 18 packages pass, including the new@adobe/data-testingpnpm -r run build— all packages build cleanpnpm -r run test— all packages pass (245 tests in@adobe/data, 10 in@adobe/data-testing, and the full suite in every consumer sample app)pnpm run check:workspace— workspace conventions OKpnpm -r run lint— clean🤖 Generated with Claude Code