2.3.0
版本发布时间: 2022-08-24 09:13:24
machty/ember-concurrency最新发布版本:4.0.1(2024-03-09 12:14:30)
NOTE: v2.3.2 simplifies the new task() API even more further; you should upgrade to that (or higher!)
2.3.0
- Introduce async-arrow task() API as the new universal JS/TS API, e.g.
myTask = task(this, { drop: true }, async (arg: string) => {})
. This new API sidesteps the vast majority of TypeScript issues that plagued past decorators- and generators- based APIs. All prior APIs are still supported, but users are strongly recommended to migrate to the new API. Recommended steps:- Finish migrating any classes with EC tasks to ES6 class syntax
- Once you've done that, use the following codemods
- Convert
@task
decorator based APIs to the new async-arrow fn-
npx machty-ember-concurrency-codemods async-arrow-task app/**/*.ts app/**/*.js
-
- If you've used
ember-concurrency-ts
, run the following codemod to removetaskFor()
-
npx machty-ember-concurrency-codemods rm-ember-concurrency-ts app/**/*.ts app/**/*.js
-
- Convert
- The
ember-concurrency-ts
andember-concurrency-async
packages are no longer needed and can be removed - Soft-deprecated (removed from documentation, likely to formally deprecate later)
a number of less commonly used features
- Encapsulated Tasks
- Task Groups