{"action":"opened","number":617,"pull_request":{"url":"https://api.github.com/repos/linkedin/dustjs/pulls/617","id":32630314,"html_url":"https://github.com/linkedin/dustjs/pull/617","diff_url":"https://github.com/linkedin/dustjs/pull/617.diff","patch_url":"https://github.com/linkedin/dustjs/pull/617.patch","issue_url":"https://api.github.com/repos/linkedin/dustjs/issues/617","number":617,"state":"open","locked":false,"title":"Add `chunk.stream` to allow streamables in context","user":{"login":"sethkinast","id":1399532,"avatar_url":"https://avatars.githubusercontent.com/u/1399532?v=3","gravatar_id":"","url":"https://api.github.com/users/sethkinast","html_url":"https://github.com/sethkinast","followers_url":"https://api.github.com/users/sethkinast/followers","following_url":"https://api.github.com/users/sethkinast/following{/other_user}","gists_url":"https://api.github.com/users/sethkinast/gists{/gist_id}","starred_url":"https://api.github.com/users/sethkinast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethkinast/subscriptions","organizations_url":"https://api.github.com/users/sethkinast/orgs","repos_url":"https://api.github.com/users/sethkinast/repos","events_url":"https://api.github.com/users/sethkinast/events{/privacy}","received_events_url":"https://api.github.com/users/sethkinast/received_events","type":"User","site_admin":false},"body":"When Dust finds a streamable in context, it begins capturing the streamable's `data` events and renders the block once for each thunk. If the streamable is a reference, Dust writes the thunks directly into the chunk.\r\n\r\nOther fixes as part of this PR;\r\n* Fix async tests in the Node runner\r\n* Allow functions in Dust context to return functions recursively\r\n* Escape data returned directly from a Thenable (e.g. `{ foo: PromiseFor(\"<evil>\"); }`\r\n\r\nNote: highland.js (browser version) is included as a test lib because the highland repo only exports the Node version as part of its NPM package.\r\n\r\nCloses #616 by reducing the needed code to:\r\n\r\n```\r\nvar recordStream = mydbconn.query('...').stream();\r\nvar ctx = {\r\n   records: recordStream\r\n};\r\ndust.stream('myTemplate', ctx); \r\n```","created_at":"2015-04-04T07:17:57Z","updated_at":"2015-04-04T07:17:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/linkedin/dustjs/pulls/617/commits","review_comments_url":"https://api.github.com/repos/linkedin/dustjs/pulls/617/comments","review_comment_url":"https://api.github.com/repos/linkedin/dustjs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linkedin/dustjs/issues/617/comments","statuses_url":"https://api.github.com/repos/linkedin/dustjs/statuses/d9839ea1ace89b795f15bbf7fc12c1e02a619e7c","head":{"label":"sethkinast:chunk.stream","ref":"chunk.stream","sha":"d9839ea1ace89b795f15bbf7fc12c1e02a619e7c","user":{"login":"sethkinast","id":1399532,"avatar_url":"https://avatars.githubusercontent.com/u/1399532?v=3","gravatar_id":"","url":"https://api.github.com/users/sethkinast","html_url":"https://github.com/sethkinast","followers_url":"https://api.github.com/users/sethkinast/followers","following_url":"https://api.github.com/users/sethkinast/following{/other_user}","gists_url":"https://api.github.com/users/sethkinast/gists{/gist_id}","starred_url":"https://api.github.com/users/sethkinast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethkinast/subscriptions","organizations_url":"https://api.github.com/users/sethkinast/orgs","repos_url":"https://api.github.com/users/sethkinast/repos","events_url":"https://api.github.com/users/sethkinast/events{/privacy}","received_events_url":"https://api.github.com/users/sethkinast/received_events","type":"User","site_admin":false},"repo":{"id":23441887,"name":"dustjs","full_name":"sethkinast/dustjs","owner":{"login":"sethkinast","id":1399532,"avatar_url":"https://avatars.githubusercontent.com/u/1399532?v=3","gravatar_id":"","url":"https://api.github.com/users/sethkinast","html_url":"https://github.com/sethkinast","followers_url":"https://api.github.com/users/sethkinast/followers","following_url":"https://api.github.com/users/sethkinast/following{/other_user}","gists_url":"https://api.github.com/users/sethkinast/gists{/gist_id}","starred_url":"https://api.github.com/users/sethkinast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethkinast/subscriptions","organizations_url":"https://api.github.com/users/sethkinast/orgs","repos_url":"https://api.github.com/users/sethkinast/repos","events_url":"https://api.github.com/users/sethkinast/events{/privacy}","received_events_url":"https://api.github.com/users/sethkinast/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sethkinast/dustjs","description":"Asynchronous templates for the browser and node.js","fork":true,"url":"https://api.github.com/repos/sethkinast/dustjs","forks_url":"https://api.github.com/repos/sethkinast/dustjs/forks","keys_url":"https://api.github.com/repos/sethkinast/dustjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sethkinast/dustjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sethkinast/dustjs/teams","hooks_url":"https://api.github.com/repos/sethkinast/dustjs/hooks","issue_events_url":"https://api.github.com/repos/sethkinast/dustjs/issues/events{/number}","events_url":"https://api.github.com/repos/sethkinast/dustjs/events","assignees_url":"https://api.github.com/repos/sethkinast/dustjs/assignees{/user}","branches_url":"https://api.github.com/repos/sethkinast/dustjs/branches{/branch}","tags_url":"https://api.github.com/repos/sethkinast/dustjs/tags","blobs_url":"https://api.github.com/repos/sethkinast/dustjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sethkinast/dustjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sethkinast/dustjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/sethkinast/dustjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sethkinast/dustjs/statuses/{sha}","languages_url":"https://api.github.com/repos/sethkinast/dustjs/languages","stargazers_url":"https://api.github.com/repos/sethkinast/dustjs/stargazers","contributors_url":"https://api.github.com/repos/sethkinast/dustjs/contributors","subscribers_url":"https://api.github.com/repos/sethkinast/dustjs/subscribers","subscription_url":"https://api.github.com/repos/sethkinast/dustjs/subscription","commits_url":"https://api.github.com/repos/sethkinast/dustjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/sethkinast/dustjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/sethkinast/dustjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/sethkinast/dustjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/sethkinast/dustjs/contents/{+path}","compare_url":"https://api.github.com/repos/sethkinast/dustjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sethkinast/dustjs/merges","archive_url":"https://api.github.com/repos/sethkinast/dustjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sethkinast/dustjs/downloads","issues_url":"https://api.github.com/repos/sethkinast/dustjs/issues{/number}","pulls_url":"https://api.github.com/repos/sethkinast/dustjs/pulls{/number}","milestones_url":"https://api.github.com/repos/sethkinast/dustjs/milestones{/number}","notifications_url":"https://api.github.com/repos/sethkinast/dustjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sethkinast/dustjs/labels{/name}","releases_url":"https://api.github.com/repos/sethkinast/dustjs/releases{/id}","created_at":"2014-08-28T20:27:51Z","updated_at":"2015-03-26T20:29:19Z","pushed_at":"2015-04-04T07:15:17Z","git_url":"git://github.com/sethkinast/dustjs.git","ssh_url":"git@github.com:sethkinast/dustjs.git","clone_url":"https://github.com/sethkinast/dustjs.git","svn_url":"https://github.com/sethkinast/dustjs","homepage":"","size":9792,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"linkedin:master","ref":"master","sha":"1c61da67ba78abf1321150deed03796cc0ce57e7","user":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"repo":{"id":3813151,"name":"dustjs","full_name":"linkedin/dustjs","owner":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkedin/dustjs","description":"Asynchronous templates for the browser and node.js","fork":false,"url":"https://api.github.com/repos/linkedin/dustjs","forks_url":"https://api.github.com/repos/linkedin/dustjs/forks","keys_url":"https://api.github.com/repos/linkedin/dustjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkedin/dustjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkedin/dustjs/teams","hooks_url":"https://api.github.com/repos/linkedin/dustjs/hooks","issue_events_url":"https://api.github.com/repos/linkedin/dustjs/issues/events{/number}","events_url":"https://api.github.com/repos/linkedin/dustjs/events","assignees_url":"https://api.github.com/repos/linkedin/dustjs/assignees{/user}","branches_url":"https://api.github.com/repos/linkedin/dustjs/branches{/branch}","tags_url":"https://api.github.com/repos/linkedin/dustjs/tags","blobs_url":"https://api.github.com/repos/linkedin/dustjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkedin/dustjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkedin/dustjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkedin/dustjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkedin/dustjs/statuses/{sha}","languages_url":"https://api.github.com/repos/linkedin/dustjs/languages","stargazers_url":"https://api.github.com/repos/linkedin/dustjs/stargazers","contributors_url":"https://api.github.com/repos/linkedin/dustjs/contributors","subscribers_url":"https://api.github.com/repos/linkedin/dustjs/subscribers","subscription_url":"https://api.github.com/repos/linkedin/dustjs/subscription","commits_url":"https://api.github.com/repos/linkedin/dustjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkedin/dustjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkedin/dustjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkedin/dustjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkedin/dustjs/contents/{+path}","compare_url":"https://api.github.com/repos/linkedin/dustjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkedin/dustjs/merges","archive_url":"https://api.github.com/repos/linkedin/dustjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkedin/dustjs/downloads","issues_url":"https://api.github.com/repos/linkedin/dustjs/issues{/number}","pulls_url":"https://api.github.com/repos/linkedin/dustjs/pulls{/number}","milestones_url":"https://api.github.com/repos/linkedin/dustjs/milestones{/number}","notifications_url":"https://api.github.com/repos/linkedin/dustjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkedin/dustjs/labels{/name}","releases_url":"https://api.github.com/repos/linkedin/dustjs/releases{/id}","created_at":"2012-03-23T22:20:39Z","updated_at":"2015-04-03T13:28:36Z","pushed_at":"2015-04-02T18:40:19Z","git_url":"git://github.com/linkedin/dustjs.git","ssh_url":"git@github.com:linkedin/dustjs.git","clone_url":"https://github.com/linkedin/dustjs.git","svn_url":"https://github.com/linkedin/dustjs","homepage":"","size":13051,"stargazers_count":1770,"watchers_count":1770,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":328,"mirror_url":null,"open_issues_count":61,"forks":328,"open_issues":61,"watchers":1770,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linkedin/dustjs/pulls/617"},"html":{"href":"https://github.com/linkedin/dustjs/pull/617"},"issue":{"href":"https://api.github.com/repos/linkedin/dustjs/issues/617"},"comments":{"href":"https://api.github.com/repos/linkedin/dustjs/issues/617/comments"},"review_comments":{"href":"https://api.github.com/repos/linkedin/dustjs/pulls/617/comments"},"review_comment":{"href":"https://api.github.com/repos/linkedin/dustjs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linkedin/dustjs/pulls/617/commits"},"statuses":{"href":"https://api.github.com/repos/linkedin/dustjs/statuses/d9839ea1ace89b795f15bbf7fc12c1e02a619e7c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":6409,"deletions":37,"changed_files":9}}