@adobe/data-ai 0.9.94 → 0.9.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,7 +48,7 @@ export const transitions = import.meta.glob<Record<string, unknown>>(
48
48
  It stays **out of `public.js`** deliberately: unlike `create`/`samples` (plain
49
49
  prod-safe values), `transitions` is the test-case graph — hanging it on `State`
50
50
  would drag `import.meta.glob` (a Vite-only construct) and every `cases` fixture
51
- (fake services, matchers, the whole `@adobe/data/testing` module) into every
51
+ (fake services, matchers, the whole `@adobe/data-testing` module) into every
52
52
  production import of `State`, none of which tree-shakes off a live namespace
53
53
  re-export. So `create`/`samples` earn a namespace slot; `transitions` is a test
54
54
  concern the tests import directly.
@@ -73,15 +73,17 @@ centrally by the shared driver's barrel-driven guard rather than by eyeballing
73
73
  one test file per transform — and genuine non-transition helpers still keep
74
74
  their own `*.test.ts` (see below).
75
75
 
76
- The case types, matchers, and runners all live in the shared
77
- **`@adobe/data/testing`** module (two namespaces, `Match` and `Conformance`;
78
- `vitest` is an *optional* peer dependency, already satisfied here). Only one
79
- tiny per-feature file remains — a ~10-line alias, `conformance-case.ts`, that
80
- binds `State` once so transform/derivation files can write a one-parameter type:
76
+ The case types, matchers, and runners all live in the separate
77
+ **`@adobe/data-testing`** package (two namespaces, `Match` and `Conformance`) —
78
+ kept out of `@adobe/data` itself so installing `@adobe/data` never pulls in a
79
+ `vitest` peer dependency; add `@adobe/data-testing` as a devDependency alongside
80
+ `vitest`, its optional peer dependency. Only one tiny per-feature file remains —
81
+ a ~10-line alias, `conformance-case.ts`, that binds `State` once so
82
+ transform/derivation files can write a one-parameter type:
81
83
 
82
84
  ```ts
83
85
  // data/state/conformance-case.ts — the only per-feature conformance declaration
84
- import { Conformance as ConformanceApi } from "@adobe/data/testing";
86
+ import { Conformance as ConformanceApi } from "@adobe/data-testing";
85
87
  import type { State } from "./state.js";
86
88
  export type Conformance<F extends (...args: never[]) => unknown> = ConformanceApi.Cases<State, F>;
87
89
  export type Derivation<F extends (...args: never[]) => unknown> = ConformanceApi.DerivationCases<F>;
@@ -93,7 +95,7 @@ export const entity = ConformanceApi.entity;
93
95
 
94
96
  ```ts
95
97
  // create-todo.ts
96
- import { Match } from "@adobe/data/testing";
98
+ import { Match } from "@adobe/data-testing";
97
99
  import type { Conformance } from "./conformance-case.js"; // the thin per-feature alias above
98
100
  export const createTodo = (
99
101
  state: Pick<State, "todos">,
@@ -141,7 +143,7 @@ export const cases: Conformance<typeof createTodo> = [
141
143
  is the default and stays unchanged. (A full `before`/`after` still works — it just
142
144
  overrides the default wholesale.)
143
145
  - **`after` leaves minted values open** with the shared matchers `Match.anyNumber`
144
- / `Match.anyString`, imported from `@adobe/data/testing` — there is **no**
146
+ / `Match.anyString`, imported from `@adobe/data-testing` — there is **no**
145
147
  per-feature `matchers.ts` anymore. An id the ECS assigns from its own id-space is
146
148
  `id: Match.anyNumber`, so the pure spec and the ECS satisfy the same case — match
147
149
  by content, not by the value you don't control. `Match` is framework-agnostic and
@@ -154,7 +156,7 @@ export const cases: Conformance<typeof createTodo> = [
154
156
  case does not pin at all; `ref` for one that must be consistent across the case.
155
157
  - **Entity-addressed cases use `entity(specId)`.** A transition that addresses an
156
158
  entity by id writes it as `args: { id: entity(2) }` — `entity` imported from the
157
- feature's `conformance-case.ts` (re-exported from `@adobe/data/testing`). It types
159
+ feature's `conformance-case.ts` (re-exported from `@adobe/data-testing`). It types
158
160
  as the id it stands for (like `Match.anyNumber`), so it slots into the transform's
159
161
  own arg type. `runSpec` unwraps it to the plain data-id for the pure side; the ECS
160
162
  runners resolve it to the seeded entity (see `conformance.md`).
@@ -170,7 +172,7 @@ export const cases: Conformance<typeof createTodo> = [
170
172
  There is no per-feature `expect-state-matches.ts`, `record-effects.ts`,
171
173
  `expect-conforms.ts`, or `conformance-case.type-test.ts` — those are gone; the
172
174
  shared driver owns comparison, effect recording, and name-based auto-pairing, and
173
- the `Effects` type-test now lives once in `@adobe/data/testing`. A genuine **non-transition helper** in
175
+ the `Effects` type-test now lives once in `@adobe/data-testing`. A genuine **non-transition helper** in
174
176
  `state/` — a `create()` constructor, a single-field predicate — has no `cases`
175
177
  and isn't a `(state,args)=>state` transform, so `runSpec` skips it: **keep its own
176
178
  sibling `*.test.ts`** rather than deleting it and losing coverage.
@@ -25,7 +25,7 @@ full-state projection and re-runs on *any* field change (fine for a small featur
25
25
  wasteful on a large or hot one, where you hand-wire the minimal resource/index
26
26
  reads instead). A derivation takes **no services**, so its co-located `cases` are
27
27
  inert `{ input, value }` data (no test-doubles) that tree-shake out of the app
28
- build (they reference the `@adobe/data/testing` matchers only, and that module is
28
+ build (they reference the `@adobe/data-testing` matchers only, and that module is
29
29
  `sideEffects: false`) — the one hazard is a `cases` literal touching the
30
30
  `public.js` barrel at load, which `state.md` already forbids. **Performance is the
31
31
  first-class constraint**: reuse freely where it doesn't matter, hand-wire minimal
@@ -6,7 +6,7 @@ paths:
6
6
  # services/main-service/conformance/ — keeping the ECS honest against the spec
7
7
 
8
8
  Test-only (imported only by `*.test.ts`, in no facet barrel). The `data/state`
9
- cases are the shared truth; the shared **`@adobe/data/testing`** runner replays
9
+ cases are the shared truth; the shared **`@adobe/data-testing`** runner replays
10
10
  them against the ECS. This folder holds only the *feature-specific projection*
11
11
  (`projection.ts`) plus one `conformance.test.ts` that makes a **single**
12
12
  `Conformance.runFeature({...})` call. Reference: `data-lit-tictactoe`'s
@@ -23,11 +23,12 @@ a normal runtime API — the collision is only in the name.) Likewise
23
23
  `Match.matches` / `Match.assert` are comparison helpers for `*.test.ts` only —
24
24
  never a runtime branch.
25
25
 
26
- ## What `@adobe/data/testing` gives you
26
+ ## What `@adobe/data-testing` gives you
27
27
 
28
28
  Two namespaces, imported only from `*.test.ts` (the module is
29
- `sideEffects: false`, and `vitest` is an optional peer dependency, satisfied
30
- here):
29
+ `sideEffects: false`; add it as a devDependency alongside `vitest`, its
30
+ optional peer dependency — kept as a separate package from `@adobe/data` so
31
+ installing `@adobe/data` never pulls in a `vitest` peer dependency):
31
32
 
32
33
  - **`Match`** — the tolerant, matcher-aware value comparison: `matches(actual,
33
34
  expected, options?)` and its throwing wrapper `assert(...)`, plus the matchers
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adobe-data-ai",
3
- "version": "0.9.94",
3
+ "version": "0.9.96",
4
4
  "description": "Architecture skills for @adobe/data — data-oriented modelling, archetype iteration, hot-path performance, and related conventions.",
5
5
  "author": {
6
6
  "name": "Adobe"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/data-ai",
3
- "version": "0.9.94",
3
+ "version": "0.9.96",
4
4
  "description": "Cross-agent architecture skills for @adobe/data — installable as a Claude Code plugin or copied into any Agent-Skills-compatible agent (Cursor, Codex).",
5
5
  "type": "module",
6
6
  "private": false,
@@ -29,12 +29,12 @@
29
29
  "skills"
30
30
  ],
31
31
  "peerDependencies": {
32
- "@adobe/data": "0.9.94"
32
+ "@adobe/data": "0.9.96"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "^5.8.3",
36
36
  "vitest": "^1.6.0",
37
- "@adobe/data": "0.9.94"
37
+ "@adobe/data": "0.9.96"
38
38
  },
39
39
  "license": "MIT",
40
40
  "scripts": {