@langchain/langgraph-checkpoint-mongodb 0.0.2 → 0.0.4

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/README.md CHANGED
@@ -48,7 +48,6 @@ const checkpoint = {
48
48
  }
49
49
  },
50
50
  pending_sends: [],
51
- current_tasks: {}
52
51
  }
53
52
 
54
53
  // store checkpoint
package/dist/index.cjs CHANGED
@@ -108,12 +108,13 @@ class MongoDBSaver extends langgraph_checkpoint_1.BaseCheckpointSaver {
108
108
  */
109
109
  async *list(config, options) {
110
110
  const { limit, before, filter } = options ?? {};
111
- let query = {};
112
- if (config?.configurable) {
113
- query = {
114
- thread_id: config.configurable.thread_id,
115
- checkpoint_ns: config.configurable.checkpoint_ns ?? "",
116
- };
111
+ const query = {};
112
+ if (config?.configurable?.thread_id) {
113
+ query.thread_id = config.configurable.thread_id;
114
+ }
115
+ if (config?.configurable?.checkpoint_ns !== undefined &&
116
+ config?.configurable?.checkpoint_ns !== null) {
117
+ query.checkpoint_ns = config.configurable.checkpoint_ns;
117
118
  }
118
119
  if (filter) {
119
120
  Object.entries(filter).forEach(([key, value]) => {
package/dist/index.js CHANGED
@@ -105,12 +105,13 @@ export class MongoDBSaver extends BaseCheckpointSaver {
105
105
  */
106
106
  async *list(config, options) {
107
107
  const { limit, before, filter } = options ?? {};
108
- let query = {};
109
- if (config?.configurable) {
110
- query = {
111
- thread_id: config.configurable.thread_id,
112
- checkpoint_ns: config.configurable.checkpoint_ns ?? "",
113
- };
108
+ const query = {};
109
+ if (config?.configurable?.thread_id) {
110
+ query.thread_id = config.configurable.thread_id;
111
+ }
112
+ if (config?.configurable?.checkpoint_ns !== undefined &&
113
+ config?.configurable?.checkpoint_ns !== null) {
114
+ query.checkpoint_ns = config.configurable.checkpoint_ns;
114
115
  }
115
116
  if (filter) {
116
117
  Object.entries(filter).forEach(([key, value]) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-checkpoint-mongodb",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "LangGraph",
5
5
  "type": "module",
6
6
  "engines": {
@@ -34,13 +34,13 @@
34
34
  "mongodb": "^6.8.0"
35
35
  },
36
36
  "peerDependencies": {
37
- "@langchain/core": ">=0.2.20 <0.3.0",
38
- "@langchain/langgraph-checkpoint": "~0.0.1"
37
+ "@langchain/core": ">=0.2.31 <0.4.0",
38
+ "@langchain/langgraph-checkpoint": "~0.0.6"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@jest/globals": "^29.5.0",
42
42
  "@langchain/langgraph-checkpoint": "workspace:*",
43
- "@langchain/scripts": ">=0.1.2 <0.2.0",
43
+ "@langchain/scripts": ">=0.1.3 <0.2.0",
44
44
  "@swc/core": "^1.3.90",
45
45
  "@swc/jest": "^0.2.29",
46
46
  "@tsconfig/recommended": "^1.0.3",
@@ -61,7 +61,7 @@
61
61
  "jest-environment-node": "^29.6.4",
62
62
  "prettier": "^2.8.3",
63
63
  "release-it": "^17.6.0",
64
- "rollup": "^4.5.2",
64
+ "rollup": "^4.23.0",
65
65
  "ts-jest": "^29.1.0",
66
66
  "tsx": "^4.7.0",
67
67
  "typescript": "^4.9.5 || ^5.4.5"