machty / ember-concurrency

ember-concurrency is an Ember Addon that enables you to write concise, worry-free, cancelable, restartable, asynchronous tasks.
http://ember-concurrency.com
MIT License
691 stars 157 forks source link

v2: Provide nice decorators via ember-concurrency-decorators #384

Closed maxfierke closed 3 years ago

maxfierke commented 3 years ago

This sets up some foundational work to begin combining ember-concurrency-decorators, by directly depending upon the current addon but without requiring separate import statements (or a separate dependency in a consuming app or addon's package.json)

It pulls in some base types for decoration options, and delegates the aliases for now to ember-concurrency-decorators. It also clones the decorator tests.

The "ugly" decorators (e.g. (@(task(function* () { ... }).drop()) will remain available by virtue of coming "for free" with the computed-based TaskProperty implementation (necessary to support the classic EmberObject model for task hosts), but will be deprecated in favor these "nice" decorators.

A follow-up PR will convert all the docs to using the "nice" decorators.

A future PR (possibly post a final v2.0.0 release) will seek to fully integrate the "nice" decorators and remove the dependence on computed to provide decorator support for Ember versions that do not require it.

maxfierke commented 3 years ago

superseded by #386