@langfuse/client 4.5.0 → 4.6.0

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/LICENSE CHANGED
@@ -1,5 +1,8 @@
1
- Copyright (c) 2023 Finto Technologies GmbH
1
+ MIT License
2
2
 
3
+ This repository is licensed under the MIT License. Portions of this codebase are derived from posthog/posthog-js-lite by PostHog, which is also licensed under the MIT License.
4
+
5
+ Copyright (c) 2023-2026 Langfuse GmbH
3
6
  Copyright (c) 2022 PostHog (part of Hiberly Inc)
4
7
 
5
8
  Permission is hereby granted, free of charge, to any person obtaining a copy
package/dist/index.cjs CHANGED
@@ -143,7 +143,8 @@ var DatasetManager = class {
143
143
  const itemsResponse = await this.langfuseClient.api.datasetItems.list({
144
144
  datasetName: name,
145
145
  limit: (_a = options == null ? void 0 : options.fetchItemsPageSize) != null ? _a : 50,
146
- page
146
+ page,
147
+ ...(options == null ? void 0 : options.version) && { version: options.version }
147
148
  });
148
149
  items.push(...itemsResponse.data);
149
150
  if (itemsResponse.meta.totalPages <= page) {
@@ -1665,10 +1666,12 @@ var ScoreManager = class {
1665
1666
  return;
1666
1667
  }
1667
1668
  this.eventQueue.push(scoreIngestionEvent);
1668
- this.logger.debug(
1669
- "Added score event to queue:\n",
1670
- JSON.stringify(scoreIngestionEvent, null, 2)
1671
- );
1669
+ if (this.logger.isLevelEnabled(import_core5.LogLevel.DEBUG)) {
1670
+ this.logger.debug(
1671
+ "Added score event to queue:\n",
1672
+ JSON.stringify(scoreIngestionEvent, null, 2)
1673
+ );
1674
+ }
1672
1675
  if (this.eventQueue.length >= this.flushAtCount) {
1673
1676
  this.flushPromise = this.flush();
1674
1677
  } else if (!this.flushTimer) {