Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

taskgroup

Package Overview
Dependencies
Maintainers
2
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

taskgroup - npm Package Versions

1
14

5.1.0

Diff

Changelog

Source

v5.1.0 2018 July 13

  • 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
bevryme
published 5.0.2 •

Changelog

Source

v5.0.2 2018 July 13

balupton
published 5.0.1 •

Changelog

Source

v5.0.1 2016 June 13

  • Added clear to clearRemaining alias for backwards compatibility between v4 and v5
balupton
published 5.0.0 •

Changelog

Source

v5.0.0 2016 June 4

  • 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
  • Changes to be cautious about:

    • Packaging:
      • require('taskgroup') is no longer the TaskGroup class, you must again do require('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 to false
        • This will be a silent problem, unless coupled with a pauseOnError, onError or onExit deprecation error
      • 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
      • destroy() now operates instantly, including removing all event listeners
        • So if you did .done().destroy().done() the first done listener would be discarded
      • Removed exit() method and exit configuration option
        • They were complex, ambiguous, and undocumented
        • errorOnExcessCompletions and destroyOnceDone configuration options are now provided
      • Replaced onError and pauseOnError configuration options with abortOnError for better clarity
        • Having two or more configuration options for this ability was overly complex
      • Removed sync configuration option
      • Renamed includeInResults configuration option to storeResult with improved functionality
        • If destroyOnceDone is true, storeResult will default to false
      • done(), onceDone(), and whenDone() 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
    • TaskGroup:
      • results state property renamed to result
      • addGroup() method is now addTaskGroup(), alias provided
      • Split nestedConfig configuration option into nestedTaskConfig and nestedTaskGroupConfig
  • Changes to be aware of:

    • Task and TaskGroup:
      • started event has been split into pending and running events for more accurate semantics
      • Less used public APIs have now been marked as private or public depending on their use cases
      • getNames method has been replaced by just names getter, which has its own toString() method that makes use of the nameSeparator configuration option, alias provided
      • getConfig() method now config getter, alias provided
      • isCompleted() method nowcompleted` getter, alias provided
      • hasStarted() method now started getter, alias provided
    • TaskGroup:
      • getTotalItems() method now totalItems getter, alias provided
      • getItemTotals() method now `itemTotals getter, alias provided
    • Task:
      • If domain configuration option is true 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
  • People to thank:

    • Peter Flannery for kickstarting the performance research and making it a priority
  • Issues closed:

balupton
published 4.3.1 •

Changelog

Source

v4.3.1 2015 December 10

  • Removed cyclic.js as the problem it solved was solved by npm v2 and above
balupton
published 4.3.0 •

Changelog

Source

v4.3.0 2015 March 15

  • Now exports the TaskGroup class, of which Task and TaskGroup 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 to true will allow the execution of a Task or TaskGroup to execute synchronously
  • Updated dependencies
balupton
published 4.2.1 •

Changelog

Source

v4.2.1 2015 February 20

  • Output more information about errors when a task completes twice
balupton
published 4.2.0 •

Changelog

Source

v4.2.0 2015 February 2

  • Reintroduced try...catch for Node v0.8 and browser environments with a workaround to prevent error suppression
  • 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
balupton
published 4.1.0 •

Changelog

Source

v4.1.0 2015 February 2

  • This release fixes the errors in completion callbacks being swallowed/lost
  • 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
  • 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)
balupton
published 4.0.5 •

Changelog

Source

v4.0.5 2014 August 3

  • Changed an error output to be of error type
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc