Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-monorepo",
"version": "0.9.95",
"version": "0.9.96",
"private": true,
"engines": {
"node": ">=24"
Expand Down
2 changes: 1 addition & 1 deletion packages/data-ai/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adobe-data-ai",
"version": "0.9.95",
"version": "0.9.96",
"description": "Architecture skills for @adobe/data — data-oriented modelling, archetype iteration, hot-path performance, and related conventions.",
"author": {
"name": "Adobe"
Expand Down
24 changes: 13 additions & 11 deletions packages/data-ai/.claude/rules/features/data/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const transitions = import.meta.glob<Record<string, unknown>>(
It stays **out of `public.js`** deliberately: unlike `create`/`samples` (plain
prod-safe values), `transitions` is the test-case graph — hanging it on `State`
would drag `import.meta.glob` (a Vite-only construct) and every `cases` fixture
(fake services, matchers, the whole `@adobe/data/testing` module) into every
(fake services, matchers, the whole `@adobe/data-testing` module) into every
production import of `State`, none of which tree-shakes off a live namespace
re-export. So `create`/`samples` earn a namespace slot; `transitions` is a test
concern the tests import directly.
Expand All @@ -73,15 +73,17 @@ centrally by the shared driver's barrel-driven guard rather than by eyeballing
one test file per transform — and genuine non-transition helpers still keep
their own `*.test.ts` (see below).

The case types, matchers, and runners all live in the shared
**`@adobe/data/testing`** module (two namespaces, `Match` and `Conformance`;
`vitest` is an *optional* peer dependency, already satisfied here). Only one
tiny per-feature file remains — a ~10-line alias, `conformance-case.ts`, that
binds `State` once so transform/derivation files can write a one-parameter type:
The case types, matchers, and runners all live in the separate
**`@adobe/data-testing`** package (two namespaces, `Match` and `Conformance`) —
kept out of `@adobe/data` itself so installing `@adobe/data` never pulls in a
`vitest` peer dependency; add `@adobe/data-testing` as a devDependency alongside
`vitest`, its optional peer dependency. Only one tiny per-feature file remains —
a ~10-line alias, `conformance-case.ts`, that binds `State` once so
transform/derivation files can write a one-parameter type:

```ts
// data/state/conformance-case.ts — the only per-feature conformance declaration
import { Conformance as ConformanceApi } from "@adobe/data/testing";
import { Conformance as ConformanceApi } from "@adobe/data-testing";
import type { State } from "./state.js";
export type Conformance<F extends (...args: never[]) => unknown> = ConformanceApi.Cases<State, F>;
export type Derivation<F extends (...args: never[]) => unknown> = ConformanceApi.DerivationCases<F>;
Expand All @@ -93,7 +95,7 @@ export const entity = ConformanceApi.entity;

```ts
// create-todo.ts
import { Match } from "@adobe/data/testing";
import { Match } from "@adobe/data-testing";
import type { Conformance } from "./conformance-case.js"; // the thin per-feature alias above
export const createTodo = (
state: Pick<State, "todos">,
Expand Down Expand Up @@ -141,7 +143,7 @@ export const cases: Conformance<typeof createTodo> = [
is the default and stays unchanged. (A full `before`/`after` still works — it just
overrides the default wholesale.)
- **`after` leaves minted values open** with the shared matchers `Match.anyNumber`
/ `Match.anyString`, imported from `@adobe/data/testing` — there is **no**
/ `Match.anyString`, imported from `@adobe/data-testing` — there is **no**
per-feature `matchers.ts` anymore. An id the ECS assigns from its own id-space is
`id: Match.anyNumber`, so the pure spec and the ECS satisfy the same case — match
by content, not by the value you don't control. `Match` is framework-agnostic and
Expand All @@ -154,7 +156,7 @@ export const cases: Conformance<typeof createTodo> = [
case does not pin at all; `ref` for one that must be consistent across the case.
- **Entity-addressed cases use `entity(specId)`.** A transition that addresses an
entity by id writes it as `args: { id: entity(2) }` — `entity` imported from the
feature's `conformance-case.ts` (re-exported from `@adobe/data/testing`). It types
feature's `conformance-case.ts` (re-exported from `@adobe/data-testing`). It types
as the id it stands for (like `Match.anyNumber`), so it slots into the transform's
own arg type. `runSpec` unwraps it to the plain data-id for the pure side; the ECS
runners resolve it to the seeded entity (see `conformance.md`).
Expand All @@ -170,7 +172,7 @@ export const cases: Conformance<typeof createTodo> = [
There is no per-feature `expect-state-matches.ts`, `record-effects.ts`,
`expect-conforms.ts`, or `conformance-case.type-test.ts` — those are gone; the
shared driver owns comparison, effect recording, and name-based auto-pairing, and
the `Effects` type-test now lives once in `@adobe/data/testing`. A genuine **non-transition helper** in
the `Effects` type-test now lives once in `@adobe/data-testing`. A genuine **non-transition helper** in
`state/` — a `create()` constructor, a single-field predicate — has no `cases`
and isn't a `(state,args)=>state` transform, so `runSpec` skips it: **keep its own
sibling `*.test.ts`** rather than deleting it and losing coverage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ full-state projection and re-runs on *any* field change (fine for a small featur
wasteful on a large or hot one, where you hand-wire the minimal resource/index
reads instead). A derivation takes **no services**, so its co-located `cases` are
inert `{ input, value }` data (no test-doubles) that tree-shake out of the app
build (they reference the `@adobe/data/testing` matchers only, and that module is
build (they reference the `@adobe/data-testing` matchers only, and that module is
`sideEffects: false`) — the one hazard is a `cases` literal touching the
`public.js` barrel at load, which `state.md` already forbids. **Performance is the
first-class constraint**: reuse freely where it doesn't matter, hand-wire minimal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ paths:
# services/main-service/conformance/ — keeping the ECS honest against the spec

Test-only (imported only by `*.test.ts`, in no facet barrel). The `data/state`
cases are the shared truth; the shared **`@adobe/data/testing`** runner replays
cases are the shared truth; the shared **`@adobe/data-testing`** runner replays
them against the ECS. This folder holds only the *feature-specific projection*
(`projection.ts`) plus one `conformance.test.ts` that makes a **single**
`Conformance.runFeature({...})` call. Reference: `data-lit-tictactoe`'s
Expand All @@ -23,11 +23,12 @@ a normal runtime API — the collision is only in the name.) Likewise
`Match.matches` / `Match.assert` are comparison helpers for `*.test.ts` only —
never a runtime branch.

## What `@adobe/data/testing` gives you
## What `@adobe/data-testing` gives you

Two namespaces, imported only from `*.test.ts` (the module is
`sideEffects: false`, and `vitest` is an optional peer dependency, satisfied
here):
`sideEffects: false`; add it as a devDependency alongside `vitest`, its
optional peer dependency — kept as a separate package from `@adobe/data` so
installing `@adobe/data` never pulls in a `vitest` peer dependency):

- **`Match`** — the tolerant, matcher-aware value comparison: `matches(actual,
expected, options?)` and its throwing wrapper `assert(...)`, plus the matchers
Expand Down
2 changes: 1 addition & 1 deletion packages/data-ai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/data-ai",
"version": "0.9.95",
"version": "0.9.96",
"description": "Cross-agent architecture skills for @adobe/data — installable as a Claude Code plugin or copied into any Agent-Skills-compatible agent (Cursor, Codex).",
"type": "module",
"private": false,
Expand Down
3 changes: 2 additions & 1 deletion packages/data-gpu-hopper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-gpu-hopper",
"version": "0.9.95",
"version": "0.9.96",
"description": "Hopper sample - real-time ECS game rendered as colored cubes via @adobe/data-gpu",
"type": "module",
"private": true,
Expand All @@ -20,6 +20,7 @@
"lit": "^3.3.1"
},
"devDependencies": {
"@adobe/data-testing": "workspace:*",
"@webgpu/types": "^0.1.61",
"jsdom": "^24.1.0",
"typescript": "^5.8.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import type { Conformance as ConformanceApi } from "@adobe/data/testing";
import type { Conformance as ConformanceApi } from "@adobe/data-testing";
import type { State } from "./state.js";

// The conformance case types for this feature — the shared `@adobe/data/testing`
// The conformance case types for this feature — the shared `@adobe/data-testing`
// machinery with `State` bound once, so a transform authors `Conformance<typeof fn>`
// and a derivation `Derivation<typeof fn>` (args/input/value read from the
// function's own signature). This tiny file is the only per-feature conformance
// type declaration; everything else lives in `@adobe/data/testing`.
// type declaration; everything else lives in `@adobe/data-testing`.
export type Conformance<F extends (...args: never[]) => unknown> =
ConformanceApi.Cases<State, F>;
export type Derivation<F extends (...args: never[]) => unknown> =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import { Conformance } from "@adobe/data/testing";
import { Conformance } from "@adobe/data-testing";
import { State } from "./state.js";
import { transitions } from "./transitions.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import { Conformance } from "@adobe/data/testing";
import { Conformance } from "@adobe/data-testing";
import { State } from "../../../data/state/state.js";
import { transitions } from "../../../data/state/transitions.js";
import { MainService } from "../main-service.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// and assert `toState ≡ after`. Each case also asserts `State.step ≡ after` first,
// keeping the shared case honest. The hazard bag compares as a multiset.
import { describe, it } from "vitest";
import { Match } from "@adobe/data/testing";
import { Match } from "@adobe/data-testing";
import { State } from "../../../data/state/state.js";
import { cases } from "../../../data/state/step.js";
import { createSystemDatabase } from "../conformance/create-system-database.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/data-gpu-samples/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-gpu-samples",
"version": "0.9.95",
"version": "0.9.96",
"description": "WebGPU samples built on @adobe/data-gpu",
"type": "module",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/data-gpu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/data-gpu",
"version": "0.9.95",
"version": "0.9.96",
"description": "Adobe data WebGPU plugins and types for graphics and compute",
"type": "module",
"private": false,
Expand Down
3 changes: 2 additions & 1 deletion packages/data-lit-space-rock-game/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-lit-space-rock-game",
"version": "0.9.95",
"version": "0.9.96",
"description": "Space Rock Game sample - real-time ECS game with Lit and @adobe/data",
"type": "module",
"private": true,
Expand All @@ -19,6 +19,7 @@
"lit": "^3.3.1"
},
"devDependencies": {
"@adobe/data-testing": "workspace:*",
"jsdom": "^24.1.0",
"typescript": "^5.8.3",
"vite": "^5.1.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import type { Conformance as ConformanceApi } from "@adobe/data/testing";
import type { Conformance as ConformanceApi } from "@adobe/data-testing";
import type { State } from "./state.js";

// The conformance case types for this feature — the shared `@adobe/data/testing`
// The conformance case types for this feature — the shared `@adobe/data-testing`
// machinery with `State` bound once, so a transform authors `Conformance<typeof fn>`
// and a derivation `Derivation<typeof fn>` (args/input/value read from the
// function's own signature). This tiny file is the only per-feature conformance
// type declaration; everything else lives in `@adobe/data/testing`.
// type declaration; everything else lives in `@adobe/data-testing`.
export type Conformance<F extends (...args: never[]) => unknown> =
ConformanceApi.Cases<State, F>;
export type Derivation<F extends (...args: never[]) => unknown> =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import { Conformance } from "@adobe/data/testing";
import { Conformance } from "@adobe/data-testing";
import { State } from "./state.js";
import { transitions } from "./transitions.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import { Conformance } from "@adobe/data/testing";
import { Conformance } from "@adobe/data-testing";
import { State } from "../../../data/state/state.js";
import { transitions } from "../../../data/state/transitions.js";
import { MainService } from "../main-service.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { State } from "../../../data/state/state.js";
import { Ship } from "../../../data/ship/ship.js";
import { Input } from "../../../data/input/input.js";
import { cases } from "../../../data/state/step.js";
import { Match } from "@adobe/data/testing";
import { Match } from "@adobe/data-testing";
import { createSystemDatabase } from "../conformance/create-system-database.js";
import { projection } from "../conformance/projection.js";
import { driveFrame } from "../conformance/drive-frame.js";
Expand Down
3 changes: 2 additions & 1 deletion packages/data-lit-tictactoe/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-lit-tictactoe",
"version": "0.9.95",
"version": "0.9.96",
"description": "Tic-Tac-Toe sample - Lit web components with @adobe/data-lit and AgenticService",
"type": "module",
"private": true,
Expand All @@ -19,6 +19,7 @@
"lit": "^3.3.1"
},
"devDependencies": {
"@adobe/data-testing": "workspace:*",
"jsdom": "^24.1.0",
"typescript": "^5.8.3",
"vite": "^5.1.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import type { Conformance as ConformanceApi } from "@adobe/data/testing";
import type { Conformance as ConformanceApi } from "@adobe/data-testing";
import type { State } from "./state.js";

// The conformance case types for this feature — the shared `@adobe/data/testing`
// The conformance case types for this feature — the shared `@adobe/data-testing`
// machinery with `State` bound once, so a transform authors `Conformance<typeof fn>`
// and a derivation `Derivation<typeof fn>` (args/input/value read from the
// function's own signature). This tiny file is the only per-feature conformance
// type declaration; everything else lives in `@adobe/data/testing`.
// type declaration; everything else lives in `@adobe/data-testing`.
export type Conformance<F extends (...args: never[]) => unknown> =
ConformanceApi.Cases<State, F>;
export type Derivation<F extends (...args: never[]) => unknown> =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import { Conformance } from "@adobe/data/testing";
import { Conformance } from "@adobe/data-testing";
import { State } from "./state.js";
import { transitions } from "./transitions.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import { Conformance } from "@adobe/data/testing";
import { Conformance } from "@adobe/data-testing";
import { State } from "../../../data/state/state.js";
import { transitions } from "../../../data/state/transitions.js";
import { MainService } from "../main-service.js";
Expand Down
3 changes: 2 additions & 1 deletion packages/data-lit-todo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-lit-todo",
"version": "0.9.95",
"version": "0.9.96",
"description": "Todo application - Lit web components with @adobe/data ECS",
"type": "module",
"private": true,
Expand All @@ -27,6 +27,7 @@
"lit": "^3.3.1"
},
"devDependencies": {
"@adobe/data-testing": "workspace:*",
"jsdom": "^24.1.0",
"typescript": "^5.8.3",
"vite": "^5.1.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import { Conformance as ConformanceApi } from "@adobe/data/testing";
import { Conformance as ConformanceApi } from "@adobe/data-testing";
import type { State } from "./state.js";

// The conformance case types for this feature — the shared `@adobe/data/testing`
// The conformance case types for this feature — the shared `@adobe/data-testing`
// machinery with `State` bound once, so a transform authors `Conformance<typeof fn>`
// and a derivation `Derivation<typeof fn>` (args/input/value read from the
// function's own signature). This tiny file is the only per-feature conformance
// type declaration; everything else lives in `@adobe/data/testing`.
// type declaration; everything else lives in `@adobe/data-testing`.
export type Conformance<F extends (...args: never[]) => unknown> =
ConformanceApi.Cases<State, F>;
export type Derivation<F extends (...args: never[]) => unknown> =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AnalyticsService } from "../../services/analytics-service/analytics-ser
import type { State } from "./state.js";
import type { Conformance } from "./conformance-case.js";
import { appendTodo } from "./append-todo.js";
import { Match } from "@adobe/data/testing";
import { Match } from "@adobe/data-testing";
/** Adds numbered placeholder todos for demos and performance testing. Reads and
* writes the todos — a `{ todos }` patch. */
export const createBulkTodos = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AnalyticsService } from "../../services/analytics-service/analytics-ser
import type { State } from "./state.js";
import type { Conformance } from "./conformance-case.js";
import { appendTodo } from "./append-todo.js";
import { Match } from "@adobe/data/testing";
import { Match } from "@adobe/data-testing";
/**
* Async, service-injected transition: brackets the slow name generation with
* analytics timing, then appends the todo via the shared {@link appendTodo} (so
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AnalyticsService } from "../../services/analytics-service/analytics-ser
import type { State } from "./state.js";
import type { Conformance } from "./conformance-case.js";
import { appendTodo } from "./append-todo.js";
import { Match } from "@adobe/data/testing";
import { Match } from "@adobe/data-testing";

// Reads the todos, writes the todos — a `{ todos }` patch — by delegating to the
// shared `appendTodo`; also logs `todoCreated`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { AnalyticsService } from "../../services/analytics-service/analytics-service.js";
import type { State } from "./state.js";
import { entity, type Conformance } from "./conformance-case.js";
import { Match } from "@adobe/data/testing";
import { Match } from "@adobe/data-testing";

// Reads the todos, writes the todos — a `{ todos }` patch — dropping the
// addressed id; also logs `todoDeleted`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import type { State } from "./state.js";
import { entity, type Conformance } from "./conformance-case.js";
import { Match } from "@adobe/data/testing";
import { Match } from "@adobe/data-testing";
/**
* Moves the todo with the given id to `toIndex` within the list, preserving the
* relative order of every other todo. Reads the todos, writes the todos — a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import { Match } from "@adobe/data/testing";
import { Match } from "@adobe/data-testing";
import type { State } from "./state.js";

// Representative full states for the projection round-trip (toState ∘ fromState ≡
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// © 2026 Adobe. MIT License. See /LICENSE for details.
import { Conformance } from "@adobe/data/testing";
import { Conformance } from "@adobe/data-testing";
import { State } from "./state.js";
import { transitions } from "./transitions.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { AnalyticsService } from "../../services/analytics-service/analytics-service.js";
import type { State } from "./state.js";
import { entity, type Conformance } from "./conformance-case.js";
import { Match } from "@adobe/data/testing";
import { Match } from "@adobe/data-testing";

// Reads the todos, writes the todos — a `{ todos }` patch — flipping the
// addressed todo's `complete`; also logs `todoToggled`.
Expand Down
Loading