fix(deps): update dependency ember-resources to v7 #305
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^6.0.0
->^7.0.0
Release Notes
NullVoxPopuli/ember-resources (ember-resources)
v6.4.2
Compare Source
Patch Changes
#1019
d63d7b7
Thanks @wagenet! - ThekeepLatest
utility previously incorrectly had a| undefined
type for the return value.That's been removed.
| undefined
is still a valid type if the passed value is possibly| undefined
.This made the
| undefined
onkeepLatest
redundant.v6.4.1
Compare Source
Patch Changes
#1011
606ba4b
Thanks @NullVoxPopuli! -trackedFunction
: Fix timing issue where updating tracked data consumed intrackedFunction
would not re-cause theisLoading
state to becometrue
again.Resolves #1010
v6.4.0
Compare Source
Minor Changes
#975
1a964f1
Thanks @NullVoxPopuli! -trackedFunction
can now be composed just like regular resources.The function body still auto-tracks and will update within consuming resource appropriately.
Example
Usage examples:
An async doubler
Example with arguments
Imagine you want to compute the hypotenuse of a triangle,
but all calculations are asynchronous (maybe the measurements exist on external APIs or something).
v6.3.1
Compare Source
Patch Changes
#960
77d54e6
Thanks @NullVoxPopuli! - Resolves: https://github.com/NullVoxPopuli/ember-resources/issues/958use
d Resources can now be immediately returned from other resources.v6.3.0
Compare Source
Minor Changes
#952
1551b33
Thanks @NullVoxPopuli! - Introduce resources as modifiers.This brings alignment with Starbeam's plans for modifiers as a universal primitive.
In ember-resources, using modifiers as resources looks like this:
The signature for the modifier here is different from
ember-modifier
, where positional args and named args are grouped together into an array and object respectively.This signature for ember-resource's
modifier
follows the plain function invocation signature.in Starbeam
v6.2.2
Compare Source
Patch Changes
16b844e
Thanks @NullVoxPopuli! - Update in-editor docs on the function resourcev6.2.1
Compare Source
Patch Changes
#941
bfc432b
Thanks @NullVoxPopuli! - Fix an issue with a new (not yet used feature) where Resources could directly return aCell
, and it would have its.current
method automatically called when resolving the value of a Resource.v6.2.0
Compare Source
Minor Changes
#936
6246a3c
Thanks @NullVoxPopuli! - Theuse
import fromember-resources
now supports an alternate style of usage.This is partly to provide consistency across the different kinds of resources (and resource builders), whether or not arguments are provided.
The motivation from this change comes from trying to better align with Starbeam's composition capabilities, and "define something once, use it anywhere" approach to that composition.
For example, before, only this was possible:
That looks a little awkward, because it looks like
data
is set to a constant.In
TypeScript
, this still worked out, and the type ofdata
would be anumber
,but it still didn't look intuitive.
Now, we can do this:
The key difference here is that
data
is now aReactive<number>
, which, like acell
, has a.current
property.This is a readonly value -- however
current
can still return a mutable data structure.This style of
use
ends up extending nicely to Resources that take arguments:Another approach
I can't recommend this approach for general usage, but it is supported under SemVer (for exploration and feedback).
This should feel familiar as it looks like what we're familiar with when it comes to declaring
@tracked
properties as well as@service
s.However, this has the same problems as
@service
-- in TypeScript, it requires you to usedeclare
and specify a type, which may or may not match the actual type ofStuckClock
.Additionally, whenever we want to pass arguments to the resource, like this:
The arrow function passed to
Clock
would not have the correct this.This is confusing, because in every other situation where we use classes,
the arrow function has the same context as the instance of the class.
But due to how decorators are configured / transpiled, the
this
is actually the surrounding context aroundMyClass
, because decorators are statically applied.So... that's why I want to recommend
property = use(this, Foo)
by default.v6.1.1
Compare Source
Patch Changes
#925
e320cf8
Thanks @NullVoxPopuli! - Fix situation where, when composing with blueprint/factory-creted Resources, the owner was not passed to the tused
d resource.The owner is part of the hooks API for
resource
and an error is thrown when it is undefined - regardless if used.v6.1.0
Compare Source
Minor Changes
#866
e1e4f66
Thanks @NullVoxPopuli! - Add the ability to compose function resources.This is enabled only for function resources as class-based resources could already compose.
how function resources compose
Patch Changes
ff776b1
Thanks @NullVoxPopuli! - Move ember-async-data to "dependencies" because users are not required to import from that package ever"Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.