ember-concurrency

ember-concurrency is an Ember Addon that enables you to write concise, worry-free, cancelable, restartable, asynchronous tasks.

MIT License

Downloads
447.6K
Stars
688
Committers
76

Bot releases are hidden (Show)

ember-concurrency -

Published by maxfierke almost 4 years ago

New features

  • Implement decorators from ember-concurrency-decorators (#386). The "nice" decorators
    from ember-concurrency-decorators are now built-in to ember-concurrency, without
    requiring an additional addon or seperate import. All decorators are available for
    import directly from the top-level ember-concurrency package.

    Many thanks to @buschtoens for years of stewardship of that addon, and important contributions from @chancancode for TypeScript support, and others in the community to get it to a place where it's seen wide adoption in the world of Ember Octane, TypeScript, and native ES classes.

    Addon maintainers: Please see notes in UPGRADING-2.x.md if you're using
    decorators currently, and wish to support both ember-concurrency 1.x and 2.x at
    runtime.

Documentation

  • Rewrite documentation to use native classes and decorators, and update tutorial
    to show rewriting of async function code, rather than Promise code, as is more common
    today (#387, #389)
ember-concurrency - 2.0.0-beta.2

Published by maxfierke almost 4 years ago

Enhancements

  • Migrate task lifetimes to @ember/destroyable underneath, rather than
    patching willDestroy (#377).

    Potentially breaking: this drops support for Node 8 and Ember < 3.8 LTS

Bugfixes

  • Ensure encapsulated task state can be accessed on the TaskInstance (#381, #383)

    Note: this uses Proxy and WeakMap, which may need to be polyfilled/unavailable on
    older browsers.

  • Make sure task/group-level state field is tracked (#382)

Removals

  • Drop unused broccoli-file-creator and ember-maybe-import-regenerator
    dependencies.

    Note on ember-maybe-import-regenerator: This was originally added back when
    generator support in browsers was far lower and Babel 5 and 6 were used. The
    addon does nothing for Babel 7, which is used for ember-concurrency these
    days. Tweaking config/targets.js or adding the regenerator Babel plugin to
    your babel config can be done instead if the regenerator runtime is needed
    to transpile generators for older browsers.

Other

  • [dev] Upgrade Ember-CLI to 3.22 (#380)
ember-concurrency - 2.0.0-beta.1

Published by maxfierke about 4 years ago

Enhancements

  • Port over changes from 1.1.6 through 1.3.0 (#367)

  • Use @tracked underneath on Ember 3.16+ (#354)

    Note: Within applications with both tracked & computed properties,
    if using a native getter to access task state, and wishing to use it
    alongside a computed property, @dependantKeyCompat will need to be used on
    the getter as expected with any other tracked-prop using getter.

Bugfixes

  • Fixes the deprecated -task-property module (for compatibility w/ some
    external addons). TaskProperty is available at the top-level.

Removals

  • Remove ability to directly use tasks with {{action}} helper stuff
    (deprecated in 1.3.0) (#374)
  • Remove get and set compatibility methods from Task, TaskGroup,
    and TaskInstance.

Documentation about upgrading to 2.0.0-beta.1 and other future 2.x releases in
general can be found in UPGRADING-2.x.md

ember-concurrency - 1.3.0

Published by maxfierke about 4 years ago

New Features

  • Add animationFrame yieldable helper. Yielding animationFrame() will
    pause a task until after the next animation frame using the native
    requestAnimationFrame() browser API.

    Note: ember-concurrency tasks are scheduled on the runloop, so this will
    not cause the remainder of the task to instead run during the next animation
    frame, but the runloop after the next animation frame. (#365, thanks @Turbo87!)

  • Add hashSettled helper for cancellation-aware implementation of RSVP's hashSettled (#353, thanks @kwliou!)

Bugfixes

  • Add missing types for linked() and unlinked() (Fixes #373)

Deprecations

  • Deprecate direct usage of task with action helper and disable tests for it
    on 3.20+.

    This feature unfortunately depends on private APIs that will be removed in
    Ember 3.25. Unfortunately, the mechanism was already removed in Ember 3.20,
    making it impossible to support this for releases at least until recent
    canaries where it was re-introduced with a deprecation. However, the feature
    is rarely used, only documented in this changelog, and frequently breaks
    whenever the private constant it depends on moves modules internally
    throughout new versions of Ember.

    It will continue to remain available for Ember < 3.20, but will not be
    available in Ember-Concurrency 2.0, and will show a deprecation warning from
    1.3.0 forward.

    Any existing uses can be converted to using {{perform}} directly or
    wrapping the task in (perform) before passing to {{action}} or {{fn}}

    Before:

    <button onClick={{action someTask}}>My button</button>
    

    After:

    {{!-- Any of these --}}
    <button {{on "click" (perform someTask)}}>My button</button>
    <button onClick={{perform someTask}}>My button</button>
    <button onClick={{action (perform someTask)}}>My button</button>
    <button onClick={{fn (perform someTask)}}>My button</button>
    
ember-concurrency - 1.2.1

Published by maxfierke over 4 years ago

Bugfixes

  • Correct types for encapsulated tasks to allow accessing encapsulated task state (#362, thanks @chancancode!)
  • Correct types to reflect that Task, TaskInstance, and TaskGroup extend EmberObject (#363, thanks @jamescdavis!)
ember-concurrency - 1.2.0

Published by maxfierke over 4 years ago

New Features

  • Introduce official TypeScript definitions targeting the last 3 versions of
    TypeScript. A big, big thank you to @chancancode for this heroic effort!
    Also, a thank you to all others before who worked on previous iterations of
    typing experiments for ember-concurrency and provided feedback. If you were
    using one of the community-provided solutions or other custom type definitions,
    you will likely need to remove those and refactor to adhere to the new official
    types.
    (#357)

    For more information about using TypeScript with ember-concurrency, please see the new docs page

ember-concurrency - 1.1.7

Published by maxfierke over 4 years ago

Bugfixes

  • Fix waitForProperty on non-EmberObject hosts (i.e. native classes) (#352. Fixes #292. Thanks @andrewfan for the find!)
ember-concurrency - 1.1.6

Published by maxfierke over 4 years ago

Enhancements

  • Add support for waitForEvent helper on host objects supporting 'on' API. Previously, waitForEvent only supported DOM-like objects with addEventListener/removeEventListener or jQuery-like objects with one/off, but did not support those with just on/off. (#348. Fixes #164)
ember-concurrency - 2.0.0-alpha.0

Published by maxfierke over 4 years ago

Breaking Changes

  • Currently, there are no known breaking changes related to user-facing APIs. Paths to various private modules have changed, so if you were depending on those, they may need to be updated. Please open an issue and let us know what you're using them for.

Enhancements

  • @machty refactored & cleaned up the scheduler and core to rely less on computed properties, and potentially make the core extractable and usable in non-Ember environments. (#302)

Bugfixes

  • Fixes derived state related bugs (#175, #278, potentially more)

Notes

  • This is a pre-release, so we don't necessarily recommend its use in production, but would love your feedback.
  • There may be breaking changes in future 2.0.0 pre-releases.
ember-concurrency - 1.1.5

Published by maxfierke almost 5 years ago

Bugfixes

  • Avoid auto-tracking rerender assertion / infinite rerender during cancellation in certain contexts in Ember 3.15+ (#341, Fixes #340)
ember-concurrency - 1.1.4

Published by maxfierke almost 5 years ago

Bugfixes

  • Avoid auto-tracking rerender assertion thrown in certain contexts in Ember 3.15+ (#338, fixed #337 thanks @Turbo87 for the report!)
  • Fix passing tasks into action helper directly on Ember 2.8 (yes, 2.8)
ember-concurrency - 1.1.3

Published by maxfierke almost 5 years ago

Bugfixes

  • Fix issue where rawTimeout, waitForEvent, and waitForQueue helper timers
    were not properly canceled or cleaned up in some cases, such as when used with
    Task-aware Promise helpers such as race. (Fixes #309, #329)
  • Fix use of Tasks with action and fn helpers in Ember 3.x (#312, #333. Thanks @thiagofelix for the find!)

Documentation

  • Remove 404'd link on outdated regenerator runtime removal
  • Document task syntax for use with ES native classes and Ember Octane
ember-concurrency - 1.1.2

Published by maxfierke almost 5 years ago

Bugfixes

  • Fixes remaining issue using task groups w/ ES native classes/Glimmer components (thanks @jrjohnson, #324)

Miscellaneous

  • Add some test coverage for use with ES native classes and stage 1 decorators
ember-concurrency - 1.1.1

Published by maxfierke about 5 years ago

Bugfixes

  • Fix use of task groups with ES native class components (#321, thanks @jrjohnson)

Enhancements / docs

  • Document and export rawTimeout helper in top-level ember-concurrency module. (#310, thanks @Turbo87)
ember-concurrency - 1.1.0

Published by maxfierke about 5 years ago

Enhancements

  • Babel 7 (#317)
  • Assert argument is an Array for Promise helpers (race, all, allSettled) (#313, thanks @buschtoens!)
  • Throw an error in waitForQueue when queue does not exist (#314, @mydea!)

Bugfixes

  • Resolve warning about colliding ember-maybe-import-regenerator versions (#316, thanks @jherdman!)
  • Fix service injection on nested encapsulated tasks on Ember 3.13+ (#318)
  • Use clearTimeout() instead of clearInterval() on timer set with setTimeout (#309, thanks @Turbo87!)

Docs

  • Document options for cancelAll() (#305, thanks @ggayowsky!)

Other

  • [dev] Upgrade Ember-CLI to 3.12 (#317)
  • [dev] Upgrade ember-cli-sass to enable use on Node 12 (#299, thanks @buschtoens!)
ember-concurrency -

Published by machty over 5 years ago

1.0.0

  • No changes, just a long overdue 1.0 release :)
ember-concurrency -

Published by machty over 5 years ago

Drops support for older unsupported LTS releases.
Fixes deprecation warning in beta.

ember-concurrency - Support Ember Canary

Published by machty over 5 years ago

Internal upgrades to comply with new low level Descriptor API in newer versions of Ember.

ember-concurrency - Yield Forever

Published by machty over 5 years ago

0.8.27

  • Fix Ember.Logger deprecations (#266)
  • Add the ability to yield forever to pause a task indefinitely (#274)
  • Better error messaging for later versions of Ember (#270)
ember-concurrency -

Published by machty about 6 years ago

0.8.21
Fixes ES5 getter syntax on Ember Canary (#248)

Package Rankings
Top 1.25% on Npmjs.org
Top 9.55% on Proxy.golang.org
Badges
Extracted from project README
Build Status NPM Ember Observer Score