{"action":"created","issue":{"url":"https://api.github.com/repos/joeybaker/remapify/issues/26","labels_url":"https://api.github.com/repos/joeybaker/remapify/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/joeybaker/remapify/issues/26/comments","events_url":"https://api.github.com/repos/joeybaker/remapify/issues/26/events","html_url":"https://github.com/joeybaker/remapify/pull/26","id":53191569,"number":26,"title":"#24 \"Error: write after end\" with browserify 7.x","user":{"login":"jmm","id":129203,"avatar_url":"https://avatars.githubusercontent.com/u/129203?v=3","gravatar_id":"","url":"https://api.github.com/users/jmm","html_url":"https://github.com/jmm","followers_url":"https://api.github.com/users/jmm/followers","following_url":"https://api.github.com/users/jmm/following{/other_user}","gists_url":"https://api.github.com/users/jmm/gists{/gist_id}","starred_url":"https://api.github.com/users/jmm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmm/subscriptions","organizations_url":"https://api.github.com/users/jmm/orgs","repos_url":"https://api.github.com/users/jmm/repos","events_url":"https://api.github.com/users/jmm/events{/privacy}","received_events_url":"https://api.github.com/users/jmm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-12-31T16:35:41Z","updated_at":"2015-01-07T21:56:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joeybaker/remapify/pulls/26","html_url":"https://github.com/joeybaker/remapify/pull/26","diff_url":"https://github.com/joeybaker/remapify/pull/26.diff","patch_url":"https://github.com/joeybaker/remapify/pull/26.patch"},"body":"This is meant to fix #24. I don't know how browserify < 7 worked, but it seems that in >= 7 its pipeline can finish before remapify's globbing and addition of the aliasify transform finishes. I think it's necessary to do the globbing synchronously. This PR makes the globbing synchronous and adjusts the code consuming the glob results accordingly. `globMatch()` is exactly the same -- it's just passed to a different method and its indentation level changed.\r\n\r\nI haven't added any new tests (not yet anyway). After a slight adjustment, all of the existing tests pass. Each test followed a sequence of 1) run plugin, 2) register event handler. I had to swap the sequence because remapify was emitting events before handlers were registered. (I suggest diffing that commit with `--patience`.)\r\n\r\nI haven't tested this extensively, but with a simple trial it works with browserify 6-8, and like I said the tests pass.\r\n\r\nI did try retaining the asynchronous globbing and utilizing streams to make everything work, but I couldn't work that out."},"comment":{"url":"https://api.github.com/repos/joeybaker/remapify/issues/comments/69099522","html_url":"https://github.com/joeybaker/remapify/pull/26#issuecomment-69099522","issue_url":"https://api.github.com/repos/joeybaker/remapify/issues/26","id":69099522,"user":{"login":"jmm","id":129203,"avatar_url":"https://avatars.githubusercontent.com/u/129203?v=3","gravatar_id":"","url":"https://api.github.com/users/jmm","html_url":"https://github.com/jmm","followers_url":"https://api.github.com/users/jmm/followers","following_url":"https://api.github.com/users/jmm/following{/other_user}","gists_url":"https://api.github.com/users/jmm/gists{/gist_id}","starred_url":"https://api.github.com/users/jmm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmm/subscriptions","organizations_url":"https://api.github.com/users/jmm/orgs","repos_url":"https://api.github.com/users/jmm/repos","events_url":"https://api.github.com/users/jmm/events{/privacy}","received_events_url":"https://api.github.com/users/jmm/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T21:56:28Z","updated_at":"2015-01-07T21:56:28Z","body":"@roncli Thanks for the heads up about the error. That didn't manifest itself in my test (and it's also undocumented behavior)."}}