Skip to content

fix(runtime): support object loop entries - #1149

Open
Gujiassh wants to merge 1 commit into
bytedance:mainfrom
Gujiassh:fix/runtime-loop-object-1089-reroll
Open

fix(runtime): support object loop entries#1149
Gujiassh wants to merge 1 commit into
bytedance:mainfrom
Gujiassh:fix/runtime-loop-object-1089-reroll

Conversation

@Gujiassh

Copy link
Copy Markdown
Contributor

Summary

Closes #1089.

Allow runtime loop execution over object entries in addition to arrays. The loop now preserves the entry value as item, exposes the object key as key, and keeps index as the numeric iteration index.

Validation

  • node common/scripts/install-run-rush.js build --to @flowgram.ai/runtime-js
  • cd packages/runtime/js-core && ./node_modules/.bin/vitest run src/domain/__tests__/schemas/loop.test.ts
  • cd packages/runtime/js-core && ./node_modules/.bin/eslint src/nodes/loop/index.ts src/domain/__tests__/schemas/loop.test.ts
  • cd packages/runtime/js-core && ./node_modules/.bin/tsc --noEmit
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] It seems that the loop node can only traverse lists (arrays) and is not designed to traverse dictionaries (objects)?

1 participant