@exabugs/dynamodb-client 1.3.7 → 1.3.12

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,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.12] - 2026-01-02
11
+
12
+ ### Fixed
13
+
14
+ - **重要**: /versionエンドポイントのデフォルトバージョンを1.3.12に更新
15
+ - esbuild設定でPACKAGE_VERSIONをdefineに追加(ビルド時にpackage.jsonのバージョンを埋め込み)
16
+
17
+ ## [1.3.11] - 2026-01-02
18
+
19
+ ### Fixed
20
+
21
+ - テストコードのモック設定を修正: removeShadowKeysをエクスポートに追加
22
+
23
+ ## [1.3.10] - 2026-01-02
24
+
25
+ ### Fixed
26
+
27
+ - **重要**: nearQuery.tsでextractCleanRecordの誤用を修正
28
+ - searchFunctionが返すレコードは既にクリーンな形式(data属性なし)
29
+ - extractCleanRecordではなくremoveShadowKeysを使用するように修正
30
+ - これにより、$near検索で0件が返される問題を解決
31
+
32
+ ## [1.3.9] - 2026-01-02
33
+
34
+ ### Added
35
+
36
+ - 自動テストケースを追加: DynamoDBレコード構造でのlocationフィールド取得テスト
37
+ - 自動テストケースを追加: DynamoDB内部フィールド(PK, SK)が含まれる場合のテスト
38
+
39
+ ### Fixed
40
+
41
+ - nearSearch.tsのデバッグログを改善: locationフィールドが見つからない場合の詳細ログ
42
+ - nearSearch.tsのデバッグログを改善: 距離計算結果とフィルタリング判定のログ
43
+
44
+ ## [1.3.8] - 2026-01-02
45
+
46
+ ### Fixed
47
+
48
+ - $nearクエリのデバッグログを追加(locationフィールドと距離計算の詳細)
49
+
10
50
  ## [1.3.7] - 2026-01-02
11
51
 
12
52
  ### 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.12
2
+ // Built: 2026-01-02T14:58:28.413Z
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
@@ -33439,7 +33453,7 @@ async function handler(event) {
33439
33453
  return createCorsResponse(HTTP_STATUS.OK);
33440
33454
  }
33441
33455
  if (event.requestContext.http.method === "GET" && event.requestContext.http.path === "/version") {
33442
- const version = process.env.DYNAMODB_CLIENT_VERSION || "1.3.6";
33456
+ const version = "1.3.12";
33443
33457
  return createSuccessResponse({ version, timestamp: (/* @__PURE__ */ new Date()).toISOString() }, requestId);
33444
33458
  }
33445
33459
  if (event.requestContext.http.method !== "POST") {