@gscdump/lakehouse 2.0.4 → 2.0.5

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.
Files changed (2) hide show
  1. package/dist/catalog.mjs +5 -1
  2. package/package.json +1 -1
package/dist/catalog.mjs CHANGED
@@ -288,7 +288,11 @@ async function loadSnapshotId(conn, namespace, table, cache, now) {
288
288
  if (cache) {
289
289
  await cachePut(cache, snapshotRefKey(scope, namespace, table), snapshotId, SNAPSHOT_REF_TTL_MS, now);
290
290
  if (snapshotId != null) {
291
- if (stringifyBigintSafe(metadata).length <= MAX_CACHED_METADATA_BYTES) await cachePut(cache, metadataRefKey(scope, namespace, table, snapshotId), metadata, METADATA_TTL_MS, now);
291
+ const serialized = stringifyBigintSafe(metadata);
292
+ if (serialized.length <= MAX_CACHED_METADATA_BYTES) {
293
+ const cacheableMetadata = JSON.parse(serialized);
294
+ await cachePut(cache, metadataRefKey(scope, namespace, table, snapshotId), cacheableMetadata, METADATA_TTL_MS, now);
295
+ }
292
296
  }
293
297
  }
294
298
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gscdump/lakehouse",
3
3
  "type": "module",
4
- "version": "2.0.4",
4
+ "version": "2.0.5",
5
5
  "description": "Dataset-agnostic Iceberg lakehouse layer + dataset registry for R2 Data Catalog producers (ADR-0021).",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",