Skip to content

Commit

Permalink
Merge pull request #926 from NullVoxPopuli/changeset-release/main
Browse files Browse the repository at this point in the history
Release Preview
  • Loading branch information
NullVoxPopuli authored Jun 23, 2023
2 parents 55c03ab + 7f0c0e2 commit 54d3ea0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 42 deletions.
41 changes: 0 additions & 41 deletions .changeset/shy-badgers-melt.md

This file was deleted.

41 changes: 41 additions & 0 deletions ember-resources/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# ember-resources

## 6.1.1

### Patch Changes

- [#925](https://github.com/NullVoxPopuli/ember-resources/pull/925) [`e320cf8`](https://github.com/NullVoxPopuli/ember-resources/commit/e320cf84b7ba82b6f9a2482bddb57e52732a6cab) Thanks [@NullVoxPopuli](https://github.com/NullVoxPopuli)! - Fix situation where, when composing with blueprint/factory-creted Resources, the owner was not passed to the t`used`d resource.

<details><summay>Example from the added test</summary>

```js
const Now = resourceFactory((ms = 1000) =>
resource(({ on }) => {
let now = cell(nowDate);
let timer = setInterval(() => now.set(Date.now()), ms);

on.cleanup(() => clearInterval(timer));

return () => now.current;
})
);

const Stopwatch = resourceFactory((ms = 500) =>
resource(({ use }) => {
let time = use(Now(ms));

return () => format(time);
})
);

await render(<template><time>{{Stopwatch 250}}</time></template>);
```

The owner is part of the hooks API for `resource` and an error is thrown when it is undefined - regardless if used.

```js
const Demo = resource(({ on, use, owner }) => {
// ...
});
```

</details>

## 6.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion ember-resources/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-resources",
"version": "6.1.0",
"version": "6.1.1",
"keywords": [
"ember-addon"
],
Expand Down

0 comments on commit 54d3ea0

Please sign in to comment.