-
Notifications
You must be signed in to change notification settings - Fork 12
/
changelog
346 lines (189 loc) · 9.61 KB
/
changelog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
2.2.8
* Rewrite interals to be based on asyncblock-generators
2.2.5
* Actually switch from fibers to fibers-scriby
2.2.4
* Switch from fibers to fibers-scriby to include pre-compiled node v4 binaries
2.2.3
* Bump fibers to 1.0.8
2.2.2
* Fix a bug with the previous change
2.2.1
* Fixed an issue with errored tasks not getting cleaned up properly in some cases
2.2.0
* Merged PR https://github.com/scriby/asyncblock/pull/28 (fix an issue with some flow.sync syntaxes, upgrade Esprima)
2.1.26
* Upgrade to fibers 1.0.7
2.1.25
* Upgrade fibers to 1.0.6
2.1.22
* Upgrade esprima to 1.2.2
2.1.21
* Fix an issue with defer variables passed to functions getting replaced improperly
2.1.20
* Ensure only one instance of asyncblock loads per process to avoid some weird interactions between multiple separate includes
2.1.19
* Return a 2 arg function for the task callback to work better with libraries that perform arg length sniffing
2.1.18
* Switch to fibers 1.0.1 from 1.0.0
2.1.16
* Replace Uglify parser with Esprima parser
2.1.15
* Adding "ifError" to wrap callbacks that should only be called in the case of an error
2.1.12
* Just a version bump to trigger re-installing fibers for node v0.10.x
2.1.11
* Upgrading to fibers 1.0.0
2.1.10
* Fix a bug with flow.wait() interfering with defer()'d tasks
2.1.9
* Fix an issue with asyncblock incorrectly reporting line counts as being off in files that have the transformation code commented out.
2.1.8
* Fix an issue with automatic transforms not working a small percentage of the time.
2.1.7
* Fixing an issue with information getting lost when passing an object as an error to a callback waited on by asyncblock.
2.1.6
* Allow the current asyncblock's flow to be gotten from a function called from the current fiber.
2.1.5
* Allow asyncblock transform compilation to be kicked off independently. This allows a build process or otherwise to run the transformations beforehand.
2.1.4
* Fix an instance of errors getting swallowed within nested asyncblocks.
2.1.3
* Allow 2nd arg to be specified to an asyncblock, which acts as the return handler.
2.1.2
* Fix an issue with deferred variables not getting handled correctly if assigned to an object property
2.1.1
* Fix issue with asyncblock not working with Coffeescript
2.1.0
* Update to fibers v0.6.8 for node v0.8 support.
2.0.9
* x().sync() optimization - Reuse the fiber from the outer asyncblock in the inner asyncblock. Lower overhead and same behavior.
* Added "end" function to enumerators which should be called if not iterating through the enumerator to prevent a memory leak.
2.0.8
* Update fibers to version 0.6.7 (windows support)
* (Note that something with maintaining line numbers in source transformation looks off on Windows)
* Get rid of use of Fibers global variable per https://github.com/laverdet/node-fibers/issues/72
2.0.7
* Update fibers version to 0.6.5
2.0.6
* Integrate JSHint and remove leaked global variables
2.0.5
* Adding firstArgIsError option to allow not treating the first argument passed to the callback as an error
2.0.4
* Correcting an issue with additional newlines getting added when a reference to a defer variable was the last in a block
2.0.3
* Updating uglify-js_scriby to 1.2.5-6 to correct an issue with newlines getting lost after certain expression types
2.0.2
* Source transformation takes 33% less time in benchmark
* Fixed an issue with assigning to or using a deferred variable before it was assigned by the deferred statement
2.0.1
* Fixing an issue with errors not getting thrown when waiting on a specific key
2.0.0
* Source transformation functions asyncFunction.sync, asyncFunction.future, and asyncFunction.defer released
* Deprecated flow.func & asyncblock.wrap in lieu of source transformation being a better solution
* You can now pass the same args to sync, future, & defer as you can to flow.add
* Added benchmark for source transformation
* Updated documentation
1.9.6
* Over 2x performance improvement when walking AST during source transformation
1.9.5
* Improved parser for source transformation and some performance improvement (more to come)
1.9.4
* Beta release of source transformation of asyncFunction.sync, asyncFunction.future, asyncFunction.defer
1.9.3
* Fixing a bug similar to the one fixed for 1.9.1, except when an actual Error is returned instead of a string
1.9.2
* Fix an issue with the first task added without a key not reporting its error correctly
1.9.1
* Fix a bug with an error not getting handled properly if it was returned to a callback within a nested asyncblock before the inner asyncblock waited on an async call
1.9.0
* Refactored code for easier maintenance
* Created benchmark tests to detect performance and memory regressions
* Fixed memory leak introduced in 1.8.0
1.8.0
* Enumerators!
1.7.0
* Adding new flow.sync usage
* var contents = flow.sync(fs.readFile(path, 'utf8', flow.add()));
* Adding flow.future
* var future = flow.future(fs.readFile(path, 'utf8', flow.add()));
* fs.readFile(path, 'utf8', flow.future());
1.6.6
* Adjusting behavior around double callback logic, as sometimes it's necessary when one asyncblock's error handler came from a flow.add()
1.6.5
* Make capturing full stack traces the default behavior (use asyncblock.nostack for old behavior)
* If an exception is thrown directly from the fiber, make sure full stack trace information gets appended to it
* Tie together call stacks from nested asyncblocks (meaning that if asyncblock is used every time before making an async call, full stack traces will always be preserved)
* Improve performance of capturing the initial stack trace
1.6.2
* Fixing an issue with an error not getting reported properly with nested asyncblocks when one asyncblock doesn't set an errorCallback
* Fixing an issue that occured if flow.wait was called within a function called by flow.sync
1.6.1
* Made a change to not reuse fiber on the current stack when creating a new asyncblock by default to allow for better parallelization.
1.6
* Re-organized documentation
1.5.6
* Changing flow.queue to accept function arguments for consistency
1.5.5
* Added flow.set & flow.get
* Allow passing of args in flow.func.future & flow.func.sync
1.5
* flow.func now returns a function that can be invoked at any time to get the result instead of calling .sync()
1.4.5
* flow.wait changed to not wait on futures
* Bugfix: If a task was added with flow.queue, it can be waited on by key with flow.wait
* flow.func chained syntax now supports queueing tasks
1.4
* New syntactic sugar: flow.func chained syntax.
1.3.1
* Bugfix: If an async method on a wrapped object is called after a nested asyncblock, the error handling context would get switched to the nested asyncblock
* When wrapping, don't attempt to guess if the function is async or not. Rely on the caller to not attempt to call non-async style methods.
1.3.0
* Creating an asyncblock when currently running in a fiber reuses the fiber, giving a 30x performance boost when creating nested asyncblocks
1.2.3
* Update fibers dependency to 0.6.4
1.2.2
* Bugfix: If a call to sync or future on a wrapped object calls its callback immediately (before going async), an error occurred.
1.2.1
* Adding caching for asyncblock.wrap calls
1.2.0
* Added asyncblock.wrap, a simple way to get synchronous style access to a module's async functions.
1.1.0
* BREAKING CHANGE - If the callback to an async task passes more than one parameter, only the first will be kept (instead of converting to an array).
Pass a responseFormat to add to get the other arguments.
1.0.0
* flow.sync added as a shorthand for executing a single task in series
* When ignoring errors, return an Error object if an error occurred during the task
* Fixed a bug with flow.queue when queueing only tasks that finish immediately before calling wait
* Added asyncblock.fullstack to provide more stack trace information (15x slower than plain asyncblock)
* Improved stack traces. You can now see the line where the original error occurred from, even if it originated from an async callback, and some other improvements.
0.9.3
* When throwing a caught error from the fiber, throw it in a nextTick so it has some effect.
0.9.2
* Allow timeouts to not throw errors by passing timeoutIsError: false to add or queue, or set flow.timeoutIsError = false
* Allow object bag syntax for flow.queue as well, to specify parameters key, responseFormat, timeout, timeoutIsError
0.9.1
* Fix bug: When waiting on a task by key that returns a falsey value, the fiber yielded forever
0.9.0
* flow.taskTimeout can be set, which will prevent a task from running for more than the specified number of milliseconds
* If a task's callback is called more than once, an Error will be thrown. This can help point out bugs in user code.
* If a task returned an error that is not of type Error, it is automatically converted. This will help keep call stack information when using system libraries that return strings
* An object bag may be passed to flow.add to specify parameters key, responseFormat, and timeout
0.8.0
* Allow an argument to be passed to flow.wait to wait on a single key
0.7.5
* New functions: addIgnoreError, callbackIgnoreError, queueIgnoreError for cases where you want to explicitly ignore errors
0.7.1
* Performance optimization
0.7.0
* Added support for asynchronously adding tasks via flow.forceWait, flow.queue, and flow.doneAdding
0.6.0
* Added support for throttling active tasks via maxParallel
0.5.0
* Added support for keeping the call stack across async boundary
0.4.0
* Fix memory leak when creating an asyncblock
0.0.7
* Performance improvements
0.0.6
* Adding flow.errorCallback for simplified error handling