shelving 1.47.2 → 1.47.3

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.
package/db/Database.d.ts CHANGED
@@ -163,8 +163,8 @@ export declare class DatabaseDocument<T extends Data = Data> implements Observab
163
163
  }
164
164
  /** Database data embeds the corresponding `Document` instance and string ID into the data. */
165
165
  export declare type DocumentData<T extends Data> = T & {
166
- _id: string;
167
- _doc: DatabaseDocument<T>;
166
+ id: string;
167
+ doc: DatabaseDocument<T>;
168
168
  };
169
169
  /** Get the data for a document from a result for that document. */
170
170
  export declare function getDocumentData<T extends Data>(result: Result<T>, ref: DatabaseDocument<T>): DocumentData<T>;
package/db/Database.js CHANGED
@@ -259,7 +259,7 @@ export class DatabaseDocument {
259
259
  /** Get the data for a document from a result for that document. */
260
260
  export function getDocumentData(result, ref) {
261
261
  if (result)
262
- return { ...result, _id: ref.id, _doc: ref };
262
+ return { ...result, id: ref.id, doc: ref };
263
263
  throw new DocumentRequiredError(ref);
264
264
  }
265
265
  /** Get the data for a document from a result for that document. */
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "state-management",
12
12
  "query-builder"
13
13
  ],
14
- "version": "1.47.2",
14
+ "version": "1.47.3",
15
15
  "repository": "https://github.com/dhoulb/shelving",
16
16
  "author": "Dave Houlbrooke <dave@shax.com>",
17
17
  "license": "0BSD",