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.100",
"version": "0.9.101",
"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.100",
"version": "0.9.101",
"description": "Architecture skills for @adobe/data — data-oriented modelling, archetype iteration, hot-path performance, and related conventions.",
"author": {
"name": "Adobe"
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.100",
"version": "0.9.101",
"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
2 changes: 1 addition & 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.100",
"version": "0.9.101",
"description": "Hopper sample - real-time ECS game rendered as colored cubes via @adobe/data-gpu",
"type": "module",
"private": true,
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.100",
"version": "0.9.101",
"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.100",
"version": "0.9.101",
"description": "Adobe data WebGPU plugins and types for graphics and compute",
"type": "module",
"private": false,
Expand Down
2 changes: 1 addition & 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.100",
"version": "0.9.101",
"description": "Space Rock Game sample - real-time ECS game with Lit and @adobe/data",
"type": "module",
"private": true,
Expand Down
2 changes: 1 addition & 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.100",
"version": "0.9.101",
"description": "Tic-Tac-Toe sample - Lit web components with @adobe/data-lit and AgenticService",
"type": "module",
"private": true,
Expand Down
2 changes: 1 addition & 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.100",
"version": "0.9.101",
"description": "Todo application - Lit web components with @adobe/data ECS",
"type": "module",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/data-lit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/data-lit",
"version": "0.9.100",
"version": "0.9.101",
"description": "Adobe data Lit bindings - hooks, elements, decorators",
"type": "module",
"private": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/data-p2p-tictactoe/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-p2p-tictactoe",
"version": "0.9.100",
"version": "0.9.101",
"description": "Serverless P2P tic-tac-toe — WebRTC DataChannel + @adobe/data-sync",
"type": "module",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/data-persistence/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/data-persistence",
"version": "0.9.100",
"version": "0.9.101",
"description": "Worker-based incremental persistence layer for @adobe/data ECS over OPFS (browser) and node:fs (server).",
"type": "module",
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/data-react-hello/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-react-hello",
"version": "0.9.100",
"version": "0.9.101",
"description": "Hello World sample - click counter using @adobe/data-react",
"type": "module",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/data-react-pixie/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-react-pixie",
"version": "0.9.100",
"version": "0.9.101",
"description": "PixiJS React sample - ECS sprites (bunny, fox) with @adobe/data-react",
"type": "module",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/data-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/data-react",
"version": "0.9.100",
"version": "0.9.101",
"description": "Adobe data React bindings — hooks and context for ECS database",
"type": "module",
"private": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/data-solid-dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-solid-dashboard",
"version": "0.9.100",
"version": "0.9.101",
"description": "Mini dashboard sample — multiple components sharing one @adobe/data ECS database with SolidJS",
"type": "module",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/data-solid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/data-solid",
"version": "0.9.100",
"version": "0.9.101",
"description": "Adobe data SolidJS bindings — context and provider for ECS database",
"type": "module",
"private": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/data-sync/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/data-sync",
"version": "0.9.100",
"version": "0.9.101",
"description": "Multi-user real-time synchronisation for @adobe/data ECS — server, client, and in-process loopback.",
"type": "module",
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/data-testing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/data-testing",
"version": "0.9.100",
"version": "0.9.101",
"description": "Conformance-testing utilities (Match + Conformance runners) for @adobe/data ECS features",
"type": "module",
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/data/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/data",
"version": "0.9.100",
"version": "0.9.101",
"description": "Adobe data oriented programming library",
"type": "module",
"sideEffects": false,
Expand Down
25 changes: 25 additions & 0 deletions packages/data/src/ecs/database/public/observe-select-deep.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,29 @@ describe("observeSelectDeep", () => {
unobserve1();
unobserve2();
});

test("keeps the entity id when the include set carries the id column", async () => {
// An archetype's runtime `components` set still contains the "id" column even
// though reads omit id. Passing it directly as `include` (as consumers do)
// must not let the copy loop overwrite each row's `id` with the read's
// (absent) id — the row's `id` must stay the entity.
const db = createTestDb();
const e1 = db.transactions.createMoving({ position: 10, velocity: 5 });
const e2 = db.transactions.createMoving({ position: 20, velocity: 15 });

const observer = vi.fn();
const unobserve = observeSelectDeep(db, db.archetypes.Moving.components)(observer);

await assert({
given: "an include set that carries the id column",
should: "emit rows whose id is the entity, not undefined",
actual: observer.mock.calls[0][0],
expected: [
{ id: e1, position: 10, velocity: 5 },
{ id: e2, position: 20, velocity: 15 },
],
});

unobserve();
});
});
10 changes: 8 additions & 2 deletions packages/data/src/ecs/database/public/observe-select-deep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Observe } from "../../../observe/index.js";
import { equals } from "../../../equals.js";
import { StringKeyof } from "../../../types/types.js";
import { RequiredComponents } from "../../required-components.js";
import { ID, RequiredComponents } from "../../required-components.js";
import { Components } from "../../store/components.js";
import { EntitySelectOptions } from "../../store/entity-select-options.js";
import { Entity } from "../../entity/entity.js";
Expand Down Expand Up @@ -53,10 +53,16 @@ const createObserveSelectDeep = <
entity: Entity,
values: Record<string, unknown>,
): EntityData<C, Include> => {
const data: Record<string, unknown> = { id: entity };
const data: Record<string, unknown> = {};
for (const key of includeKeys) {
// `includeKeys` carries the archetype's runtime component set, which still
// includes the "id" column even though reads omit it. Skip it here and set
// `id` from `entity` below, or the loop would overwrite id with
// `values["id"]` (undefined) and hand callers id-less rows.
if (key === ID) continue;
data[key] = values[key];
}
data[ID] = entity;
return data as EntityData<C, Include>;
};

Expand Down
Loading