fix(langgraph): support falsy command resume values - #2610
Conversation
🦋 Changeset detectedLatest commit: 86baa79 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@langchain/langgraph-checkpoint
@langchain/langgraph-checkpoint-mongodb
@langchain/langgraph-checkpoint-postgres
@langchain/langgraph-checkpoint-redis
@langchain/langgraph-checkpoint-sqlite
@langchain/langgraph-checkpoint-validation
create-langgraph
@langchain/langgraph-api
@langchain/langgraph-cli
@langchain/langgraph
@langchain/langgraph-cua
@langchain/langgraph-supervisor
@langchain/langgraph-swarm
@langchain/langgraph-ui
@langchain/langgraph-sdk
@langchain/angular
@langchain/react
@langchain/svelte
@langchain/vue
commit: |
|
This failure seems unrelated to this PR's code changes. The failing workflow is
The action is pinned to a full commit SHA, but This PR only changes Could a maintainer either add |
Summary
Allow falsy values such as
false,0, and an empty string to be used asCommand.resumevalues.PregelLoopdetermines whether a resume value is present usingresume != null, butmapCommandpreviously used a truthiness check. As aresult, falsy resume values produced no pending writes and caused:
Changes
nullandundefinedas missing resume valuesfalse,0, and""as valid resume valuesTests
pnpm exec vitest run src/pregel/io.mapCommand.test.ts --project unit --typecheck.enabled=falseResult: 14 tests passed.