- Updated dependencies, base files, and editions using boundation
- Thank you to the sponsors: Andrew Nesbitt, Balsa, Codecov, Poonacha Medappa, Rob Morris, Sentry, Syntax
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Thank you to the sponsors: Andrew Nesbitt, Balsa, Codecov, Poonacha Medappa, Rob Morris, Sentry, Syntax
- Compatibility with eachr v7
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Minimum required Node.js version changed from
node: >=8
tonode: >=4
adapting to ecosystem changes
- Updated dependencies, base files, and editions using boundation
- Minimum required Node.js version changed from
node: >=10
tonode: >=8
adapting to ecosystem changes
- Updated dependencies, base files, and editions using boundation
- Updated license from
MIT
toArtistic-2.0
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Correctly relocate
safeps
fromdependencies
todevDependencies
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Minimum required node version changed from
node: >=8
tonode: >=10
to keep up with mandatory ecosystem changes
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Updated dependencies, base files, and editions using boundation
- Minimum required node version changed from
node: >=0.8
tonode: >=8
to keep up with mandatory ecosystem changes
- Updated dependencies, base files, and editions using boundation
- Updated base files and editions using boundation
- Updated dependencies
clearRemaining
now returns the number of dropped items,clear
continues to be chainable
- state of taskgroup is now updated before user events are emitted, to accurately represent current state
- this splits
itemDoneCallback
intoitemDoneCallbackUpdateState
anditemDoneCallbackNextState
- this splits
- nested events are now all bound at the same time
task.add
,group.add
, anditem.add
are now all emitted at the same time
- Add support for unbounded
- If a task completed, but had already completed earlier, we will now try to output the task's source for easier debugging
- Updated base files and editions using boundation
- Updated dependencies
- Added
clear
toclearRemaining
alias for backwards compatibility between v4 and v5
-
Changes to be impressed by:
- Dramatic performance improvements
- Improved performance of 10,000 tasks from 13 seconds to 1 seconds
- Improved memory footprint of 10,000 tasks from 130MB to 4MB (taken during completion event)
- Code has moved from CoffeeScript to ESNext
- Documentation is now powered by JSDoc
- Module is published with Editions
- Dramatic performance improvements
-
Changes to be cautious about:
- Packaging:
require('taskgroup')
is no longer the TaskGroup class, you must again dorequire('taskgroup').TaskGroup
- It was too difficult to handle this across multiple environments without polluting scopes
- Task and TaskGroup:
- Once done, the item is now destroyed by default via the
destroyOnceDone
configuration option- This means to add tasks to an already completed TaskGroup, you will need to set
destroyOnceDone
tofalse
- This will be a silent problem, unless coupled with a
pauseOnError
,onError
oronExit
deprecation error
- This means to add tasks to an already completed TaskGroup, you will need to set
- Running and completed tasks are no longer stored
- Completed items are now destroyed by default via TaskGroup's
destroyDoneItems
configuration option - If you wish to store them, use the event listeners and disable
destroyDoneItems
- Completed items are now destroyed by default via TaskGroup's
destroy()
now operates instantly, including removing all event listeners- So if you did
.done().destroy().done()
the first done listener would be discarded
- So if you did
- Removed
exit()
method andexit
configuration option- They were complex, ambiguous, and undocumented
errorOnExcessCompletions
anddestroyOnceDone
configuration options are now provided
- Replaced
onError
andpauseOnError
configuration options withabortOnError
for better clarity- Having two or more configuration options for this ability was overly complex
- Removed
sync
configuration option- It was complex and only had one use case, which turned out was better accomplished without it
- Renamed
includeInResults
configuration option tostoreResult
with improved functionality- If
destroyOnceDone
istrue
,storeResult
will default tofalse
- If
done()
,onceDone()
, andwhenDone()
now only listen for upcoming completions, rather than past- Listening for past completions was too complex and could never guarantee consistent results
timeout
configuration option has been removed- It is actually best and easily accomplished by your own task methods
- Removed configuration options will throw deprecation errors to ease migration
- Once done, the item is now destroyed by default via the
- TaskGroup:
results
state property renamed toresult
addGroup()
method is nowaddTaskGroup()
, alias provided- Split
nestedConfig
configuration option intonestedTaskConfig
andnestedTaskGroupConfig
- Packaging:
-
Changes to be aware of:
- Task and TaskGroup:
started
event has been split intopending
andrunning
events for more accurate semantics- Less used public APIs have now been marked as
private
orpublic
depending on their use cases getNames
method has been replaced by justnames
getter, which has its owntoString()
method that makes use of thenameSeparator
configuration option, alias providedgetConfig()
method nowconfig
getter, alias providedisCompleted() method now
completed` getter, alias providedhasStarted()
method nowstarted
getter, alias provided
- TaskGroup:
getTotalItems()
method nowtotalItems
getter, alias providedgetItemTotals()
method now `itemTotals getter, alias provided
- Task:
- If
domain
configuration option istrue
and domains are not available, an error will result - More accurate error reporting for
completion
event- It a state error occurred, but a argument error did not, it is possible this would not be reported to our done listener, this has been resolved
- done listener's error argument will now always be the stored error
- internal
result
storage now is stored without the error/first argument, as that is stored elsewhere
- If
- Task and TaskGroup:
-
People to thank:
- Peter Flannery for kickstarting the performance research and making it a priority
-
Issues closed:
- Removed
cyclic.js
as the problem it solved was solved by npm v2 and above
- Now exports the TaskGroup class, of which
Task
andTaskGroup
are now children - Added
Task
attribute on the TaskGroup class to allow over-riding of what should be the sub-task class - Added
TaskGroup
attribute on the TaskGroup class to allow over-riding of what should be the sub-taskgroup class - Added the
sync
configuration option, which when set totrue
will allow the execution of a Task or TaskGroup to execute synchronously - Updated dependencies
- Output more information about errors when a task completes twice
- Reintroduced
try...catch
for Node v0.8 and browser environments with a workaround to prevent error suppression- Thanks to kksharma1618 for issue #17
- Closes issue #18
- You can now ignore all the warnings from the v4.1.0 changelog as the behaviour is more or less the same as v4.0.5 but with added improvements
- This release fixes the errors in completion callbacks being swallowed/lost
- Thanks to kksharma1618 for issue #17
- The following changes have been made
- We no longer use
try...catch
at all, if you want error catching in your task, you must not disable domains (they are enabled by default) - why? - We now force exit the domain when the task's method calls its completion callback
- Domains now wrap only the firing of the task's method, rather than the preparation too as before
- Removed superflous check to ensure a task has a method before execution
- Ensured the actual check to ensure a task has a method before execution also checks if the method is actually a function (via checking for
.bind
) as the superflous check did
- We no longer use
- This could introduce the following issues in the following cases:
- You may get errors that were suppressed before now showing themselves, this is good, but it may cause unexpected things to break loudly that were breaking silently before
- If you have domains disabled and an error is thrown, you will get a different flow of logic than before as the error will be caught in your code, not TaskGroup's
- The domain's flow has improved, but this may cause a different flow than you were expecting previously
- This will introduce the following issues in the following cases:
- If you are still on Node v0.8, synchronous errors and perhaps asynchronous errors thrown within your task method will no longer be caught by TaskGroup (due to Node 0.8's crippled domain functionality) and instead will need to be caught by your code either via preferably sent to the task method's completion callback rather than thrown, or via your own try...catch. But please upgrade to Node 0.10 or higher.
- If you are running TaskGroup in a web browser, you will need to catch errors manually or utilise a domain shim (browserify has one by default) - why?
- In other words, this release is the most stable yet, but do run your tests (you should always do this)
- Changed an error output to be of error type
- Added the ability to turn off using domains by setting the new task option
domain
tofalse
(defaults totrue
) - Added the ability to turn off using ambi by setting the new task option
ambi
tofalse
(defaults totrue
)
- Use
setImmediate
instead ofnextTick
to avoid(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
errors - Updated dependencies
- Added support for
done
,whenDone
,onceDone
,once
, andon
configuration options
- Fixed
Recursive process.nextTick detected
error (regression since v4.0.0)
- Significant rewrite with b/c breaks
- Completion listeners should now be accomplished via
.done(listener)
(listens once) or.whenDone(listener)
(listener persists)- These methods are promises in that they will execute the listener if the item is already complete
- They listen for the
done
event
- The execution of tasks and groups have had a great deal of investment to ensure execution is intuitive and consistent across different use cases
- Refer to to
src/lib/test/taskgroup-usage-test.coffee
for the guaranteed expectations across different scenarios
- Refer to to
- In earlier versions you could use
tasks.exit()
during execution to clear remaning items, stop execution, and exit, you can no longer do this, instead use the completion callback with an error, or calltasks.clear()
then the completion callback - Refer to the new public api docs for the latest usage
- Completion listeners should now be accomplished via
- Changes
complete
event is nowcompleted
, but you really should be using the newdone
event or the promise methodsrun
event is nowstarted
- A lot of internal variables and methods have had their functionality changed or removed, if a method or variable is not in the public api, do not use it
- There is now a default
error
andcompleted
listener that will emit thedone
event if there are listeners for it, if there is nodone
event listeners, and an error has occured, we will throw the error - Tasks and groups will now only receive a default name when required, this is to prevent set names from being over-written by the default
- Adding of tasks and groups to a group instance will now return the group instance rather than the added tasks to ensure chainability, if you want the created tasks, use
.createTask(...)
and.createGroup(...)
instead, then add the result manually
- Introductions
passed
,failed
,destroyed
events are new- Task only
- new
timeout
option that accepts a number of milliseconds to wait before throwing an error - new
onError
option that defaults to'exit'
but can also accept'ignore'
which will ignore duplicated exit errors (useful when combined with timeout event)
- new
- TaskGroup only
- new
onError
option that defaults to'exit'
but can also accept'ignore'
which will ignore all task errors - new
setNestedConfig(config)
andsetNestedTaskConfig(config)
options to set configuration for all children
- new
- Added
context
option for Task, to perform a late bind on the method - Asynchronous task methods can now accept optional arguments thanks to new ambi version
- Updated dependencies
- Added extendonclass support
- Added
Task.create
andTaskGroup.create
helpers - Will no longer fail if an invalid argument is passed as configuration
- Updated dependencies
- More descriptive error when a task is fired without a method to fire
- Improvements around adding tasks to task groups and passing arguments to Task and TaskGroup constructors
- Properly fixed v3.3.3 issue while maintaining node.js v0.8 and browserify support
- Thanks to pflannery for pull request #11
- Re-added Node.js v0.8 support (regression since v3.3.3)
- Fixed the v3.3.3 fix
- Fixed possible "(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral." error under certain circumstances
- Don't add or create empty tasks and groups
- Fixed child event bubbling by using duck typing (regression since v3.3.0)
- Better error handling on uncaught task exceptions
- Tasks will now get a default name set to ease debugging
- Bindings are now more explicit
- Improved configuration parsing
- Configuration is now accessed via
getConfig()
- Dropped component.io and bower support, just use ender or browserify
- Re-packaged
- Fixed cyclic dependency problem on windows (since v2.1.3)
- Added bower support
- Component.io compatibility
- Republish with older version of joe dev dependency to try and stop cyclic errors
- Better node 0.8 support when catching thrown errors
- Wrapped Task execution in a domain to catch uncaught errors within the task execution, as well as added checks to ensure the completion callback does not fire multiple times
- These will be reported via the
error
event that the Task will emit- If the Task is part of a TaskGroup, the TaskGroup will listen for this, kill the TaskGroup and emit an
error
event on the TaskGroup
- If the Task is part of a TaskGroup, the TaskGroup will listen for this, kill the TaskGroup and emit an
- These will be reported via the
- Moved from EventEmitter2 to node's own EventEmitter to ensure domain compatibility
- Added
getTotals()
toTaskGroup
- Added
complete()
toTask
- Fixed task run issue under certain circumstances
- Added
exit(err)
function
- Tasks can now have the arguments that are sent to them customized by the
args
configuration option - Group inline functions now support an optional completion callback
- Group events for items now have their first argument as the item the event was for
- Significant rewrite and b/c break
- Split from bal-util / bal-util history