)]}'
{
  "commit": "9f817bc9be4211f10c413d3516cd1620171e7999",
  "tree": "66e06da3f92e93014fdfccb54812d2e7bbb0e3c2",
  "parents": [
    "b878740c72b4da240e62f69d3a9b0002e423ae89"
  ],
  "author": {
    "name": "Nate Bosch",
    "email": "nbosch1@gmail.com",
    "time": "Wed Jun 21 14:32:16 2017 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jun 21 14:32:16 2017 -0700"
  },
  "message": "Add `fromHandlers` for easier broadcast streams (dart-lang/stream_transform#21)\n\nFixes dart-lang/stream_transform#18\r\n\r\nStreamTransformer.fromHandlers constructor does not behave as expected\r\nfor broadcast streams - handlers are called once per listener rather\r\nthan once per event. This means that closures which share state for a\r\nsingle source stream won\u0027t work correctly for broadcast streams with\r\nmultiple listeners. The transformers currently using this pattern are\r\nmost readable with it vs a custom StreamTransformer class for each one,\r\nso add a `fromHandlers` utility which mimics that constructor but only\r\ncalls the handlers once per event and the broadcast multiplexing is done\r\non the other side.\r\n\r\n- Add _StreamTransformers with an overridable handleData and handleDone.\r\n  Eventually handleError will be needed, but this is all that is\r\n  required to solve the bug with `debounce`.\r\n- Add tests for _StreamTransformers across both single-subscrption and\r\n  broadcast streams. All these tests pass with either `new\r\n  StreamTransformers.fromhandlers` or the new `fromhandlers` except the\r\n  \u0027called once\u0027 tests.\r\n- Add a pair of tests for debounce and debounceBuffer which exhibit the\r\n  bug - data is only added to one of the listeners because the Timer is\r\n  overridden to the last listener whose handleData is called.\r\n- Update debounce to use `fromHandlers` and see that the tests pass.\r\n\r\nOther StreamTransformers in this package have the same bug and will be\r\nfixed in subsequent commits.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6f632db1488f7b8f5fc75ce70632fd42d5a607ff",
      "old_mode": 33188,
      "old_path": "pkgs/stream_transform/CHANGELOG.md",
      "new_id": "50c23d83e0bda5c6846f61c2d44b5d1c47c687e8",
      "new_mode": 33188,
      "new_path": "pkgs/stream_transform/CHANGELOG.md"
    },
    {
      "type": "modify",
      "old_id": "8d7870e15dc886b1dfd19ed1203ef9e43ff9fe43",
      "old_mode": 33188,
      "old_path": "pkgs/stream_transform/lib/src/debounce.dart",
      "new_id": "fffb2213f6ed6109ffb1a3733c1cfed9a5250d82",
      "new_mode": 33188,
      "new_path": "pkgs/stream_transform/lib/src/debounce.dart"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8157ea1695466ba2203b9faa0028f7a82298c5bc",
      "new_mode": 33188,
      "new_path": "pkgs/stream_transform/lib/src/from_handlers.dart"
    },
    {
      "type": "modify",
      "old_id": "e8267308d110fa5ad5b14040570fb51fe71efbe1",
      "old_mode": 33188,
      "old_path": "pkgs/stream_transform/pubspec.yaml",
      "new_id": "f1c647ee85743aa02e00b875555fc15c748db21a",
      "new_mode": 33188,
      "new_path": "pkgs/stream_transform/pubspec.yaml"
    },
    {
      "type": "modify",
      "old_id": "a556b41e74d7dd252418c4dbdaec5af85e565e2f",
      "old_mode": 33188,
      "old_path": "pkgs/stream_transform/test/debounce_test.dart",
      "new_id": "a28d2ca32d12de282c9b6dd3120697186caba700",
      "new_mode": 33188,
      "new_path": "pkgs/stream_transform/test/debounce_test.dart"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "28436bd6b2420da14c073ecc10e4ff64151a39f2",
      "new_mode": 33188,
      "new_path": "pkgs/stream_transform/test/from_handlers_test.dart"
    }
  ]
}
