@exabugs/dynamodb-client 1.3.7 → 1.3.11

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,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.11] - 2026-01-02
11
+
12
+ ### Fixed
13
+
14
+ - テストコードのモック設定を修正: removeShadowKeysをエクスポートに追加
15
+
16
+ ## [1.3.10] - 2026-01-02
17
+
18
+ ### Fixed
19
+
20
+ - **重要**: nearQuery.tsでextractCleanRecordの誤用を修正
21
+ - searchFunctionが返すレコードは既にクリーンな形式(data属性なし)
22
+ - extractCleanRecordではなくremoveShadowKeysを使用するように修正
23
+ - これにより、$near検索で0件が返される問題を解決
24
+
25
+ ## [1.3.9] - 2026-01-02
26
+
27
+ ### Added
28
+
29
+ - 自動テストケースを追加: DynamoDBレコード構造でのlocationフィールド取得テスト
30
+ - 自動テストケースを追加: DynamoDB内部フィールド(PK, SK)が含まれる場合のテスト
31
+
32
+ ### Fixed
33
+
34
+ - nearSearch.tsのデバッグログを改善: locationフィールドが見つからない場合の詳細ログ
35
+ - nearSearch.tsのデバッグログを改善: 距離計算結果とフィルタリング判定のログ
36
+
37
+ ## [1.3.8] - 2026-01-02
38
+
39
+ ### Fixed
40
+
41
+ - $nearクエリのデバッグログを追加(locationフィールドと距離計算の詳細)
42
+
10
43
  ## [1.3.7] - 2026-01-02
11
44
 
12
45
  ### Fixed
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v1.3.7
2
- // Built: 2026-01-02T13:40:18.082Z
1
+ // @exabugs/dynamodb-client v1.3.11
2
+ // Built: 2026-01-02T14:15:20.621Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -30125,6 +30125,13 @@ async function executeNearSearch(nearQuery, fieldName, limit, searchFunction, co
30125
30125
  }
30126
30126
  const documentsWithDistance = allCandidates.map((doc) => {
30127
30127
  const location = doc[fieldName];
30128
+ if (!location) {
30129
+ console.log("[nearSearch] Location field not found:", {
30130
+ fieldName,
30131
+ docKeys: Object.keys(doc),
30132
+ doc: JSON.stringify(doc).substring(0, 200)
30133
+ });
30134
+ }
30128
30135
  if (!location || typeof location.latitude !== "number" || typeof location.longitude !== "number") {
30129
30136
  return null;
30130
30137
  }
@@ -30134,6 +30141,13 @@ async function executeNearSearch(nearQuery, fieldName, limit, searchFunction, co
30134
30141
  location.latitude,
30135
30142
  location.longitude
30136
30143
  );
30144
+ console.log("[nearSearch] Distance calculated:", {
30145
+ docId: doc.id,
30146
+ distance,
30147
+ maxDistance,
30148
+ minDistance,
30149
+ willBeFiltered: maxDistance !== void 0 && distance > maxDistance || minDistance !== void 0 && distance < minDistance
30150
+ });
30137
30151
  if (maxDistance !== void 0 && distance > maxDistance) {
30138
30152
  return null;
30139
30153
  }
@@ -30576,7 +30590,7 @@ async function executeNearQuery(resource, fieldName, nearQuery, limit, requestId
30576
30590
  DEFAULT_GEOHASH_CONFIG
30577
30591
  );
30578
30592
  const items = result.documents.map((doc) => {
30579
- const cleanRecord = extractCleanRecord(doc);
30593
+ const cleanRecord = removeShadowKeys(doc);
30580
30594
  return {
30581
30595
  ...cleanRecord,
30582
30596
  __distance: doc.__distance