@exabugs/dynamodb-client 0.3.4 → 0.3.6

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/CHANGELOG.md CHANGED
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.6] - 2024-12-02
11
+
12
+ ### Changed
13
+
14
+ - **Shadow Records**: Exclude `id` field from shadow record generation
15
+ - `id` field no longer generates a shadow record
16
+ - Main record (`SK = id#{ULID}`) is used for id-based sorting
17
+ - Reduces redundant shadow records and improves performance
18
+ - `find()` operation already optimized to use main records for id sorting
19
+
20
+ ## [0.3.5] - 2024-12-02
21
+
22
+ ### Changed
23
+
24
+ - **Shadow Records**: Removed `data` field from shadow records
25
+ - Shadow records now only contain `PK` and `SK` fields
26
+ - Record ID is extracted from `SK` (format: `{field}#{value}#id#{recordId}`)
27
+ - Reduces storage cost and simplifies data structure
28
+ - No functional changes - ID extraction logic remains the same
29
+
10
30
  ## [0.3.4] - 2024-12-02
11
31
 
12
32
  ### Removed
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v0.3.4
2
- // Built: 2025-12-02T04:56:59.326Z
1
+ // @exabugs/dynamodb-client v0.3.6
2
+ // Built: 2025-12-02T05:38:42.906Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -27794,6 +27794,9 @@ __name(generateMainRecordSK, "generateMainRecordSK");
27794
27794
  function generateShadowRecords(record, resourceName, config) {
27795
27795
  const shadows = [];
27796
27796
  for (const [fieldName, value] of Object.entries(record)) {
27797
+ if (fieldName === "id") {
27798
+ continue;
27799
+ }
27797
27800
  if (fieldName.startsWith("__")) {
27798
27801
  continue;
27799
27802
  }
@@ -27808,8 +27811,7 @@ function generateShadowRecords(record, resourceName, config) {
27808
27811
  const sk = `${fieldName}#${formattedValue}#id#${record.id}`;
27809
27812
  shadows.push({
27810
27813
  PK: resourceName,
27811
- SK: sk,
27812
- data: { id: record.id }
27814
+ SK: sk
27813
27815
  });
27814
27816
  }
27815
27817
  return shadows;