Skip to content

Commit 8a05a08

Browse files
chore(release): 3.0.0 [skip ci]
# [3.0.0](v2.0.1...v3.0.0) (2021-07-20) ### Features * **functions:** all useFunction functions are now async ([01c6ffd](01c6ffd)) ### BREAKING CHANGES * **functions:** all functions async due to an issue that came up during production builds, where minification would optimize away the async/await when the function was a one liner, like: ```ts async () => { return await ... } ``` the `async` keyword was a clue to the `FunctionRunner` to go down a different code branch (before running the function), but when the above example function was minified, it became: ```ts () => { return ... } ``` which then made the `FunctionRunner` go down the sync path, resulting in the `value` being a promise, rather than the resolved value of the promise.
1 parent ed657c4 commit 8a05a08

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

CHANGELOG.md

+31
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
# [3.0.0](https://github.com/NullVoxPopuli/ember-resources/compare/v2.0.1...v3.0.0) (2021-07-20)
2+
3+
4+
### Features
5+
6+
* **functions:** all useFunction functions are now async ([01c6ffd](https://github.com/NullVoxPopuli/ember-resources/commit/01c6ffda29a0fcb02f722077aebc693413d6dd9f))
7+
8+
9+
### BREAKING CHANGES
10+
11+
* **functions:** all functions async due to an issue that came up
12+
during production builds, where minification would optimize away the
13+
async/await when the function was a one liner, like:
14+
15+
```ts
16+
async () => {
17+
return await ...
18+
}
19+
```
20+
the `async` keyword was a clue to the `FunctionRunner` to go down a
21+
different code branch (before running the function), but when the above
22+
example function was minified, it became:
23+
24+
```ts
25+
() => { return ... }
26+
```
27+
28+
which then made the `FunctionRunner` go down the sync path, resulting
29+
in the `value` being a promise, rather than the resolved value of the
30+
promise.
31+
132
## [2.0.1](https://github.com/NullVoxPopuli/ember-resources/compare/v2.0.0...v2.0.1) (2021-07-14)
233

334

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ember-resources",
3-
"version": "2.0.1",
3+
"version": "3.0.0",
44
"keywords": [
55
"ember-addon"
66
],

0 commit comments

Comments
 (0)