I encountered an issue with the cursor function where two syntactically similar usages produce different results. The first usage works as expected, while the second one does not.
[CLI] ♦ Versions:
▸ node.js 18.17.1
▸ cli 1.2.2
▸ @openfn/language-common monorepo
[CLI] ✔ Loading adaptors from monorepo at /Users/openfn/Workspace/adaptors
[CLI] ⚠ Skipping auto-install as monorepo is being used
[CLI] ✔ Loaded state from tmp/state.json
[CLI] ✔ Compiled all expressions in workflow
Setting cursor "now" to: 16:06 4 Jun 2024 (GMT+3)
[R/T] ✔ Completed step job-1 in 190ms
[CLI] ✔ State written to tmp/output.json
[CLI] ✔ Finished in 263ms ✨
[CLI] ♦ Versions:
▸ node.js 18.17.1
▸ cli 1.2.2
▸ @openfn/language-common monorepo
[CLI] ✔ Loading adaptors from monorepo at /Users/openfn/Workspace/adaptors
[CLI] ⚠ Skipping auto-install as monorepo is being used
[CLI] ✔ Loaded state from tmp/state.json
[CLI] ✔ Compiled all expressions in workflow
Setting cursor to: undefined
[R/T] ✔ Completed step job-1 in 246ms
[CLI] ✔ State written to tmp/output.json
[CLI] ✔ Finished in 318ms ✨
Steps to Reproduce:
Run the job with working code with initial state as {}. It will print in CLI logs Setting cursor "now" to: HH:mm D M YYY
Run the job with non-working code with initial state as {}. It will print in CLI logs Setting cursor "now" to: undefined
Description:
I encountered an issue with the
cursor
function where two syntactically similar usages produce different results. The first usage works as expected, while the second one does not.Working Code:
CLI logs for working code
Non-working Code:
CLI Logs for Non-working code
Steps to Reproduce:
{}
. It will print in CLI logsSetting cursor "now" to: HH:mm D M YYY
{}
. It will print in CLI logsSetting cursor "now" to: undefined